arXiv:2512.23075cs.LGcs.AI2025-12被引 9

解决大模型强化学习中长序列优化的误差失控问题

Trust Region Masking for Long-Horizon LLM Reinforcement Learning

  • 提出信任区域掩码机制,通过屏蔽异常序列控制局部偏差
  • 新界标将误差从O(T²)降至O(T),实现长序列任务的稳定优化
  • 适合追求可靠长程决策的大模型强化学习研究者

大型语言模型的策略梯度方法通过采样策略π_{roll}计算代理目标来优化策略π_θ。然而现代LLM-RL流程存在不可避免的实现偏差——后端差异、专家混合路由不连续性、分布式训练延迟等,导致策略偏离(π_{roll} ≠ π_θ)及代理目标与真实目标间的近似误差。我们证明经典信任区域界随序列长度T呈O(T²)增长,对长时序任务无效。为此,我们推导出一类新界标,包括基于KL和TV的界,如Pinsker-边际界(O(T^{3/2}))、混合界(O(T))以及通过逐位置重要性比率分解严格推广Pinsker-边际界的自适应界。取所有界最小值可获得当前最紧的全局保证。关键的是,所有界均依赖于最大分词级偏差D_{KL}^{tok,max}(或D_{TV}^{tok,max}),该序列级量无法由独立分词的方法(如PPO裁剪)控制。我们提出信任区域掩码(TRM),通过屏蔽违反信任区域的完整序列,首次实现长时序LLM-RL的非平凡单调改进保障。

原文摘要 · Abstract (English)

Policy gradient methods for Large Language Models optimize a policy $π_θ$ via a surrogate objective computed from samples of a rollout policy $π_{\text{roll}}$. However, modern LLM-RL pipelines suffer from unavoidable implementation divergences -- backend discrepancies, Mixture-of-Experts routing discontinuities, and distributed training staleness -- causing off-policy mismatch ($π_{\text{roll}} \neq π_θ$) and approximation errors between the surrogate and the true objective. We demonstrate that classical trust region bounds on this error scale as $O(T^2)$ with sequence length $T$, rendering them vacuous for long-horizon tasks. To address this, we derive a family of bounds -- both KL-based and TV-based -- including a Pinsker-Marginal bound ($O(T^{3/2})$), a Mixed bound ($O(T)$), and an Adaptive bound that strictly generalizes the Pinsker-Marginal bound via per-position importance-ratio decomposition. Taking the minimum over all bounds yields the tightest known guarantee across all divergence regimes. Crucially, all bounds depend on the maximum token-level divergence $D_{\mathrm{KL}}^{\mathrm{tok,max}}$ (or $D_{\mathrm{TV}}^{\mathrm{tok,max}}$), a sequence-level quantity that cannot be controlled by token-independent methods like PPO clipping. We propose Trust Region Masking (TRM), which masks entire sequences violating the trust region, enabling the first non-vacuous monotonic improvement guarantees for long-horizon LLM-RL.

强化学习大模型信任区域长序列

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。