Reproduce “FlowRL: Matching Reward Distributions for LLM Reasoning” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Xuekai Zhu, Daixuan Cheng, Dinghuai Zhang, Hengli Li, Kaiyan Zhang, Che Jiang, Youbang Sun, Ermo Hua and 15 more

FlowRL trains language models to match a reward-shaped distribution of high-reward answers, rather than maximizing reward alone. It converts scalar response scores into a normalized target and uses trajectory balance with length normalization and importance sampling. On Qwen2.5-32B-Base, it reaches 48.39% average accuracy across six math benchmarks, above PPO and GRPO; diversity is separately model-judged, not shown to cause gains.

Key insights

  • Optimizing for reward distribution matching rather than reward maximization inherently promotes both higher reward and greater policy entropy (diversity).
  • Minimizing the reverse KL divergence between the policy and a reward-weighted distribution is theoretically equivalent to minimizing a GFlowNet-inspired trajectory balance loss.
  • Practical adaptations like length normalization and importance sampling are critical for stabilizing gradients and enabling efficient off-policy training when applying flow-balancing objectives to long LLM reasoning trajectories.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.