Realistic Zero-Shot Cross-Lingual Transfer in Legal Topic Classification

Stratos Xenouleas, Alexia Tsoukara, Giannis Panagiotakis, Ilias Chalkidis, Ion AndroutsopoulosarXiv 2022

TL;DR

This paper reveals that popular benchmarks for zero-shot cross-lingual transfer in legal text classification are unrealistic due to "parallel text leakage." By introducing a new, non-parallel version of the Multi-EURLEX dataset, the authors demonstrate that simple machine-translation baselines and a novel bilingual teacher-student framework vastly outperform state-of-the-art cross-lingual fine-tuning, even surpassing monolingual upper bounds.

What Problem Does This Paper Address?

When deploying Natural Language Processing (NLP) models globally, companies rarely have labeled training data for every target language. The standard solution is zero-shot cross-lingual transfer: training a model on a resource-rich source language (like English) and deploying it on target languages (like German, French, or Greek) without further labeled training.

However, the authors identify a major flaw in how this is evaluated using current legal datasets like Multi-EURLEX. In the real world, laws and legal cases vary by country. But the original Multi-EURLEX dataset consists of EU laws that are officially translated into multiple languages, meaning the training sets across different languages are perfectly parallel (identical content). This data leakage creates an unrealistic evaluation environment and masks the true performance of cross-lingual transfer methods.

Methods

The authors evaluate several approaches on their newly corrected dataset using XLM-R, a massive multilingually pre-trained language model:

  1. Cross-lingual Fine-Tuning (FT): The baseline approach where XLM-R is fine-tuned on the source language only (either end-to-end or using parameter-efficient adapters) and tested directly on target languages.
  2. Translation-Based Baselines:
  3. Translate Test: The model is trained on the source language. At inference, target language documents are machine-translated back to the source language.
  4. Translate Train: Labeled source language training documents are machine-translated into the target language to train a target-specific model.
  5. Bilingual Teacher-Student Framework: The authors' novel contribution. A bilingual "teacher" model is trained on both the source documents and their machine-translated target counterparts. This teacher then generates "soft labels" (probability distributions) for the training data as well as for an additional set of unlabeled target language documents. Finally, a "student" model is trained to predict these soft labels, allowing it to leverage unlabeled target data effectively.

Datasets

The paper utilizes Multi-EURLEX, a multilingual dataset for legal topic classification containing 65,000 EU laws categorized under 127 concepts.

To fix the parallel text issue, the authors introduce an Updated Harder Version of Multi-EURLEX. They randomly sample 12,000 distinct, non-parallel documents per language across four languages from different families: English (Germanic), French (Romance), German (Germanic), and Greek (Hellenic). The test sets remain parallel to ensure fair, controlled evaluation across target languages.

Key Insights and Ideas

  • Parallel Data Distorts Reality: In previous studies using parallel training data, training a single model jointly on all languages showed no benefit over training separate monolingual models. The authors prove that when the data is non-parallel (realistic), joint multilingual training provides a massive boost.
  • Translation is King in Legal NLP: Legal language is highly structured and precise. Modern Neural Machine Translation (NMT) systems handle this structure well enough that translation-based methods completely dominate direct cross-lingual fine-tuning.
  • Concept Drift Matters: Because the training sets for each language contain different laws, they suffer from "temporal concept drift." The authors used Wasserstein distance and Kendall’s $\tau$ to map these differences, showing that language pairs with closer label distributions (like English-to-French) naturally perform better.
Label distribution distances showing temporal concept drift between language pairs

Key Results

The experiments evaluated models using R-Precision (RP, %), with English serving as the source language.

Full experimental results comparing zero-shot methods against upper bounds
  • The Failure of Direct Transfer: Standard cross-lingual fine-tuning with adapters achieved a meager 56.8% average R-Precision on target languages.
  • The Power of Translation: Both Translate Test (66.2%) and Translate Train (66.4%) vastly outperformed direct transfer, performing on par with the monolingual "upper bound" (training on actual labeled target data, which scored 66.0%).
  • Teacher-Student Superiority: The proposed Bilingual Teacher-Student model with Adapters hit 67.5%, actually beating the monolingual upper bound by exploiting unlabeled target documents.

Limitations and Future Work

While the bilingual teacher-student model excelled, the authors' attempt to scale this to a multilingual teacher-student model (one model supporting all four languages simultaneously) performed poorly (60.6%).

The authors attribute this to a degradation in the quality of the teacher's soft labels when forced to generalize across multiple distinct language families at once.

Figure 2: Average difference (Diff) between gold and soft labels (the latter predicted by the multilingual teacher), measured as Mean Absolute Error averaged over the document subset being considered. Results reported per document subset: original in English (source), machine-translated (NMT) in target languages, and additional unlabelled (UL) in the target languages.

Future work will focus on filtering out low-quality machine translations and weighting training documents based on the certainty of the teacher's soft labels to make a single, unified multilingual model viable.

Summary updated

Abstract

We consider zero-shot cross-lingual transfer in legal topic classification using the recent MultiEURLEX dataset. Since the original dataset contains parallel documents, which is unrealistic for zero-shot cross-lingual transfer, we develop a new version of the dataset without parallel documents. We use it to show that translation-based methods vastly outperform cross-lingual fine-tuning of multilingually pre-trained models, the best previous zero-shot transfer method for MultiEURLEX. We also develop a bilingual teacher-student zero-shot transfer approach, which exploits additional unlabeled documents of the target language and performs better than a model fine-tuned directly on labeled target language documents.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Multi-EURLEX, realistic non-parallel versionBilingual XLM-R (E2E) StudentTest R-Precision (RP)66.1%+0.3 vs baselineLegal Topic Classification · split: test · 0-shot · method=bilingual teacher-student · training=machine translations and soft-label bootstrapping · source-language=English · target-languages=de, fr, el
Source quote
L365: \xlmr (E2E) (Student) │ 4 │ \ding{51} │ \ding{51} │ 69.1 {± 1.3} │ 67.4 {± 0.1} │ 66.1 {± 0.3} │ 65.0 {± 0.4} │ 66.1
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
Multi-EURLEX, realistic non-parallel versionXLM-R + Adapters baselineTest R-Precision (RP)56.2%Legal Topic Classification · split: test · 0-shot · training=adapter layers and classification head · source-language=German · target-languages=en, fr, el
Source quote
L257: \xlmr + Adapters │ 1 │ \ding{55} │ \ding{55} │ 64.98 {± 0.72} │ 61.30 {± 1.70} │ 58.28 {± 0.60} │ 49.02 {± 1.09} │ 56.2
Multi-EURLEX, realistic non-parallel versionXLM-R, Translate Test documents to Target language baselineTest R-Precision (RP)65.0%Legal Topic Classification · split: test · 0-shot · translation=test documents · source-language=German · target-languages=en, fr, el
Source quote
L261: \xlmr │ 1 │ \ding{51} │ \ding{55} │ 65.84 {± 0.68} │ 65.65 {± 0.72} │ 65.66 {± 0.78} │ 63.57 {± 0.74} │ 65.0
Multi-EURLEX, realistic non-parallel versionXLM-R, Translate Train documents to Target language baselineTest R-Precision (RP)65.8%Legal Topic Classification · split: test · 0-shot · models=N · translation=training documents · source-language=German · target-languages=en, fr, el
Source quote
L266: \xlmr │ N │ \ding{51} │ \ding{55} │ 65.84 {± 0.68} │ 67.36 {± 1.62} │ 65.64 {± 1.14} │ 64.32 {± 1.21} │ 65.8
BibTeX
@misc{xenouleas2022realistic,
  author = {Stratos Xenouleas and Alexia Tsoukara and Giannis Panagiotakis and Ilias Chalkidis and Ion Androutsopoulos},
  title = {{Realistic Zero-Shot Cross-Lingual Transfer in Legal Topic Classification}},
  year = {2022},
  eprint = {2206.03785},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.03785},
}
Figure