LLM failure steps found without labels using attention guided scoring

Can Failed Trajectories Reveal Where Agents Go Wrong? Agentic Failure Attribution Without Step-Level Labels

Machine Learning

Summary

Figuring out exactly where a large language model (LLM) agent goes wrong in a task is hard because it usually needs detailed labels for every step or examples of when things succeed. This paper introduces SOAP, a method that can find the key mistake step in a failed attempt without any step-by-step labels or relying on successful examples. SOAP uses the LLM’s internal attention information and patterns in the model’s output to trace back errors to their likely source, even if mistakes appear later due to earlier errors. The authors show through extensive testing that SOAP performs better than other methods at pinpointing these failure points.

What this means in practice

  • For ai development teams: Identify exact failure points in language model agent runs without needing detailed annotations or success examples to debug complex tasks.
  • For software quality assurance teams: Improve troubleshooting workflows by automatically locating root causes of failures in multi-step automated processes powered by LLMs.

Authors

Do Nguyen-Thanh, Junlin Fang, Bing Li, Zhen Fang, Sean Du

Abstract

Failure attribution for LLM agents aims to identify decisive steps responsible for task failure, which is critical for debugging and improving agentic systems. Existing methods rely on costly LLM prompting, step-level error annotations, or verified successful trajectories that lack failure signals for assistance. In this paper, we study failure attribution from step-unlabeled failure trajectories, where each trajectory is known to have failed but its decisive step is unknown. We propose SOAP (Spectral scOring with Attention-guided Propagation), an effective framework requiring neither step-level training labels nor a separate success-only reference set. SOAP first constructs a spectral reference space from LLM representations and assigns each step a base error score according to its projection behavior. Importantly, later steps may exhibit stronger failure signals because they inherit an earlier mistake, causing independent scorers to favor downstream consequences over the decisive error. To address this downstream contamination, SOAP derives soft step dependencies from attention patterns and propagates downstream error evidence toward its likely upstream sources. Extensive experiments show that SOAP consistently improves attribution performance over competitive baselines.