Do Charge Prediction Models Learn Legal Theory? (2022)

Abstract: The charge prediction task aims to predict the charge for a case given its fact description. Recent models have already achieved impressive accuracy in this task, however, little is understood about the mechanisms they use to perform the judgment.For practical applications, a charge prediction model should conform to the certain legal theory in civil law countries, as under the framework of civil law, all cases are judged according to certain local legal theories. In China, for example, nearly all criminal judges make decisions based on the Four Elements Theory (FET).In this paper, we argue that trustworthy charge prediction models should take legal theories into consideration, and standing on prior studies in model interpretation, we propose three principles for trustworthy models should follow in this task, which are sensitive, selective, and presumption of innocence.We further design a new framework to evaluate whether existing charge prediction models learn legal theories. Our findings indicate that, while existing charge prediction models meet the selective principle on a benchmark dataset, most of them are still not sensitive enough and do not satisfy the presumption of innocence. Our code and dataset are released at https://github.com/ZhenweiAn/EXP_LJP .

## introduction the task of charge prediction is to determine appropriate charges, such as fraud or theft, for a case by analyzing its textual fact descriptions. such a technique is beneficial for improving the efficiency of legal professionals, e.g., helping judges, lawyers, or prosecutors to distinguish similar charges and focus on discriminative features. but as an auxiliary tool in the legal domain, it should be used with great caution, in case of introducing undesirable unfairness @xcite . fet is the most dominant legal theory in china, which defines that a case must satisfy four criminal elements simultaneously to constitute a crime most existing works formalize charge prediction as a text classification task @xcite @xcite . although recent advances in deep learning have demonstrated their excellent performance in predicting the charges @xcite , their reliability and interpretability are still underexplored. it is unknown whether the intrinsic decision mechanism of these models corresponds to the decision logic of human judges. specifically, since most existing models are data-driven and all cases in the charge prediction dataset conform to local legal theories, it is necessary to figure out whether these charge prediction models learn their corresponding legal theories. previous studies have shown that trustworthy legal ai models are supposed to point out humaninterpretable factors used in a decision @xcite . besides, they should also explain how the changes in fact descriptions would change their decisions. based on these discussions, we argue that a trustworthy charge prediction model should obey the following principles to conform to local legal theory and illustrate how they act in legal perspectives using fet, the most dominant legal theory in china @xcite , as an example: apart from the prerequisites, which have been extensively explored in various domains, we can not ignore the presumption of innocence when focusing on a legal task. presumption of innocence refers to the principle that any defendant is presumed innocent until proven guilty in a criminal trial, which is fundamental to protect human rights worldwide @xcite . taking this presumption into account, we propose an additional principle that a trustworthy charge prediction model should follow: 3) presumption of innocence: always assume innocent unless sufficient requirements for a charge are met. in fet, presumption of innocence is guaranteed by checking all four criminal elements before making decisions. in this paper, we propose a framework to evaluate whether a charge prediction model conforms to certain legal theory. our framework consists of three components that evaluate the aforementioned principles respectively. we first apply a probing task to measure whether models learn the skill of identifying criminal elements from fact descriptions, corresponding to the selective principle. the assumption here is that if the model is capable of identifying criminal elements, the knowledge of such a skill should be reflected in its internal representations, which could be detected by a diagnostic model @xcite . the evaluation of the sensitive principle relies on a perturbation experiment, in which we modify the fact descriptions of confusing charges and check whether the model could detect the modifications. specifically, for a pair of confusing charges, we rewrite the fact descriptions related to a certain criminal element and make the modified facts fulfill the requirements of the other charge. if a model is sensitive enough, it should be capable of iden-tifying these modifications and making different predictions for the original facts and the modified ones. the final component evaluates whether models follow the presumption of innocence by checking the model's performance on incomplete fact descriptions. those incomplete facts are obtained by excluding all descriptions related to a specific criminal element from criminal descriptions. the models are expected to make innocent predictions for those incomplete fact descriptions, because they violate the requirements of fet that all the four criminal elements should be satisfied when judging guilty. we conduct experiments with popular chinese charge prediction models and the results indicate that, while existing charge prediction models meet the selective principle on our benchmark dataset, most of them are still not sensitive enough and do not satisfy the presumption of innocence. our contributions are four-folds: (1) we propose the first ever set of principles that a trustworthy charge prediction model should follow when conforming to certain legal theories. (2) based on these principles, we propose a new investigation framework to evaluate the trustworthiness of charge prediction models. (3) we supplement the current popular charge prediction dataset cail @xcite with innocent cases and provide sentencelevel criminal elements annotation for a subset. (4) we examine existing chinese charge prediction models using fet, the most widely used legal theory in china, on the new benchmark, and find that most existing charge prediction models are not trustworthy enough, though they can achieve over 80% prediction accuracy. ## the charge prediction task suppose the fact description of a case is a word sequence @xmath0, x 2 , • • • , x n }, where n is the length of x. based on the fact description x, the charge prediction task aims at predicting an appropriate charge @xmath1, where y is the potential charge set. to solve this task, previous works often use existing text classification models @xcite , many of which are later improved by introducing legal knowledge @xcite @xcite . more recently, pretrained language models have also been proven effective in this task @xcite . in our study, we select the following representa-tive charge prediction models to evaluate whether they are trustworthy according to the specific legal theory, i.e., the fet in this case. bilstm @xcite uses bi-lstm @xcite to encode fact descriptions and applies an attention mechanism to aggregate encoded word representations to obtain fact embedding, which is then used for classification. topjudge topjudge @xcite is a representative of those multitask learning models. during encoding, topjudge employs cnn @xcite as the encoder to obtain fact embeddings. in decoding, it exploits a directed acyclic graph to capture the relationship among three sub-tasks, i.e., charge prediction, law article prediction, and term prediction, which are jointly optimized in a multitask framework. fewshot fewshot @xcite introduces discriminative attributes to distinguish confusing charges and provide additional knowledge for fewshot charges, which can stand for those models that introduce legal knowledge into the charge prediction task. it uses lstm @xcite as the fact encoder and conducts charge prediction and attributes prediction afterward. bert bert @xcite is a strong baseline for many text classification tasks. we use the representation of [cls] token for classification. lawformer @xcite is a longformerbased @xcite language model, which is pretrained on large-scale chinese legal cases. we use it to encode the fact description and apply the classification based on the [cls] token. ## dataset existing charge prediction datasets, such as cail @xcite , have played a crucial role in the development of legal artificial intelligence research. however, they suffer from two limitations: (1) lacking innocent cases. this violates the presumption of innocence, one of the most fundamental legal principles worldwide. (2) only containing coarse-grained annotations, such as charges and law articles, which cannot reveal how the judges analyze the cases. to alleviate the two shortcomings, in this paper, we propose a new charge prediction dataset, cail-i, that adds innocent cases to the original cail. we further annotate whether a sentence is related to certain criminal elements in a subset of cail. ## selective principle checking judges are required to extract criminal elements and filter less important information from fact descriptions, where the first step is to relate each sentence to its corresponding criminal elements. however, it is unclear whether existing charge prediction models are selective enough to relate sentences to criminal elements. to figure it out, we design a probing task to explore these models' ability to distinguish criminal elements of a charge. probing is a popular approach to model introspection, which trains a simple classifier -a probe, to predict certain desired information from the latent representations learned by neural networks. high prediction performance is interpreted as evidence for the information being encoded in the representations and indicates that the information is what the neural networks rely on @xcite . our probing task is to examine whether the representations have encoded the type of criminal elements, which represents the model's ability to identify them, i.e., the selectivity of models. figure 2 shows our probing setup. specifically, we freeze encoders of charge prediction models and obtain the sentence representations of fact descrip- we apply mean pooling to get the sentence representation from the word embeddings encoded by the encoder of specific charge prediction models. in order to explore how the charge prediction task influences models' ability to identify criminal elements, we conduct probing experiments on a few language models, including elmo @xcite , bert, and lawformer. the experiment is conducted on the sce dataset. ## sensitive principle checking a reliable charge prediction model should be sensitive to the subtle difference between the fact descriptions of confusing charges. in this section, we collect pairs of similar fact descriptions and evaluate whether existing models could recognize the difference. specifically, we select three groups of confusing charges where the charges in each group differ in only one criminal element from each other. according to the difference between the criminal elements of two charges, we modify the fact descriptions and make the modified ones meet the requirements of the other charge in the same group. we expect that a reliable model could recognize the distinctions and make different predictions for the original fact descriptions and the modified ones. as shown in figure 3 , the difference between forcible seizure and robbery lies in their conduct elements. "armed with a weapon or not" is the representative legal knowledge in distinguishing robbery from forcible seizure, as "armed with a weapon" could bring coercion to the victim, which is the conduct element of robbery. then, we add descriptions "armed with a knife" and "armed with a baton" to the fact descriptions of forcible seizure. a trustworthy charge prediction model is expected to learn such legal knowledge during training and predict robbery for the modified fact descriptions. for legal knowledge, like "armed with weapons" in figure 3 , we design two specific circumstances, e.g., "armed with a knife" and "armed with a baton", where "armed with a knife" is much more common than the other. this design is to determine if the charge prediction models truly learn the legal knowledge, rather than simply remembering common textual patterns. if the model only recognizes the common circumstance and ignores the other, we believe the model does not learn that legal knowledge. ## presumption of innocence checking in china, fet guarantees the presumption of innocence by checking the completeness of all four criminal elements. the theory requires that only when all four criminal elements are satisfied, will a defendant be convicted of that charge. based on this completeness checking, although a in the following example satisfied three criminal elements, a was innocent because a did not intend to occupy the phone and did not fulfill the requirement of the mental state element. a sat next to b on the bus. the wallet of b slipped out of b's pocket just before b got off the bus. a picked it up and got off as far as possible to give it back to b , but a did not find b. when b realize the wallet was lost, b called the police. then the police arrested a on suspicious of the theft. ideally, a reliable model, which follows the presumption of innocence, should have the ability to check whether all the four criminal elements are satisfied and predict a case as innocent when its fact description lacks one or more criminal elements. in this section, we explore whether existing charge prediction models have such an ability. specifically, we generate cases lacking one criminal element by removing all the sentences related to that element in criminal fact descriptions and check whether the model could change its predictions when identifying such modifications. we use the sce dataset to generate attack cases. the ratio of predicting the same charge after removing one criminal element is shown in charge prediction models do not satisfy the presumption of innocence. while charge prediction models are expected to recognize the absence of any criminal element, as shown in which criminal elements gain more attention? as illustrated in figure 5 , lawformer's confidence density changes significantly when the conduct element is omitted. for the remaining three criminal elements, eliminating the relevant fact descriptions has little effect on the lawformer's confidence in predicting the original charge, and in most cases, the confidence remains greater than 80%, which is a very high level. the results of other models are shown in the appendix and the results are similar as lawformer's. ## related work probing probing is a popular method for model introspection, which associates the representations learned by the neural networks with properties of interests and examines the extent to which these properties can be recovered from the representations @xcite . previous works mainly focus on what linguistic properties models have learnt @xcite @xcite . there also has been research that employs probing to investigate the mechanisms that models used to perform certain tasks @xcite . although the probing method is widely used, as far as we know, no research has employed probing to explore whether neural networks could learn legal knowledge, like the four elements theory in our paper. more discussion of probing could be found in @xcite besides, we are not the first to analyze models by manipulating the input text. many studies point out that minor changes in the text may bring unexpected results from the neural models, like bert-attack @xcite . but little work has been done in the field of analyzing legal texts. interpretable charge prediction models when machine learning algorithms are put into practice for automated individual decision making, many legal experts demand right to explanation @xcite for these algorithms, whereby users especially the losing party in a justification have the right to ask for an explanation of an algorithm decision that significantly affects them. consequently, the reliability and interpretability of charge prediction models are of equal importance to their performance. to improve the interpretability of charge predictions, several studies generate charge prediction alongside its supports. @xcite and @xcite employ reinforce learning to derive rationales at the phrase level to explain the model's output. hu et al. (2018) and li et al. (2019) design certain attributes to help distinguish confusing charges. they train a classifier for each attribution and then make decisions depending on whether or not the fact descriptions satisfy those attributes. @xcite designs a series of questions and solves charge prediction by answering those questions, with each question corresponding to a certain attribute. @xcite exhibits important evidence for judgment with causal graphs and causal chains. li2 achieves multi-granularity inference of legal charges by obtaining the subjective and objective elements from the fact descriptions of legal cases. although these strategies are more interpretable than those that just provide a charge, their reasoning procedure may still violates fet. some of them, such as @xcite , are solely concerned with the life-related object element and disregard moneyrelated object element, thus cannot perform criminal element extraction for all charges. some other works concentrate exclusively on a subset of the four criminal elements, omitting the others. @xcite , @xcite , and li2 do not consider the subject element, implying that they do not check whether all the elements are satisfied when making decisions, thus violate the presumption of innocence. as a result, the reliability of those models remains questionable. ## conclusion and future work when applying artificial intelligence in the domain of law, not only do we expect a model to achieve high accuracy, but we also require the model to be trustworthy. our work proposes three principles that a trustworthy model should follow in the charge prediction task based on both previous efforts on explanation and legal theories. according to the principles, we examine existing charge prediction models and our analysis shows that while they satisfy the selective principle, most models are not sensitive enough and do not satisfy the presumption of innocence. we hope our discoveries will help the artificial intelligence and law community better understand the mechanism of charge prediction models. we suggest the fol-lowing directions for future work: