In high-stakes fields like law, arriving at the correct answer is only half the battle; the underlying reasoning must also be sound. While current Large Language Models (LLMs) demonstrate impressive accuracy on legal benchmarks, there is growing concern that they are often "right for the wrong reasons."
This paper moves beyond simple accuracy metrics to audit the internal logic of LLMs in legal settings. By decomposing model predictions into "interaction-based explanations," the authors reveal a significant gap in procedural fairness: even when LLMs provide the correct legal judgment, over half of their underlying inference patterns frequently rely on irrelevant or misleading information.
The Problem: Procedural Fairness in LLMs
An LLM might correctly predict a "Guilty" verdict, but it could be doing so based on the defendant's occupation or the actions of a completely different person mentioned in the case text. Traditional evaluations that only look at the final text output fail to catch these problematic internal representations. To address this, the researchers introduce a framework to quantify and audit these "inference patterns," ensuring they align with human legal expertise rather than statistical shortcuts.
Auditing Inference Patterns
To understand how models make decisions, the researchers employ a mechanistic explanation approach based on interaction theory (specifically Harsanyi dividends from cooperative game theory).
The methodology relies on two main pillars:
- AND-OR Logical Modeling: The LLM’s output score is represented as a sum of interactions between input phrases. An "AND" interaction occurs when a set of words must appear together to trigger a score boost, while an "OR" interaction occurs when any single word from a set can trigger it.
- Expert Annotation: Legal experts partition the input case text into three categories:
- Relevant ($R$): Facts directly contributing to the judgment (e.g., "chased with an axe").
- Irrelevant ($I$): Descriptive but non-legal facts (e.g., "on a Wednesday morning").
- Forbidden ($F$): Misleading information, such as actions taken by a different entity or person.
Using these annotations, the authors define a reliability metric, $S^{reliable}$, which calculates the ratio of "reliable" interaction effects (those using relevant phrases and excluding forbidden ones) to the total salient interaction effects.
Key Insights: The Illusion of Reasoning
The study evaluated four LLMs (Qwen2.5, Deepseek-R1, SaulLM, and BAI-Law) across five major legal benchmarks in both English (LegalBench, LexGLUE) and Chinese (CAIL2018, LeCaRD, LEVEN). The findings challenge the assumption that LLMs are engaging in complex legal reasoning:
- The "Bag-of-Words" Reality: Despite the hype surrounding "Chain-of-Thought" prompting, LLMs primarily rely on simple, low-order interactions of local tokens. They often act more like sophisticated keyword matchers than logical reasoners, preferring to base judgments on 1-3 isolated phrases rather than a comprehensive analysis of all case factors.
- Massive Mutual Cancellation: Roughly 60% of the interaction effects in LLMs are "conflicting"—positive and negative noise patterns that cancel each other out.
- Identity and Entity Bias: Models frequently attribute the actions of one person to another (incorrect entity matching) or change their verdict based solely on the victim's or defendant's occupation.
Results: Accuracy is a Mask
The most striking insight is that "correct" generation results often hide misleading or irrelevant logic. High accuracy on a leaderboard does not guarantee that a model is safe for courtroom or judicial assistance.
In many tests, the ratio of reliable interactions ($S^{reliable}$) hovered near or below 50%. For example, in one case study, the legal model SaulLM correctly identified an "Assault" charge. However, an audit of its internal logic revealed that only 41.5% of the inference patterns used to reach that conclusion were considered reliable by legal experts. Even law-specific models like BAI-Law, while showing some improvement in identifying direct reasons, still relied heavily on unreliable patterns—such as memorizing "sensitive tokens" (like weapon names) without understanding who actually wielded them.
Limitations and Future Directions
While this auditing framework provides crucial visibility into LLM decision-making, it faces scalability hurdles. The method requires manual annotation of relevant, irrelevant, and forbidden sets by legal experts, which is difficult to scale across every possible legal provision and jurisdiction.
However, the authors suggest a promising path forward: using these reliability scores to refine Supervised Fine-Tuning (SFT) or Reinforcement Learning (RL). By actively penalizing models when they reach the right answer via "unreliable" logical paths, developers might finally train LLMs that are not just statistically accurate, but truly sound in their legal reasoning.
Summary updated