Introduction
In the legal domain, identifying "noticed cases"—prior judicial decisions that serve as precedents—is a critical yet challenging task. This "needle in a haystack" problem requires legal practitioners to navigate vast databases where relevance is determined not just by keyword matching, but by intricate legal relationships and shared statutory charges. Traditional retrieval methods often fall short: lexical models like BM25 miss deep semantic context, while semantic models like BERT frequently ignore the structural connectivity (citations and shared charges) inherent in legal corpora.
To address these limitations, UQLegalAI introduced CaseLink, a hybrid retrieval framework designed for the COLIEE 2025 Task 1 competition. CaseLink combines the semantic depth of Large Language Models (LLMs) with the relational reasoning capabilities of Graph Neural Networks (GNNs).
Methodology: The CaseLink Framework
The core of CaseLink is the conceptualization of legal retrieval as a graph-learning problem. The framework operates through several key stages:
1. Global Case Graph (GCG) Construction
Instead of treating cases as isolated documents, CaseLink constructs a heterogeneous "Global Case Graph." * Nodes: The graph includes nodes for individual legal cases and specific legal charges (e.g., sections of the Federal Courts Act). * Edges: Three types of relationships are modeled: Case-Case (linking cases with high BM25 similarity), Charge-Charge (linking semantically related legal charges), and Case-Charge (linking a case to the specific statutes it references).
2. LLM-Powered Node Initialization
Node features are initialized using e5-mistral-7b-instruct, a state-of-the-art embedding model. This allows the system to capture nuanced semantic meanings from long legal texts, transforming them into high-dimensional vectors.
3. GNN Refinement and Dual-Objective Training
A Graph Attention Network (GAT) processes the GCG, allowing case representations to be informed by their neighbors (similar cases and related charges). The model is optimized using a dual-objective loss function:
- InfoNCE Loss: A contrastive objective that pulls relevant precedents closer to the query case in the embedding space.
- Degree Regularization (DegReg): A novel term that regularizes candidate node connectivity to enhance retrieval stability.
Finally, a "Year Filtering" post-processing step ensures that retrieved precedents chronologically precede the query case, adhering to legal logic.
Dataset and Experimental Setup
The framework was evaluated on the COLIEE 2025 Task 1 dataset, featuring English-language legal cases from the Federal Court of Canada. The dataset presents significant challenges due to the extreme length of documents, which average 30,000 tokens and can exceed 680,000 tokens. The training set includes 1,678 queries, while the test set comprises 400 queries.
Results
UQLegalAI achieved the second-highest performance in the COLIEE 2025 Task 1 competition, demonstrating both high effectiveness and remarkable stability.
As shown in the results table, UQLegalAI's best submission reached an F1 score of 0.2962. Notably, the team's results were highly consistent across multiple runs (variance of ±0.003), suggesting that the graph-based approach is more robust than methods relying solely on text embeddings.
Discussion and Future Work
While CaseLink proved highly effective, two primary bottlenecks were identified:
- Context Truncation: The 4,096-token limit of the
e5-mistralmodel necessitated truncating the 30,000-token average cases, potentially losing critical legal details. - Recall Constraints: The two-stage system used BM25 to pre-filter candidates. If a relevant case was not captured in the initial top-10 BM25 results, the GNN could not recover it.
Future research will focus on integrating models capable of handling longer contexts and incorporating more diverse legal metadata into the graph structure to further improve recall and precision.
Summary updated