Table of Contents
Fetching ...

LEXA: Legal Case Retrieval via Graph Contrastive Learning with Contextualised LLM Embeddings

Yanran Tang, Ruihong Qiu, Yilun Liu, Xue Li, Zi Huang

TL;DR

LEXA addresses legal case retrieval limitations by jointly exploiting rich edge information, enhanced training signals via graph contrastive learning, and contextualised embeddings from large language models. It introduces the Edge-updated Graph Attention Layer to update both node and edge features and uses graph augmentation within a contrastive framework to improve legal understanding. Evaluations on COLIEE 2022 and 2023 show that LEXA consistently outperforms CaseGNN and other state-of-the-art LCR methods, demonstrating robust gains across ranking and precision metrics. The authors also release code, enabling reproducibility and practical adoption in legal retrieval workflows.

Abstract

Legal case retrieval (LCR) is a specialised information retrieval task aimed at identifying relevant cases given a query case. LCR holds pivotal significance in facilitating legal practitioners to locate legal precedents. Existing LCR methods predominantly rely on traditional lexical models or language models; however, they typically overlook the domain-specific structural information embedded in legal documents. Our previous work CaseGNN successfully harnesses text-attributed graphs and graph neural networks to incorporate structural legal information. Nonetheless, three key challenges remain in enhancing the representational capacity of CaseGNN: (1) The under-utilisation of rich edge information in text-attributed case graph (TACG). (2) The insufficiency of training signals for graph contrastive learning. (3) The lack of contextualised legal information in node and edge features. In this paper, the LEXA model, an extension of CaseGNN, is proposed to overcome these limitations by jointly leveraging rich edge information, enhanced training signals, and contextualised embeddings derived from large language models (LLMs). Specifically, an edge-updated graph attention layer (EUGAT) is proposed to comprehensively update node and edge features during graph modelling, resulting in a full utilisation of structural information of legal cases. Moreover, LEXA incorporates a novel graph contrastive learning objective with graph augmentation to provide additional training signals, thereby strengthening the model's legal comprehension capabilities. What's more, LLMs are employed to generate node and edge features for TACG. Extensive experiments on two benchmark datasets demonstrate that LEXA not only significantly improves CaseGNN but also achieves supreme performance compared to state-of-the-art LCR methods.

LEXA: Legal Case Retrieval via Graph Contrastive Learning with Contextualised LLM Embeddings

TL;DR

LEXA addresses legal case retrieval limitations by jointly exploiting rich edge information, enhanced training signals via graph contrastive learning, and contextualised embeddings from large language models. It introduces the Edge-updated Graph Attention Layer to update both node and edge features and uses graph augmentation within a contrastive framework to improve legal understanding. Evaluations on COLIEE 2022 and 2023 show that LEXA consistently outperforms CaseGNN and other state-of-the-art LCR methods, demonstrating robust gains across ranking and precision metrics. The authors also release code, enabling reproducibility and practical adoption in legal retrieval workflows.

Abstract

Legal case retrieval (LCR) is a specialised information retrieval task aimed at identifying relevant cases given a query case. LCR holds pivotal significance in facilitating legal practitioners to locate legal precedents. Existing LCR methods predominantly rely on traditional lexical models or language models; however, they typically overlook the domain-specific structural information embedded in legal documents. Our previous work CaseGNN successfully harnesses text-attributed graphs and graph neural networks to incorporate structural legal information. Nonetheless, three key challenges remain in enhancing the representational capacity of CaseGNN: (1) The under-utilisation of rich edge information in text-attributed case graph (TACG). (2) The insufficiency of training signals for graph contrastive learning. (3) The lack of contextualised legal information in node and edge features. In this paper, the LEXA model, an extension of CaseGNN, is proposed to overcome these limitations by jointly leveraging rich edge information, enhanced training signals, and contextualised embeddings derived from large language models (LLMs). Specifically, an edge-updated graph attention layer (EUGAT) is proposed to comprehensively update node and edge features during graph modelling, resulting in a full utilisation of structural information of legal cases. Moreover, LEXA incorporates a novel graph contrastive learning objective with graph augmentation to provide additional training signals, thereby strengthening the model's legal comprehension capabilities. What's more, LLMs are employed to generate node and edge features for TACG. Extensive experiments on two benchmark datasets demonstrate that LEXA not only significantly improves CaseGNN but also achieves supreme performance compared to state-of-the-art LCR methods.
Paper Structure (41 sections, 12 equations, 3 figures, 10 tables)

This paper contains 41 sections, 12 equations, 3 figures, 10 tables.

Figures (3)

  • Figure 1: The framework of LEXA. Given legal case $c$, the legal fact and the legal issue sections are converted into case graph. The case graph is processed by L layers of EUGAT and a Readout function to obtain an overall case graph representation. The whole framework is trained with the contrastive loss with positive, negative and augmented samples.
  • Figure 2: Parameter sensitivity for the temperature $\tau$ in the contrastive loss of LEXA.
  • Figure 3: Parameter sensitivity for the number of easy negative samples in the contrastive loss of LEXA.