Can Mechanistic Interpretability Help Explain LLM Agent Failures? A Case Study on Web Element Hallucination
Abstract
Mechanistic Interpretability (MI) has made significant progress in explaining the internal computations of Large Language Models (LLMs); however, these advances have yet to demonstrate comparable success in explaining the decision-making processes of LLM-based agents. This paper examines the challenges MI tools face when applied to realistic agentic failures. We focus on one such failure: web agents hallucinating actions that are not available on a website. We apply a series of mechanistic analyzes to Qwen2.5-7B-Instruct as it interacts with live websites. We find that a linear probe trained on the last prompt token can predict hallucinations before generation begins (0.80 AUC) and steering along a probe direction corrects 85\% of hallucinations, but disrupts 7\% of valid actions. However, these results only provide a partial explanation of why the agent hallucinates. The probe direction is sensitive to prompt formatting, losing much of its steering effect after a minor change to how actions are represented. Additionally, circuit identification can be difficult as the computation is distributed across multiple components and positions, and the information the agent relies on varies across examples. We discuss how these observations challenge the assumptions underlying standard MI methods for circuit discovery and feature identification, and outline future directions for making these methods better suited to explain failures in LLM-based agents.
Create a lesson
Related papers
When Tools Fail, Agents Fabricate: Silent Failure and Verification-First Oversight in Tool-Using LLM Agents
Shared title terminology · Gün Kaynar, Boshen Yan, Carl Kingsford
DECODE: Diagnosing Interpretability Failures in Automated Interpretation Process
Shared title terminology · Dohyun Kim, Jaeung Lee, Donghee Hong et al.
Learn then Bet: Learning Interpretable Rules for Reliable Agent Intervention
Shared title terminology · You-Lin Chen, Xinyi Lisa Chen, Pedro Herrero-Vidal et al.
MVAgent: Per-Video Agents under Global Coordination for Multi-Video Understanding
Shared title terminology · Kewei Wei, XueXiang Wen, Bocheng Hu et al.
When Wrong Answers Remain Unsettled: Failure Dynamics in Recurrent Reasoners
Shared title terminology · Jiucheng Zang, Congkai Peng, Yankai Wei
STRIDE: Strategy-to-Tactics Retrieval-Guided Skill Disclosure and Evolution for Agentic Reinforcement Learning
Shared title terminology · Shixin Hong, Wanqing Cui, Yibo Hu et al.