从反思经验中内化代理性
Counterfactual Distillation: Internalizing Reflective Experience into LLM Agent
AI总结:
本文提出LEAFE框架,通过反思经验内化恢复代理性,提升长周期任务中的问题解决能力,实验显示在Pass@k任务中优于传统方法。
摘要:
大型语言模型正被部署为自主代理,需通过长周期环境交互进行规划、行动和从错误中恢复。然而,现有基于结果的训练方法(如可验证奖励的强化学习)主要优化最终成功信号,导致环境反馈未被充分利用,从而产生分布尖锐化问题:策略在已成功行为集上表现优异,但无法提升基于反馈的代理性以扩展问题解决能力(如Pass@k)在长周期设置中。为此,我们提出LEAFE(从反思经验中学习反馈导向的代理性),通过探索阶段将环境反馈总结为可操作经验,回溯到早期决策点并探索替代分支。然后通过监督微调将这些经验引导的修正提炼入模型,使策略在未来的交互中更有效地恢复。在固定交互预算下,LEAFE在多样化的交互编码和代理任务中持续提升Pass@1性能,并在Pass@k任务中优于基于结果的方法(GRPO)和基于经验的方法(如Early Experience),在Pass@128上提升高达14%。
英文摘要:
Large language models increasingly act as autonomous agents in long-horizon interactions, learning from final outcomes and environmental feedback. However, optimizing from such interaction experience remains challenging, as feedback is heterogeneous and rarely carries explicit reward information. Existing post-training approaches rely on outcome-driven methods, such as reinforcement learning with verifiable rewards (RLVR), which primarily exploit final success signals while leaving interaction experience and feedback underutilized. In sparse-reward, long-horizon tasks, this often results in distribution sharpening: the policy reinforces a narrow set of already-successful behaviors, without substantially improving the feedback-grounded agency needed for broader problem-solving capacity (e.g., Pass@k). We propose Counterfactual Distillation, a framework that converts exploration-derived experience into trainable policy supervision. Specifically, we organize exploration as a tree-structured search process, where the agent reflects on past decision points and makes new experience-guided decisions to form alternative branches. These corrections are then distilled as counterfactual targets: we train the model to predict the revised action from the original history without explicitly providing the experience, thereby introducing out-of-distribution behavior patterns and expanding exploration capacity. Across diverse interactive coding and agentic tasks, our method outperforms outcome-driven baselines such as GRPO and experience-based methods such as Early Experience, with gains of up to 14 percentage points over the base model on Pass@128. When interleaved with reinforcement learning updates, it further raises the performance ceiling, improving Pass@1 on Sokoban by 8 percentage points over extended GRPO. Our code is available at https://github.com/motigrez/Counterfactual-Distillation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。