Official implementation for experiments in the paper "Evaluation of Fake News Detection with Knowledge-Enhanced Language Models".
In Proceedings of the Sixteenth International AAAI Conference on Web and Social Media (AAAI ICWSM-2022).
Fake news detection with BERT, RoBERTa and various knowledge-enhanced PLMs including ERNIE, KnowBert, KEPLER and K-ADAPTER.
Experimented on LIAR and COVID-19 dataset.
git clone https://github.com/chenxwh/fake-news-detection.git
cd fake_news_detection
bash install_libs
To train or test on ERNIE, KnowBert, KEPLER and K-ADAPTER, we need to download the pretrained weights from the corresponding repositories.
After downloading the wieghts, change the path to the weights in src/config.yaml
.
Modify hyper-parameters in src/config.yaml
.
Run following to train and rest on the fake news detection datasets
cd src
python main.py --mode train --dataset liar --model bert-base --num_labels 6 --logging --verbose
python main.py --mode test --dataset liar --model bert-base --num_labels 6 --logging
if you find the work helpful, please consider citing:
@inproceedings{whitehouse2022evaluation,
title={Evaluation of Fake News Detection with Knowledge-Enhanced Language Models},
author={Whitehouse, Chenxi and Weyde, Tillman and Madhyastha, Pranava and Komninos, Nikos},
booktitle={Proceedings of the International AAAI Conference on Web and Social Media},
volume={16},
pages={1425--1429},
year={2022}
}