论文

Sampler Replay:通过重放采样器状态修复 RLVR 训练-推理失配

Sampler Replay: Train The Sampler Not The Trainer in Reinforcement Learning with Verifiable Rewards

精选理由

训练和推理不一致会悄悄毁掉你的 RLVR 效果,这篇论文换了个思路:与其修正训练器,不如直接重放采样器的 logits 和隐藏状态。实验覆盖量化、KV cache 失配等场景,做 RL 后训练的工程师值得复现试试。

arXiv 论文 2611.41862 提出 Sampler Replay 算法,重新定义了 RLVR(可验证奖励强化学习)中的训练-推理失配问题:作者主张应训练的是采样器本身,因为测试时真正执行的是采样器,训练器只是获取采样器真实梯度的近似机制。

正文

具体做法是在训练器前向传播中重放采样器的隐藏状态、logits 和路由决策,从而更准确地逼近采样器梯度。论文还从数学上证明 Score Centering 是 Sampler Replay 的特例,即只重放 logits 的情形,将此前文献中被独立处理的多项 TIM 缓解技术统一到同一框架下。

在多种任务和模型规模上,该方法在量化(权重、激活、KV cache)、权重扰动和过时策略导致的严重失配下稳定了训练,成绩超过强基线。

原文 · arXiv cs.LG

Sampler Replay: Train The Sampler Not The Trainer in Reinforcement Learning with Verifiable Rewards

Train-inference mismatch is a well-known problem that degrades reinforcement learning with verifiable rewards (RLVR) performance. This problem is currently framed as training the trainer with samples coming from an imperfect version of itself: a sampler optimized to meet some efficiency criteria. Therefore, current RLVR algorithms are designed to account for the discrepancy in the trainer's gradient due to the sampler's off-policy rollouts. In this paper, we reframe the problem: we argue that RLVR should strive to \emph{train the sampler}, since it is the sampler's performance at test time that we ultimately care about. Therefore, we view the trainer merely as a mechanism to get an approximation of the sampler's true gradient. We propose \emph{Sampler Replay}, an algorithm that replays the sampler's hidden states, logits, and routing decisions in the trainer's forward pass to better approximate the sampler's gradient. Across tasks and model scales, we show that Sampler Replay stabilizes training under severe train-inference mismatch induced by quantization (weights, activations, KV cache), weight perturbation, and staleness, outperforming strong baselines. Furthermore, we show that Sampler Replay is a generalization of techniques that have been widely used in the literature to address TIM but that, so far, have been treated independently. Notably, we mathematically prove that Score Centering is a special case of Sampler Replay, where only the logits are replayed.

产业坐标与信源核验

本条情报归属 AITOP「论文」核心追踪栏目。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:RLVR、Sampler Replay、强化学习、训练-推理失配,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。

信源核验说明:本文原始线索采编自「arXiv cs.LG」(@Milad Aghajohari, Kamran Chitsaz, Sarath Chandar, Alessandro Sordoni, Michael Noukhovitch, Aaron Courville),经 AITOP 多维评分管线结构化提炼。