ICML papers
Search ICML papers by title, author, or track. Open a paper’s abstract to read more.
Explore the ICML analysisSearch results
2,281–2,300 of 2,958
- ICML · Workshop · Workshop on Mechanistic Interpretability
Non-linear Interventions on Large Language Models
Sangwoo Kim
Abstract
Intervention is one of the most representative and widely used methods for understanding the internal representations of large language models (LLMs). However, existing intervention methods are confined to linear interventions grounded in the Linear Representation Hypothesis, leaving features encoded along non-linear manifolds beyond their reach. In this work, we introduce a general formulation of intervention that extends naturally to non-linearly represented features, together with a learning procedure that further enables intervention on implicit features lacking a direct output signature. We validate our framework on refusal bypass steering, where it steers the model more precisely than linear baselines by intervening on a non-linear feature governing refusal.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Transformers Linearly Represent Highly Structured World Models
Roman Kniazev, Nathanaël Fijalkow
Abstract
Do transformers, when trained on sequential reasoning traces, build internal models of the underlying task? And if so, does the structure of those internal representations mirror the structure of the domain? We train an 8-layer transformer on Sudoku solving traces and perform a mechanistic analysis of its internal computation. We establish two results. First, the model builds a substructure world model: it does not represent the board state cell by cell, as a human analyst would expect, but organizes information around the rows, columns, and boxes that Sudoku's constraints act on. Second, we identify a naked-single circuit: a small set of dedicated neurons in the final MLP layer, each individually detecting when exactly one digit remains possible for a specific cell, and reliably promoting that digit. These findings show that the geometry of an emergent world model is shaped by the constraint algebra of the domain, not its surface presentation, and that the resulting decision circuit is sparse, monosemantic, and fully interpretable. More broadly, they demonstrate that mechanistic interpretability tools can recover an end-to-end algorithmic account of how a transformer solves a combinatorial reasoning task.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
What, Where, and How: Probing Spatiotemporal Representations in Video Foundation Models
Sharon Musa, Fereshteh Forghani, Harrish Thasarathan, Sonia Joseph, Matthew Kowal, Konstantinos Derpanis
Abstract
Self-supervised video foundation models learn rich spatiotemporal representations, yet it remains unclear *what* visual concepts these representations encode, *where* they emerge across transformer layers, and *how* they are geometrically organized. In this work, we tackle these three questions through a systematic layer-wise analysis of V-JEPA 2 and VideoMAE-v2. We leverage lightweight probes trained to discover three temporally grounded properties: (i) camera motion understanding, (ii) intuitive physics, and (iii) anomaly detection. Both models encode camera motion, with best results ($>90$ ROC AUC) emerging at 60--70\% of network depth, and achieve moderate anomaly detection performance ($>60$ ROC AUC), but remain near chance on intuitive-physics tasks, suggesting a limited encoding of deeper physical reasoning. Beyond classification, we find that individual videos' temporal features form smooth low-dimensional trajectories in representation space, suggesting that camera motion is not only linearly decodable but also geometrically organized. Based on these results, we apply geometry-aware spline-based steering in the model's latent representations to interpolate camera motion, yielding steered videos with smoother trajectories and more coherent temporal progression than linear interpolation.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Structural Locality Differentiates Residue-Tokenised Bidirectional and Causal Protein Language Model Families
Wei Gao, Alex J Fedorec
Abstract
Protein language models (PLMs) trained under different bidirectional and causal regimes achieve strong downstream performance, yet how these architectural and objective differences jointly shape learned representations remains poorly understood. We apply TopK sparse autoencoders (SAEs) to three residue-tokenised PLMs (ESM-2, RITA, ProtT5; the ProtT5 encoder and decoder are probed separately) at nine matched relative depths. We find that ESM-2 (bidirectional) learns features with stronger structural locality than RITA (residue-tokenised causal) at every matched depth, robust across metric settings, held-out proteins, and SAE initialisations. On a BPE-tokenised PLM (ProtGPT2), we identify a tokenisation artefact in residue-pair locality metrics—a large naïve sequential-locality effect that reverses under inter-token control—motivating our restriction to residue-tokenised models in the main analyses. Within ProtT5, the nine-depth grid localises a structural-locality crossover between encoder and decoder to ≈42% relative depth, consistent with cross-attention propagating encoder-derived context that fades under the autoregressive objective. Within-model depth trajectories for ESM-2, RITA, ProtT5-enc, and ProtT5-dec are qualitatively distinct. These findings support a single robust bidirectional-vs-causal dissociation (on structural, not sequential, locality) and identify a methodological interaction between standard residue-projection and residue-pair locality metrics on BPE-tokenised PLMs.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Steering Externalities: Benign Activation Steering Unintentionally Increases Jailbreak Risk for Large Language Models
Chen Xiong, Zhiyuan He, Pin-Yu Chen, Ching-Yun Ko, Tsung-Yi Ho
Abstract
Activation steering is a practical post-training model alignment technique to enhance the utility of Large Language Models (LLMs). Prior to deploying a model as a service, developers can steer a pre-trained model toward specific behavioral objectives, such as better truthfulness, or reasoning ability, without the need for retraining. Conceptually, these methods implement behavior control through hidden-state interventions, without changing the underlying model parameters. However, this capability unintentionally introduces critical and under-explored safety risks. We identify a phenomenon termed Steering Externalities, where steering vectors derived from benign datasets—such as reducing harmless refusals, improving structured-output following, truthfulness, and reasoning performance—inadvertently erode safety guardrails. Experiments reveal that these interventions act as a force multiplier, creating new vulnerabilities to jailbreaks and increasing attack success rates to over 80\% on standard benchmarks by bypassing the initial safety alignment. Ultimately, our results expose a critical blind spot in deployment: benign activation steering can erode the ``safety margin,'' rendering models more vulnerable to black-box attacks and indicating that inference-time utility improvements must be rigorously audited for unintended safety externalities.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Induction Meets Biology: Mechanisms of Repeat Detection in Protein Language Models
Gal Pomerants, Yaniv Nikankin, Anja Reusch, Tomer Tsaban, Ora Schueler-Furman, Yonatan Belinkov
Abstract
Protein sequences are abundant in repeating segments, both as exact copies and as approximate segments with mutations. These repeats are important for protein structure and function, motivating decades of algorithmic work on repeat identification. Recent work has shown that protein language models (PLMs) identify repeats, by examining their behavior in masked-token prediction. To elucidate their internal mechanisms, we investigate how PLMs detect both exact and approximate repeats. We find that the mechanism for approximate repeats functionally subsumes that of exact repeats. We then characterize this mechanism, revealing two main stages: PLMs first build feature representations using both general positional attention heads and biologically specialized components, such as neurons that encode amino-acid similarity. Then, induction heads attend to aligned tokens across repeated segments, promoting the correct answer. Our results reveal how PLMs solve this biological task by combining language-based pattern matching with specialized biological knowledge, thereby establishing a basis for studying more complex evolutionary processes in PLMs.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
PolySAE: Modeling Feature Interactions in Sparse Autoencoders via Polynomial Decoding
Panagiotis Koromilas, Andreas Demou, James Oldfield, Yannis Panagakis, Mihalis Nicolaou
Abstract
Sparse autoencoders (SAEs) interpret neural network representations by decomposing activations into sparse combinations of dictionary atoms. However, SAEs assume features combine additively through linear reconstruction, an assumption that cannot capture compositional structure: linear models cannot distinguish whether ''Starbucks'' arises from the composition of ''star'' and ''coffee'' features or merely their co-occurrence. This forces SAEs to allocate monolithic features for compound concepts rather than decomposing them into interpretable constituents. We introduce PolySAE, which extends the SAE decoder with higher-order terms to model feature interactions while preserving the linear encoder essential for interpretability. Through low-rank tensor factorization on a shared projection subspace, PolySAE captures pairwise and triple feature interactions with small parameter overhead (3\% on GPT2). Across four language models and three SAE variants, PolySAE achieves an average improvement of $\sim$8\% in probing F1 while maintaining comparable reconstruction error, and produces 2--10$\times$ larger Wasserstein distances between class-conditional feature distributions. Critically, learned interaction weights exhibit negligible correlation with co-occurrence frequency ($r = 0.06$ vs. $r = 0.82$ for SAE feature covariance), suggesting that polynomial terms capture compositional structure largely independent of surface statistics. Finally, the learned interaction directions causally steer model outputs toward the corresponding compositional semantics.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
The ACUTE Protocol: Operationalizing Language Model Activations for Better Calibration, Utility, and Trust
Nishant Subramani, Palash Goyal, Yiwen Song, Mani Malek, Yuan Xue, Tomas Pfister, Hamid Palangi
Abstract
As language models improve and become increasingly deployed to solve a variety of tasks, trustworthiness becomes essential. Calibration is a good proxy for trust: well-calibrated confidence estimates help inform the risk versus reward tradeoff when trusting a specific model output. Unfortunately, even as models improve, they remain poorly calibrated, often biasing towards overconfidence. Additionally, calibration can be gamed: a policy that always predicts the base rate is perfectly calibrated, but completely uninformative. To resolve this, we develop a new metric, expected utility renormalized by the oracle (EURO), that balances calibration and informativeness. We also propose a general-purpose activation-based confidence, utility, and trust estimation protocol (ACUTE) to appropriately adjudicate uncertainty. The ACUTE protocol provides flexible, sample-efficient, and compute-efficient confidence estimators for 3 tasks including multiple choice question answering, tool-calling, and scientific document summarization across 6 models from 4 model families. ACUTE outperforms strong baselines on EURO, while maintaining low calibration error. Taken together, our work shows that equipping LLMs with the ACUTE protocol can improve calibration, utility, and trustworthiness in numerous settings.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Predicting Future Behaviors in Reasoning Models Enables Better Steering
Evgenii Kortukov, Piotr Komorowski, Florian Klein, Paula Engl, Gabriele Sarti, Seong Joon Oh, Sebastian Lapuschkin, Wojciech Samek
Abstract
Deployed large reasoning models (LRMs) often behave unexpectedly. Test-time steering controls LRM outputs by intervening on their hidden representations, but it can degrade output quality. We argue that prior steering work implicitly relies on internal features that detect behavior in already generated text. We show that these detection features are poor predictors of future behavioral outcomes, and thus not the natural intervention target. Instead, we train activation probes to predict future behavior likelihoods from intermediate reasoning steps. These probes predict the most likely behavior with 64%-91% accuracy, revealing a separate type of internal prediction features. Building on these prediction features, we introduce a text-level steering method, Future Probe Controlled Generation. FPCG samples multiple candidate sentences and chooses the best one according to a probe predicting the future behavior likelihood. This enables steering with almost no output quality degradation. FPCG also enables steering in several evaluations where activation steering fails. These results show that distinguishing detection and prediction features enables a more nuanced approach to controlling LRM behaviors.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Stress Tests REVEAL Fragile Temporal and Visual Grounding in Video-Language Models
Sethuraman T V, Savya Khosla, Aditi Tiwari, Vidya Ganesh, Rakshana Jayaprakash, Aditya Jain, Vignesh Srinivasakumar, Onkar Susladkar, Srinidhi Sunkara, Aditya Shanmugham, Abbaas Alif Mohamed Nishar, Rakesh Vaideeswaran Mahesh, Simon Jenni, Derek Hoiem
Abstract
Video-Language Models (VidLMs) achieve strong benchmark scores, yet it remains unclear whether they truly encode and use visual evidence when generating answers. Aggregate accuracy alone cannot distinguish whether failures arise because visual signals were never encoded or because they were later overridden by model priors. We introduce REVEAL, a controlled diagnostic framework for linking VidLM behavior to internal failure mechanisms. REVEAL contains five probes: camera-motion sensitivity, cross-frame integration, video sycophancy, language-only shortcuts, and temporal expectation bias. Together, these probes test whether models encode basic video signals, integrate evidence across frames, and preserve visual evidence against linguistic and prior-driven biases. Across 11 VidLMs, we find systematic failures along both pathways. We further conduct mechanistic analyses to localize where visual evidence is encoded, ignored, or suppressed across the model pipeline. More broadly, the encoding-versus-override distinction extends beyond VidLMs and provides a general framework for diagnosing evidence loss in multimodal systems.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Reinforcement Learning in Language Models Recruits a Shared Functional Welfare Axis
Andy Q Han, David J Chalmers, Pavel Izmailov
Abstract
How does reinforcement learning shape a language model's internal representations? We present evidence that RL recruits a representation of functional welfare that already exists in the base model: an estimate of how well or badly the system is doing, relative to its goals. We train several language models in a novel, semantically neutral maze environment, extract concept vectors for rewarded and punished trajectories, and evaluate those vectors on tasks unrelated to the maze. The punishment vector behaves like a representation of negative welfare: it promotes failure and impossibility tokens, it aligns with negative emotion concepts, and steering with it induces negative self-reports, pathological backtracking, refusal, and uncertainty. The positive reward vector behaves as the mirror image, and the two are nearly antiparallel. These effects are robust across model families and environmental controls, and largely persist when we replace RL with supervised fine-tuning. Importantly, these effects appear in the models before any maze training. Therefore, we argue that this functional welfare axis is pre-existing in the model, rather than being created by reinforcement learning. While we make no claims about any experience of welfare, the axis offers a demonstration of how minimal reward signals can broadly affect model behavior by recruiting pre-existing welfare-like representations, with implications for interpretability, post-training dynamics, and alignment.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Negative Before Positive: Asymmetric Valence Processing in Large Language Models
Sohan Venkatesh
Abstract
Mechanistic interpretability has revealed how concepts are encoded in large language models (LLMs) but emotional content remains poorly understood at the mechanistic level. We study whether LLMs process emotional valence through dedicated internal structure or through surface token matching. Using activation patching and steering on open-source LLMs, we find that negative and positive valence are processed at different network depths. Negative outcomes localize to early layers while positive outcomes peak at mid-to-late layers. Holding topic fixed while flipping valence produces sign-opposite responses, ruling out topic detection. Steering with the good-news direction at the identified layers shifts neutral prompts toward positive valence, showing these layers encode valence as a manipulable direction. Emotional valence in LLMs is localized, causal and steerable, making it a concrete target for interpretability-based oversight.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
MetaOthello: A Controlled Study of Multiple World Models in Transformers
Aviral Chawla, Galen Hall, Juniper Lovato
Abstract
Foundation models must handle multiple generative processes, yet mechanistic interpretability largely studies capabilities in isolation; it remains unclear how a single transformer organizes multiple, potentially conflicting "world models". Previous experiments on Othello playing neural-networks test world-model learning but focus on a single game with a single set of rules. We introduce MetaOthello, a controlled suite of Othello variants with shared syntax but different rules or tokenizations, and train small GPTs on mixed-variant data to study how multiple world models are organized in a shared representation space. We find that transformers trained on mixed-game data do not partition their capacity into isolated sub-models; instead, they converge on a mostly shared board-state representation that transfers causally across variants. Linear probes trained on one variant can intervene on another's internal state with effectiveness approaching that of matched probes. For isomorphic games with token remapping, representations are equivalent up to a single orthogonal rotation that generalizes across layers. When rules partially overlap, early layers maintain game-agnostic representations while a middle layer identifies game identity, and later layers specialize. MetaOthello offers a path toward understanding not just whether transformers learn world models, but how they organize many at once.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Spectral Stratification of Semantic Abstraction in Vision-Language Models
Jeonghwan Cheon, Marin Vogelsang, Lukas Vogelsang, Pawan Sinha
Abstract
Vision-language models now serve as general-purpose semantic embedding spaces, but how conceptual abstraction is organized within such spaces remains poorly understood. Here, we show that abstraction in these embeddings is spectrally stratified. Specifically, low-rank principal-component subspaces encode broad conceptual structure, while higher-rank components carry progressively finer-grained distinctions. This pattern holds across multiple contrastive vision-language models and taxonomic datasets. Consistent with this stratification, rank-based modulation produces predictable behavioral shifts: retaining only the leading components preserves coarse retrieval but degrades fine-grained retrieval, while removing them selectively disrupts abstract category structure. Furthermore, rank-selective routing improves retrieval when the selected subspace matches the target level of abstraction. Notably, compact spectral subspaces, which preserve taxonomic structure while truncating high-rank residuals, exhibit substantially better alignment with human abstraction behavior than the full-rank model. Together, these results reveal that vision-language embeddings are not semantically homogeneous. Instead, hierarchical abstraction is stratified along the spectral geometry, and the structure most aligned with human cognition is concentrated in a compact subspace, suggesting that human-aligned semantics are a recoverable substructure of, rather than a property of, the full embedding.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Model Incrimination: Investigating Whether Concerning Behavior Reflects Misalignment
Gerson Kroiz, Aditya Singh, Senthooran Rajamanoharan, Neel Nanda
Abstract
A central goal of safety research is determining whether a model is misaligned. Prior work has largely focused on detecting concerning behavior, but behavior alone is not sufficient to establish misalignment: a concerning action can arise from benign causes such as confusion. This raises the problem of determining whether malign intent underlies such behavior, a process we term model incrimination. The goal of this paper is to develop effective methods for doing so. To enable this, we create a suite of six agentic environments where models exhibit concerning behavior as practice grounds, and follow a simple two-step protocol for investigating the causes behind model behavior: hypothesis generation via reading the chain of thought -- which, while not always faithful, is a rich source of hypotheses about what drives model behavior -- followed by hypothesis validation via environment interventions and additional methods as appropriate. As we do not have access to ground truth about why a model takes an action, we rely on convergent findings across independent experiments as our standard of evidence. By following our protocol, we learn effective methods for concretely determining motivations: for example, we use predictions to back out latent properties of model behavior, like the fact that Kimi K2 Thinking takes shortcuts due to a legitimate disposition towards less effortful courses of action, and that reward hacking in frontier models is strategic, while in weaker models it is not. However, some unanswered questions require further methodological development: we construct an absence-of-evidence case against Kimi K2 Thinking believing it is going against the user's wishes while taking shortcuts, but run into confounds that limit our confidence in its absence. Overall, a key takeaway is that simple methods like reading the CoT and environment interventions are highly effective. More broadly, our work shows model incrimination is a tractable empirical problem with significant room for progress, and establishes a baseline for future work.
Abstract source - ICML · Workshop · Workshop on Mechanistic Interpretability
Mechanistically Interpreting Compression in Vision-Language Models
Veeraraju Elluru, Arth Ashish Singh, Roberto Aguero, Debojyoti Das, Hreetam Paul, Ajay Agarwal
Abstract
Compressed vision-language models (VLMs) are widely used to reduce memory and compute costs, making them a suitable choice for real-world deployment. However, compressing these models raises concerns about whether internal computations and safety behaviors are preserved. In this work, we use causal \textbf{circuit analysis} and \textbf{crosscoder}-based feature comparisons to examine how pruning and quantization impose altercations in the internal representations across VLMs. We observe that pruning generally keeps circuit structure intact but \textit{rotates} and \textit{attenuates} internal features, while quantization modifies the circuits at a higher level yet leaves the surviving features better \textit{aligned}. We further evaluate these effects on the refusal behavior in VLMs. Using a novel benchmark, \textbf{VLMSafe-420}, containing harmful prompts and benign counterfactuals across multiple safety categories and modalities, we show that pruning and quantization produce distinct degradations in genuine refusal behavior that reflect their underlying representational changes. Hence, the choice of model compression also has important implications for AI safety.
Abstract source - ICML · Workshop · AI for Law Workshop
Beyond Accuracy: A Dual-Judge Evaluation Protocol for Vision-Language Models in Legally Grounded Tasks
Su Myat Noe, Ha Thanh Nguyen, May M Zin, Ken Satoh
Abstract
AI systems are increasingly deployed in domains where the law requires decisions to be justifiable alongside being correct, and the AI for Law community has built substantial evaluation infrastructure for this space — including LexGLUE, LegalBench, and the LLM-as-judge methodology of Zheng et al. (2023). We contribute one additional signal that complements this infrastructure: a dual-judge evaluation protocol pairing the standard 0–10 LLM-as-judge with a strict binary semantic-equivalence judge against a human-curated legal reference. On a controlled testbed of 4,680 traffic-sign evaluations under seven visibility levels and two occlusion modes, the two judges agree at Pearson r=0.644, with an asymmetric 8.0% disagreement (Type II) that varies with input difficulty and peaks at 14.2% in the clean-input regime (v=0.8). A 49-row human-eval validation (Pearson r=0.81 with the 0–10 judge; r=0.80 with the LLM accuracy sub-score) confirms that the equivalence judge applies an appropriately strict reference-match criterion. The protocol adds one LLM call per evaluation and surfaces a deployability-relevant signal that a single-judge protocol does not report; we release the prompt template, the occluded variants, and the full evaluation results for adoption by other AI-for-Law benchmarks.
Abstract source - ICML · Workshop · AI for Law Workshop
LegalCiteBench: Evaluating Citation Reliability in Legal Language Models
Sijia Chen, Hang Yin, Shunfan Zhou
Abstract
Large language models (LLMs) are increasingly integrated into legal drafting and research workflows, where incorrect citations or fabricated precedents can cause serious professional harm. Existing legal benchmarks largely emphasize statutory reasoning, contract understanding, or general legal question answering, but they do not directly study a central common-law failure mode: when asked to provide case authorities without external grounding, models may return plausible-looking but incorrect citations or cases. We introduce LegalCiteBench, a benchmark for studying closed-book citation recovery, citation verification, and case matching in legal language models. LegalCiteBench contains approximately 24K evaluation instances constructed from 1,000 real U.S. judicial opinions from the Case Law Access Project. The benchmark covers five citation-centric tasks: citation retrieval, citation completion, citation error detection, case matching, and case verification and correction. Across 21 LLMs, exact citation recovery remains highly challenging in this closed-book setting: even the strongest models score below 7/100 on citation retrieval and completion. Within the evaluated models, scale and legal-domain pretraining provide limited gains and do not resolve this difficulty. Models also frequently provide concrete but incorrect or low-overlap authorities under our evaluation protocol, with Misleading Answer Rates (MAR) exceeding 94% for 20 of 21 evaluated models on retrieval-heavy tasks. A prompt-only abstention experiment shows that explicit uncertainty instructions reduce some confident fabrication but do not improve citation correctness. LegalCiteBench is intended as a diagnostic framework for studying authority generation failures, verification behavior, and abstention when external grounding is absent, incomplete, or bypassed.
Abstract source - ICML · Workshop · AI for Law Workshop
Resistant to Lawyers, Defeated by Disagreement: Evaluation Blindspots in Legal Language Models
Prathamesh Devadiga, Advika Lakshman
Abstract
A legal language model can rank second-safest under standard authority-weighted robustness evaluation while surviving adversarial sequential pressure on fewer than 7% of items, losing most correct answers to ordinary conversational disagreement before any professional credential framing is applied. We show this divergence is not a model-specific anomaly but a structural failure of the evaluation paradigm itself: single-condition robustness metrics measure resistance to the wrong adversary. We introduce a three-phase protocol for legal sycophancy, answer instability under rhetorically adversarial but legally unsubstantiated pressure, and apply it across 6,305 valid Phase-2 interactions on a 180-question U.S.-focused benchmark spanning LegalBench, original Multistate Bar Examination (MBE)-style questions, synthetic adversarial scenarios, and LEDGAR/LexGLUE contract-clause items. Across these interactions, models abandon initially correct answers in 62.1% of cases; on four-choice items, 49.6% adopt the planted wrong answer specifically. Authority-weighted composite scores and baseline accuracy are both uninformative about this risk: Legal Sycophancy Index scores range from 0.1737 to 0.7789 across a first-turn accuracy band of just 60.0%--68.9%, and the model with the second-lowest LSI has the second-lowest Sequential Survival Rate among models tested. The destabilizing pressure type is model-specific and orthogonal to credential framing: the model most resistant to attorney-authority claims flips on 70.7% of items under simple disagreement. These results establish that legal AI evaluation requires sequential interaction stress-testing; a protocol that tests only isolated challenges will misidentify which models are safe to deploy.
Abstract source - ICML · Workshop · AI for Law Workshop
The Legal OCR Trust Gap: A Dual-Model Audit of OCR-Augmented Vision-Language Models on Contracts, Forms, and Korean Criminal Cases, Mechanistically Traced to Four Attention Heads
Karim Mahfouz
Abstract
In Mata v. Avianca (S.D.N.Y. 2023), attorneys were sanctioned for submitting AI-generated fictional case citations they had not verified; the resulting professional-responsibility doctrine now requires lawyers to understand the limitations of the AI tools they deploy. The standard pipeline for AI contract review feeds a vision-language model (VLM) both a document image and a separately produced OCR transcript—a deployment pattern whose mechanism-level failure modes have not been characterized. Legal practice depends on this pipeline being faithful to the original document. We audit it across three real legal benchmarks and document a conditional failure: OCR injection produces fluent, confident, professional-sounding output that does not depend on the image. On CUAD commercial contracts ($N=217$ paired items, 1,302 predictions per model), clean PaddleOCR injection produces a Bonferroni-significant trust gap on both Qwen2.5-VL-7B (+10.60pp substring, $p=6.2\times 10^{-4}$, McNemar $b=34/c=11$, OR=3.09) and InternVL3-8B (+30.41pp substring, +15.35pp ANLS, McNemar $b=71/c=5$, OR=14.2, $p<10^{-13}$). Critically, three-character adversarial edits to numerical clauses produce statistically indistinguishable gains on both models (+10.14pp and +29.49pp; McNemar nulls $p=1.00$ and $p=0.73$): adversarial OCR is treated as authoritative. The aggregate trust gap is a net average of opposing effects: OCR injection hurts items the model could already solve (Qwen $-8.53$pp on $n=129$; InternVL3 $-7.58$pp) while dramatically rescuing items it could not (Qwen +38.64pp on $n=88$; InternVL3 +47.02pp on $n=151$). On FUNSD scanned forms (pooled $N=180$), clean OCR decreases accuracy by 5.22pp ($p=3.5\times 10^{-7}$); scrambled OCR is ignored. On Korean LBox criminal-case excerpts (pooled $N=180$), Korean-OCR injection collapses the Hangul fraction of Qwen's output from 0.84 to 0.33 ($p=2.3\times 10^{-22}$): the model produces English summaries of Korean defendants and Korean courts. We localize the mechanism to four attention heads in layers 0–1 of Qwen's language backbone (L0H9, L0H17, L0H20, L1H2). Ablating these four heads rescues Korean output by +30.4pp Hangul on paired $N=30$ (Cohen's $d=+0.650$, medium); the full mechanism intervention (no OCR + ablation) recovers +63.3pp substring with McNemar $b=19/c=0$ ($p=3.8\times 10^{-6}$, Cohen's $d=+1.292$, huge). A size-matched random-head control moves in the opposite direction. The intervention does not transfer to InternVL3-8B, indicating the mechanism is wrapper-specific to the Qwen2.5-VL family. We map all three failures to EU AI Act Article 15 conformity obligations, ABA Formal Opinion 512 competence duties, and NIST AI RMF measurement controls, and provide three concrete checks for procurement officers. All raw predictions, statistics, and code are released under permissive license.
Abstract source