Towards Explainability in Legal Outcome Prediction Models (2024)

Abstract: Current legal outcome prediction models - a staple of legal NLP - do not explain their reasoning. However, to employ these models in the real world, human legal actors need to be able to understand the model’s decisions. In the case of common law, legal practitioners reason towards the outcome of a case by referring to past case law, known as precedent. We contend that precedent is, therefore, a natural way of facilitating explainability for legal NLP models. In this paper, we contribute a novel method for identifying the precedent employed by legal outcome prediction models. Furthermore, by developing a taxonomy of legal precedent, we are able to compare human judges and neural models with respect to the different types of precedent they rely on. We find that while the models learn to predict outcomes reasonably well, their use of precedent is unlike that of human judges.

## introduction legal outcome prediction models have generated much interest in the past years @xcite @xcite . given a text transcript of the facts of a legal case, a legal outcome prediction model predicts whether a particular law has been breached. researchers have evaluated these models in several jurisdictions, including the uk, usa, switzerland, france, china, japan, india and the european court of human rights (ecthr; @xcite @xcite @xcite @xcite . while legal outcome prediction models are interesting in the context of academic research @xcite , any real-world deployment of legal ai necessitates a certain level of understanding of how the system works @xcite . after all, it is the reasoning towards the outcome of the case, rather than the outcome itself, that is of tantamount importance in legal outcome prediction. there are two reasons for this. (1) to be able to use a legal outcome prediction model system in practice implicitly assumes explainability: lawyers are bound to provide advice that the client can depend on. this obligation is so extreme that a negligent lawyer themself can be sued for misconduct if they give faulty advice. moreover, making legal decisions without understanding the reasoning behind them is unethical in many legal systems. for example, for a model to be used in practice it is a legal requirement in the eu under gdpr to know what the decision is based on. thus, the ability to double-check any information a hypothetical legal ai assistant provides is paramount when building technology for legal professionals. (2) explainability can create new use cases for legal outcome prediction models. knowing how to reason towards a desired legal outcome is valuable for drafting legal arguments and, thus, a legal outcome prediction system could be deployed as an assistive technology in areas well beyond simply predicting outcomes @xcite . state-of-the-art legal outcome prediction models are nearly homogeneous at a technical level-they are all parameterized as neural network classifiers on top of pre-trained language models (lm). while their performance is remarkable at times, the reasoning embedded in the model is largely inscrutable. despite the widespread recognition of the problem that unexplainable legal nlp systems pose @xcite and emerging work in the domain of case law summarization @xcite , much remains to be done in order to build effective explainable legal nlp systems @xcite . in particular, the existing work on explainable legal ai focuses on providing explanations by identifying relevant tokens @xcite , sentences @xcite or paragraphs @xcite , from the facts of the case. however, lawyers and judges typically reason at the level of a case. in this paper, we address the lack of explainability of legal outcome prediction models in a manner inspired by legal reasoning. the law in the anglo-american tradition is endowed with a natural rationale-precedent-which produces a legal argument. precedent is how judges and lawyers reason with respect to previous cases. because precedent is binding, by citing previously decided cases, legal actors substantiate their arguments. unlike existing explainability methods, our method produces an explanation in terms of legal precedent. this allows legal practitioners to easily inspect the legal reasoning the model employs. furthermore, we develop a taxonomy of legal precedent, which allows us to categorize each training case in terms of its precedential operation. we can therefore pinpoint which kinds of precedential reasoning the models rely on. we validate our proposed method by training several legal outcome prediction models and measuring the correlation between the precedent they use and that used by a human judge. overall, our experiments reveal that the precedent used by a human judge has a weak positive correlation with the precedent our models rely on (the highest spearman's ρ we observe is 0.18). we also discover that the model predictions positively correlate with one type of precedent in particular-the one where the outcome of the precedent case is the same as the outcome of the case at hand. however, for most of the categories of precedent, we find the models have a negligible or even negative correlation with the precedent applied by a human judge. worse yet, model f 1 performance on predicting the outcome of a case is a poor proxy for its alignment with precedential reasoning; see tab. 2. in other words, higher f 1 does not equal better alignment. therefore, our results cast doubt on the real-world utility of the current outcome prediction models. ## precedent-based interpretability we now give an argument for why precedent-based interpretability is the right direction for improving the usability of legal outcome prediction models. why are existing methods insufficient? many interpretability methods, such as linguistic probing, have been developed to investigate the linguistic capabilities of neural models @xcite @xcite . these methods often focus solely on the immediate input to the model. this is intentional because the goal of linguistic probing is to analyze the model in terms of how individual tokens affect the output. for example, if you want to know if and how a neural network's representations relate to a dependency parse of the input sentence, investigating the network's use of tokens in a sentence is a wise choice. in legal nlp, however, despite the recent rejuvenation of efforts in the field @xcite , there is no generally accepted legal theory about how individual words or sentences affect the outcome of a case. we further elaborate on the related work in §9. why precedent? there is already a generally accepted method of legal reasoning-reasoning through legal precedent. however, precedent does not operate on the granularity of individual words or sentences. instead, precedent relies on the relationship between the case at hand and previously decided cases. importantly, precedent is a way of developing law. a decision rendered in a past case binds future decisions in a common law system. this binding precedent, which stems from the doctrine of stare decisis, literally stand by the decision, ensures the reliability of law by forcing judges to make consistent decisions @xcite @xcite . 1 while precedent plays an important role in deciding the outcome of a case in both common and civil law systems, it occupies the core of legal reasoning in common law jurisdictions, e.g., uk, usa, and india, and it is the focus of this paper. ## under the influence we now turn to the explainability method developed in this paper, which will allow us to identify the exact role precedent plays in the decisions made by neural legal outcome prediction models. ## taxonomy of precedent precedent is more than just a binary category. legal actors use it in a number of different ways to craft their arguments. to better evaluate how neural models of outcome use precedent, we develop a novel taxonomy of types of precedent. ## neural models of legal outcome we consider two different instantiations of eq. ( 1 ), each of which corresponds to a different legal outcome prediction approach from the literature. ## results we report our results in terms of spearman's ρ. overall, we find a weak positive correlation between judges' precedent and influence scores-the best correlation we find is 0.180. however, due to the fine-grained taxonomy, the results vary between different types of precedent. inspecting the main results, contained in tab. 2, we make the following six findings. finding #1. we observe that influence scores correlate more strongly with applied precedent than distinguished precedent. in fact, the distinguished precedent is negatively correlated with the influence scores in the case of the simple model. under the best joint model, the highest correlation we find between the distinguished precedent and influence scores is nearly 4× lower (0.020) when compared to the highest correlation we obtain for the applied precedent (0.079). therefore, we conclude that current legal outcome prediction models struggle with distinguished precedent. finding #2. we find negative precedent correlates less strongly with influence scores than positive precedent. in the case of applied precedent, we observe a correlation with positive precedent of 0.180, which is more than 6× larger than the correlation we observe with negative precedent (0.027). therefore, we conclude the models struggle to utilize negative precedent in comparison. finding #3. when analyzed through the lens of influence scores, neither model correctly emulates the full spectrum of precedential reasoning. while the influence scores under the joint model correlate positively with every type of precedent, we observe an overall correlation of 0.085, which is weaker than the overall correlation of 0.157 that we observe with the simple model's influence scores. because the simple model is negatively correlated with distinguished precedent, neither of the models under consideration seems to be able to robustly reason with the full set of precedential operations. finding #4. we observe that pre-training on legal data is beneficial for improving precedent correlations. the legal-bert-based models exhibit higher correlations with precedent when compared to the bert-based models. under the simple model, in particular, we see an increase from a correlation of 0.137 to a correlation of 0.157 when we use legal-bert. finding #5. when we compare the correlation for cases a judge has cited with the correlation for claimed precedent cases, we observe that the latter approach magnifies the results. in the case of a positive correlation, the correlations become more positive. in the case of a negative correlation, the correlations become more negative. the effect is considerable-in many instances, the difference is more than an order of magnitude. finding #6. we find that higher f 1 scores do not directly translate to more human-like legal reasoning. where the joint models outperform the simple models in terms of f 1 , the overall ρ is higher for the simple models. overall, the worst model in terms of f 1 (simple bert: 0.64 f 1 ) exhibits a correlation of 0.14 with precedent. whereas the best model in terms of f 1 (joint legal-bert: 0.68 f 1 ) exhibits a correlation of merely 0.085 with the precedent. conclusion. in summary, we find that current models do well at encoding one particular type of precedent, applied-positive precedent, and not so well at the other types of precedent. we believe the culprit is the lack of sophisticated legal reasoning. to distinguish a case is to identify how two seemingly similar cases differ. this requires in-depth legal knowledge. our work indicates that this level of legal understanding is beyond the capabilities of the current neural models of legal outcome prediction models. ## further analysis we extend our analysis with the following three studies to better understand the models' behavior. first, we analyze the precedent from the perspective of the model. then, we analyze the model behavior per individual legal article. finally, in app. c, we develop a novel metric, which confirms the trends we report in §7 from the perspective of precedent retrieval. ## related work in the wider nlp context, there is a considerable amount of research aimed at developing methods for unraveling what lms know about language @xcite @xcite @xcite . sub-fields of nlp dealing with sensitive information, such as biomedical nlp @xcite @xcite @xcite , have set out to build their own explainable ai models to address the concerns about applying a black-box model to sensitive data. in the past, legal ai researchers working on symbolic methods built explainable models of legal reasoning @xcite @xcite . however, the most recent crop of models utilizing modern nlp methods are inherently opaque. regardless of whether the domain is chinese @xcite , japanese @xcite , indian @xcite or uk law @xcite , the machine learning models underlying the work in the area are not easily interpretable. to address this shortcoming, straightforwardly adopting existing methodology from wider nlp is insufficient. after all, how well a model knows syntax can only go so far in explaining its legal decisions. using more general methods, such as attention maps, is not particularly viable either. for instance, using attention to find where the model looks at legal facts does not provide a legally salient answer as to what the decision is based on @xcite . setting aside the question of whether attention can be used for explainability in the first place @xcite @xcite , models of legal outcome prediction are trained to make decisions based on the facts of a case alone. while the facts of the case are important, inspecting the attention distribution over them can never provide a sufficient explanation. this is because lawyers and judges do not argue by highlighting which facts played a role in their decision. instead, in their arguments, they justify their decision by relating the facts at hand to previous case decisions. this makes our work different from prior research in two aspects. (1) where the existing legal ai work focuses on providing explanations by identifying relevant tokens @xcite , sentences @xcite or paragraphs @xcite of the facts of the case, we find the entire relevant cases. (2) instead of looking inside the input to the model, i.e., at the facts, we look at the training data of the model. ## conclusion we introduce a method based on influence functions for legal explainability. we created a taxonomy of precedent, used it to annotate the ecthr dataset and ran a series of experiments to identify what precedential operations might be learned, or not, by outcome prediction models. we find that the models we train rely on one type of precedent in particular: applied precedent. this makes them very unlike human judges, who employ a full spectrum of precedential reasoning to justify the outcome of a case. to construct useful models of legal outcomes, we need to develop legally faithful models of law. we hope that our methodology can help in the search for such models. indeed, we see two concrete avenues toward legal nlp models that could better align with human precedential reasoning. (1) we can focus on creating more representative datasets of the tasks we would like to model. the facts in current datasets contain superficial indicators of the outcome-they are written as post-hoc justification. using datasets built around legal briefs, instead of cases, could be a step towards mitigating this issue @xcite . (2) we can better incorporate the court processes in our neural models. to induce precedential reasoning, a natural step would be to incorporate precedent retrieval as part of the model architecture. much like a judge, the model should be able to explicitly select the precedent that its decision is based on.