ReCast: Attribution-Oriented Step Representation Learning for LLM-Based Agent Systems
作者: Weilin Jin, Mingyu Wang, Taiyu Zhu, Ziqi Zhou, Wenbo Li, Haoyang Huang, Nan Duan, Yifan Wu, Ying Li, Zhonghai Wu
分类: cs.AI
发布日期: 2026-10-08
💡 一句话要点
提出ReCast以解决LLM代理系统中的失败归因问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 失败归因 大型语言模型 步骤表示 对比学习 智能代理系统 深度学习 特征构建
📋 核心要点
- 现有方法在利用LLM进行失败归因时,隐藏状态作为步骤表示的区分能力有限,导致难以有效识别根本原因步骤。
- ReCast通过选择与归因相关的层,构建互补特征,并使用对比和排序目标训练编码器,生成归因导向的步骤表示。
- ReCast在Who&When算法和Handcrafted等基准测试中,Hit@1指标分别超越最强基线5.65和9.19个百分点,显示出显著的性能提升。
📝 摘要(中文)
在基于大型语言模型(LLM)的代理系统中,失败往往源于早期步骤,其影响会通过后续交互传播,导致难以识别其起源。为追溯这些失败,失败归因被定义为识别导致失败的最早步骤。现有方法通常利用LLM内部信号进行失败归因,但其效果有限。为此,本文提出ReCast,一种将隐藏状态转化为归因导向步骤表示的学习方法。ReCast通过选择相关层、构建互补特征,并通过对比和排序目标训练编码器,学习上下文化的步骤表示。此外,本文还引入了ReCast-2K,一个用于失败归因的训练数据集。实验结果表明,ReCast在四个基准测试中实现了最佳的Hit@1,超越最强基线5.65和9.19个百分点。
🔬 方法详解
问题定义:本文旨在解决基于LLM的代理系统中的失败归因问题,现有方法在识别导致失败的早期步骤时效果不佳,难以有效区分根本原因步骤与其他步骤。
核心思路:ReCast的核心思路是将LLM的隐藏状态转化为归因导向的步骤表示,通过选择相关层和构建特征来增强表示的区分能力,从而提高失败归因的准确性。
技术框架:ReCast的整体架构包括三个主要模块:首先选择与归因相关的层;其次构建互补的模式和偏差特征;最后通过对比和排序目标训练编码器,生成上下文化的步骤表示。
关键创新:ReCast的主要创新在于其归因导向的步骤表示学习方法,通过构建互补特征和优化训练目标,与现有方法相比,显著提高了步骤表示的区分能力。
关键设计:在设计中,ReCast选择了特定的层作为输入,构建了模式和偏差特征,并使用对比损失和排序损失作为训练目标,以优化编码器的学习效果。具体的参数设置和网络结构细节在实验部分进行了详细说明。
🖼️ 关键图片
📊 实验亮点
在实验中,ReCast在四个基准测试中实现了最佳的Hit@1,分别超越最强基线5.65和9.19个百分点,显示出其在失败归因任务中的显著性能提升。这一结果表明ReCast在实际应用中的有效性和优越性。
🎯 应用场景
ReCast的研究成果在多个领域具有潜在应用价值,尤其是在需要高可靠性和准确性的智能代理系统中,如自动化客服、智能助手和决策支持系统。通过提高失败归因的准确性,ReCast能够帮助开发更为鲁棒的LLM应用,减少系统故障和提升用户体验。
📄 摘要(原文)
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 .