How Vital is the Jurisprudential Relevance: Law Article Intervened Legal Case Retrieval and Matching

Nuo Xu, Pinghui Wang, Zi Liang, Junzhou Zhao, Xiaohong Guan

In the world of intelligent legal systems, finding the "right" precedent is about more than just matching keywords. Two cases might describe similar events but hinge on completely different legal principles. Conversely, two cases with very different narratives might be legally identical. This gap between semantic similarity and jurisprudential relevance is the "daunting challenge" addressed by a new paper from researchers at Xi’an Jiaotong University and Tsinghua University.

TL;DR

The researchers introduce LCM-LAI, an end-to-end framework that masters legal case retrieval by learning to predict applicable law articles as an intermediate step. By measuring similarity through "law distribution vectors" rather than just raw text embeddings, it achieves state-of-the-art performance across multiple real-world datasets without requiring expert-labeled law articles during actual use.

What Problem Does This Paper Address?

Legal Case Retrieval (LCR) and Matching (LCM) are essential for helping judges and lawyers find relevant precedents. However, standard NLP models often fail here because legal relevance is domain-specific.

As shown in Figure 1, a query about drug possession might semantically resemble a case about illegal firearms (both involve police searches and seized items in a safe), but they are a "mismatch" legally. Meanwhile, a case with different facts but the same applicable law is a "match."

Fig. 1. Example of the special text relevance in LCR. Left: the query and candidate legal cases in LCR. Right: two applicable law articles of the legal cases.

Previous attempts to solve this either relied on expensive manual tagging by legal experts or made the unrealistic assumption that the applicable law for a new, unjudged query case is already known. The authors set out to build a model that captures this "legal-rational" information automatically and realistically.

Methods

The core of the paper is the LCM-LAI (Legal Case Matching with Law Article Intervention) framework. It treats the problem as a dependent multi-task learning task.

LCM-LAI Framework Overview

The architecture consists of three main components:

  1. Basic Interaction Module (BIM): This handles standard semantic matching, ensuring the model doesn't lose the "who, what, and where" of the case.
  2. Legal Interaction Module (LIM): The "secret sauce." It uses a Law Article Prediction (LAP) sub-task to learn how to extract legal-rational features.
  3. Article-Aware Attention (AAA): Instead of just comparing sentence embeddings, the model maps each sentence to a "law distribution vector"—essentially asking, "How much does this sentence relate to Law Article X vs. Law Article Y?"
    • Article-Intervened Attention (AIA): It uses the predicted law articles to create a context vector that filters out "noise" (like background descriptions) and highlights jurisprudentially significant sentences.
  4. Matching Module: Combines semantic and legal representations to produce a final similarity score.

By using causal analysis (Figure 2), the authors designed the training process so that while the model learns from "gold standard" law labels, it can function perfectly at inference time using only its own internal predictions.

Datasets

The authors evaluated LCM-LAI on four major Chinese legal datasets:

  • LeCaRD & LeCaRDv2: Large-scale criminal case retrieval datasets published by the Supreme People’s Court of China.
  • ELAM: A dataset focused on explainable legal case matching with fine-grained rationale labels.
  • eCAIL: An extension of the CAIL 2021 dataset focusing on private lending (civil law) cases.

Key Insights and Ideas

  • Law as a Latent Bridge: The researchers treat law articles as high-dimensional summaries of professional legal knowledge. By forcing the model to predict these articles, they effectively "teach" it to see the world like a lawyer.
  • Distributional Similarity > Embedding Distance: The most innovative idea is measuring similarity via law distributions. If two sentences from different cases both point strongly toward the same specific set of statutes, they are legally similar, regardless of their specific wording.
  • Late Interaction for Efficiency: The model is designed for real-world speed. By using a "late interaction" framework, the computationally heavy sentence embeddings for millions of candidate cases can be precomputed offline. Only the lightweight interaction modules need to run online.

Key Results

LCM-LAI consistently outperformed all baselines, including specialized legal models like Lawformer and BERT-PLI.

  • Accuracy: On the LeCaRD dataset, it achieved a maximum relative improvement of 7.02% over previous state-of-the-art methods.
  • Efficiency: The model maintains an inference latency of roughly 76.5ms for re-ranking the top 100 candidates, well within the 500ms threshold required for online systems.
  • Robustness: Ablation studies confirmed that the Legal Interaction Module is the primary driver of performance, significantly outperforming models that rely solely on semantic text matching.

Limitations and Future Work

The authors identify two main hurdles:

  1. Common Law Systems: The current model relies on the explicit codification of laws found in Civil Law systems (like China or France). Adapting this to Common Law systems (like the US or UK), where "law" is often embedded in a web of precedents rather than a single book of articles, will require new strategies like automated case summarization.
  2. Capturing the "Focus of Dispute": The model sometimes struggles with the "controversial focus" of a case—the specific arguments made by the defense. These are often seen as "noise" by the law prediction task but are crucial for nuanced legal matching. Future versions may need to explicitly model these adversarial elements.

Summary updated

BibTeX
@article{xu2025how,
  author = {Nuo Xu and Pinghui Wang and Zi Liang and Junzhou Zhao and Xiaohong Guan},
  title = {{How Vital is the Jurisprudential Relevance: Law Article Intervened Legal Case Retrieval and Matching}},
  journal = {ACM Trans. Information Systems},
  year = {2025},
}
Figure