Giter Site home page Giter Site logo

ahren09 / finerfact Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 5.0 48 KB

PyTorch implementation for the FinerFact model in the AAAI 2022 paper Towards Fine-Grained Reasoning for Fake News Detection

License: MIT License

Python 99.51% Shell 0.49%
text-classification fake-news text-mining python fakenewsdetection fakenews natural-language-processing aaai2022 aaai misinformation

finerfact's Introduction

FinerFact

This is the PyTorch implementation for the FinerFact model in the AAAI 2022 paper Towards Fine-Grained Reasoning for Fake News Detection (Arxiv).

@article{jin2021towards,
  title={Towards Fine-Grained Reasoning for Fake News Detection},
  author={Jin, Yiqiao and Wang, Xiting and Yang, Ruichao and Sun, Yizhou and Wang, Wei and Liao, Hao and Xie, Xing},
  journal={arXiv preprint arXiv:2110.15064},
  year={2021}
}

The implementation is based on HuggingFace Transformers and KernelGAT.

Installation

  • Run conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.2 -c pytorch. conda is preferred over pip due to its stability on Windows

Instruction to run code

  • Take politifact as an example. Make sure you have put the following training and test files under data/.
    • Train_bert-base-cased_politifact_130_5.pt
    • Test_bert-base-cased_politifact_130_5.pt
  • If the Train_*.pt and Test_*.pt files are not present, you can run preprocess/preprocess.py to split the training data (e.g. bert-base-cased_politifact_130_5.pt) into Train_*.pt and Test_*.pt. You can download the data here
  • Download the files for pretrained BERT model and put them under bert_base/. You should have the following 3 files in bert_base/:
    • pytorch_model.bin
    • vocab.txt
    • bert_config.json
  • make sure you have set the root path given by get_root_dir() in utils/utils to your own data path of fake_news_data/. Mine is root = "C:\\Workspace\\FakeNews\\fake_news_data" on Windows and root = "../../fake_news_data"
  • run the train.py file using kgat/ as the working directory:
    • python train.py --outdir . --config_file P.ini, or
    • python train.py --outdir . --config_file G.ini

finerfact's People

Contributors

ahren09 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

finerfact's Issues

Request for Access to Dataset for Reproducing Results in "FinerFact" Paper

Dear Dr. Jin and Dr. Liao,

I hope this email finds you well. My name is Zhang Weijian, and I am a Ph.D. candidate in Computer Science at the University of Macau, currently conducting research on fake news detection.

I recently came across your paper titled "Towards Fine-Grained Reasoning for Fake News Detection" on arXiv (https://arxiv.org/abs/2110.15064) and found it highly relevant and insightful for my research. I am particularly interested in reproducing the results presented in your paper to further understand and build upon your work.

I have accessed the code provided in your GitHub repository (https://github.com/Ahren09/FinerFact). However, I noticed that the dataset required to run the experiments is not included. Given the recent restrictions imposed by Twitter on API access, I am unable to independently download the necessary Twitter data to recreate the dataset.

Therefore, I am writing to kindly request if you could share the dataset used in your study. Access to this dataset would be invaluable for my research, allowing me to accurately replicate your findings and contribute to the ongoing research in this field. I assure you that any data shared will be used strictly for academic purposes and in accordance with data privacy and ethical guidelines.

Thank you very much for your time and consideration. I look forward to your positive response.

Best regards,

Zhang Weijian
Ph.D. Candidate, Computer Science
University of Macau
[email protected]

lack utils.utils_case_study file

for kgat/test.py
from utils.utils_case_study import load_case_study is error.
in utils file, there is no utils.utils_case_study.py file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.