A Mechanistic Study of Automated Failure Attribution in LLM-based Agentic Systems
Organizations: University of Virginia · Nokia
Abstract
Agentic systems have demonstrated strong capabilities on complex tasks by enabling multiple interacting large language model (LLM)-based agents to collaborate and execute subtasks in parallel. However, this collaborative structure introduces new challenges for reliably evaluating and diagnosing system failures, particularly failure attribution: tracing a system's execution to identify the agent step responsible for an incorrect final outcome. Because manually performing this task is time- and labor-intensive, recent work has turned to LLMs as judges to automate the process, referred to as automated failure attribution (AFA). These approaches assume that a sufficiently capable model can infer the failing step directly from an interaction transcript. In practice, however, direct prompting often performs poorly, which motivates follow-up work that explores various ways to improve AFA performance, including alternative prompting strategies and inference-time interventions. In this paper, we examine a more fundamental question: whether this weak behavioral performance reflects a genuine capability limitation. Using linear probes applied to internal activations, we uncover a significant knows-but-won't-say gap: models encode sufficient information to attribute a failure correctly but fail to explicitly output the responsible step. Building on this finding, we propose grafting, a simple manual intervention that exploits knowledge already encoded in the model to improve AFA performance without requiring ground-truth labels at inference time. Extensive evaluations across multiple LLMs and benchmark settings demonstrate that grafting consistently outperforms direct-prompting approaches, underscoring the potential of leveraging latent model knowledge for more reliable failure attribution. Our code is available at https://github.com/wendyzheng22/mi4afa.
Figures & tables
| Algorithm Generated | Hand Crafted | |||
|---|---|---|---|---|
| Agent Acc. | Step Acc. | Agent Acc. | Step Acc. | |
| Qwen 0.5B | 41.27 | 22.22 | 39.29 | 7.14 |
| Qwen 1.5B | 33.33 | 7.94 | 46.43 | 10.71 |
| Qwen 7B | 30.16 | 12.70 | 46.43 | 0.00 |
| Llama 1B | 23.81 | 15.87 | 17.86 | 3.57 |
| Llama 3B | 30.16 | 17.46 | 25.00 | 7.14 |
| Prompting | Probing | Grafting | |||||
|---|---|---|---|---|---|---|---|
| All-at-Once | Step-by-step | Sequential | |||||
| Algo. | Qwen 0.5B | Agent Acc. | 34.92 | 41.27 | 47.62 | 5 3.97 | 61.90 |
| Step Acc. | 23.81 | 22.22 | 14.29 | 3 6.51 | 38.10 | ||
| Qwen 1.5B | Agent Acc. | 30.16 | 33.33 | 5 0.79 | 57.14 | 57.14 | |
| Step Acc. | 20.63 | 7.94 | 6.35 | 44.44 | 3 3.33 | ||
| Qwen 7B | Agent Acc. | 28.57 | 30.16 | 39.68 | 61.90 | 4 9.21 | |