ReCast: Attribution-Oriented Step Representation Learning for LLM-Based Agent Systems
cs.AI
Submitted: 2026-10-08
Updated: 2026-10-08
Code: https://github.com/ag2ai/ag2-classic
License: http://creativecommons.org/licenses/by/4.0/
The gist: In LLM-based agent systems, failures can originate from early steps whose effects propagate through subsequent interactions, making their origins difficult to identify.
Terminology
Abstract
In LLM-based agent systems, failures can originate from early steps whose effects propagate through subsequent interactions, making their origins difficult to identify. To trace such failures back to their origin, failure attribution has been formulated as the task of identifying the earliest step responsible for the failure. Recent methods leverage LLM internal signals for failure attribution, typically using hidden states as step representations. We therefore conduct an empirical study to evaluate how effectively these representations distinguish root-cause steps from other steps and find limited separation. Motivated by this observation, we propose ReCast, a step representation learning method that transforms hidden states from a frozen LLM into attribution-oriented step representations. ReCast first selects attribution-relevant layers, then constructs complementary pattern and deviation features, and finally learns contextualized step representations through an encoder trained with contrastive and ranking objectives. We also introduce ReCast-2K, a training dataset for failure attribution. ReCast achieves the best Hit@1 across four benchmarks, surpassing the strongest baseline by 5.65 and 9.19 pp on Who&When Algorithm and Handcrafted, respectively. Code is available at https://anonymous.4open.science/r/ReCast-5FB6 .
Sources
- Magentic-One: A Generalist Multi-Agent System for Solving Complex Tasks
- Measuring Mathematical Problem Solving With the MATH Dataset
- GPT-4o System Card
- ASCon: A Direction-Aware Reciprocal Agent--Step Contextualization Model for Failure Attribution in Multi-Agent Systems
- Who&When Pro: Can LLMs Really Attribute Failures in AI Agents?
- MASPrism: Lightweight Failure Attribution for Multi-Agent Systems Using Prefill-Stage Signals
- FALAT: Tracing Failures in LLM Agent Trajectories via Dependency-Guided Search
- Adaptive In-conversation Team Building for Language Model Agents
- From Flat Logs to Causal Graphs: Hierarchical Failure Attribution for LLM-based Multi-Agent Systems
- DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence
- Qwen3 Technical Report
- Tracing Agentic Failure from the Flow of Success
- AgentForesight: Online Auditing for Early Failure Prediction in Multi-Agent Systems
- Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Models
Related papers
- MAVEN-T: Reinforced Heterogeneous Distillation for Real-Time Multi-Agent Trajectory Prediction
- Model Discovery Agent: LLM-assisted Bayesian experiment design for data-efficient discovery of mechanistic world models
- Agents' Last Exam
- The Clinician's Veto: Navigating Trust, Liability, and Uncertainty in Autonomous AI Prescribing
- MindHelper: Closed-Loop Embodied Mental-State Reasoning for Precision Intervention
- Incumbent Advantage: Brand Bias and Cognitive Manipulation Dynamics in LLM Recommendation Systems