不要掩盖环境:观察监督如何改变智能体在强化学习中的探索

·

研究论文 · 2026/09/18

标准监督微调(SFT)仅对智能体生成的动作 token 计算损失,而将环境观测作为上下文而非预测目标。本文提出 ActObs,在 SFT 中同时监督轨迹中已有的观测 token。尽管部署时智能体从不生成观测,学习预测观测能促使策略建模动作后果,且不增加数据、参数、序列 token 或前向传播。两种方法在 SFT 后表现相近,但在 GRPO 后出现分化。在 Qwen3-4B 上,基于 ActObs 的 GRPO 在 Terminal-Bench 2.0 的每个采样预算下 pass@k 均高于仅动作版本;在 Qwen3-8B 上,它以部分 pass@1 可靠性换取更高的 pass@k(pass@16 提升 3.4 个百分点)并解决更多不同任务。该优势还扩展到 aider-polyglot 的跨域代码编辑(4B 模型 pass@1 提升 4.2 个百分点),这些任务在 SFT 和 RL 中均未见过。ActObs 在 RL 中保留更多熵,同时需要更少的策略移动,使最终策略更接近其 SFT 初始化。分析表明,差异源于 SFT:动作与观测梯度迅速变得正交,而仅动作训练留下较大的残差观测梯度,并使环境预测能力低于基础模型。联合监督防止了这种单侧特化,保留了后果预测能力,为下游探索做好准备。

该研究挑战了 SFT 仅监督动作 token 的惯例,提出一种简单且零额外开销的观测监督方法,显著提升下游 RL 探索能力,并提供了梯度层面的机制解释,对智能体训练具有重要实践和理论意义。

Agent trajectories record what an agent does and what happens next. Yet standard supervised fine-tuning (SFT) applies loss only to agent-authored action tokens, using environment observations as context but not as prediction targets. We ask whether this convention provides the best initialization for subsequent reinforcement learning. We introduce ActObs, which also supervises the observation tokens already present in each trajectory. Although deployed agents never generate observations, learning to predict them encourages the policy to model action consequences without adding data, parameters, sequence tokens, or forward passes. The methods perform similarly after SFT but diverge after GRPO. On Qwen3-4B, GRPO from ActObs achieves higher pass@k at every evaluated sampling budget than its action-only counterpart on Terminal-Bench 2.0. On Qwen3-8B, it trades some pass@1 reliability for higher pass@k (+3.4 pp at pass@16) and solves more distinct tasks. The advantage extends to cross-domain code editing on aider-polyglot (+4.2 pp at pass@1 at 4B), whose tasks are unseen during SFT and RL. ActObs retains more entropy during RL while requiring less policy movement, leaving the final policy closer to its SFT initialization. Our analysis traces this difference to SFT: action and observation gradients rapidly become orthogonal, while action-only training leaves a large residual observation gradient and degrades environment prediction below the base model. Joint supervision prevents this one-sided specialization, preserving consequence prediction and preparing the policy for downstream exploration.

阅读原文

参与讨论