Towards Explainability in Legal Outcome Prediction Models

Josef Valvoda, Ryan Cotterell

TL;DR

This paper proposes a novel framework for making legal AI explainable by identifying the legal precedents that influence a model's decision. By applying influence functions to track how specific training cases affect predictions, the authors reveal a sobering reality: while current models can predict legal outcomes reasonably well, their "reasoning" is poorly aligned with human judges, particularly when it comes to distinguishing between complex cases.

What Problem Does This Paper Address?

Legal Outcome Prediction (LOP) models—AI systems that predict whether a law has been breached based on the facts of a case—are becoming increasingly accurate. However, they remain "black boxes." For a lawyer or judge, a simple "guilty" or "not guilty" prediction is useless without a rationale.

In common law systems, legal reasoning is built on precedent (stare decisis): the practice of citing past cases to justify a current decision. Existing explainability methods in NLP usually focus on "saliency maps" (highlighting specific words or sentences). The authors argue this is the wrong granularity; lawyers don't reason at the level of tokens, they reason at the level of cases. The gap addressed here is the lack of a method to identify which specific "precedent" cases in a training set are actually driving a model's output.

Methods

The authors introduce two key components to bridge the gap between neural networks and legal theory:

  1. Influence Functions: Instead of retraining a model thousands of times to see how removing one case affects the outcome, the authors use influence functions (a technique from robust statistics). This allows them to mathematically estimate how much a specific training case (a potential precedent) contributed to the model's decision on a new test case.
  2. Taxonomy of Precedent: They categorize the relationship between cases into a fine-grained taxonomy:
  3. Applied vs. Distinguished: Does the judge follow the past case (Applied) or explain why the current case is different (Distinguished)?
  4. Positive vs. Negative: Did the past case find a breach of law (Positive) or not (Negative)?
  5. Cited vs. Claimed: Is the precedent specifically mentioned by the judge (Cited) or just a case involving the same legal articles (Claimed)?

The authors tested two model architectures: a Simple model (binary classification) and a Joint model (which explicitly models positive, negative, and null outcomes), using both BERT and LEGAL-BERT as encoders.

Datasets

The study uses an improved version of the ECtHR (European Court of Human Rights) corpus.

  • Citation Network: The authors used regular expressions and manual inspection to extract a high-quality network of citations from the "Arguments" section of legal transcripts.
  • Scale: The dataset includes 8,344 training cases, 904 validation cases, and 913 test cases, covering various legal articles (e.g., Right to a fair trial, Prohibition of torture).

The distribution of these cases across the taxonomy is shown in the table below: Total number of cited cases per category of precedent

Total number of cited cases per category of precedent

Key Insights and Ideas

  • Models are "Lazy" Analogizers: Models rely heavily on applied-positive precedent—cases where the facts are similar and the outcome is the same. They struggle significantly with distinguished precedent, where they must understand why two similar-looking cases should have different outcomes.
  • The F1 Trap: A high F1 score (accuracy) does not imply good legal reasoning. In fact, the authors found that models with higher F1 scores sometimes had lower correlation with human-cited precedents.
  • Scaling Doesn't Solve Reasoning: For articles with more training data, the models actually showed worse correlation with "distinguished" precedents. This suggests that simply adding more data might make models better at pattern matching but worse at nuanced legal distinction.
  • Pre-training Matters: LEGAL-BERT, which is pre-trained on legal text, showed better alignment with human reasoning than standard BERT, though the overall correlation remained low.

Key Results

The primary finding is a weak positive correlation between the cases a model finds influential and the cases a human judge actually cites. The highest Spearman’s $\rho$ observed was only 0.180.

As shown in the main results table, models correlate much better with "Applied" cases than "Distinguished" ones. In some instances, the correlation for Distinguished cases was actually negative, meaning the model was influenced by the exact opposite of what a human judge would consider relevant.

Spearman’s ρ between influence scores and taxonomy of precedent

The per-article analysis in Figure 1 highlights that for most legal articles, the models fail to capture "negative-distinguished" reasoning (the ability to cite a case where a breach was found and explain why the current case is not a breach).

Figure 1: Per-article Spearman correlation between influence functions and cited negative-distinguished precedent. The Simple model is on the left and the Joint model is on the right; both models are LEGAL-BERT based.

Limitations and Future Work

  • Language & Jurisdiction: The study is limited to the English version of the ECtHR corpus. Legal reasoning varies significantly across different languages and jurisdictions (e.g., Civil Law vs. Common Law).
  • Dataset Bias: The "facts" in current datasets are often written by judges after the decision, which might contain "leakage" or post-hoc justifications. The authors suggest using "legal briefs" (documents written before the decision) for future research.
  • Architecture: Current models are classifiers. The authors propose that future models should explicitly incorporate precedent retrieval as part of their architecture, forcing the model to select its precedents before making a prediction.

Summary updated

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.
BibTeX
@inproceedings{valvoda2024towards,
  author = {Josef Valvoda and Ryan Cotterell},
  title = {{Towards Explainability in Legal Outcome Prediction Models}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.naacl-long.404},
}
Figure