This repo contains code and data for the paper Evaluating Evidence Attribution in Generated Fact Checking Explanations.
Automated fact-checking systems often struggle with trustworthiness, as their generated explanations can include hallucinations. In this work, we explore evidence attribution for fact-checking explanation generation. We introduce a novel evaluation protocol, citation masking and recovery, to assess attribution quality in generated explanations. We implement our protocol using both human annotators and automatic annotators, and find that LLM annotation correlates with human annotation, suggesting that attribution assessment can be automated. Finally, our experiments reveal that: (1) the best-performing LLMs still generate explanations with inaccurate attributions; and (2) human-curated evidence is essential for generating better explanations.
git clone [email protected]:ruixing76/Transparent-FCExp.git && cd Transparent-FCExp && pip install -r requirement.txt
The original PolitiHop data can be downloaded here: https://github.com/copenlu/politihop. Please put the data under ./data/PolitiHop_data/
.
The generated explanation data is mainly used in our work, which is stored here: ./data/TransExp_data/{model_name}_{setting}_data.json
.
model_name
should begpt4
,gpt35
orllama2-70b
.setting
should becore
(Human setting) orfull
(Machine setting).
"CLAIM_ID": {
"claim": "claim content",
"label": "claim veracity label from {true, false and half-true}",
// No. 12 reason cited in explanation is masked
"masked_reason": 12,
// answer index in "explanation"
"ans_sens": [
1
],
"core_reasons": [
"12: No.12 core reason content"
],
// "1: explanation sentence [12]" is the ground-truth
"explanation": [
"0: explanation sentence",
"1: explanation sentence [12]",
"2: explanation sentence"
],
// top 2 annotator's choices, -2 indicates 'no citation'
"top_choice": [
-2
2
]
}
python preprocess_politihop.py
We recommend to use our preprocessed data under: ./data/TransExp_data/raw_dataset/raw_dataset.json
.
Generate explanations using:
python generate_explanation.py -model_name llama2-70b -output_dir output_dir
-model_name
should begpt4
,gpt35
orllama2-70b
.-output_dir
is output directory for generated explanation.
Postprocess generated explanation, extract, mask and sample citation.
python postprocess_generation.py -model_name llama2-70b -output_dir output_dir
-model_name
should begpt4
,gpt35
orllama2-70b
.-output_dir
is output directory for postprocessed explanation.
Generate annotation data using:
cd ./annotation
python create_annotation_data.py
Annotation is performed on Amazon Mechanical Turk. The webpage template can be found under ./annotation/annotation_platform.html
. Generate annotation webpage using:
python create_HIT.py
If you find this work useful, please kindly cite our paper.
@misc{xing2024evaluatingevidenceattributiongenerated,
title={Evaluating Evidence Attribution in Generated Fact Checking Explanations},
author={Rui Xing and Timothy Baldwin and Jey Han Lau},
year={2024},
eprint={2406.12645},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2406.12645},
}