RECAP:用上下文压缩训练长程LLM智能体的强化学习框架
RECAP: Training Long-horizon LLM Agents with Context Compaction
RECAP是一个强化学习框架,核心原则是压缩摘要应保留原始交互历史所诱导的行为,并用行为失真目标衡量压缩与原始上下文下智能体后续行为的差异。该目标的梯度分解为摘要生成的失真奖励与后续动作的自蒸馏两个学习信号。在Qwen3.5-4B上,RECAP在BrowseComp-plus和SWE-bench Verified上分别取得4.6%和4.3%的绝对提升,优于仅用任务奖励的RL基线。
arXiv:2611.31258v1 Announce Type: new Abstract: Context compaction enables large language model agents to tackle long-horizon tasks within limited context budgets by replacing interaction histories with compressed summaries. However, learning effective compaction jointly with the agent policy remains challenging, as summaries affect task success over many subsequent interactions. We introduce RECAP, a reinforcement learning (RL) framework based on the principle that a summary should preserve the behavior induced by the original interaction history. We formalize this principle with a behavior distortion objective that measures the divergence between the agent's subsequent behavior under compressed and original contexts. We show that the gradient of the distortion objective decomposes into two complementary learning signals: distortion-based reward for summary generation and self-distillation for subsequent actions. Experiments on Qwen3.5-4B show that RECAP consistently outperforms the task-reward-only RL baselines on both environments, leading to an absolute improvement of 4.6% and 4.3% on BrowseComp-plus and SWE-bench Verified, respectively. Ablations further highlight the value of jointly supervising summary generation and post-compaction behavior for RECAP.
来源:arXiv (AI + Vision + Imaging) · arxiv.org