Beyond Normalization: Rethinking the Partition Function as a Difficulty Scheduler for RLVR
Proposes PACED-RL, leveraging the partition function as an online accuracy signal to improve sample efficiency in distribution-matching training of LLMs.
Key Findings
Methodology
This work first establishes a theoretical link between the partition function Z(x) and per-prompt online accuracy p_old(x). It then reinterprets Z(x) as an online accuracy estimate during training, enabling adaptive prompt selection and prioritized replay. The approach modifies the Trajectory Balance loss to incorporate Zϕ, which predicts prompt accuracy. The framework reuses existing training signals, reducing additional computational costs. Experiments on mathematical reasoning and code generation tasks demonstrate significant performance gains, with improvements up to 29.1% in pass@1 and 14.2% in pass@k metrics, while accelerating training speed.
Key Results
- On the AIME benchmark, PACED-RL improves pass@1 by 29.1% over GRPO and 40.0% over FlowRL; on pass@k, it outperforms baselines by up to 14.2%. In math reasoning, Qwen2.5-Math-7B achieves 13.1% accuracy on AIME24, surpassing previous methods.
- In code generation, PACED-RL reduces training time by approximately half to reach comparable performance, validating higher sample efficiency. It also enhances diversity, as indicated by improved pass@k scores, especially at larger k.
- The method effectively leverages the partition function for online accuracy estimation, guiding adaptive prompt sampling and error-prioritized replay, leading to better exploration and generalization.
Significance
This research shifts the perspective on the partition function from a mere normalization factor to a dynamic difficulty indicator, enabling more efficient and diverse training of large language models. By integrating theoretical insights with practical algorithms, it addresses longstanding challenges in sample efficiency and exploration in RL-based fine-tuning. The approach offers a scalable solution to improve reasoning and generation performance, with broad implications for AI development, including autonomous learning, multi-task adaptation, and scalable reasoning systems.
Technical Contribution
The core technical innovation is the reinterpretation of the GFlowNet partition function as an online accuracy predictor, supported by a theoretical derivation. This enables the design of adaptive prompt selection and prioritized replay mechanisms that reuse existing training signals, reducing computational overhead. The method extends the distribution matching framework with a principled difficulty-aware sampling strategy, improving both efficiency and diversity. Theoretical guarantees link the partition function to accuracy, providing a solid foundation for further extensions.
Novelty
This work is the first to exploit the GFlowNet partition function as a real-time accuracy signal for adaptive training. Unlike prior methods that treat it solely as a normalization constant, this approach leverages its informational content to guide prompt difficulty and sample prioritization, representing a fundamental shift in how distribution matching is utilized in large-scale language model training.
Limitations
- The accuracy estimation relies on the assumption that the KL divergence between policies remains small during training; in unstable training regimes, this assumption may break down, affecting estimate reliability.
- In highly complex or noisy tasks, the estimated accuracy signals may be less precise, limiting effectiveness.
- Current experiments are confined to specific datasets and model sizes; scalability to larger models and broader tasks requires further validation.
Future Work
Future research could focus on extending the accuracy estimation to multi-modal and multi-task settings, enhancing robustness against noisy signals. Integrating active learning strategies to dynamically adjust prompt difficulty could further improve efficiency. Additionally, exploring the theoretical bounds of the accuracy partition function in more diverse RL scenarios and scaling the approach to larger models and real-world applications are promising directions.
AI Executive Summary
In recent years, large language models (LLMs) have achieved remarkable success in natural language understanding and generation tasks. However, optimizing these models for reasoning and diversity remains challenging. Reinforcement learning (RL) approaches, such as reward maximization, often lead to overly concentrated outputs, limiting exploration and variety. To address this, GFlowNets emerged as a promising alternative, focusing on distribution matching rather than reward maximization. Yet, the core component—the partition function—has been treated merely as a normalization factor, ignoring its potential to encode richer information.
This paper introduces PACED-RL, a novel framework that reinterprets the GFlowNet partition function as an online accuracy signal. By establishing a theoretical relationship between the partition function and per-prompt accuracy, the authors enable the model to dynamically assess the difficulty of prompts during training. This insight allows for adaptive prompt selection, prioritizing questions that are neither too easy nor too hard, thus maximizing learning efficiency. Moreover, the framework incorporates an accuracy estimation error–prioritized replay mechanism, which emphasizes training on samples where the model's accuracy estimate is most uncertain.
The approach leverages existing training signals, avoiding additional computational overhead, and significantly accelerates training while maintaining output diversity. Extensive experiments on mathematical reasoning and code generation benchmarks demonstrate that PACED-RL outperforms state-of-the-art methods such as GRPO and FlowRL, achieving up to 29.1% improvement in pass@1 and faster convergence. These results highlight the potential of using the partition function as a dynamic difficulty scheduler, opening new avenues for scalable, efficient, and diverse training of large language models.
Overall, PACED-RL offers a principled and practical advancement in distribution-matching training, addressing core limitations of existing RL methods and paving the way for more autonomous, capable AI systems in reasoning, coding, and beyond.
Deep Analysis
Background
The evolution of large language models (LLMs) has transformed NLP, with methods like supervised fine-tuning and reinforcement learning (RL) significantly boosting reasoning and generation capabilities. Early RL approaches, such as PPO, improved reasoning but often caused output mode collapse, reducing diversity. GFlowNets, introduced by Bengio et al., offered a new paradigm by focusing on reward distribution matching, which naturally preserves diversity. Prior works like FlowRL adapted GFlowNets for LLM post-training, but their core reliance on the partition function as a normalization constant limited the exploitation of its informational potential. Despite progress, challenges remain in balancing sample efficiency, diversity, and training stability.
Core Problem
Existing RL methods for LLM fine-tuning face a fundamental trade-off: maximizing reward often leads to reduced output diversity, while distribution matching approaches like GFlowNets, though preserving diversity, treat the partition function as a static normalizer. This neglects the rich information embedded within the partition function, particularly its potential to reflect prompt difficulty. Consequently, training remains sample-inefficient, especially in complex reasoning tasks where data and compute costs are high. The core issue is how to leverage the partition function to dynamically guide training, improving efficiency without sacrificing diversity.
Innovation
The key innovation is reinterpreting the GFlowNet partition function as an online accuracy estimator, establishing a theoretical link that allows it to serve as a difficulty scheduler. This enables adaptive prompt selection, focusing training on questions of intermediate difficulty, which maximizes learning progress. Additionally, the authors introduce an accuracy estimation error–prioritized replay mechanism, emphasizing samples where the model's accuracy estimate is uncertain. These mechanisms are integrated into the existing GFlowNet training pipeline, reusing existing signals to avoid extra computation. The approach balances exploration and exploitation, significantly boosting sample efficiency while maintaining diversity.
Methodology
- �� Derive the theoretical relationship between Zϕ and per-prompt accuracy p_old(x) using a modified Trajectory Balance loss. • Replace the reference policy with the old policy to interpret Zϕ as an estimate of prompt accuracy. • Use Zϕ to select prompts with accuracy estimates near 0.5, ensuring informative training samples. • Generate rollouts for selected prompts, updating both the policy and Zϕ by minimizing the modified loss. • Implement an accuracy estimation error–prioritized replay buffer, storing prompt-output pairs with high estimation errors. • During training, sample from the buffer to focus on uncertain prompts, refining accuracy estimates and normalization. • Validate the approach on datasets like DeepCoder and DeepScaleR, with hyperparameters β=0.05, buffer size 128, and 8 rollouts per prompt.
Experiments
Experiments involve training models such as Qwen2.5-Math-7B on datasets like DeepScaleR and DeepCoder, comparing PACED-RL to baselines like GRPO and FlowRL. Metrics include pass@1 and pass@k, with evaluations on benchmarks like AIME, HumanEval+, and Math500. Hyperparameters include a β of 0.05, buffer capacity of 128, and 8 rollouts per prompt. Ablation studies examine the impact of prompt difficulty targeting and replay prioritization. Results show faster convergence and higher accuracy, with improvements up to 29.1% in pass@1 and significant diversity gains.
Results
PACED-RL outperforms baselines across multiple tasks, achieving up to 29.1% higher pass@1 on AIME and faster training times—about half the epochs needed for comparable performance. On code generation benchmarks, it reaches top performance with only 42-49% of the training time of previous methods. The pass@k scores indicate enhanced exploration and diversity, especially at larger k values, demonstrating the method’s ability to balance accuracy and variety. The ablation confirms that adaptive prompt selection based on accuracy estimates is crucial for these gains.
Applications
This approach is immediately applicable to tasks requiring high reasoning accuracy and output diversity, such as automated theorem proving, code synthesis, and complex question answering. It enables models to focus on optimally challenging prompts, reducing training costs and improving generalization. Long-term, integrating this dynamic difficulty scheduling into multi-task and multi-modal systems could foster autonomous AI that learns more efficiently across diverse domains, ultimately reducing reliance on massive labeled datasets and computational resources.
Limitations & Outlook
The method assumes stable training dynamics where KL divergence remains small; in unstable or highly noisy environments, accuracy estimates may degrade. Its effectiveness diminishes in tasks with extremely high complexity or where prompt difficulty cannot be reliably inferred. Scalability to larger models and broader tasks remains to be validated. Further, the approach depends on the quality of the initial GFlowNet training, which may limit its applicability in scenarios with limited data or unstable training conditions.
Plain Language Accessible to non-experts
想象你在一家工厂工作,工厂每天生产各种商品。传统的方法是用一个简单的评分系统,给每个商品打分,然后根据这个评分调整生产线,但这个评分只是一个粗略的指标,没有考虑商品的实际难度。现在,工厂引入了一个智能检测系统,这个系统不仅能告诉你商品的质量,还能反映出生产的难度。于是,工厂开始用这个系统的评分来决定下一步生产什么:优先处理那些难度适中的商品,这样既能保证商品质量,又能让生产更快更有效。这个新方法就像给AI模型配备了一个“难度感知器”,让它能更聪明地学习和推理,不仅提高效率,还能保持多样性,就像工厂既能快速生产,又能提供各种不同的商品一样。
ELI14 Explained like you're 14
想象你在学校里做题,有些题太简单,你做完了就学不到新东西;有些题太难,你根本做不出来,也没学到东西。理想的学习方法是挑那些难度刚刚好的题——既不会太简单,也不会太难。这个研究就像给AI设计了一个“聪明的老师”,能根据每个题目的难度,帮它挑选最合适的题目来练习。这个“老师”其实是用模型内部的一个特别的评分系统来判断题目的难度,然后优先让AI练习那些既有挑战,又能学到新知识的题目。这样,AI就能更快、更有效地学习新技能,而且还能保持多样性,不会只会一种题型。就像你在学校里学得更快、更全面一样,AI也能变得更聪明、更厉害。
Glossary
Partition Function (分区函数)
在统计学和机器学习中,用于归一化概率分布的函数,确保所有可能结果的概率和为1。在本文中,它还反映每个提示的在线准确率。
用来调整模型输出的概率分布,提升样本效率和多样性。
GFlowNets (流动网络)
一种基于分布匹配的生成模型,通过学习分区函数实现多样性采样,避免传统RL的模式崩溃。
作为后训练阶段优化LLM的工具,本文利用其分区函数的潜在信息。
Online Accuracy (在线准确率)
模型在训练过程中实时估算的任务正确率,用于动态调节训练难度。
通过分区函数Zϕ估算,指导提示选择和重放优先级。
Trajectory Balance (轨迹平衡)
一种训练GFlowNets的损失函数,确保模型生成的轨迹符合目标分布。
用于建立分区函数与准确率的关系。
Prioritized Replay (优先重放)
强化学习中根据样本误差大小优先采样,提高训练效率的方法。
本文结合准确率估计误差,优化样本重用。
Open Questions Unanswered questions from this research
- 1 如何在更复杂、多模态任务中保持准确率估算的鲁棒性仍需探索,尤其在高噪声环境下的表现尚不明确。
- 2 未来应研究分区函数在多任务、多目标场景中的动态调节机制,以实现更广泛的适用性。
Abstract
Reward-maximizing RL methods have shown to be capable of enhancing the reasoning performance of LLMs, but often lead to reduced generation diversity. Recent works address this issue by adopting GFlowNets, training LLMs to match a target distribution while jointly learning its partition function. In contrast to prior works that treat this partition function solely as a normalizer, we reinterpret it as a per-prompt expected-reward (i.e., online accuracy) signal, leveraging this unused information to improve sample efficiency. Specifically, we first establish a theoretical relationship between the partition function and per-prompt accuracy estimates. Building on this key insight, we propose Partition Function-Guided RL (PACED-RL), a post-training framework that leverages accuracy estimates to prioritize informative question prompts during training, and further improves sample efficiency through an accuracy estimate error-prioritized replay. Crucially, both components reuse information already produced during GFlowNet training, effectively amortizing the compute overhead into the existing optimization process. Extensive experiments across diverse benchmarks demonstrate strong performance improvements over GRPO and prior GFlowNet approaches, highlighting PACED-RL as a promising direction for a more sample efficient distribution-matching training for LLMs.