Abstract
Identifying and retrieving relevant statutes and prior cases (precedents) for a given legal situation are common tasks exercised by law practitioners. Researchers to date have addressed the two tasks independently, thus developing completely different datasets and models for each task; however, both retrieval tasks are inherently related, e.g., similar cases tend to cite similar statutes due to similar factual situations. In this paper, we address this gap. We propose IL-PCSR (Indian Legal corpus for Prior Case and Statute Retrieval), which is a unique corpus that provides a common testbed for developing models for both tasks—Statute Retrieval and Precedent Retrieval—that can exploit the dependence between the two. We experiment extensively with several baseline models, including lexical models, semantic models, and ensembles based on GNNs. Further, to exploit the dependence between the two tasks, we develop an LLM-based re-ranking approach that gives the best performance.
Introduction
In the legal world, research is a dual-track process: a lawyer must identify the specific laws (statutes) that apply to a situation and find previous court rulings (precedents) that interpret those laws. Historically, the AI research community has treated these as two unrelated retrieval tasks, developing separate datasets and models for each. However, in "common law" jurisdictions like India, these tasks are deeply intertwined. A case is often cited as a precedent precisely because it deals with the same statutes and factual patterns as the current case. By ignoring this link, current models miss out on a massive "hint": if you know which statutes are relevant, you have a much better chance of finding the right precedents, and vice versa. The authors address this gap by providing a unified dataset and a framework to exploit these cross-task dependencies.
Methods
The authors experimented with a wide range of retrieval strategies, moving from simple word-matching to complex graph-based reasoning:
- Lexical Baselines: Using BM25, a standard algorithm that ranks documents based on keyword overlaps.
- Semantic GNNs: They developed two Graph Neural Network (GNN) approaches: Event-GNN, which uses an LLM to extract "triplets" (Subject-Action-Object) to build a graph of legal events, and Para-GNN, which leverages the "rhetorical roles" of paragraphs to build a structured document graph.
- Ensemble Models: They combined lexical and semantic scores using both static grid searches and a Dynamic $\alpha$ approach, where a small neural network decides how much to trust the keyword match vs. the semantic meaning for every specific query.
- Two-Stage LLM Re-ranking: This is the paper's most novel contribution. They used GPT-4 to first rank candidates independently. In the second stage, they performed cross-task conditioning: the LLM was asked to re-rank statutes while being "shown" the precedents found in stage one, and vice versa.
The IL-PCSR Dataset
The primary contribution is IL-PCSR (Indian Legal corpus for Prior Case and Statute Retrieval). The dataset consists of 6,271 case judgments from the Supreme Court of India and various High Courts. The retrieval pools include 936 statutes from 92 Central Acts and 3,183 prior cases. Crucially, the authors masked all explicit citations in the query text to ensure models could not simply "cheat" by reading the answers already written in the judgment.
Key Insights and Results
- The "Task Interference" Trap: Surprisingly, training a single model to do both tasks at once (multi-task learning) actually lowered performance. Statute Retrieval (LSR) requires understanding abstract, technical language, while Precedent Retrieval (PCR) relies heavily on specific lexical overlaps in long, messy factual descriptions. The gradient signals from these two needs ended up "fighting" each other.
- Sequential over Simultaneous: While joint training failed, sequential transfer learning and LLM-based conditioning worked brilliantly. This suggests that the tasks share a common "legal logic" even if their retrieval patterns differ.
- Lexical vs. Semantic Strengths: Lexical models (BM25) dominated Precedent Retrieval, likely because precedents share very specific factual terminology. Conversely, semantic models (GNNs) were much better at Statute Retrieval, where the "meaning" of a law is more important than the specific words used to describe a crime.
- LLM Superiority: The two-stage LLM re-ranking approach achieved the best overall performance, reaching a Macro-F1 of 46.11% for statutes and 43.31% for precedents. In the LLM pipeline, Stage 2 (cross-task conditioning) provided a significant boost over Stage 1 (isolation), improving precedent F1 scores by over 4%.
Conclusion
IL-PCSR represents a landmark for Indian legal AI by moving beyond "siloed" retrieval. While high-end LLMs like GPT-4 provide state-of-the-art results, their computational cost remains a barrier to scaling. Future work will explore smaller, open-source LLMs and finer-grained supervision to capture legal relevance more efficiently. Human studies also suggest that current "Gold Standards" are conservative lower bounds, as many relevant cases exist beyond those explicitly cited in original judgments.
Summary updated