Introduction
The French Court of Cassation, the highest court for civil and criminal matters in France, is tasked with ensuring the uniform application of the law. A critical part of this mission involves identifying "legal divergences"—instances where different rulings interpret the same legal text in conflicting ways. Currently, identifying these divergences is a labor-intensive manual process. Legal experts must draft a synthesis (a brief summary) and a keyword sequence (a hierarchical list of tags) for each ruling. However, these annotations exist for only about 20% of rulings, and the subjective nature of human tagging often leads to inconsistencies in granularity and terminology.
Problem and Data Structure
The primary challenge lies in the complexity of the legal indexing system. Keywords are organized hierarchically, moving from broad legal matters to highly specific technical points.
As shown in Figure 1, a sequence might progress from "civil procedure" to "defense rights" and finally to specific "preliminary observations of the parties." Because these manual annotations are scarce and subjective, researchers developed a pipeline to automate keyword generation and use these tags to predict case similarity.
Methodology
The research team approached the problem in two distinct stages:
1. Automatic Keyword Generation
The creation of keyword sequences was framed as a Neural Machine Translation (NMT) task. Rather than translating between natural languages, the models "translate" a legal synthesis into a sequence of hierarchical keywords separated by special tokens (e.g., <t>). The team evaluated several architectures, including standard Transformer models (BASE and MINI) and a fine-tuned CamemBERT (a French-specific BERT model).
2. Similarity Prediction
To determine if two cases are legally similar, a Multi-Layer Perceptron (MLP) regressor was trained using both unsupervised and supervised features. These included TF-IDF similarity (word overlap) and Normalized Edit-distance (the cost to transform one keyword sequence into another). A key objective was to determine if automatically predicted keywords could enhance the model's ability to match human expert intuition.
Datasets
- Jurinet: A database of Court of Cassation decisions since 1990. The authors utilized approximately 182,000 synthesis-keyword pairs for training.
- Reference Ruling Similarity Corpus: A gold-standard evaluation dataset comprising 780 ruling pairs, each annotated by two legal experts on a similarity scale from 0 (no similarity) to 3 (strong similarity).
Key Results and Insights
Keyword Generation Performance
The fine-tuned CamemBERT model emerged as the top performer, achieving a weighted accuracy of 35.84%. However, accuracy varies significantly across the hierarchy. As shown in Figure 6, models perform best at the highest levels of the hierarchy (T1-T2) where the vocabulary is smaller and more general, with performance declining as the tags become more specific at deeper levels.
Similarity Prediction Success
The best similarity model achieved a high Pearson’s correlation of 0.854 with human experts. This was achieved by combining the gold keyword sequence, the gold synthesis, and 20 automatically predicted keyword sequences generated via beam search.
Interestingly, the raw text of a ruling was found to be a poor predictor of legal similarity ($r = 0.04$), whereas human-written keyword sequences were highly effective ($r = 0.78$). Crucially, adding predicted keywords improved the correlation even when manual tags were available, suggesting that model-generated keywords capture nuances that a single human expert might overlook.
Conclusion and Future Work
This research demonstrates that treating hierarchical tagging as a sequence-to-sequence problem is a viable path for legal text analysis. Predicted keywords can effectively compensate for missing manual annotations, allowing for high-accuracy similarity detection.
The current bottleneck is the reliance on manual syntheses, which are only available for 20% of cases. Future work will focus on end-to-end generation—producing keywords directly from raw ruling text—and automating the synthesis generation itself to create a fully autonomous pipeline for identifying legal divergences.
Summary updated