GFlowRL: Scaling Distribution-Matching RL to Large Language Models
作者: Xiaodong Liu, Michael Xu, Jack W. Stokes, Paul Smolensky, Doug Burger, Jianfeng Gao
分类: cs.CL, cs.LG
发布日期: 2026-07-15
备注: 31 pages, 8 figures, 17 tables
🔗 代码/项目: GITHUB
💡 一句话要点
提出GFlowRL以解决大规模语言模型的分布匹配强化学习问题
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 生成流网络 强化学习 大规模语言模型 奖励分布匹配 对抗性测试
📋 核心要点
- 现有的GFlowNet风格强化学习在扩展到现代大规模语言模型时面临梯度不稳定和工程复杂性的问题。
- GFlowRL通过去除辅助分区网络,利用批内蒙特卡洛估计来实现奖励分布匹配,简化了算法结构。
- GFlowRL在多个基准测试中表现优异,尤其是在Codeforces和AdvBench上,超越了之前的最优方法。
📝 摘要(中文)
生成流网络(GFlowNets)为大型推理模型提供了一种有前景的替代方案,鼓励通过匹配奖励分布而非趋向主导模式来实现多样化推理路径。尽管在数学和代码任务上已有初步成果,但将GFlowNet风格的强化学习扩展到现代后训练管道仍然面临挑战。通过系统分析,论文发现先前被视为关键的学习分区函数可以被从训练所需的回滚组中计算出的批内蒙特卡洛估计所替代。提出的GFlowRL算法完全去除了辅助分区网络,同时保留了奖励分布匹配目标,并引入了重要性采样修正和不对称流差剪切两个稳定器。GFlowRL在数学、代码和对抗性红队测试基准上超越了所有对手,显示出显著的性能提升。
🔬 方法详解
问题定义:论文要解决的问题是如何将GFlowNet风格的强化学习有效扩展到大规模语言模型中,现有方法在模型规模、奖励噪声和分布式系统复杂性增加时,学习的分区函数导致了梯度不稳定和工程开销。
核心思路:论文的核心思路是用从回滚组中计算出的批内蒙特卡洛估计替代学习的分区函数,从而简化算法并提高稳定性。这样的设计旨在减少复杂性,同时保持奖励分布匹配的目标。
技术框架:GFlowRL的整体架构包括去除辅助分区网络的简化设计,利用重要性采样修正和不对称流差剪切来稳定训练过程。主要模块包括回滚组的生成、奖励计算和模型更新。
关键创新:GFlowRL的关键创新在于完全去除了分区网络,采用批内蒙特卡洛估计来实现奖励分布匹配,这与现有方法的依赖于复杂分区函数的设计本质上不同。
关键设计:在GFlowRL中,重要性采样修正用于处理回滚和训练者之间的漂移,而不对称流差剪切则用于处理异常残差,这些设计确保了算法在不同规模和架构下的稳定性。
🖼️ 关键图片
📊 实验亮点
GFlowRL在多个基准测试中表现卓越,尤其是在Codeforces上达到了2048的评分,且在AdvBench和HarmBench上实现了最高的ASR@1,超越了之前的最优多轮攻击者。与FlowRL相比,GFlowRL在235B参数的MoE配置中也表现出更好的收敛性。
🎯 应用场景
GFlowRL的研究成果具有广泛的应用潜力,尤其是在需要复杂推理和决策的领域,如自然语言处理、代码生成和对抗性攻击防御等。其稳定性和高效性使其适用于大规模模型的训练和推理,未来可能推动更多智能系统的发展。
📄 摘要(原文)
Generative Flow Networks (GFlowNets) offer a promising alternative to reward-maximizing reinforcement learning (RL) for large reasoning models, encouraging diverse reasoning paths by matching reward distributions rather than collapsing to dominant modes. Recent work shows promise on math and code, but scaling GFlowNet-style RL to modern post-training pipelines remains difficult: as model size, rollout horizon, reward noise, and distributed-systems complexity grow together, a learned prompt-conditional partition function becomes a source of gradient instability and engineering overhead rather than a useful normalizer. Through systematic analysis, we find that the learned partition function, previously treated as essential, can be replaced by an in-batch Monte Carlo estimate computed from the rollout group already required for training. We propose GFlowRL, a streamlined GFlowNet-style RL algorithm that removes the auxiliary partition network entirely while preserving the reward-distribution-matching objective, completed by two stabilizers: importance-sampling correction for rollout/trainer drift and asymmetric flow-gap clipping for outlier residuals. GFlowRL exceeds all counterparts on math, code, and adversarial red-teaming benchmarks, reaching a Codeforces rating of 2048 at the 14B scale (within 25 Elo of o3-mini) and attaining the highest average ASR@1 on AdvBench and HarmBench, outperforming the previous SOTA multi-turn attacker in a regime where FlowRL, a prior GFlowNet-style method, diverges. The same recipe transfers to all evaluated MoE configurations up to 235B parameters, where FlowRL again fails to converge. To our knowledge, GFlowRL is the first GFlowNet-style RL algorithm to scale stably across both dense and sparse architectures. Code will be at: https://github.com/microsoft/gflowrl