Skip to main content
v2026.11,986 entries · CC-BY 4.0

Editorial · CASRAI · AI and ML research outputs

Study Uses Mechanistic Interpretability to Trace Web-Agent UI Hallucinations

A study traces web-agent UI hallucinations in Qwen2.5-7B, showing internal failure signals emerge in the residual stream before token generation starts.

Published 16 Nov 2026· 7 minute read

Ask CASRAI · free to try

Ask about this story

2 free questions a day, no account.

An AI assistant for research: funder rules, compliance, methods and publishing. It links the sources behind its answers and labels answers that come from a web search.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays open to read, with no account and no card.

CASRAI is the reference for research administration — bookmark it for the next question.

Computer scientists from George Mason University and Tel Aviv University have applied mechanistic interpretability techniques to investigate why autonomous web agents hallucinate non-existent user interface elements on live websites. The investigation, published in a November 13, 2026 arXiv preprint, reveals that while linear probes can identify an agent’s commitment to hallucinated actions before text generation begins, conventional circuit discovery methods break down when applied to multi-step agent trajectories.

What Happened: Probing Web Agent Failures on Live Websites

As autonomous large language model agents transition from chatbots to practical automation tools across academic and enterprise workflows, their reliability remains constrained by behavioral failure modes. Among the most disruptive is web element hallucination: an agent navigating a graphical user interface attempts to click, type into, or select Document Object Model (DOM) elements that do not exist on the target page. In automated research pipelines, such failures cause task abandonment, state corruption, or unintended execution loops.

In the preprint Can Mechanistic Interpretability Help Explain LLM Agent Failures? A Case Study on Web Element Hallucination (arXiv:2611.18514), researchers Mohamed Aghzal, Gregory J. Stein, and Ziyu Yao from George Mason University, alongside Mor Geva from Tel Aviv University, conducted a mechanistic investigation into Alibaba Cloud’s open-weights frontier model, Qwen2.5-7B-Instruct. While mechanistic interpretability has achieved success in analyzing static prompt-response behaviors, the authors tested whether these tools can explain the sequential decision-making failures of interactive agents.

The authors evaluated the agent using Online-Mind2Web, an interactive benchmark derived from the Mind2Web framework (Ohio State University NLP Group). The model operated in a minimal action space: CLICK, SCROLL, TYPE, and HOVER. At each interaction step across live websites, candidate actions extracted from the webpage DOM were supplied in the prompt. The resulting corpus comprised 300 interaction episodes and 2,071 discrete actions, of which 32.6% were UI element hallucinations referencing non-existent page selectors.

Key Experimental Findings: Probes, Steering Vectors, and Component Attribution

To inspect internal representations, the researchers trained linear probes across all 28 layers of Qwen2.5-7B-Instruct at three positions: prompt end (prompt_end), selector start (selector_start), and selector value start (selector_value_start), using a 70/15/15 episode split.

The probing experiments uncovered a striking temporal pattern: the model’s commitment to a hallucinated action is linearly separable in the residual stream before token generation begins. At the prompt_end token, before emitting any output text, a linear probe achieved an ROC-AUC of 0.80 at Layer 18. By the time generation reached the selector_start token, the classification signal was strongly separable from Layer 0 onward, strengthening across subsequent layers.

The team next tested representation steering using the Layer 17 probe weights at the selector_start position. Steering along this vector corrected 85% of hallucinated actions, while disrupting only 7% of previously valid actions. However, when the prompt’s action list format was modified from JSON to numbered Markdown, probe accuracy degraded substantially and steering efficacy collapsed, showing that the learned direction was entangled with prompt formatting rather than capturing an invariant grounding feature.

The authors also tested whether hallucinations could be traced to specific attention heads or feed-forward network (FFN) layers, adapting intervention methods from language model grounding literature. As detailed in the paper, targeted component interventions failed to localize the mechanism:

Intervention Configuration Attention Heads FFN Layers Fix Rate (%) Break Rate (%)
L22 All Heads + FFN Dampening Layer 22 (All heads, α=3.0) Layers 22, 23, 24 (β=0.5) 8.9% 2.4%
L22 and L27 All Heads + FFN Dampening Layers 22, 27 (All heads, α=3.0) Layers 22, 23, 24 (β=0.5) 5.9% 27.6%
Top-10 Causal Attribution Heads (Set A) Top 10 heads by causal attribution Layers 13, 15, 24 (β=0.5) 4.4% 3.5%
Top-10 Causal Attribution Heads (Set B) Top 10 heads by causal attribution Layers 22, 23, 24 (β=0.5) 4.5% 4.6%
Top-10 Correlation Difference Heads Top 10 heads by correlation difference Layers 22, 23, 24 (β=0.5) 6.3% 2.5%

When individual components were subjected to large interventions—such as amplifying Layer 15 FFN activations tenfold—the model output degraded into ungrammatical tokens like VAR-1000000000... rather than natural task-directed hallucinations, confirming that single components do not govern the strategic choices underlying agent errors.

Background and Context: From Static Circuits to Stateful Agents

Mechanistic interpretability has achieved major milestones in reverse-engineering algorithmic circuits within transformer architectures. Automated circuit discovery (Conmy et al., 2023) and dictionary learning via Sparse Autoencoders (Bricken et al., 2023, Anthropic) have successfully isolated discrete circuits for factual recall and indirect object identification.

However, these methodologies assume static, single-turn prompts with fixed inputs and immediate outputs. In contrast, interactive agents operate over dynamic, multi-turn trajectories: they observe an environment, maintain working memory, and execute sequential actions where each decision alters future states.

To test whether standard dictionary learning tools could isolate agentic failure features, the authors applied a pretrained Sparse Autoencoder to the action-list activations at Layer 27 of Qwen2.5-7B-Instruct (Qwen Team, Alibaba Cloud). The top ten SAE features separating grounded from hallucinated actions promoted tokens unrelated to web navigation, showing that SAEs trained on static web text do not capture the interactive state representations that emerge during agent navigation.

Methodological Implications: Why Agent Settings Break Core MI Assumptions

The authors identified four core assumptions of mechanistic interpretability that fail in agentic environments:

  • Component Localizability Breaks Down: Planning and action selection are distributed across numerous attention layers and residual stream pathways, rendering single-component causal attribution ineffective.
  • Input Position Localizability Breaks Down: While the action list contributes to grounding, the specific token positions and syntactic properties responsible for triggering hallucinations vary across episodes.
  • Stationarity Is Violated: In stateful environments, counterfactual perturbations cause cascading divergence. Removing a valid action produces a hallucination in only 38% of trials and quickly sends the agent into divergent pages and observation histories.
  • Temporal Locality Is Violated: Strategic commitments to hallucinated actions are encoded in the residual stream well before generation begins, shaped by context accumulated across earlier timesteps.

What It Means for AI Researchers, Universities, and Research Offices

The findings carry practical implications for academic departments, research IT teams, and institutional governance bodies:

  • Limits of Simple Guardrails: Teams deploying web-browsing agents for automated literature discovery or administrative workflows cannot rely on linear probes or steering vectors as turnkey guardrails. Because learned directions are brittle to prompt formatting shifts, an intervention that suppresses a hallucination in JSON can fail under Markdown formatting.
  • Dynamic Evaluation Requirements: Institutional testing programs must expand beyond static benchmarks toward a dynamic model evaluation suite that measures compounding errors across multi-step execution windows, reflecting broader research on the METR time horizon framework.
  • Demand for Interactive Protocol Standards: Research offices evaluating autonomous software tools must enforce AI output verification protocols that validate action targets against live, authenticated DOM elements prior to system execution.

What Happens Next: Toward Dedicated Agentic Interpretability Frameworks

The authors outline a five-part research roadmap for agentic interpretability: developing dedicated benchmarks specifying stateful environments and trajectory-level ground-truth failures, creating multi-component causal attribution methods, formalizing counterfactual generation for stateful trajectories, training Sparse Autoencoders on interactive agent distributions, and testing whether discovered circuits exhibit universality across web agents, coding assistants, and robotics.

Sources

  • Mohamed Aghzal, Mor Geva, Gregory J. Stein, and Ziyu Yao. Can Mechanistic Interpretability Help Explain LLM Agent Failures? A Case Study on Web Element Hallucination. arXiv:2611.18514, published November 13, 2026. https://arxiv.org/abs/2611.18514
  • Ohio State University NLP Group. Mind2Web: Towards a Generalist Agent for the Web. Project Repository and Benchmark Suite, June 2023. https://osu-nlp-group.github.io/Mind2Web/
  • Arthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim, and Adrià Garriga-Alonso. Towards Automated Circuit Discovery for Language Models. Advances in Neural Information Processing Systems (NeurIPS), April 2023. https://arxiv.org/abs/2304.14997
  • Trenton Bricken, Adly Templeton, Joshua Batson, Brian Chen, Adam Jermyn, Tom Conerly, Nick Turner, et al. Towards Monosemanticity: Decomposing Language Models With Dictionary Learning. Anthropic Transformer Circuits Thread, October 2023. https://transformer-circuits.pub/2023/monosemantic-features/index.html
  • Qwen Team, Alibaba Cloud. Qwen2.5: A Party of Foundation Models. Architectural Release and Model Evaluation Technical Report, September 2024. https://qwenlm.github.io/blog/qwen2.5/

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →