Abstract
Keyphrase generation (KPG) is a critical task for navigating large-scale text collections, yet research has historically been limited by domain bias and language constraints. This paper introduces EUROPA, the first open-source, large-scale multilingual dataset specifically designed for KPG in the legal domain. Comprising over 280,000 instances across all 24 official European Union languages, EUROPA presents a unique challenge due to its high proportion of "absent" keyphrases and the extreme length of legal documents. Our experiments demonstrate that while generative models like mBART50 show promise, performance is heavily dependent on long-context processing capabilities and realistic evaluation splits.
Introduction
Keyphrase generation involves automatically producing short, descriptive phrases that summarize the core concepts of a document. In the legal sector, where experts must navigate thousands of complex judgments, automated KPG could significantly reduce manual workloads. However, existing benchmarks primarily focus on English-language scientific or academic papers (STEM). Furthermore, many current tools are extractive, meaning they only identify phrases already present in the text. In legal contexts, many vital concepts are abstractive—they describe the legal essence of a case without being explicitly mentioned in the document text.
The EUROPA Dataset
The EUROPA dataset was constructed by scraping the EUR-Lex database, specifically targeting judgments from the Court of Justice of the European Union (CJEU). It contains approximately 285,000 document-keyphrase pairs.
EUROPA differs from previous benchmarks like KP20k in several key ways. First, it is truly multilingual, covering 24 languages. Second, it is significantly more challenging: 52.6% of its keyphrases are "absent" from the source text, compared to lower ratios in academic datasets. This necessitates the use of abstractive generative models rather than simple extractive algorithms.
Methodology
We frame KPG as a sequence-to-sequence (seq2seq) task and evaluate several state-of-the-art transformer models, including mT5 (Small, Base, Large) and mBART50.
A major technical hurdle in legal KPG is document length. Standard transformers typically cap input at 1,024 tokens, which covers only about 14% of a typical CJEU judgment. To address this, we implemented mBART50-8k, a variant utilizing Local-Sparse-Global (LSG) attention to extend the context window to 8,192 tokens.
Furthermore, we advocate for a chronological split for evaluation. Traditional random splits often lead to "data leakage," where a model sees similar cases from the same time period during training and testing. By training on older cases and testing on newer ones, we provide a more realistic assessment of how models handle evolving legal concepts.
Experimental Results
Our results indicate that generative deep learning is essential for this domain. Traditional extractive methods like YAKE failed to generate any absent keyphrases (0% accuracy). Among the generative models, mBART50-8k emerged as the top performer, benefiting significantly from the expanded context window.
The performance boost from 1k to 8k tokens confirms that critical legal information is often buried deep within long documents. Interestingly, mBART50 outperformed mT5 even in languages not explicitly listed in its pretraining documentation, suggesting robust cross-lingual transfer of legal reasoning.
Discussion and Limitations
Despite the success of mBART50-8k, several challenges remain:
- The Context Ceiling: Some legal judgments exceed 17,000 tokens, meaning even an 8k window misses nearly half the text. More efficient long-context architectures are required.
- Resource Disparity: Performance remains lower for low-resource languages like Irish and Croatian, where training data is less abundant.
- Evaluation Metrics: Current exact-match F1 scores are overly punitive. A model that generates a semantically correct but slightly different phrase (e.g., "Regulation 123" vs. "EU Regulation 123") receives no credit. Future research should explore semantic matching metrics.
Conclusion
EUROPA provides a robust foundation for multilingual legal NLP. By highlighting the necessity of long-context modeling and abstractive generation, this work sets a new benchmark for the community to develop tools that can truly assist legal professionals in a multilingual world.
Summary updated