Augmenting Legal Judgment Prediction with Contrastive Case Relations (2022)

Abstract: Existing legal judgment prediction methods usually only consider one single case fact description as input, which may not fully utilize the information in the data such as case relations and frequency. In this paper, we propose a new perspective that introduces some contrastive case relations to construct case triples as input, and a corresponding judgment prediction framework with case triples modeling (CTM). Our CTM can more effectively utilize beneficial information to refine the encoding and decoding processes through three customized modules, including the case triple module, the relational attention module, and the category decoder module. Finally, we conduct extensive experiments on two public datasets to verify the effectiveness of our CTM, including overall evaluation, compatibility analysis, ablation studies, analysis of gain source and visualization of case representations.

## introduction as an important component of legal intelligence in civil law systems, legal judgment prediction (ljp) has received a lot of attention and research in recent years @xcite . given a case fact description, ljp usually includes three sub-tasks, i.e., law article prediction, charge prediction and terms of penalty prediction for this case @xcite , and an example of ljp is shown on the left side of figure 1 . as an auxiliary tool to serve legal practitioners and people without professional knowledge in law, a more accurate method for ljp is necessary. the existing legal judgment prediction methods mainly include two lines of single-task modeling and multi-task modeling. the former usually focuses on targeted modeling of a certain sub-task, such as introducing some more advanced network architectures @xcite ) or * co-corresponding authors more sources of information @xcite @xcite . the latter takes multiple sub-tasks as a whole and uses a multi-task learning (mtl) framework for unified modeling. the most representative methods in this line aim to design different decoding structures, including mtl @xcite that ignores the inter-task dependency, topjudge @xcite that considers unidirectional topological dependency among sub-tasks, and mpbfn @xcite that considers bidirectional topological dependency. in this paper, we focus on the line of multi-task learning because it is more aligned with practical applications. although the existing methods have shown promising results, as shown on the left side of figure 1 , most of them only consider the fact description of one single case as input when modeling. this form of modeling ignores the full utilization of the beneficial information contained in the data, such as the case relation and frequency information that might provide constraints for modeling. we believe this may have an adverse effect on the model and cause a performance bottleneck, such as cases with low-frequency law articles or charges suffer from insufficient training. as an example, we show in figure 2 the accuracy of mpbfn on cail-small @xcite for law articles and charges of different frequencies. we can find that the accuracy drops significantly with decreasing frequency. to more effectively utilize the beneficial information contained in the data, in this paper, we propose a new perspective that introduces some contrastive case relations to construct case triples as the input of the model. specifically, we sample some similar and dissimilar cases for a current case through some carefully designed contrasting case relations, where these auxiliary cases will be beneficial to improve the performance of the model. an example of this new form of modeling is shown on fact description on the afternoon of december 22, 2012, the defendant xxx took an apple 4s worth 4,256 chinese yuan (cny) from the owner xxx and did not return it after using it to make a call. charge: the crime of theft law article: no. 264 terms of penalty: 5 months encode case representation decode on october 3, 2015, the defendant xxx took away the mobile phone worth 2,253 chinese yuan (cny) that was placed on the counter by the owner xxx when no one was there. encode case representation decode similar case dissimilar case on august 17, 2014, the defendant xxx threatened the victim xxx with a knife, and fled the scene after stealing his wallet and an apple 4s worth 4,256 chinese yuan (cny). fact description on the afternoon of december 22, 2012, the defendant xxx took an apple 4s worth 4,256 chinese yuan (cny) from the owner xxx and did not return it after using it to make a call. charge: the crime of theft law article: no. 264 terms of penalty: 5 months figure 1 : on the left is an illustrative example of legal judgment prediction (ljp), including a case fact description and the corresponding three prediction sub-tasks. on the right is an example of the proposed new form of modeling, where some contrastive case relations are introduced to construct case triples as input. note that in this paper we focus on prediction of law articles and charges, since that of terms of penalty is known of high difficulty and variance. the right side of figure 1 , and the importance of different phrases may be more accurately identified through this case triple. we then propose a corresponding judgment prediction framework with case triple modeling (ctm) to mine information from the constructed case triples for improving the model. specifically, our ctm adds three customized modules to the traditional encoder and decoder: 1) a case triple module samples two similar cases and one dissimilar case for an input case based on case labels and frequency information to form two case triples; 2) a relational attention module imposes a relational constraint on the obtained case triples to refine the encoding process; and 3) a category decoder module acts as a switch to select a corresponding decoding branch for a high-frequency or low-frequency case to further refine the decoding process. it is intuitive that our ctm does not depend on a specific encoder or decoder. this means that our ctm can be easily integrated with some existing legal judgment prediction methods, and we will demonstrate its good compatibility in the experiments by combining our ctm with different encoder and decoder structures. in addition to this, we conduct other empirical studies on two public datasets to verify the effectiveness of our ctm, including overall performance evaluation, ablation studies, fine-grained performance evaluation and case representation analysis. ## related work in this section, we briefly review some related works on two research topics, including legal judgment prediction and case relations modeling. legal judgment prediction. legal judgment prediction can be mainly summarized into two research lines. the first line focuses on the targeted modeling of a specific sub-task from the perspective of network architectures @xcite @xcite , available information sources @xcite @xcite , and interpretability of the models @xcite . the second line considers multiple sub-tasks as a whole and uses a multi-task learning framework for case modeling. the most representative methods are mtl @xcite , topjudge @xcite and mpbfn @xcite , in which three different decoding structures are considered respectively. some recent works have designed some more sophisticated architectures based on them, especially in combination with some graph learning techniques and large-scale pre-trained models @xcite @xcite . note that since the terms of penalty prediction is usually of higher difficulty and variance than the other two sub-tasks, we focus on law article prediction and charge prediction similar to @xcite . case relations modeling. the idea of case relations modeling is mainly applied to similar case matching (scm) tasks in some recent studies on legal intelligence @xcite @xcite . unlike legal judgment prediction, this task is given a set of manually labeled case triples as training samples, where each triple contains two similar cases and one dissimilar case, and the goal is to learn a model that can identify those two similar ones. this task can be further relaxed to find some similar cases for a current case @xcite , which is important in the common law system. to the best of our knowledge, our work is the first to introduce a case triple structure to legal judgment prediction based on some case relations. ## experiments in this section, we first introduce the experimental setup, and then conduct extensive empirical studies and show the effectiveness of our ctm. ## conclusions and future work in this paper, we introduce some contrastive case relations to construct case triples as a new form of modeling, and propose a general judgment prediction framework with case triple modeling (ctm). our ctm includes three new modules, i.e., a case sampling module for constructing case triples, a relational attention module for extracting information from case triples to refine the encoding process, and a category decoder module for refining the decoding process. finally, we conduct extensive experiments on two public datasets and find that our ctm can effectively improve the performance of legal judgment prediction, especially for cases with low-frequency law articles or charges, and is also of good compatibility. for future works, we plan to extend our ctm to more scenarios such as cases with multiple law articles or charges by further improving the corresponding case triple module and relational attention module. we are also interested in generalizing our ctm for prediction of the terms of penalty.