Finding the Law: Enhancing Statutory Article Retrieval via Graph Neural Networks (2023)

Abstract: Statutory article retrieval (SAR), the task of retrieving statute law articles relevant to a legal question, is a promising application of legal text processing. In particular, high-quality SAR systems can improve the work efficiency of legal professionals and provide basic legal assistance to citizens in need at no cost. Unlike traditional ad-hoc information retrieval, where each document is considered a complete source of information, SAR deals with texts whose full sense depends on complementary information from the topological organization of statute law. While existing works ignore these domain-specific dependencies, we propose a novel graph-augmented dense statute retriever (G-DSR) model that incorporates the structure of legislation via a graph neural network to improve dense retrieval performance. Experimental results show that our approach outperforms strong retrieval baselines on a real-world expert-annotated SAR dataset.

## introduction today, the high cost of legal expertise prevents less fortunate people from understanding and reacting to legal issues that may arise @xcite . in recent years, an increasing number of works have focused on legal text processing @xcite with the intent to assist legal practitioners and citizens while reducing legal costs and improving equal access to justice for all. statutory article retrieval (sar), the task of retrieving statute law articles relevant to a legal question, marks the first and one of the most crucial steps in any legal aid process. our goal is to help reduce the gap between people and the law by improving sar systems that could provide citizens with the first component of a free professional legal aid service. book 1 book 2 book 3 book m title 1 title 2 title 3 title 4 title n s ta tu te l a w section 1 art. r ... ... ... ... ... ... ... ... ... chapter 1 chapter 2 chapter 3 chapter 4 chapter 5 chapter p ... ... ... ... ... section q section 2 section 3 section 4 section 5 section 6 ... ... ... ... ... ... art.101 art.102 art.103 art.104 art.105 art.106 art.107 art.108 models or dense embedding-based models @xcite . while good performance has been achieved, these approaches rely on the flawed assumption that articles are complete and independent sources of information. in reality, statute law is an ensemble of interdependent rules meticulously organized into different codes, books, titles, chapters, and sections, as illustrated in figure 1 . each level in the structure of legislation comes with a unique heading that informs about the content of the articles below it. an article takes on its whole meaning only when considered at its rightful place in the structure with the complementary information from its neighboring articles. this work shows that such a structure can be highly beneficial for retrieving statutes. we propose a graph-augmented dense statute retriever (g-dsr) model that leverages the topological structure of legislation to enhance the article content information. specifically, the proposed model extends the document encoder of a dense retriever with a graph neural network to learn knowledge-rich cross-article representations. similar to previous work, we adopt a contrastive learning strategy to optimize the similarity between the representations of relevant query-article pairs. the contributions of this paper are threefold: ## preliminaries in this section, we formally introduce the task of statutory article retrieval and discuss the specific difficulties associated with it. we then explain how we identify the structure of legislation as an essential consideration in sar. problem formulation. given a simple legal question, such as "who should pay for the construction of the common wall? ", sar aims to return one or several relevant articles from the legislation. formally speaking, a sar system can be expressed as a function r : (q, c) → f that takes as input a question q along with a corpus of articles @xmath0, a 2 , • • • , a n }, and returns a much smaller filter set f ⊂ c of the supposedly relevant articles, ranked by decreasing order of relevance. for a fixed @xmath1, the retriever can be evaluated in isolation with multiple rank-based metrics. most modern retriever systems follow a two-stage retrieval approach @xcite @xcite , where a pre-fetcher first aims to return all relevant documents in the filter set f and a re-ranker then attempts to make more relevant documents in f appear before less relevant ones. in this work, we focus our research on improving the pre-fetcher component for sar. challenges. sar comes with two core challenges that make the task unique compared to tra-ditional information retrieval. first, the statutes to be retrieved are written in a language that dramatically differs from the ordinary plain language used in the questions. the legal language uses a specialized jargon known for its frequent and deliberate use of formal words, latin phrases, lengthy sentences, and expressions with flexible meanings @xcite . second, statutory articles are long text sequences that may reach several thousand words. this implies overcoming the maximum input length limit of 512 tokens imposed by bert-based models, which have recently become the standard in neural information retrieval due to their effectiveness. ## approach in this section, we present a new general approach for sar that learns to retrieve relevant statutes by using both the textual semantic information from articles and the structural graph information from the legislation. our model, called graph-augmented dense statute retriever (g-dsr), consists of two main building blocks, as depicted in figure 2 , that are trained independently with the same objective. we first describe the dense retriever component of our approach in section 3.1 and then explain how our legislative graph encoder builds upon it in section 3.2. ## experimental setup in this section, we present the basic setup for experiments. in particular, section 4.1 describes the dataset we conduct our experiments on, section 4.2 details our model implementation, section 4.3 reviews the different baselines we use for comparison, and section 4.4 reports the evaluation metrics. ## experiments in this section, we empirically evaluate the effectiveness of our proposed approach against competitive baselines and discuss the main results in section 5.1. next, we provide an ablation study in section 5.2 to understand how different design and training options affect our model's performance. ## conclusion in this paper, we introduce g-dsr, a novel approach for statutory article retrieval (sar) that leverages the topological structure of legislation to improve retrieval performance. specifically, g-dsr enriches the article representations of a dense retriever designed for long document retrieval by employing a graph neural network that uses the organization of statute law to learn knowledge-rich cross-article embeddings. experiments show that g-dsr outperforms competitive baselines on a real-world expert-annotated sar dataset. we also include a detailed analysis to motivate our design choices and training strategies.