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.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/doc2doc-ir-eval6 skill_kind: dataset_eval7 source_arxiv: 2101.107268 bibtex_key: chalkidis2021regulatory9 confidence: high10---1112# doc2doc-ir-eval1314> 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)1516## What this evaluates1718Evaluates 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.1920## Datasets2122- **EU2UK** — total ?; splits: train (-1), val (-1), test (-1)23- **UK2EU** — total ?; splits: train (-1), val (-1), test (-1)2425## Metrics2627- `R@100` **(primary)** — range: [0, 1]28 - Recall@k measures the fraction of relevant documents retrieved within the top-k ranked results. For pre-fetching, k is fixed at 100.29- `R@20` — range: [0, 1]30 - Recall@20 measures the fraction of relevant documents retrieved within the top-20 ranked results, used for re-ranking evaluation.31- `nDCG@20` — range: [0, 1]32 - 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.33- `R-Precision` — range: [0, 1]34 - 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.3536## Input / output format3738**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%.3940**Output**: A ranked list of candidate documents for each query.4142## Scoring recipe4344```python45def compute_recall_at_k(predictions, gold_set, k):46 retrieved = set(predictions[:k])47 relevant = len(retrieved & gold_set)48 return relevant / len(gold_set) if gold_set else 0.04950# For nDCG@k and R-Precision, apply standard IR formulas over the top-k ranked predictions against the gold set.51```5253## Common pitfalls5455- Using traditional BM25 hyperparameters (k1=1.2, b=0.75) instead of tuning for long queries, which significantly degrades performance.56- Using only the legislative title as a query instead of the full text, which drops R@100 by 5–20%.57- Ignoring temporal context, which is critical for correctly matching transposed legislation.5859## Evidence (verbatim from paper)6061> 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.6263## Citation6465```bibtex66@misc{chalkidis2021regulatory,67 title={Regulatory Compliance through Doc2Doc Information Retrieval: A case study in EU/UK legislation where text similarity has limitations},68 author={Chalkidis et al. (2021)},69 year={2021},70 note={arXiv:2101.10726}71}72```7374- arXiv: 2101.10726