提出统一框架RCL,用反思与迭代优化上下文空间,提升智能体泛化能力。
Reflective Context Learning: Studying the Optimization Primitives of Context Space
- 通过反思行为与失败,生成类梯度的上下文更新信号。
- 在多个任务上超越强基线,提升稳定性和泛化性能。
- 适合研究通用智能体、强化学习优化机制的学者。
通用智能体需在跨任务和环境间泛化地从经验中学习。信用分配、过拟合、遗忘、局部最优及高方差学习信号等基本学习问题,在参数空间与上下文空间中均存在。尽管经典机器学习优化中已有充分理解,但上下文空间中的相关研究仍不足,导致现有方法零散且依赖直觉。本文提出反射式上下文学习(RCL)框架,支持智能体通过重复交互、行为反思与上下文迭代更新实现学习。其中,反思将轨迹与当前上下文转化为类梯度的方向性更新信号,突变则应用该信号以改进未来行为。我们将近期上下文优化方法重新归入此统一学习范式,并系统引入经典优化原语:批量处理、改进信用分配信号、辅助损失、失败重播及分组回放以降低方差。在AppWorld、BrowseComp+和RewardBench2上,这些原语显著优于强基线,其相对重要性随任务类型变化。进一步分析显示,初始化鲁棒性、批大小、采样与课程策略、优化器状态变体,以及强弱模型在不同组件间的分配均影响性能。结果表明,上下文更新应被视为可系统研究与可迁移改进的优化问题,而非孤立算法集合。
原文摘要 · Abstract (English)
Generally capable agents must learn from experience in ways that generalize across tasks and environments. The fundamental problems of learning, including credit assignment, overfitting, forgetting, local optima, and high-variance learning signals, persist whether the learned object lies in parameter space or context space. While these challenges are well understood in classical machine learning optimization, they remain underexplored in context space, leading current methods to be fragmented and ad hoc. We present Reflective Context Learning (RCL), a unified framework for agents that learn through repeated interaction, reflection on behavior and failure modes, and iterative updates to context. In RCL, reflection converts trajectories and current context into a directional update signal analogous to gradients, while mutation applies that signal to improve future behavior in context space. We recast recent context-optimization approaches as instances of this shared learning problem and systematically extend them with classical optimization primitives, including batching, improved credit-assignment signal, auxiliary losses, failure replay, and grouped rollouts for variance reduction. On AppWorld, BrowseComp+, and RewardBench2, these primitives improve over strong baselines, with their relative importance shifting across task regimes. We further analyze robustness to initialization, the effects of batch size, sampling and curriculum strategy, optimizer-state variants, and the impact of allocating stronger or weaker models to different optimization components. Our results suggest that learning through context updates should be treated not as a set of isolated algorithms, but as an optimization problem whose mechanisms can be studied systematically and improved through transferable principles.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。