Mechanistic Interpretability Struggles with LLM Agent Hallucinations? A Web Element Case Study

Mechanistic interpretability tools expose deep limitations—partially effective prediction, fragile directions, and hard-to-find circuits—when explaining Web agent hallucinations.
Through a Web agent hallucination case study, the article tests how well mechanistic interpretability (MI) tools apply to real agent failures. Using Qwen2.5-7B-Instruct, it finds a linear probe on the last prompt token predicts hallucinations before generation at 0.80 AUC; steering along the probe direction corrects 85% of hallucinations but breaks 7% of valid actions; the direction is highly sensitive to prompt format, and circuit identification is hard because computation is distributed and sample-dependent. The authors argue that standard MI's assumptions of localizable circuits and stable readable directions fail for agent failures, calling for more robust frameworks.
Mechanistic Interpretability (MI) has made significant progress in dissecting the internal computations of large language models, but when this toolkit is applied to explaining the decision-making processes of LLM agents, its limitations become glaringly apparent. A case study focused on Web agent hallucinations reveals, through a series of mechanistic analyses, the deep challenges MI methods face in real-world agent failure scenarios.

When an Agent "Sees" a Button That Doesn't Exist: A Real Failure Scenario
The research focuses on a typical agent failure: a Web agent hallucinating an action that does not actually exist on a website. For example, the agent may claim there is a "Submit Order" button on a page when that element does not exist at all. Such errors are quite harmful in real-world deployment—they can interrupt automated workflows or even trigger incorrect actions.
The researchers used Qwen2.5-7B-Instruct as the subject, having it interact with real websites and applying a suite of mechanistic analysis tools to trace the mechanism behind hallucinations. Choosing real websites rather than synthetic environments means the conclusions are closer to the complexity of actual deployment.
Linear Probes Can Predict Hallucinations in Advance, but Only Partially Succeed
A core finding of the study is that a linear probe trained on the last prompt token can predict hallucination before generation begins, achieving an AUC of 0.80. This means there is indeed some signal in the model's internal state that can be read linearly, foretelling that it is about to "fabricate" a nonexistent action.
Furthermore, steering along the probe direction can correct 85% of hallucinations. This number looks considerable at first glance, indicating that intervening in internal representations can indeed change model behavior. But the same operation also breaks 7% of valid actions—the cost of correcting hallucinations is that some originally correct behaviors fail.
This coexistence of "error correction" and "collateral damage" suggests that the signal captured by the probe does not purely correspond to the concept of "hallucination." It is more like a representation entangled with task context, and simply pushing or pulling along the direction affects adjacent correct behaviors at the same time.
Linear probe is a commonly used lightweight diagnostic tool in mechanistic interpretability: it trains a simple linear classifier on the activation vectors of a certain layer of the model to determine whether that layer's representation encodes a certain concept (e.g., "about to hallucinate"). Training typically uses the residual stream activations at specific token positions as input features.
The advantage of linear probes is strong interpretability, low training cost, and the ability to directly indicate "whether a concept exists in the representation in a linearly readable way." But they also have inherent limitations: a probe can only prove that a signal can be linearly decoded, not that the model itself actually uses that signal to make decisions; moreover, probes easily learn surface features correlated with labels (such as prompt format) rather than semantic concepts. Therefore, a high probe AUC does not equal revealing the model's true computational mechanism.
Steering / activation steering refers to the technique of adding or subtracting a scaled vector along a certain direction to the model's internal activation vectors during inference, thereby changing model behavior. A typical approach is: first obtain the "concept direction" through probes or contrastive activations, then inject that direction into the residual stream during generation, positively amplifying or negatively suppressing the corresponding concept.
The effectiveness of steering relies on two assumptions: first, the target concept is approximately linearly separable in representation space; second, that direction is as orthogonal as possible to other concept directions. When the direction is entangled with task context, pushing or pulling along it will also affect adjacent behaviors—this is precisely the mechanistic source of "correcting 85% of hallucinations while breaking 7% of valid actions" in this study. The fragility of steering also suggests that the direction may be bound to specific input distributions rather than universal semantics.
Probe Directions Are Fragile: Change the Format and the Effect Drops Sharply
One of the most noteworthy findings of the study is the fragility of the probe direction. When the researchers made slight changes to how actions were represented—for example, adjusting the prompt format—the steering effect of the probe was largely lost.
This result poses a direct challenge to the practical application of MI methods. If the effectiveness of an interpretability tool is highly dependent on the specific wording of the prompt, then it will be difficult to deploy reliably in real systems, because input formats in real systems are often variable and hard to fully control. In other words, what the probe learns may not be "general features of hallucination" but surface patterns bound to a specific format.
Circuits Are Hard to Find: Computation Is Distributed Across Multiple Components and Positions
In addition to difficulties at the feature level, the study also found that circuit identification is equally tricky. The agent's computation is distributed across multiple components and multiple positions, rather than concentrated in a clearly localizable circuit. More troublesome, the information the agent relies on also changes across samples—meaning there is no unified computational path that explains all hallucination cases.
These two points directly challenge the core assumptions of standard MI methods: circuit discovery presupposes that computation can be localized to a specific subgraph, and feature identification presupposes that there exists a stable, readable direction. When the computation itself is distributed and varies across samples, these presuppositions no longer hold.
Circuit discovery is one of the core methods of mechanistic interpretability, aiming to localize the computational process by which a model completes a task to specific attention heads, MLP neurons, and their connecting subgraphs. Common techniques include activation patching, ablation experiments, and path analysis.
Circuit discovery implicitly assumes a key premise: task computation can be localized to a relatively sparse, stable subgraph, and different samples of the same task share roughly the same circuit. When computation is distributed across multiple components and the information relied upon varies across samples, this assumption fails—researchers struggle to find a unified "hallucination circuit," and ablating a single component often produces only weak and inconsistent effects. This shows that standard circuit tools need to be reexamined in dynamic, multifactor-interwoven agent scenarios.
A Deeper Interrogation of the MI Toolkit
The value of this case study is not in negating MI, but in pointing out the methodological gap when it is transferred from "explaining internal model computation" to "explaining agent failure." Internal model computation is relatively static, whereas agent behavior involves the dynamic coupling of perception, planning, and action selection, and the causes of failure are often multifactor-interwoven.
Based on this, the researchers propose that methods better suited to explaining LLM agent failures need to be developed—for example, analytical frameworks that can handle distributed computation, are more robust to input format, and can adapt to differences across samples. For practitioners concerned with AI interpretability and agent reliability, this is a direction worth tracking: if MI is to truly serve agent debugging, there is still considerable foundational work to be done.
One-line Summary
Mechanistic interpretability tools reveal deep limitations—partially effective prediction, fragile directions, and hard-to-find circuits—when explaining Web agent hallucinations.
Paragraph Summary
Through a case study of Web agent hallucinations, the article examines the applicability of mechanistic interpretability (MI) tools in real-world agent failure scenarios. Using Qwen2.5-7B-Instruct as the subject, the study finds that a linear probe trained on the last prompt token can predict hallucinations before generation with 0.80 AUC, and steering along the probe direction corrects 85% of hallucinations but simultaneously breaks 7% of valid actions; the probe direction is highly sensitive to prompt format, with steering effectiveness largely lost after slight format changes; circuit identification is also difficult because computation is distributed across multiple components and positions, and the information relied upon varies across samples. The authors therefore point out that the presuppositions of standard MI methods—"localizable circuits" and "stable readable directions"—no longer hold when explaining agent failures, and that new analytical frameworks that are more robust and can handle distributed computation and sample differences need to be developed.
Related articles

ChatGPT Plus Subscription Pitfall Guide: Go/Plus/Pro Tier Comparison and Quick Activation
A complete ChatGPT Plus subscription guide based on a Bilibili tutorial: from registering an account, comparing Go/Plus/Pro tiers, to the practical steps for quickly completing your subscription.

GPT-6.2 Sol/Astra Released! A Step-by-Step ChatGPT Plus Subscription Guide and Tier Comparison
GPT-6.2 Sol/Astra is out—here's a ChatGPT Plus subscription guide: register an account, compare Go/Plus/Pro tiers, and subscribe in a minute.

Comparing Three Channels for Subscribing to GPT Plus in China: Is Website Top-Up the Easiest?
How to subscribe to GPT Plus in China? This article compares website top-up, credit card, and mobile top-up channels—process, cost, and risk—with steps and tips to help you choose wisely.