LongDocFACTScore: A framework for evaluating factual consistency of long document abstractive summarisation and the LongSciVerify data set
Project description
LongDocFACTScore
This is the repository associated with the paper: LongDocFACTScore: Evaluating the Factuality of Long Document Abstractive Summarisation, presented at LREC-COLING 2024 in Turin, Italy.
Abstract:
Maintaining factual consistency is a critical issue in abstractive text summarisation, however, it cannot be assessed by traditional automatic metrics used for evaluating text summarisation, such as ROUGE scoring. Recent efforts have been devoted to developing improved metrics for measuring factual consistency using pre-trained language models, but these metrics have restrictive token limits, and are therefore not suitable for evaluating long document text summarisation. Moreover, there is limited research and resources available for evaluating whether existing automatic evaluation metrics are fit for purpose when applied in long document settings. In this work, we evaluate the efficacy of automatic metrics for assessing the factual consistency of long document text summarisation. We create a human-annotated data set for evaluating automatic factuality metrics, LongSciVerify, which contains fine-grained factual consistency annotations for long document summaries from the scientific domain. We also propose a new evaluation framework, LongDocFACTScore, which is suitable for evaluating long document summarisation. This framework allows metrics to be efficiently extended to any length document and outperforms existing state-of-the-art metrics in its ability to correlate with human measures of factuality when used to evaluate long document summarisation data sets.
Method:
LongDocFACTScore is a reference-free framework which can be applied to any reference-free metric for assessing factual consistency. In this repo, it is implemented with BARTScore. The method uses sentence embeddings to calculate similarity between source document sentences and predicted summary sentences, and then applies metrics to the highest similarity text snippets. The scores per sentence in the predicted summary are averaged to give one score per predicted summary.
In this work, LongDocFACTScore is implemented with BARTScore, and some code is copied from the linked repo.
Data sets (including LongSciVerify)
In our work, we curate LongSciVerify data set consisting of PubMed and ArXiv papers with human annotations of factual consistency. More information about the data sets we use can be found here
Usage of LongDocFACTScore
To run on a piece of text:
from longdocfactscore.ldfacts import LongDocFACTScore
predict_summary = "INSERT PREDICTED SUMMARY HERE"
src_doc = "INSERT SOURCE DOCUMENT HERE"
ldfacts_scorer = LongDocFACTScore(device='cpu')
scores = ldfacts_scorer.score_src_hyp_long([src_doc],[predict_summary])
To run with some example data:
pip install -e .
python run_example.py
Repeat evaluation in LongDocFACTScore paper
Set up
- Run the following
pip install -e .
cd evaluation_scripts
git clone https://github.com/ThomasScialom/QuestEval.git
git clone https://github.com/neulab/BARTScore.git
git clone https://github.com/salesforce/factCC.git
cp ./utils/factcc_run.py ./factCC/modeling/run.py
pip install -r requirements.txt
- Download the factCC trained checkpoint from their repo for evaluation and copy into the top level of this repo in a folder called
factcc-checkpoint - Run scripts, dataset options are:
pubmed_longdocfactscore,arxiv_longdocfactscore,pubmed_longdocfactscore
e.g.,
cd ..
python evaluation_scripts/run_evaluation.py --dataset pubmed_longdocfactscore
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file longdocfactscore-0.0.1.tar.gz.
File metadata
- Download URL: longdocfactscore-0.0.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0348dc399ac1a8c847db2e5f37bc22dc4159f38252087658cd5c875dbcfdad2
|
|
| MD5 |
a8d2c66b5fb898253c947aebc7cfc08e
|
|
| BLAKE2b-256 |
bc0b9b05085ad35a7efe0951d9976a215321d1e44c36cf81c46a62cd6a9779b4
|
File details
Details for the file longdocfactscore-0.0.1-py3-none-any.whl.
File metadata
- Download URL: longdocfactscore-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
845eedc9f04b1f3c0833350d66aeac9edb702e771963ef95772545ce23b345a5
|
|
| MD5 |
d635b061e7515a87f6556a6250718f63
|
|
| BLAKE2b-256 |
00c4632834f1be6886b17b68f6b93991d254fa57b4e0c213e8c646f9b353d520
|