Introduction
Legal case retrieval is a specialized domain where relevance is determined by underlying legal logic rather than simple keyword matching. Traditional Pre-trained Language Models (PLMs) like BERT or RoBERTa often struggle in this context because they are not designed to handle the specific structural and semantic requirements of legal documents. This paper introduces SAILER (Structure-Aware pre-traIned language model for LEgal case Retrieval), a novel model that explicitly incorporates the structural logic of legal opinions into its training objective.
The Challenge of Legal Retrieval
Legal documents are characterized by a strict internal structure, typically following the sequence: Procedure, Fact, Reasoning, Decision, and Tail. General-purpose models face two primary hurdles in this domain:
- Structural Blindness: The long-form nature of legal documents makes it difficult for standard models to capture dependencies between disparate sections.
- Sensitivity to Key Elements: Legal relevance hinges on specific "key legal elements." Minor factual differences—such as the difference between stealing and purchasing—can lead to vastly different legal outcomes, yet general models may treat these as semantically similar.
Methodology: The SAILER Framework
To address these challenges, SAILER utilizes an asymmetric encoder-decoder architecture designed to mimic the judicial process of writing a legal opinion.
Architecture Components
- Fact Encoder: A deep transformer encoder (based on BERT) that processes the "Fact" section of a case. It uses standard Masked Language Modeling (MLM) to learn general semantics.
- Reasoning & Decision Decoders: Two shallow decoders are tasked with reconstructing the "Reasoning" and "Decision" sections of the document using only the factual embedding produced by the encoder.
The Logic Bottleneck
By forcing the model to predict the judge's reasoning and the final verdict based solely on the facts, the Fact Encoder is pressured to capture the "key legal elements" necessary for a judgment. The use of shallow decoders is a deliberate design choice; it prevents the decoders from learning to reconstruct text through language modeling alone, thereby forcing the deep encoder to produce highly informative, dense vectors that represent the legal significance of the facts.
Evaluation and Key Results
SAILER was evaluated on four major benchmarks: LeCaRD and CAIL2022-LCR (Chinese criminal cases), and COLIEE 2020 and 2021 (English case law).
Performance Highlights
- Zero-Shot Dominance: On the LeCaRD dataset, SAILER achieved an NDCG@10 of 0.7979, significantly outperforming the previous state-of-the-art retrieval model, RetroMAE (0.6876). It demonstrated a unique ability to distinguish between legally similar but distinct charges without supervised training.
- Fine-Tuning Success: In supervised settings, SAILER maintained its lead over specialized models like LEGAL-BERT and Lawformer. On the COLIEE 2021 benchmark, it was the only model to significantly outperform traditional lexical matching methods like BM25 in terms of Recall@100.
Conclusion and Future Work
SAILER demonstrates that simulating the judicial process is an effective way to learn legal representations. By treating legal reasoning and decisions as derivatives of factual descriptions, the model creates a powerful information bottleneck that filters out irrelevant factual noise. Future research will focus on "expert-led" masking strategies to target specific legal keywords and the integration of external legal knowledge graphs to further ground the model's understanding.
Summary updated