arXiv:2509.25849cs.LGcs.AI2025-09被引 16

用背包问题优化大模型探索预算,提升难任务学习效率。

Knapsack RL: Unlocking Exploration of LLMs via Optimizing Budget Allocation

  • 将任务探索视为背包问题,动态分配计算资源。
  • 训练中非零梯度比例提升20%-40%,难任务成功率显著提高。
  • 适合需要高效探索的强化学习场景,尤其数学推理任务。

大型语言模型可通过强化学习自我改进,但探索过程计算成本高,现有方法常对每项任务分配固定预算,导致简单任务持续成功、困难任务持续失败,二者均产生零梯度,影响基于组相对策略优化(GRPO)的训练效果。本文从探索预算分配视角出发,将每个任务的探索视为具有不同‘价值’和‘成本’的‘物品’,建立与经典背包问题的联系,推导出基于模型当前学习状态的最优资源分配规则。应用于GRPO时,该方法使训练期间有效非零策略梯度比例提升20%-40%。作为计算上的‘免费午餐’,该方法可将饱和任务的资源重新分配至最需改进的任务,从而在复杂问题上实现高达93次回溯采样的探索预算(传统均匀分配下不可行)。这些改进带来数学推理基准上的实质性提升:平均性能提高2-4分,特定任务峰值提升9分。值得注意的是,达到类似效果的传统方法需约2倍计算资源。

原文摘要 · Abstract (English)

Large Language Models (LLMs) can self-improve through reinforcement learning, where they generate trajectories to explore and discover better solutions. However, this exploration process is computationally expensive, often forcing current methods to assign limited exploration budgets to each task. This uniform allocation creates problematic edge cases: easy tasks consistently succeed while difficult tasks consistently fail, both producing zero gradients during training updates for the widely used Group Relative Policy Optimization (GRPO). We address this problem from the lens of exploration budget allocation. Viewing each task's exploration as an "item" with a distinct "value" and "cost", we establish a connection to the classical knapsack problem. This formulation allows us to derive an optimal assignment rule that adaptively distributes resources based on the model's current learning status. When applied to GRPO, our method increases the effective ratio of non-zero policy gradients by 20-40% during training. Acting as a computational "free lunch", our approach could reallocate exploration budgets from tasks where learning is saturated to those where it is most impactful. This enables significantly larger budgets (e.g., 93 rollouts) for especially challenging problems, which would be computationally prohibitive under a uniform allocation. These improvements translate to meaningful gains on mathematical reasoning benchmarks, with average improvements of 2-4 points and peak gains of 9 points on specific tasks. Notably, achieving comparable performance with traditional homogeneous allocation would require about 2x the computational resources.

强化学习预算分配大模型优化

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