This repository contains all scripts and data necessary for reproducing the results from ABCD-Link
Abstract: Understanding fine-grained relations between documents is crucial for many application domains. However, the study of automated assistance is limited by the lack of efficient methods to create training and evaluation datasets of cross-document links. To address this, we introduce a new domain-agnostic framework for selecting a best-performing approach and annotating cross-document links in a new domain from scratch. We first generate and validate semi-synthetic datasets of interconnected documents. This data is used to perform automatic evaluation, producing a shortlist of best-performing linking approaches. These approaches are then used in an extensive human evaluation study, yielding performance estimates on natural text pairs. We apply our framework in two distinct domains -- peer review and news -- and show that combining retrieval models with LLMs achieves 78% link approval from human raters, more than doubling the precision of strong retrievers alone. Our framework enables systematic study of cross-document understanding across application scenarios, and the resulting novel datasets lay foundation for numerous cross-document tasks like media framing and peer review. We make the code, data, and annotation protocols openly available.
Contact person: Serwar Basch
Don't hesitate to send us an e-mail or report an issue, if something is broken (and it shouldn't be) or if you have further questions.
First, ensure you have python 3.11
Then, install the necessary requirements
pip install -r requirements.txt
python -m spacy download en_core_web_md
For OpenAI-based inference, set your key:
export OPENAI_API_KEY=YOUR_KEY_HERE
Ensure you have access to an appropriate GPU for the LLM inference step (at least 100GB of VRAM are needed for Qwen2.5)
To reconstruct the NEWS-HE dataset, please download the SPICED dataset from Zenodo (filename: spiced.csv) and place it under ./datasets/news_he
Then you can run
python scripts/reconstruct_dataset.py
To run all steps in sequence:
bash run.sh
This runs:
Results are saved to:
./predictions/./data/prompts_json/./llm_results/./eval_outputs/./datasets/*_heYou can also run specific stages:
bash run.sh --retrieval
bash run.sh --prompts
bash run.sh --llm
bash run.sh --eval
bash run.sh --anno
bash run.sh --gold
You can adjust evaluation parameters using flags passed to run.sh, for example:
bash run.sh --eval --type=classified --metric=f1
bash run.sh --eval --type=ranked --cutoffs=1 3 5 7 10 20 --metric=recall
Supported flags:
To evaluate model outputs against human-annotated gold labels:
bash run.sh --gold
This evaluates precision, recall, and F1 on:
datasets/news_he/news_gold_labels.csvdatasets/reviews_he/reviews_gold_labels.csvResults are saved to:
datasets/news_he/eval_gold_labels.jsondatasets/reviews_he/eval_gold_labels.jsonDatasets:
news_ecbnews_synthreviews_synthreviews_f1000Each dataset contains:
docs.json: documents split into sentences<name>_links.json: ground truth cross-document sentence-level linksFor retrievers (ranked):
For LLMs (classified):
news_hereviews_heEach dataset contains:
docs.json: documents split into sentencesannotations.json: annotations results from the human evaluation studyThe generate_prompts.py script uses dragon_plus as the default source for top-ranked sentences based on our experiments. The value is hardcoded to ensure reproducibility of our results.
project-root/
β
βββ datasets/
β βββ news_ecb/
β β βββ docs.json
β β βββ news_ecb_links.json
β βββ ...
β
βββ data/ # Input artifacts for prompt generation
β βββ positive_examples.json
β βββ prompts_json/ # All generated prompt files
β
βββ predictions/ # Retriever output path
β
βββ llm_results/ # LLM classification output path
β
βββ eval_outputs/ # Metrics and evaluation output path
β
βββ retrieval/ # Retriever scripts
β βββ __init__.py
β βββ scorers.py
β βββ models.py
β βββ utils.py
β
βββ prompts/ # Prompt construction scripts
β βββ __init__.py
β βββ builder.py
β βββ generate_prompts.py
β
βββ llm_inference/ # LLM scripts
β βββ __init__.py
β βββ chat_utils.py # Shared prompt-building and vLLM setup
β βββ executor.py # Local vLLM inference (Phi-4, Qwen)
β βββ openai_utils.py
β βββ openai_executor.py # GPT-4o inference
β
βββ scripts/ # Executable scripts
β βββ run_retrievals.py # Runs all retrieval models on all datasets
β βββ run_llm_inference.py # Runs all prompts through all LLMs
β βββ annotation_results.py # Calculates agreement and acceptance rates on annotations
β βββ evaluate_gold_labels.py
β βββ evaluate.py
β
βββ requirements.txt
βββ README.md
Please use the following citation:
@misc{basch2025abcdlink,
title={ABCD-LINK: Annotation Bootstrapping for Cross-Document Fine-Grained Links},
author={Serwar Basch and Ilia Kuznetsov and Tom Hope and Iryna Gurevych},
year={2025},
eprint={2509.01387},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2509.01387},
}
This repository contains experimental software and is published for the sole purpose of giving additional background details on the respective publication.
5 commits
2 commits
Python
95.9%
Shell
4.1%
This repository contains all scripts and data necessary for reproducing the results from ABCD-Link
Abstract: Understanding fine-grained relations between documents is crucial for many application domains. However, the study of automated assistance is limited by the lack of efficient methods to create training and evaluation datasets of cross-document links. To address this, we introduce a new domain-agnostic framework for selecting a best-performing approach and annotating cross-document links in a new domain from scratch. We first generate and validate semi-synthetic datasets of interconnected documents. This data is used to perform automatic evaluation, producing a shortlist of best-performing linking approaches. These approaches are then used in an extensive human evaluation study, yielding performance estimates on natural text pairs. We apply our framework in two distinct domains -- peer review and news -- and show that combining retrieval models with LLMs achieves 78% link approval from human raters, more than doubling the precision of strong retrievers alone. Our framework enables systematic study of cross-document understanding across application scenarios, and the resulting novel datasets lay foundation for numerous cross-document tasks like media framing and peer review. We make the code, data, and annotation protocols openly available.
Contact person: Serwar Basch
Don't hesitate to send us an e-mail or report an issue, if something is broken (and it shouldn't be) or if you have further questions.
First, ensure you have python 3.11
Then, install the necessary requirements
pip install -r requirements.txt
python -m spacy download en_core_web_md
For OpenAI-based inference, set your key:
export OPENAI_API_KEY=YOUR_KEY_HERE
Ensure you have access to an appropriate GPU for the LLM inference step (at least 100GB of VRAM are needed for Qwen2.5)
To reconstruct the NEWS-HE dataset, please download the SPICED dataset from Zenodo (filename: spiced.csv) and place it under ./datasets/news_he
Then you can run
python scripts/reconstruct_dataset.py
To run all steps in sequence:
bash run.sh
This runs:
Results are saved to:
./predictions/./data/prompts_json/./llm_results/./eval_outputs/./datasets/*_heYou can also run specific stages:
bash run.sh --retrieval
bash run.sh --prompts
bash run.sh --llm
bash run.sh --eval
bash run.sh --anno
bash run.sh --gold
You can adjust evaluation parameters using flags passed to run.sh, for example:
bash run.sh --eval --type=classified --metric=f1
bash run.sh --eval --type=ranked --cutoffs=1 3 5 7 10 20 --metric=recall
Supported flags:
To evaluate model outputs against human-annotated gold labels:
bash run.sh --gold
This evaluates precision, recall, and F1 on:
datasets/news_he/news_gold_labels.csvdatasets/reviews_he/reviews_gold_labels.csvResults are saved to:
datasets/news_he/eval_gold_labels.jsondatasets/reviews_he/eval_gold_labels.jsonDatasets:
news_ecbnews_synthreviews_synthreviews_f1000Each dataset contains:
docs.json: documents split into sentences<name>_links.json: ground truth cross-document sentence-level linksFor retrievers (ranked):
For LLMs (classified):
news_hereviews_heEach dataset contains:
docs.json: documents split into sentencesannotations.json: annotations results from the human evaluation studyThe generate_prompts.py script uses dragon_plus as the default source for top-ranked sentences based on our experiments. The value is hardcoded to ensure reproducibility of our results.
project-root/
β
βββ datasets/
β βββ news_ecb/
β β βββ docs.json
β β βββ news_ecb_links.json
β βββ ...
β
βββ data/ # Input artifacts for prompt generation
β βββ positive_examples.json
β βββ prompts_json/ # All generated prompt files
β
βββ predictions/ # Retriever output path
β
βββ llm_results/ # LLM classification output path
β
βββ eval_outputs/ # Metrics and evaluation output path
β
βββ retrieval/ # Retriever scripts
β βββ __init__.py
β βββ scorers.py
β βββ models.py
β βββ utils.py
β
βββ prompts/ # Prompt construction scripts
β βββ __init__.py
β βββ builder.py
β βββ generate_prompts.py
β
βββ llm_inference/ # LLM scripts
β βββ __init__.py
β βββ chat_utils.py # Shared prompt-building and vLLM setup
β βββ executor.py # Local vLLM inference (Phi-4, Qwen)
β βββ openai_utils.py
β βββ openai_executor.py # GPT-4o inference
β
βββ scripts/ # Executable scripts
β βββ run_retrievals.py # Runs all retrieval models on all datasets
β βββ run_llm_inference.py # Runs all prompts through all LLMs
β βββ annotation_results.py # Calculates agreement and acceptance rates on annotations
β βββ evaluate_gold_labels.py
β βββ evaluate.py
β
βββ requirements.txt
βββ README.md
Please use the following citation:
@misc{basch2025abcdlink,
title={ABCD-LINK: Annotation Bootstrapping for Cross-Document Fine-Grained Links},
author={Serwar Basch and Ilia Kuznetsov and Tom Hope and Iryna Gurevych},
year={2025},
eprint={2509.01387},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2509.01387},
}
This repository contains experimental software and is published for the sole purpose of giving additional background details on the respective publication.
5 commits
2 commits
Python
95.9%
Shell
4.1%