Faeze 8a7e663616 some changes to store losses and embeddings | 2 years ago | |
---|---|---|
data | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 3 years ago | |
README.md | 2 years ago | |
data_loaders.py | 2 years ago | |
evaluation.py | 2 years ago | |
image.py | 2 years ago | |
learner.py | 2 years ago | |
lime_main.py | 2 years ago | |
main.py | 2 years ago | |
model.py | 2 years ago | |
optuna_main.py | 2 years ago | |
requirements.txt | 2 years ago | |
test_main.py | 2 years ago | |
text.py | 2 years ago | |
torch_main.py | 2 years ago | |
utils.py | 2 years ago |
Official implementation of the “Fake News Revealer (FNR): A Similarity and Transformer-Based Approach to Detect Multi-Modal Fake News in Social Media” paper (ArXiv Link).
FNR is built in Python 3.6 using PyTorch 1.8. Please use the following command to install the requirements:
pip install -r requirements.txt
First, place the data address and configuration into the config file in the data directory, and then follow the train and test commands.
To run with Optuna for parameter tuning use this command:
python main --data "DATA NAME" --use_optuna "NUMBER OF OPTUNA TRIALS" --batch "BATCH SIZE" --epoch "EPOCHS NUMBER"
To run without parameter tuning, adjust your parameters in the config file and then use the below command:
python main --data "DATA NAME" --batch "BATCH SIZE" --epoch "EPOCHS NUMBER"
In the test step, at first, make sure to have the requested ‘checkpoint’ file then run the following line:
python main --data "DATA NAME" --just_test "REQUESTED TRIAL NUMBER"
Cite our paper using the following bibtex item:
@misc{ghorbanpour2021fnr,
title={FNR: A Similarity and Transformer-Based Approach to Detect Multi-Modal Fake News in Social Media},
author={Faeze Ghorbanpour and Maryam Ramezani and Mohammad A. Fazli and Hamid R. Rabiee},
year={2021},
eprint={2112.01131},
archivePrefix={arXiv},
}