swiltra-bench-eval
SwiLTra-Bench: The Swiss Legal Translation Benchmark — Niklaus et al. (2025) (arXiv:2503.01372, 2025)
What this evaluates
Evaluates large language models and specialized translation systems on their ability to accurately translate Swiss legal documents (laws, headnotes, press releases) across four national languages and English. It probes domain-specific translation quality, contextual understanding, and zero-shot versus fine-tuned performance in a legal context.
Datasets
Metrics
GEMBA-MQM (primary) — range: [0, 1]
- Generative Multi-dimensional Quality Metrics, a model-based metric that predicts human MQM (Mutual Quality Measurement) error severity scores. It outputs a continuous score where higher values indicate better translation quality.
BLEU — range: [0, 1]
- Bilingual Evaluation Understudy, a lexical metric computing n-gram precision between reference and hypothesis translations, typically with a brevity penalty.
ChrF — range: [0, 1]
- Character n-gram F-score, measuring the harmonic mean of character n-gram precision and recall between reference and hypothesis.
METEOR — range: [0, 1]
- Metric for Evaluation of Translation with Explicit ORdering, aligning words using exact match, stem, synonym, and paraphrase matches to compute a weighted F-score.
BERTScore — range: [0, 1]
- Computes semantic similarity using contextual embeddings from BERT, calculating precision, recall, and F1 based on cosine similarity of token representations.
XCOMET — range: [0, 1]
- Cross-lingual Optimized Metric for Evaluation of Translation, a reference-free or reference-based model that predicts translation quality scores based on source, hypothesis, and context embeddings.
BLEURT — range: [0, 1]
- BERT-based Evaluation Utility for Ranking Translations, a learned metric fine-tuned on human judgments to output a quality score between 0 and 1.
Input / output format
Input: Source text in a specific language (Swiss German, French, Italian, Romansh, or English) paired with a target language instruction. For fine-tuning, formatted as a table-like prompt: | {source language}: | {source text} | \n | --- | --- | \n | {target language}: | {target text} |. For zero-shot evaluation, standard instruction prompts are used.
Output: Translated text in the target language.
Scoring recipe
def score(predictions, references):
results = {}
for pred, ref in zip(predictions, references):
results['bleu'] += nltk.translate.bleu_score.sentence_bleu([ref], pred)
results['chrF'] += chrF_score(ref, pred)
results['meteor'] += meteor_score([ref], pred)
results['bertscore'] += bertscore_score(ref, pred)
results['xcomet'] += xcomet_score(ref, pred)
results['gemba_mqm'] += gemba_mqm_score(ref, pred)
return {k: v / len(predictions) for k, v in results.items()}
Common pitfalls
- BLEURT and XCOMET have a strict 512-token limit and cannot process press releases, requiring truncation or exclusion from evaluation.
- Fine-tuning requires replicating the exact instruction template and chat format used in the paper to ensure fair comparison with open SLMs.
- GEMBA-MQM is prioritized for human alignment but is computationally intensive and may vary based on the underlying annotator model configuration.
Evidence (verbatim from paper)
We evaluated translations using lexical (BLEU Papineni et al. ([2002]), ChrF Popović ([2015]), METEOR Banerjee and Lavie ([2005])) and model-based metrics (BERTScore Zhang et al. ([2020]), BLEURT Sellam et al. ([2020]), XCOMET Guerreiro et al. ([2024]), GEMBA-MQM Kocmi and Federmann ([2023])). Due to the 512-token limit, BLEURT and XCOMET cannot process press releases. Given GEMBA-MQM’s strong correlation with human judgments, we prioritized it alongside XCOMET, METEOR, and ChrF, ensuring both lexical and trained metrics for diversity.
Citation
@misc{niklaus2025swiltra,
title={SwiLTra-Bench: The Swiss Legal Translation Benchmark},
author={Niklaus et al. (2025)},
year={2025},
note={arXiv:2503.01372}
}
1---2name: swiltra-bench-eval3description: Evaluates large language models and specialized translation systems on their ability to accurately translate Swiss legal documents (laws, headnotes, press releases) across four national languages and English. It probes domain-specific translation quality, contextual understanding, and zero-shot versus fine-tuned performance in a legal context. Use when the user wants to benchmark on SwiLTra-Bench, or asks about evaluating this task. Reports GEMBA-MQM.4---56# swiltra-bench-eval78> SwiLTra-Bench: The Swiss Legal Translation Benchmark — Niklaus et al. (2025) (arXiv:2503.01372, 2025)910## What this evaluates1112Evaluates large language models and specialized translation systems on their ability to accurately translate Swiss legal documents (laws, headnotes, press releases) across four national languages and English. It probes domain-specific translation quality, contextual understanding, and zero-shot versus fine-tuned performance in a legal context.1314## Datasets1516- **SwiLTra-Bench** — total 180000; splits: train (-1), val (-1), test (-1); repo https://github.com/JoelNiklaus/SwissLegalTranslations1718## Metrics1920- `GEMBA-MQM` **(primary)** — range: [0, 1]21 - Generative Multi-dimensional Quality Metrics, a model-based metric that predicts human MQM (Mutual Quality Measurement) error severity scores. It outputs a continuous score where higher values indicate better translation quality.22- `BLEU` — range: [0, 1]23 - Bilingual Evaluation Understudy, a lexical metric computing n-gram precision between reference and hypothesis translations, typically with a brevity penalty.24- `ChrF` — range: [0, 1]25 - Character n-gram F-score, measuring the harmonic mean of character n-gram precision and recall between reference and hypothesis.26- `METEOR` — range: [0, 1]27 - Metric for Evaluation of Translation with Explicit ORdering, aligning words using exact match, stem, synonym, and paraphrase matches to compute a weighted F-score.28- `BERTScore` — range: [0, 1]29 - Computes semantic similarity using contextual embeddings from BERT, calculating precision, recall, and F1 based on cosine similarity of token representations.30- `XCOMET` — range: [0, 1]31 - Cross-lingual Optimized Metric for Evaluation of Translation, a reference-free or reference-based model that predicts translation quality scores based on source, hypothesis, and context embeddings.32- `BLEURT` — range: [0, 1]33 - BERT-based Evaluation Utility for Ranking Translations, a learned metric fine-tuned on human judgments to output a quality score between 0 and 1.3435## Input / output format3637**Input**: Source text in a specific language (Swiss German, French, Italian, Romansh, or English) paired with a target language instruction. For fine-tuning, formatted as a table-like prompt: `| {source language}: | {source text} | \n | --- | --- | \n | {target language}: | {target text} |`. For zero-shot evaluation, standard instruction prompts are used.3839**Output**: Translated text in the target language.4041## Scoring recipe4243```python44def score(predictions, references):45 results = {}46 for pred, ref in zip(predictions, references):47 results['bleu'] += nltk.translate.bleu_score.sentence_bleu([ref], pred)48 results['chrF'] += chrF_score(ref, pred)49 results['meteor'] += meteor_score([ref], pred)50 results['bertscore'] += bertscore_score(ref, pred)51 results['xcomet'] += xcomet_score(ref, pred)52 results['gemba_mqm'] += gemba_mqm_score(ref, pred)53 return {k: v / len(predictions) for k, v in results.items()}54```5556## Common pitfalls5758- BLEURT and XCOMET have a strict 512-token limit and cannot process press releases, requiring truncation or exclusion from evaluation.59- Fine-tuning requires replicating the exact instruction template and chat format used in the paper to ensure fair comparison with open SLMs.60- GEMBA-MQM is prioritized for human alignment but is computationally intensive and may vary based on the underlying annotator model configuration.6162## Evidence (verbatim from paper)6364> We evaluated translations using lexical (BLEU *Papineni et al. ([2002])*, ChrF *Popović ([2015])*, METEOR *Banerjee and Lavie ([2005])*) and model-based metrics (BERTScore *Zhang et al. ([2020])*, BLEURT *Sellam et al. ([2020])*, XCOMET *Guerreiro et al. ([2024])*, GEMBA-MQM *Kocmi and Federmann ([2023])*). Due to the 512-token limit, BLEURT and XCOMET cannot process press releases. Given GEMBA-MQM’s strong correlation with human judgments, we prioritized it alongside XCOMET, METEOR, and ChrF, ensuring both lexical and trained metrics for diversity.6566## Citation6768```bibtex69@misc{niklaus2025swiltra,70 title={SwiLTra-Bench: The Swiss Legal Translation Benchmark},71 author={Niklaus et al. (2025)},72 year={2025},73 note={arXiv:2503.01372}74}75```7677- arXiv: 2503.01372