Skip to content
Back to skills

Lextreme Eval

ASecurity

Evaluates multilingual legal NLP models across text classification and named entity recognition tasks. It probes the ability of models to handle domain-specific legal jargon, long-form documents, and cross-lingual generalization across 24 languages. Use when the user wants to benchmark on LEXTREME, or asks about evaluating this task. Reports macro-F1.

  • 3 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 11, 2026
researchpythongogit

Security analysis

A100/100

Scanned September 11, 2026

npx -y skills add qhjqhj00/research-skills-pool --skill lextreme-eval --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Lextreme Eval?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Lextreme Eval
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/qhjqhj00-lextreme-eval/badge)](https://www.skillsdirectory.com/skills/qhjqhj00-lextreme-eval)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: lextreme-eval
description: Evaluates multilingual legal NLP models across text classification and named entity recognition tasks. It probes the ability of models to handle domain-specific legal jargon, long-form documents, and cross-lingual generalization across 24 languages. Use when the user wants to benchmark on LEXTREME, or asks about evaluating this task. Reports macro-F1.
metadata:
  skill_kind: dataset_eval
  source_arxiv: 2301.13126
  bibtex_key: [REDACTED]
  confidence: high
---

# lextreme-eval

> LEXTREME: A Multi-Lingual and Multi-Task Benchmark for the Legal Domain — Niklaus et al. (2023) (arXiv:2301.13126, 2023)

## What this evaluates

Evaluates multilingual legal NLP models across text classification and named entity recognition tasks. It probes the ability of models to handle domain-specific legal jargon, long-form documents, and cross-lingual generalization across 24 languages.

## Datasets

- **LEXTREME** — total ?; splits: train (-1), val (-1), test (-1); repo https://github.com/JoelNiklaus/LEXTREME

## Metrics

- `macro-F1` **(primary)** — range: [0, 1]
  - Unweighted average of recall (or F1) computed independently for each class, ensuring comparability across imbalanced text classification and NER tasks.
- `LEXTREME aggregate score` — range: [0, 1]
  - Harmonic mean of the dataset aggregate score and the language aggregate score. Each aggregate is computed by successively taking the harmonic mean of macro-F1 scores across languages, configurations, and datasets.

## Input / output format

**Input**: Multilingual legal documents (sequence lengths up to 4096 tokens) for text classification or named entity recognition tasks.

**Output**: Predicted class labels for classification tasks or token-level entity annotations for NER tasks.

## Scoring recipe

```python
def compute_macro_f1(preds, golds):
    recalls = [recall_per_class(c) for c in unique_classes]
    return mean(recalls)

def compute_lextreme_score(all_f1s):
    # Harmonic mean across languages, configs, datasets
    dataset_agg = harmonic_mean(mean(f1s_per_language))
    language_agg = harmonic_mean(mean(f1s_per_dataset))
    return harmonic_mean(dataset_agg, language_agg)
```

## Common pitfalls

- Datasets are highly imbalanced (e.g., BCD-U has a 2% minority class), requiring random oversampling during fine-tuning.
- Mathew's Correlation Coefficient (MCC) is only suitable for text classification, not NER, despite being reported in supplementary materials.
- Long documents require specific hierarchical model variants and tailored sequence lengths (1024–4096 tokens) rather than standard 512-token truncation.

## Evidence (verbatim from paper)

> We use the macro-F1 score for all datasets to ensure comparability across the entire benchmark, since it can be computed for both text classification and NER tasks. Mathew's Correlation Coefficient (MCC) (Matthews, 1975) is a suitable score for evaluating text classification tasks but its applicability to NER tasks is unclear. For brevity, we do not display additional scores, but more detailed (such as precision and recall, and scores per seed) and additional scores (such as MCC) can be found online on our Weights and Biases project. The final LEXTREME score is computed using the harmonic mean of the dataset and the language aggregate score. We calculate the dataset aggregate by successively taking the harmonic mean of (i) the languages in the configurations (e.g., de,fr,it in SJP), (ii) configurations within datasets (e.g., OTS-UL, OTS-CT in OTS), and (iii) datasets in LEXTREME (BCD, GAM).

## Citation

```bibtex
@misc{niklaus2023lextreme,
  title={LEXTREME: A Multi-Lingual and Multi-Task Benchmark for the Legal Domain},
  author={Niklaus et al. (2023)},
  year={2023},
  note={arXiv:2301.13126}
}
```

- arXiv: 2301.13126

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.