Skip to main content
QUICK REVIEW

[Paper Review] MultiLegalPile: A 689GB Multilingual Legal Corpus

Joel Niklaus, Veton Matoshi|arXiv (Cornell University)|Jun 3, 2023
Artificial Intelligence in LawSocial Sciences3 citations
TL;DR

This paper introduces MultiLegalPile, a 689GB multilingual legal corpus spanning 24 languages and 17 jurisdictions, curated from diverse, permissively licensed legal sources. The authors fine-tune multilingual and monolingual RoBERTa and Longformer models on this data, achieving new state-of-the-art results on LEXTREME and LexGLUE benchmarks, with significant performance gains in low-resource languages like Greek and Dutch.

ABSTRACT

Large, high-quality datasets are crucial for training Large Language Models (LLMs). However, so far, there are few datasets available for specialized critical domains such as law and the available ones are often only for the English language. We curate and release MultiLegalPile, a 689GB corpus in 24 languages from 17 jurisdictions. The MultiLegalPile corpus, which includes diverse legal data sources with varying licenses, allows for pretraining NLP models under fair use, with more permissive licenses for the Eurlex Resources and Legal mC4 subsets. We pretrain two RoBERTa models and one Longformer multilingually, and 24 monolingual models on each of the language-specific subsets and evaluate them on LEXTREME. Additionally, we evaluate the English and multilingual models on LexGLUE. Our multilingual models set a new SotA on LEXTREME and our English models on LexGLUE. We release the dataset, the trained models, and all of the code under the most open possible licenses.

Motivation & Objective

  • Address the scarcity of large-scale, multilingual, domain-specific datasets for training legal NLP models, particularly outside English.
  • Overcome the limitations of existing legal corpora, which are often monolingual, small, or restricted by restrictive licensing.
  • Provide a high-quality, openly licensed multilingual legal corpus to support fair-use pretraining of legal language models.
  • Train and evaluate multilingual and monolingual legal-specific models to benchmark performance across diverse legal NLP tasks.
  • Demonstrate the effectiveness of in-domain pretraining on low-resource legal languages and long-form legal documents using Longformer architecture.

Proposed method

  • Curated a 689GB multilingual legal corpus from 17 jurisdictions across 24 languages, including diverse sources such as Eurlex, Legal mC4, and national case law collections.
  • Selected data based on permissive licensing (e.g., CC BY, CC0) to ensure broad reuse, with subsets like Eurlex and Legal mC4 allowing open pretraining under fair use.
  • Continued pretraining of XLM-RoBERTa base and large models on the MultiLegalPile corpus using standard masked language modeling objective.
  • Fine-tuned a Longformer model on the multilingual base model to handle long legal documents, with context length up to 4096 tokens.
  • Trained 24 monolingual models by fine-tuning XLM-R base on language-specific subsets of the corpus to improve in-domain performance.
  • Evaluated models on LEXTREME and LexGLUE benchmarks using standard metrics, including macro F1 and harmonic mean scores.
Figure 1: MultiLegalPile Source Distribution
Figure 1: MultiLegalPile Source Distribution

Experimental results

Research questions

  • RQ1Can a large-scale, multilingual legal corpus significantly improve zero-shot and few-shot performance on legal NLP benchmarks compared to general-domain pretraining?
  • RQ2To what extent does in-domain pretraining on monolingual legal data improve performance in low-resource legal languages?
  • RQ3How does a Longformer-based architecture compare to standard RoBERTa models in handling long-form legal texts across multiple jurisdictions?
  • RQ4Can multilingual legal models achieve state-of-the-art performance across diverse legal tasks while maintaining robustness across languages?
  • RQ5What impact does corpus composition—especially language-specific data volume and source diversity—have on model generalization and performance on legal NLP tasks?

Key findings

  • The multilingual Legal-XLM-R-large model achieves a new state-of-the-art score of 59.5 on the LEXTREME benchmark, surpassing previous models (59.4 for base, 59.3 for XLM-R large).
  • The legal Longformer model achieves the highest dataset aggregate score on LEXTREME and sets new SotA in four individual tasks: Brazilian court decisions (BCD), German argument mining (GAM), Greek legal code (GLC), and Swiss judgment prediction (SJP).
  • Monolingual models outperform their base XLM-R counterparts in 21 out of 24 languages, with five languages (Croatian, Hungarian, Latvian, Maltese, Dutch) achieving language-specific SotA, including a 20-point macro F1 gain over XLM-R base in Dutch.
  • On LexGLUE, the English Legal-XLM-R-large model achieves SotA on five out of seven tasks and records the highest aggregate score, outperforming general-purpose models like RoBERTa.
  • The largest performance gains were observed in Greek legal code (+7.4 F1) and Brazilian court decisions (+8.9 F1), suggesting strong in-domain benefit from corpus composition.
  • Despite strong gains in some tasks, the legal models underperform slightly in three NER tasks (GLN, LNR, LNB), possibly due to hyperparameter constraints or data scarcity in those subtasks.
Figure 2: MultiLegalPile Text Type Distribution
Figure 2: MultiLegalPile Text Type Distribution

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.