This is official repository for "Leveraging Multi-Perspective LLM-Generated Rationales for Explainable Fake News Detection".
The origin news texts data used in the experiments can be found at the official links provided:
- The LIAR dataset can be accessed at the publisher's site, get the origin liar dataset project and cite the paper.
- The GossipCop dataset can be found by following the FakeNewsNet project and cite the paper.
Note: The data used in use is not the origin Liar and GossipCop dataset, but the data obtained through step Explainable Features.
The explainable features are generated using the Qwen model or a locally deployed LLaMa3 model. You need to set your API_KEY in the rationale_generator.py file and modify the LLM instructions according to the provided template.
- python==3.10.14
- CUDA==13.4
- All other dependencies can be obtained in requirements.txt.
- installed by running the following command:
pip install -r requirements.txt
- installed by running the following command:
The bert-base-uncased model is used.
You can download the pre-trained bert-base-uncased model locally and place it in the model directory.
Then, modify the command-line argument bert_path to point to the correct location.
You can run this model through run.sh for datasets.
Note: If you are using relative paths, make sure to set the correct working directory.