[Paper Review] Large Scale Legal Text Classification Using Transformer Models
This paper proposes a fine-tuned transformer-based approach for large-scale legal text classification using BERT, RoBERTa, DistilBERT, XLNet, and multilingual BERT on the JRC-Acquis and EURLEX57K datasets, achieving new state-of-the-art micro-F1 scores of 0.661 and 0.754, respectively, through strategies like language model fine-tuning, gradual unfreezing, and iterative stratification for standardized data splits.
Large multi-label text classification is a challenging Natural Language Processing (NLP) problem that is concerned with text classification for datasets with thousands of labels. We tackle this problem in the legal domain, where datasets, such as JRC-Acquis and EURLEX57K labeled with the EuroVoc vocabulary were created within the legal information systems of the European Union. The EuroVoc taxonomy includes around 7000 concepts. In this work, we study the performance of various recent transformer-based models in combination with strategies such as generative pretraining, gradual unfreezing and discriminative learning rates in order to reach competitive classification performance, and present new state-of-the-art results of 0.661 (F1) for JRC-Acquis and 0.754 for EURLEX57K. Furthermore, we quantify the impact of individual steps, such as language model fine-tuning or gradual unfreezing in an ablation study, and provide reference dataset splits created with an iterative stratification algorithm.
Motivation & Objective
- To advance state-of-the-art performance in large multi-label text classification (LMTC) within the legal domain, particularly for datasets with long-tail label distributions.
- To evaluate the effectiveness of recent transformer models—BERT, RoBERTa, DistilBERT, XLNet, and multilingual BERT—on legal text with thousands of labels.
- To establish standardized, reproducible dataset splits using iterative stratification to enable fair comparison across future research.
- To quantify the impact of training strategies such as language model fine-tuning, gradual unfreezing, and discriminative learning rates in LMTC.
- To leverage the hierarchical structure of the EuroVoc taxonomy to derive reduced label sets that improve classification performance.
Proposed method
- Fine-tuned multiple transformer models (BERT, RoBERTa, DistilBERT, XLNet, multilingual BERT) on legal text from JRC-Acquis and EURLEX57K using domain-specific fine-tuning.
- Applied training strategies including language model fine-tuning on target legal text, gradual unfreezing of network layers in groups, and slanted triangular learning rates.
- Used iterative stratification to generate standardized, balanced training/validation/testing splits for both datasets to ensure reproducibility and fair comparison.
- Leveraged semantic relationships in the EuroVoc taxonomy to create reduced label sets (e.g., top terms, microthesauri, domains) for improved classification performance.
- Conducted ablation studies to isolate the contribution of each training strategy and hyperparameter to model performance.
- Evaluated models using micro-F1 as the primary metric, with inference time measured on a standard CPU for computational efficiency analysis.
Experimental results
Research questions
- RQ1How do transformer-based models compare in performance on large-scale legal text classification with long-tail label distributions?
- RQ2What is the impact of language model fine-tuning and gradual unfreezing on classification performance in legal text with thousands of labels?
- RQ3Can iterative stratification produce more reliable and comparable dataset splits than random splits in legal text classification?
- RQ4To what extent can the hierarchical structure of the EuroVoc taxonomy be used to reduce label space and improve classification accuracy?
- RQ5How do computational costs and inference times vary across different transformer architectures in this LMTC setting?
Key findings
- The proposed method achieved a new state-of-the-art micro-F1 score of 0.661 on the JRC-Acquis dataset and 0.754 on the EURLEX57K dataset.
- RoBERTa and DistilBERT outperformed BERT in most settings, with DistilBERT showing strong performance at lower computational cost.
- Language model fine-tuning and gradual unfreezing were both critical for achieving high performance, with ablation studies confirming their significant positive impact.
- DistilBERT achieved the lowest inference time (12 ms/example), while XLNet required the highest (77 ms/example), highlighting trade-offs between accuracy and efficiency.
- Reduced label sets derived from the EuroVoc hierarchy led to higher classification scores, demonstrating the value of leveraging semantic structure.
- Multilingual BERT showed promising initial results, suggesting potential for future work using multilingual pretraining and parallel corpora.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.