arXiv:2608.05600cs.LGcs.AI2026-08

用朗之万校正解决生成模型训练与推理不一致问题

LC-GRPO: Bridging Train-Inference Gap for Flow-Based GRPO with Langevin Correction

论文配图:LC-GRPO: Bridging Train-Inference Gap for Flow-Based GRPO with Langevin Correction
图 1 · 摘自论文原文
  • 训练时用带噪声的随机微分方程,推理时用确定性常微分方程,导致采样差异
  • 引入朗之万校正步骤,使训练采样更接近推理结果,提升生成质量
  • 无需额外评分模型,适用于文本到图像/视频生成任务

基于流的生成模型通常通过求解确定性常微分方程(ODE)进行采样,而在线强化学习需要随机轨迹用于策略探索与优化。现有针对流模型的GRPO方法在训练时将推理阶段的ODE替换为随机微分方程(SDE)。尽管连续时间下两者具有相同的边际分布,但有限步离散化存在显著差异,尤其当探索噪声增大时,SDE轨迹易出现模糊,造成训练与测试采样不一致。本文提出LC-GRPO,一种带有朗之万校正的流式GRPO框架。每个轨迹转移先执行与推理对齐的ODE欧拉步,再施加针对当前时刻边际分布的随机朗之万校正。所需得分可直接从流速度中获得,无需额外评分模型,且最终转移仍为可计算似然的各向同性高斯分布。理论证明,在合适条件下,一步朗之万校正能降低不完美欧拉步的Wasserstein误差;在相同随机性水平下,该转移比反向SDE的标准欧拉-丸山离散化更准确。在SD3.5-Medium、FLUX.1-Dev和HunyuanVideo上的实验表明,LC-GRPO在文本到图像和文本到视频任务中持续提升奖励优化效果,保持生成质量,并显著缩小训练随机轨迹与测试时确定性ODE推理之间的差距。

原文摘要 · Abstract (English)

Flow-based generative models are typically sampled by solving a deterministic ordinary differential equation (ODE), whereas online reinforcement learning requires stochastic rollouts for policy exploration and optimization. Existing GRPO methods for flow models therefore replace the inference-time ODE with a stochastic differential equation (SDE) during training. Although the ODE and SDE share the same marginal distributions in continuous time, their finite-step discretizations can differ substantially. In particular, SDE rollouts often become blurry as the exploration noise increases, creating a mismatch between the samples used for reinforcement learning and those generated by the test-time ODE sampler. We introduce LC-GRPO, a flow-based GRPO framework with Langevin correction. Each rollout transition first takes an inference-aligned ODE Euler step and then applies a stochastic Langevin correction targeting the marginal distribution at the resulting timestep. The required score is recovered directly from the flow velocity, requiring no additional score model, while the resulting transition remains an isotropic Gaussian with a tractable likelihood for policy optimization. We theoretically show that, under suitable conditions, one Langevin correction step reduces the Wasserstein error of an imperfect ODE Euler step. At a matched randomness level, we further show that the proposed transition can be more accurate than the standard Euler--Maruyama discretization of the reverse SDE. Experiments on SD3.5-Medium, FLUX.1-Dev, and HunyuanVideo demonstrate that LC-GRPO consistently improves reward optimization across text-to-image and text-to-video tasks, preserves generation quality, and substantially narrows the gap between stochastic training rollouts and deterministic test-time ODE inference.

生成模型强化学习扩散模型采样对齐

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