doc2doc-ir-eval
Regulatory Compliance through Doc2Doc Information Retrieval: A case study in EU/UK legislation where text similarity has limitations — Chalkidis et al. (2021) (arXiv:2101.10726, 2021)
What this evaluates
Evaluates document-to-document information retrieval systems for regulatory compliance, testing their ability to match long, noisy legislative texts to related legal documents. It probes how well models handle extended query lengths, domain-specific vocabulary, and temporal constraints in legal transposition tasks.
Datasets
- EU2UK — total ?; splits: train (-1), val (-1), test (-1)
- UK2EU — total ?; splits: train (-1), val (-1), test (-1)
Metrics
R@100 (primary) — range: [0, 1]
- Recall@k measures the fraction of relevant documents retrieved within the top-k ranked results. For pre-fetching, k is fixed at 100.
R@20 — range: [0, 1]
- Recall@20 measures the fraction of relevant documents retrieved within the top-20 ranked results, used for re-ranking evaluation.
nDCG@20 — range: [0, 1]
- Normalized Discounted Cumulative Gain at rank 20, which evaluates the quality of the ranked list by discounting the relevance score of each document by its position.
R-Precision — range: [0, 1]
- Recall at rank R, where R equals the total number of relevant documents for the query. It measures how many relevant documents appear in the top-R positions.
Input / output format
Input: Full-text of legislative acts (queries and candidate documents), pre-processed by removing stop-words, punctuation, digits, and low-IDF terms, reducing average length by ~55%.
Output: A ranked list of candidate documents for each query.
Scoring recipe
def compute_recall_at_k(predictions, gold_set, k):
retrieved = set(predictions[:k])
relevant = len(retrieved & gold_set)
return relevant / len(gold_set) if gold_set else 0.0
# For nDCG@k and R-Precision, apply standard IR formulas over the top-k ranked predictions against the gold set.
Common pitfalls
- Using traditional BM25 hyperparameters (k1=1.2, b=0.75) instead of tuning for long queries, which significantly degrades performance.
- Using only the legislative title as a query instead of the full text, which drops R@100 by 5–20%.
- Ignoring temporal context, which is critical for correctly matching transposed legislation.
Evidence (verbatim from paper)
Pre-fetching aims to bring all the relevant documents in the top-k, thus we report R@k. We observe that for k > 100 the best pre fetchers have not significant gains in performance in development data, thus we select k = 100 , as a reasonable threshold. For re-ranking we report R@20, nDCG@20 and R-Precision (RP) following the literature (Manning et al., 2009). We report the average and standard deviation across three runs considering the best set of hyper-parameters on development data for neural re-rankers.
Citation
@misc{chalkidis2021regulatory,
title={Regulatory Compliance through Doc2Doc Information Retrieval: A case study in EU/UK legislation where text similarity has limitations},
author={Chalkidis et al. (2021)},
year={2021},
note={arXiv:2101.10726}
}
1---2name: doc2doc-ir-eval3description: Evaluates document-to-document information retrieval systems for regulatory compliance, testing their ability to match long, noisy legislative texts to related legal documents. It probes how well models handle extended query lengths, domain-specific vocabulary, and temporal constraints in legal transposition tasks. Use when the user wants to benchmark on EU2UK, UK2EU, or asks about evaluating this task. Reports R@100.4---56# doc2doc-ir-eval78> Regulatory Compliance through Doc2Doc Information Retrieval: A case study in EU/UK legislation where text similarity has limitations — Chalkidis et al. (2021) (arXiv:2101.10726, 2021)910## What this evaluates1112Evaluates document-to-document information retrieval systems for regulatory compliance, testing their ability to match long, noisy legislative texts to related legal documents. It probes how well models handle extended query lengths, domain-specific vocabulary, and temporal constraints in legal transposition tasks.1314## Datasets1516- **EU2UK** — total ?; splits: train (-1), val (-1), test (-1)17- **UK2EU** — total ?; splits: train (-1), val (-1), test (-1)1819## Metrics2021- `R@100` **(primary)** — range: [0, 1]22 - Recall@k measures the fraction of relevant documents retrieved within the top-k ranked results. For pre-fetching, k is fixed at 100.23- `R@20` — range: [0, 1]24 - Recall@20 measures the fraction of relevant documents retrieved within the top-20 ranked results, used for re-ranking evaluation.25- `nDCG@20` — range: [0, 1]26 - Normalized Discounted Cumulative Gain at rank 20, which evaluates the quality of the ranked list by discounting the relevance score of each document by its position.27- `R-Precision` — range: [0, 1]28 - Recall at rank R, where R equals the total number of relevant documents for the query. It measures how many relevant documents appear in the top-R positions.2930## Input / output format3132**Input**: Full-text of legislative acts (queries and candidate documents), pre-processed by removing stop-words, punctuation, digits, and low-IDF terms, reducing average length by ~55%.3334**Output**: A ranked list of candidate documents for each query.3536## Scoring recipe3738```python39def compute_recall_at_k(predictions, gold_set, k):40 retrieved = set(predictions[:k])41 relevant = len(retrieved & gold_set)42 return relevant / len(gold_set) if gold_set else 0.04344# For nDCG@k and R-Precision, apply standard IR formulas over the top-k ranked predictions against the gold set.45```4647## Common pitfalls4849- Using traditional BM25 hyperparameters (k1=1.2, b=0.75) instead of tuning for long queries, which significantly degrades performance.50- Using only the legislative title as a query instead of the full text, which drops R@100 by 5–20%.51- Ignoring temporal context, which is critical for correctly matching transposed legislation.5253## Evidence (verbatim from paper)5455> Pre-fetching aims to bring all the relevant documents in the top-k, thus we report R@k. We observe that for k > 100 the best pre fetchers have not significant gains in performance in development data, thus we select k = 100 , as a reasonable threshold. For re-ranking we report R@20, nDCG@20 and R-Precision (RP) following the literature (Manning et al., 2009). We report the average and standard deviation across three runs considering the best set of hyper-parameters on development data for neural re-rankers.5657## Citation5859```bibtex60@misc{chalkidis2021regulatory,61 title={Regulatory Compliance through Doc2Doc Information Retrieval: A case study in EU/UK legislation where text similarity has limitations},62 author={Chalkidis et al. (2021)},63 year={2021},64 note={arXiv:2101.10726}65}66```6768- arXiv: 2101.10726