GR e X : A Graph Neural Network-Based Rerank-then-Expand Method for Detecting Conflicts Among Legal Articles in K orean Criminal Law (2025)

Abstract: As social systems become more complex, legal articles have grown increasingly intricate, making it harder for humans to identify potential conflicts among them, particularly when drafting new laws or applying existing ones. Despite its importance, no method has been proposed to detect such conflicts. We introduce a new legal NLP task, Legal Article Conflict Detection (LACD), which aims to identify conflicting articles within a given body of law. To address this task, we propose GReX, a novel graph neural network-based retrieval method. Experimental results show that GReX significantly outperforms existing methods, achieving improvements of 44.8% in nDCG@50, 32.8% in Recall@50, and 39.8% in Retrieval F1@50. Our codes are in github.com/asmath472/LACD-public.

## introduction in many countries, courts judge legal cases based on national laws, and lawyers frequently rely on legal articles (also known as codes, or statutes) in their works. in legal nlp, several studies have utilized legal articles to address tasks such as legal judgment prediction @xcite @xcite , legal article retrieval @xcite @xcite , and legal question answering @xcite . despite their crucial role, some legal articles conflict (also known as contradict, or compete) with one another @xcite @xcite . here, conflict refers to situations in which overlapping directives or contradictory interpretations arise. for example, in figure 1 , article 60 of narcotics control act and article 201 of criminal act define different punishments for the * corresponding author. same crime, using opium or morphine, and thus conflict with each other. if two articles conflict in a given circumstance, one may be disregarded during judgment, leading to confusion in the application of the law @xcite . detecting such conflicts is therefore essential for individuals involved in drafting laws (e.g., legislators) or enforcing laws (e.g., public prosecutors). as laws grow more complex @xcite , manually identifying conflicting articles becomes increasingly challenging. moreover, with the rise of llms and agents that rely on natural language rules @xcite @xcite , automating conflict detection has become even more critical. this study addresses this issue by developing nlp-based methods to automatically detect conflicting articles, with a particular focus on the criminal law of the republic of korea (hereafter referred to as korean law). we introduce a new legal nlp task, legal article conflict detection (lacd), which aims to retrieve articles that conflict with a given query article from a collection of legal articles. for example, as illustrated in figure 1 , when criminal act article 201 is given as a query, the model is expected to identify and retrieve criminal act article 205 and narcotics control act article 60 as conflicting articles, while correctly excluding narcotics control act article 58-2. for document retrieval tasks, various methods such as tf-idf, bm25 @xcite , dpr @xcite , and retrieve-thenrerank have been widely used. in particular, the retrieve-then-rerank approach, where top-ranked candidate documents are reranked using another slower but more accurate language models (lms), has demonstrated high performance with low latency across various retrieval tasks @xcite . however, conventional retrievethen-rerank methods perform poorly on the lacd task, primarily due to two fundamental differences article 201 (smoking opium and provision of place) (1) a person who ingests opium or receives a morphine injection, shall be punished by imprisonment with labor for not more than five years. (2) the preceding paragraph shall apply to a person who profits by providing a place for smoking opium or for injecting morphine. conflict article 205 (possession of opium, etc.) a person who possesses opium, morphine, its composite or an instrument for smoking opium, shall be punished by imprisonment for not more than one year or by a fine not exceeding five million won. narcotics control act criminal act article 2 (narcotic drugs) (a) the narcotic drugs referred to in subparagraph 2 (d) of article 2 of the act on the control of narcotics (hereinafter referred to as the "act") are as listed in […] enforcement decree of the narcotics control act article 60 (penalty provisions) (1) any of the following persons shall be punished by imprisonment with labor for not more than 10 years or by a fine not exceeding 100 million won: 1. a person who uses narcotic drugs or psychotropic substances under subparagraph 3 (a) of article 2 […] article 2 (definitions) […] 2. the term narcotic drugs means any of the following substances: […] (b) opium: the coagulated sap extracted from poppy and its processed substance: provided, that the […] (d) all alkaloids extracted from poppy, opium, or coca leaves and chemical compounds similar thereto, as prescribed by presidential decree; […] article 58-2 (penalty provisions) (1) person who gives or receives or delivers cannabis to the minors, or has the minors smoke or […] shall be punished by imprisonment with labor for a limited term of not less than two years. […] (1) between legal documents and general texts, and the second challenge (challenge 2) lies in the insufficiency of textual descriptions in legal articles, particularly when interpreting legal terminology. legal articles often rely on references to other articles to define specific terms or conditions @xcite . for instance, in figure 1 , article 60 uses the term narcotic drugs, which is explicitly defined in a referenced article (i.e., mentioned article), article 2. moreover, accurate interpretation often requires traversing not only direct (i.e., 1-hop) references but also indirect (n-hop) ones. for example, fully understanding the term narcotic drugs may require consulting the enforcement decree of the narcotics control act. therefore, to reason effectively over legal articles, a retrieval model must leverage not only the textual content of individual articles but also their explicit inter-article references (i.e., mention relationships) @xcite . however, to the best of our knowledge, no prior work has explored the use of mention relationships for legal article retrieval. to tackle the two key challenges in the lacd task, we propose a novel retrieve-then-rerank method, grex, which consists of two main components: (1) rex (rerank-then-expand), designed to address challenge 1, and ( 2) lgnn (legal graph neural network), a reranker aimed to address challenge 2. to tackle challenge 1, the rex method expands the set of candidate articles using a reranker. it first reranks the initially retrieved top-ranked articles to identify those that conflict with the query article a q , and then augments the candidate set by including additional articles -originally outside the top-ranked set -that are known to conflict with the identified ones. the underlying intuition builds on transitivity-like relationships among articles observed in prior studies @xcite @xcite , which we extend to conflict relationship: if a q conflicts with a j , and a i is known to conflict with a j , then a i is likely to conflict with a q , since such conflicts often reflect overlapping or contradictory legal directives. for example, in figure 1 , if the reranker detects a conflict between article 201 (the query) and article 205, and article 205 is known to conflict with article 60, rex expands the candidate set to include article 60, thereby uncovering its conflict with article 201. narcotics act article 2 article 39 (prohibition of use of narcotic drugs) no medical practitioner handling narcotics may conduct any of the following acts […] that this shall not apply […] under article 40 […] article 60 (penalty provisions) (1) any of the following persons shall be punished by imprisonment with […] 1. a person who uses narcotic drugs or psychotropic substances under subparagraph 3 (a) of article 2 […] 4. a person who handles narcotic drugs or issues a prescription thereof, in violation of article 5 (1) […] or 39; […] narcotics act article 60 article 2 (definitions) the terms used in this act are defined as follows: […] 2. the term narcotic drugs means any of the following substances: […] 4. the term cannabis means any of the following substances: […] article 40 (treatment and protection …) the minister of health and welfare or a mayor/do governor may either establish and operate a medical treatment and […] narcotics act article 39 narcotics act article 40 ⋯ figure 2: example of lmgraph (blue box: article, red text: mention). all contents are translated from korean. article mention graph (lmgraph), where each node represents a legal article and edges represent mention relationships between articles. the lgnn reranker applies a graph neural network (gnn) over this graph to leverage these relationships during reranking. this structure enables contextual reasoning based on inter-article connections. constructed from korean law, lmgraph consists of 192,974 nodes and 339,666 edges. figure 2 shows a small portion of lmgraph. by incorporating this graph, the lgnn reranker gains a deeper understanding of each article within its broader legal context. we constructed a dedicated dataset for training and evaluating the lacd task, consisting of 392 conflicting article pairs and 3,782 non-conflicting pairs, carefully reviewed and validated by legal experts. we will release it publicly. our proposed retriever, grex, achieves significant improvements over existing retrieve-then-rerank methods, with improvements of 44.8% in ndcg@50, 32.8% in recall@50, and 39.8% in retrieval f1@50. ## conclusions in this paper, we proposed a new legal nlp task, legal article conflict detection (lacd), and constructed a dedicated dataset for it. we propose a novel retriever, grex, which integrates two key techniques: rex and the lgnn reranker. experimental results demonstrate that grex significantly outperforms existing retrievers on the lacd task.