Comparative Study of Explainability Methods for Legal Outcome Prediction (2024)

Abstract: This paper investigates explainability in Natural Legal Language Processing (NLLP). We study the task of legal outcome prediction of the European Court of Human Rights cases in a ternary classification setup, where a language model is fine-tuned to predict whether an article has been claimed and violated (positive outcome), claimed but not violated (negative outcome) or not claimed at all (null outcome). Specifically, we experiment with three popular NLP explainability methods. Correlating the attribution scores of input-level methods (Integrated Gradients and Contrastive Explanations) with rationales from court rulings, we show that the correlations are very weak, with absolute values of Spearman and Kendall correlation coefficients ranging between 0.003 and 0.094. Furthermore, we use a concept-level interpretability method (Concept Erasure) with human expert annotations of legal reasoning, to show that obscuring legal concepts from the model representation has an insignificant effect on model performance (at most a decline of 0.26 F1). Therefore, our results indicate that automated legal outcome prediction models are not reliably grounded in legal reasoning.

## introduction interpretability is at the core of legal practice. lawyers and judges pour over legal text to interpret it in light of current affairs, the case at hand and the general zeitgeist @xcite . in the context of natural legal language processing, interpretability is no less important. primarily, this is because the use of machine learning (ml) in law can have profound effects on human life @xcite . this risk is widely acknowledged, as reflected in the eu's general data protection regulation (gdpr), which mandates that legal decisions must be explainable @xcite . 2 as such, we advocate for interpretability to be a central focus of nllp research. despite early contributions to the field, which include symbolic methods @xcite as well as attention-based interpretability @xcite , and the emergence of recent domain-specific methods @xcite , there remains a lack of a comprehensive overview of the popular nlp interpretability tools that can be applied to legal contexts. in this work, we offer such a comparative study. we focus on explainability of neural models in the context of the legal outcome prediction task -a popular nllp task @xcite @xcite @xcite . in particular, we work on the recent reformulation of this task as a three-way classification @xcite and compare three influential interpretability methods from general nlp on legal outcome prediction -integrated gradients @xcite , contrastive explanations @xcite and concept errasure @xcite . we first hypothesize that while different explainability methods might provide varying results in terms of what legal outcome prediction models use in their decision-making process, the models are likely to be using features which differ from those that a human would deem important. we put this hypothesis to the test by correlating the attributions from the methods of integrated gradients @xcite and contrastive explanations @xcite with ground truth data from court rulings. confirming our hypothesis, we measure a very weak correlation between the predicted importance scores and the ground truth labels, with the absolute values of the correla-tion coefficients of @xcite and @xcite ranging between 0.003 and 0.094. we further hypothesise that the outcome prediction models are not likely to perform complex legal reasoning, such as those captured in annotated datasets of legal arguments @xcite and concepts @xcite . we test this by using the concept erasure method @xcite . indeed, we find that the outcome prediction models perform on par or at times even better when legal concepts are obscured from their representations, with f1 on the outcome prediction task decreasing by at most 0.26 -a statistically insignificant change. we conclude that the subpar performance of neural models on negative outcome prediction task is symptomatic of a larger issue -the models do not reason like a human legal professional would. ## related work over the years, different approaches have been proposed to address the question of how an ml model reasons @xcite . researchers have compared the faithfulness and cost of various interpretability methods @xcite @xcite . the majority of these explainability methods link surface features in the model input to model predictions. some research has emphasized that there is likely no single feature-based explanation for a given model prediction @xcite . thus, the development of alternative, concept-based methods has complemented their feature-based counterparts @xcite . furthermore, humans find the explanations of deceptive machine learning systems equally convincing as those of truthful models @xcite , which stresses the importance of explanations being faithful as opposed to simply convincing @xcite @xcite . the earliest work in explainability in nllp are the legal reasoning systems of hypo @xcite and @xcite . these symbolic systems involve a manual extraction of factors that do not deterministically influence the case outcome, but rather weigh the decision positively or negatively with varying strength, depending on the context. since then researchers have developed hybrid systems, using stochastic methods to extract the features that are then fed into a rule-based system. falakmasir and @xcite have used tf-idf and latent dirichlet allocation (lda), while @xcite employed transformer models @xcite , to extract factors to be used in rule-based systems. researchers have also studied explainability in fully probabilistic methods. @xcite and @xcite use attention as explanation. @xcite solve the outcome prediction and rationale extraction tasks via a multitask approach. @xcite evaluate the usefulness of attention scores as well as scores from a source attribution method based on word overlap, by measuring the increase in the speed of humans reviewing legal summaries. @xcite and soh tsin howe (2024) use topic models along with other featureextraction methods. @xcite , @xcite and @xcite use llms to extract factors in legal cases. @xcite explore a novel interpretability method in nllp, namely influence functions @xcite , in order to determine which cases in the training data influence the outcome predictions. some researchers have also addressed the problem that interpretability methods are difficult to evaluate, given that even humans disagree on what a correct explanation is. @xcite compare the results of an outcome prediction model with some parts of the input masked and without, which highlight the difference between the importance attributed by experts and the occlusion method. @xcite have shown low agreement between integrated gradients scores of models and expert annotations. @xcite link the errors of outcome prediction models to their failure to detect the parts of the input that determine the judgment. @xcite use deconfounding to align model predictions with expert reasoning. @xcite study human label variation with regard to the rationales explaining legal outcomes, and show low agreement not only between experts and models, but also among experts, which highlights the difficulty of the task. by and large, the models described in this subsection do not compare multiple interpretability methods. legal outcome prediction is the task of predicting the outcome of a case, i.e. whether a law has been violated, given the case facts, which describe the circumstances of the parties involved. 3 over the years, predicting the outcome of a court case has been approached by many researchers in a number of jurisdictions @xcite @xcite @xcite . perhaps due to its conceptual simplicity, the task is one of the cornerstones of nllp research and is usually defined as a binary classification task @xcite . different approaches to legal outcome prediction use the case facts @xcite , the complaints @xcite , the contents of the laws @xcite , and/or the facts of precedent cases @xcite . recent work has re-framed outcome prediction to reflect the reality of a court setting better @xcite . instead of predicting if an article is violated or not, the task is to predict whether the article is claimed to be violated (simulating the role of a lawyer), and then whether it is actually found to be violated or not (simulating the role of a judge). this can be simplified as a three-way classification objective. in practice, a model is trained to predict positive outcomes, i.e. when a law has been claimed as violated and found as violated, negative outcomes, i.e. when a law has been claimed as violated but the judge found it was not violated, null outcomes, i.e. when a law has not even been claimed as violated and is irrelevant to the case. ## explainability for models of legal outcome in our explainability experiments, we focus on the re-framing of the legal outcome prediction task following @xcite . we do this for three reasons. (1) the new formulation better reflects the actual legal process and outperforms prior work in the domain of the european convention of human rights (echr). (2) legal outcome prediction models turn out to perform particularly poorly when having to predict negative outcomes. this is diametrically opposite to their excellence at predicting positive outcomes. thus, at the core of our paper lies a natural question arising from this asymmetry. why do the models struggle with negative outcome prediction? (3) having three target classes instead of two, opens up new possibilities in terms of the explainability methods we can study. we begin our work with the standard explainable artificial intelligence (xai) method -namely integrated gradients @xcite . this method highlights the input tokens (in our setting facts) the model finds important for a given case. then, we move to a contrastive explanation method @xcite . since we work with a three-way classification problem we can employ contrastive explanations to infer which facts are particularly important to the model for distinguishing each target class from every other class. our main interest here is to understand why the models struggle with negative outcomes. finally, we use the concept erasure method @xcite to perform a deeper analysis of whether any legal concepts are used by the model. unlike the prior two methods where we study the effect of input tokens, here we study the effect of legal concepts encoded in the latent representations learned by the model. we describe each of the above approaches in more detail in section 5. given the ground-truth data of human annotated token sequences and legal concepts @xcite @xcite , we can begin to study how well a model aligns with human judgement when it comes to legal reasoning. furthermore, the chosen set of xai approaches allows us to study the difference between superficial textual explanations versus explanations through concepts in the legal ai domain. ## parametrizing legal outcome prediction models we finetune a sequence classification model on the ecthr dataset to jointly predict the positive, negative and null outcomes, following the architecture of the ternary prediction setup from @xcite . one modification made to the model architecture is replacing the multi-layer perceptron (mlp) with a simple linear classification layer. this change ensures that the setup is compatible with the interpretability methods discussed in section 5, where linear classifiers are used. we choose the legal-bert model @xcite due to its domain-specific training set and the fact that it yields the best performance for the ternary setup we are using for our experiments. 4 the model is trained on a single nvidia tu102 gpu with batch size 16, for a maximum of 10 epochs, using early stopping by monitoring the loss. the model performs the best on the null class, and yields particularly poor results on the negative cases, as shown in ## interpretability methods this section describes the interpretability methods used in this study, along with their implementation. ## datasets we use the european court of human rights (ec-thr) dataset @xcite foot_4 and its extensions for the experiments in this study (see in addition, we are also using annotations of legal concepts in ecthr. firstly, @xcite annotate a corpus of 373 court decisions covering articles 3, 7, and 8, with legal arguments being made in each case. the purpose of the dataset is to aid legal nlp models in coming closer to legal reasoning in modeling outcomes. secondly, @xcite annotate 735 cases pertaining to article 6, with legal concepts that correspond to factors in a rule-based legal reasoning system. the concepts used in this study are listed in appendix b. ## evaluation metrics spearman and kendal correlation coefficients. in order to compare the importance scores attributed to the inputs and concepts by the different interpretability methods, we run each interpretability method on the inputs and evaluate the predictions with respect to the silver rationales annotations. we run a correlation study using @xcite and @xcite rank correlation coefficients and calculate statistical significance using a t-test. the differences assigned by the contrastive explanations method and the attributions of integrated gradients are treated as ranks. ## results this section presents the quantitative and qualitative results of the interpretability methods. in order to ensure that the results cannot be accounted for by the short input sequence length of the legal-bert model @xcite or the ternary setup of the task @xcite , we replicate the results with the longformer model @xcite as well as the binary setup. the results of these experiments are presented in appendix c. ## conclusion we have studied three interpretability methods in the domain of legal outcome prediction. our experimental results show a small variance in the correlation between the importance scores assigned by different interpretability methods and the ground truth. worryingly, even removing the information a lawyer would consider essential for reasoning over the data has an insiginificant effect on the model performance. we interpret this result as a call for caution in using automated legal outcome prediction models as they do not appear to be grounded in legal reasoning to the extent that would be necessary for ensuring reliability. future work in nllp should continue searching for ways to make legal outcome prediction models more transparent by investigating their legal expertise. studying why predicting negative outcome prediction remains a difficult task is only one direction of such research. new directions could involve the study of biases that may be affecting the decision making of the models.