Official implementation of the Fake News Revealer paper
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.5KB

2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # FakeNewsRevealer
  2. Official implementation of the "Fake News Revealer (FNR): A Similarity and Transformer-Based Approach to Detect
  3. Multi-Modal Fake News in Social Media" paper [(ArXiv Link)](https://arxiv.org/pdf/2112.01131.pdf).
  4. ## Requirments
  5. FNR is built in Python 3.6 using PyTorch 1.8. Please use the following command to install the requirements:
  6. ```
  7. pip install -r requirements.txt
  8. ```
  9. ## How to Run
  10. First, place the data address and configuration into the config file in the data directory, and then follow the train
  11. and test commands.
  12. ### train
  13. To run with Optuna for parameter tuning use this command:
  14. ```
  15. python main --data "DATA NAME" --use_optuna "NUMBER OF OPTUNA TRIALS" --batch "BATCH SIZE" --epoch "EPOCHS NUMBER"
  16. ```
  17. To run without parameter tuning, adjust your parameters in the config file and then use the below command:
  18. ```
  19. python main --data "DATA NAME" --batch "BATCH SIZE" --epoch "EPOCHS NUMBER"
  20. ```
  21. ### test
  22. In the test step, at first, make sure to have the requested 'checkpoint' file then run the following line:
  23. ```
  24. python main --data "DATA NAME" --just_test "REQESTED TRIAL NUMBER"
  25. ```
  26. ## Bibtex
  27. Cite our paper using the following bibtex item:
  28. ```
  29. @misc{ghorbanpour2021fnr,
  30. title={FNR: A Similarity and Transformer-Based Approach to Detect Multi-Modal Fake News in Social Media},
  31. author={Faeze Ghorbanpour and Maryam Ramezani and Mohammad A. Fazli and Hamid R. Rabiee},
  32. year={2021},
  33. eprint={2112.01131},
  34. archivePrefix={arXiv},
  35. }
  36. ```