← 返回 2026-03-20

数学对象推理:策略内奖励建模与测试时聚合 Reasoning over mathematical objects: on-policy reward modeling and test time aggregation

Pranjal Aggarwal, Marjan Ghazvininejad, Seungone Kim, Ilia Kulikov, Jack Lanchantin, Xian Li, Tianjian Li, Bo Liu, Graham Neubig, Anaelia Ovalle, Swarnadeep Saha, Sainbayar Sukhbaatar, Sean Welleck, Jason Weston, Chenxi Whitehouse, Adina Williams, Jing Xu, Ping Yu, Weizhe Yuan, Jingyu Zhang, Wenting Zhao 📅 2026-03-19 👍 6 2026-07-13 08:36
奖励建模 并行推理 强化学习 数学推理 测试时计算扩展

提出Principia基准和RLLM、ParaGator方法,显著提升LLM推导复杂数学对象的能力

前置知识

强化学习

RL是机器学习的一种范式,智能体通过与环境交互获得奖励来优化策略。在LLM训练中,常用RLHF(从人类反馈中强化学习)和RLVR(可验证奖励强化学习)。RLHF依赖人类偏好数据训练标量奖励模型,而RLVR使用基于规则的验证器直接判断答案正确性。本文提出RLLM,使用大语言模型本身作为奖励模型,能生成推理过程并提供灵活的奖励信号。

本文的核心方法RLLM和ParaGator都基于强化学习框架,理解RL的基本原理(策略优化、奖励信号、KL散度正则化等)是读懂方法设计的关键。

奖励模型

在RL训练中,奖励模型负责评估模型输出的质量并给出数值奖励。传统RLHF使用标量奖励模型,只输出单一分数而不生成推理过程。本文的RLLM使用生成式奖励模型,即语言模型本身作为RM,能够先生成推理轨迹,再输出分数。这种思考式奖励模型能提供更高质量的判断,并且支持reference-free和reference-based两种模式。

理解RLLM的创新点需要对比传统标量RM与生成式LM-as-RM的区别,特别是后者如何通过推理能力提供更准确的奖励信号。

Pass@k优化

Pass@k是代码生成和数学推理中的重要指标,定义为在k次随机采样中至少有一次正确的概率。在强化学习中优化pass@k意味着只要模型生成的k个样本中有一个正确就获得奖励,这鼓励模型探索多样化的解题路径而不是收敛到单一模式。本文中,pass@k优化用于并行生成阶段(鼓励多样性),而pass@1优化用于聚合阶段(鼓励选择最佳答案)。

ParaGator方法的核心就是使用pass@k和pass@1的组合优化,理解这一概念是理解该方法如何平衡多样性与质量的关键。

策略内与策略外训练

策略内训练指使用当前策略生成的数据进行训练,策略外训练则使用来自不同策略的数据。本文强调on-policy训练的重要性:RLLM中的LM-as-RM需要用待优化的策略模型采样出的响应进行训练;ParaGator中的聚合器需要用当前生成器生成的候选进行训练。这避免了训练与推理时的分布不匹配问题。

论文的主要发现之一就是on-policy训练比off-policy训练更有效,理解这一区别对于理解为何本文方法优于之前的工作至关重要。

研究动机

现有语言模型评估和训练存在两个核心问题。首先,当前LLM推理能力的评估严重依赖简化答案格式(数值答案或多项选择),主要因为自动化评分的便利性。例如,在SuperGPQA基准上,当移除选项时,Qwen3-235B的性能从69.33下降到55.58,o3从69.10下降到62.90,下降幅度达10-20。这是因为模型在有多选项时会使用选项作为锚点进行反向推理,但当要求直接推导数学对象时会做出错误假设(如图2所示,模型错误地假设所有1-特征空间有公共固定向量,排除了有效情况)。其次,现有的RL后训练数据大多包含短答案(数值、多选项),缺乏复杂数学对象(方程、不等式、集合、矩阵、分段函数等)的训练样本。如图4所示,常用数据集的答案长度大多在10-200 token之间,而Principia Collection的答案更长且结构更复杂。

本文的目标是本文有三个主要目标:第一,构建一个要求推导复杂数学对象的评估基准和训练数据集,填补当前基准忽略数学对象推导能力的空白;第二,提出一个统一的后训练框架RLLM,使用强语言模型作为奖励模型,解决RLHF(标量RM易被操纵)和RLVR(依赖易验证答案)的局限性;第三,开发一个在线端到端训练的并行推理方法ParaGator,通过pass@k优化鼓励多样性生成,通过pass@1优化实现有效聚合,解决当前离线聚合方法的训练-推理不匹配问题。

与已有工作不同的是,本文的独特切入角度在于同时关注三个层面的创新:数据层面是第一个系统构建数学对象基准和训练集的工作;方法层面是首次系统研究on-policy训练LM-as-RM的有效性,并证明其优于prompted LLMs和off-policy训练;推理层面是首次提出pass@k加pass@1的联合优化框架,将生成和聚合训练统一到在线端到端框架中,而非分别优化或离线训练。

核心方法

本文提出三个贡献的完整流程:首先构建Principia Suite(评估基准、训练数据、验证基准),使用强模型作为验证器训练语言模型推导数学对象;然后提出RLLM框架,两阶段训练:第一阶段用可验证奖励训练LM-as-RM,第二阶段用LM-as-RM的k-wise比较判断作为奖励优化策略LM;最后提出ParaGator方法,将并行推理视为两阶段任务,生成阶段用pass@k优化(鼓励多样性),聚合阶段用pass@1优化(选择最佳答案),两个阶段在线端到端训练。

核心创新点有三个:第一,使用强LM(如o3或GPT-OSS-120B)作为验证器评估数学对象答案,因为规则验证器在处理等价性判断时非常脆弱(math-verify在Principia VerifyBench上仅5.95准确率,而o3达94.05);第二,RLLM中on-policy训练LM-as-RM的关键性,实验证明on-policy训练的J1-Qwen3-32B-RM优于prompted GPT-OSS-120B和off-policy训练的模型;第三,ParaGator中pass@k加pass@1的联合优化解决了传统并行推理的两个问题:离线聚合的训练-推理不匹配和标准RL导致的多样性崩溃。

方法步骤详情

Principia Collection构建步骤:1)从MSC2020和PhySH提取9,573个学科实体;2)为每个实体生成40个策略描述,共382,920个;3)基于实体加策略对生成问题陈述,随机选择6种数学对象类型之一;4)过滤无效问题(多问题、不包含目标类型、包含提示或答案);5)GPT-OSS-120B生成8次回答,通过成对等价性检查和传递性保守规则确定多数投票作为标签。RLLM训练步骤:1)用策略模型采样响应;2)强教师模型(GPT-OSS-120B)标注正确性或质量;3)构建平衡数据集;4)用GRPO和可验证奖励训练LM-as-RM;5)用LM-as-RM的生成式奖励优化策略模型。ParaGator训练步骤:1)对每个问题采样m个候选解;2)用pass@k优化奖励候选集(只要有一个正确就奖励);3)将候选打包成聚合提示,生成聚合解;4)用pass@1优化奖励聚合解(只有最终答案正确才奖励);5)两个阶段同时在线更新模型参数。

技术新颖性

技术新颖性体现在:1)Principia Collection的构造pipeline采用基于学科分类的合成方法,确保问题覆盖广度和数学对象类型多样性;2)用于数学对象多数投票的成对等价性检查算法,采用传递性保守规则解决等价关系不一致问题;3)RLLM框架是首个系统研究LM-as-RM的on-policy vs off-policy、reference-free vs reference-based、点对vs列表奖励的工作;4)ParaGator首次将pass@k优化与聚合训练结合,提出生成-聚合的统一在线框架,解决了离线聚合的根本缺陷。

Illustration of our majority voting procedure used in dataset construction.
Figure 7: Illustration of our majority voting procedure used in dataset construction.
Answer type counts of the Principia Collection.
Figure 8: Answer type counts of the Principia Collection.
Reinforcement Learning with an LM as Reward Model (RLLM).
Figure 12: Reinforcement Learning with an LM as Reward Model (RLLM).
ParaGator Training.
Figure 18: ParaGator Training.
ParaGator Inference.
Figure 19: ParaGator Inference.

实验结果

主要发现包括:第一,在PrincipiaBench上训练后,四个基线模型均有显著提升:Qwen2.5-7B-Base提升10.12(12.75到22.87),OctoThinker-8B-Long-Base提升15.30(3.75到19.05),Qwen3-4B-Base提升18.35(11.31到29.66),Qwen3-4B提升7.22(41.23到48.45)。第二,数学对象训练正迁移到其他格式:在AIME 2024上提升7.5到17.5,在GPQA-Diamond上提升12.31到25.47。第三,前沿模型在PrincipiaBench上表现困难:o3得分62.90,Qwen3-235B得分55.58,远低于AIME-2024(83.33和85.63)和GPQA-Diamond(82.29和74.34)。第四,RLLM在Qwen3-1.7B上平均数学提升8(35.20到43.41),且在Physics基准上也有提升。第五,ParaGator在Qwen3-4B-Base上平均竞赛数学得分34.00(Dr.GRPO为28.13,离线聚合为31.46);在Qwen3-4B-Instruct-2507上平均竞赛数学得分61.38(Dr.GRPO为58.79,离线聚合为56.91)。

Evaluation performance on PrincipiaBench involving hard reasoning problems with mathematical objects.
Table 2: Evaluation performance on PrincipiaBench involving hard reasoning problems with mathematical objects.
Principia VerifyBench results.
Table 3: Principia VerifyBench results.
Training with rule-based verifier vs model-based verifier.
Table 4: Training with rule-based verifier vs model-based verifier.
Reference-free setting: Comparison of different post-trained Qwen3-1.7B models using RLLM or RLHF.
Table 6: Reference-free setting: Comparison of different post-trained Qwen3-1.7B models using RLLM or RLHF.
Reference-based setting: Comparison of different post-trained Qwen3-1.7B models using RLLM or RLVR.
Table 7: Reference-based setting: Comparison of different post-trained Qwen3-1.7B models using RLLM or RLVR.
Comparison of RLLM, RLHF, and RLVR across different training datasets.
Table 8: Comparison of RLLM, RLHF, and RLVR across different training datasets.
Comparison of Win Rate of RLLM and RLHF on non-verifiable instruction-following tasks.
Table 9: Comparison of Win Rate of RLLM and RLHF on non-verifiable instruction-following tasks.
Analysis of Generator-Verifier Gap.
Table 10: Analysis of Generator-Verifier Gap.
Comparison of RLLM post-training of Qwen3-1.7B with on-policy versus off-policy J1-trained LMs-as-RMs.
Table 11: Comparison of RLLM post-training of Qwen3-1.7B with on-policy versus off-policy J1-trained LMs-as-RMs.
Comparison of training strategies across the initial and aggregation rounds.
Table 14: Comparison of training strategies across the initial and aggregation rounds.
Competition Math evaluation results by method and round.
Table 15: Competition Math evaluation results by method and round.
Scientific reasoning (PrincipiaBench) and competition math evaluation results.
Table 16: Scientific reasoning (PrincipiaBench) and competition math evaluation results.
Effect of initial sampling temperature on decoding performance.
Table 13: Effect of initial sampling temperature on decoding performance.
Example of a subject entity, a strategy description, an initial problem statement and its corresponding CoT, and a revised problem statement and its corresponding CoT.
Table 1: Example of a subject entity, a strategy description, an initial problem statement and its corresponding CoT, and a revised problem statement and its corresponding CoT.
Unifying mathematical objects and numerical type data using weight merging leads to the best performances.
Table 5: Unifying mathematical objects and numerical type data using weight merging leads to the best performances.
RL training on the Principia Collection, which requires mathematical-object outputs, improves an LM's reasoning capability.
Figure 1: RL training on the Principia Collection, which requires mathematical-object outputs, improves an LM's reasoning capability.
Training directly on complex mathematical objects yields substantially better transfer than training on datasets requiring only numerical values or simple mathematical objects.
Figure 9: Training directly on complex mathematical objects yields substantially better transfer than training on datasets requiring only numerical values or simple mathematical objects.
Performance comparison of post-trained Qwen3-1.7B models on (a) verifiable tasks and (b) non-verifiable instruction-following tasks.
Figure 13: Performance comparison of post-trained Qwen3-1.7B models on (a) verifiable tasks and (b) non-verifiable instruction-following tasks.
RL validation rewards for LM-as-RM training and RLLM policy training, alongside the downstream AIME24 accuracy.
Figure 14: RL validation rewards for LM-as-RM training and RLLM policy training, alongside the downstream AIME24 accuracy.
Analysis of Generator-Verifier Gap.
Figure 15: Analysis of Generator-Verifier Gap.
Reward curves for training Qwen3-4B-Base on deepscaler using different methods.
Figure 22: Reward curves for training Qwen3-4B-Base on deepscaler using different methods.
查看结构化数据
任务指标本文基线提升
PrincipiaBench (平均) 准确率 48.45 (Principia-4B) 41.23 (Qwen3-4B thinking) +7.22
PrincipiaBench (平均) 准确率 29.66 (Principia-4B-Zero) 11.31 (Qwen3-4B-Base) +18.35
AIME-2024 mean@32 27.96 (ParaGator-Zero-4B-Principia) 8.20 (Qwen3-4B-Base) +19.76
AIME-2024 mean@32 71.20 (ParaGator-4B-Instruct) 47.71 (Qwen3-4B-Instruct-2507) +23.49
GPQA-Diamond mean@16 57.48 (Principia-4B) 53.70 (Qwen3-4B thinking) +3.78
数学竞赛 (平均) pass@1 34.00 (ParaGator-4B-Zero) 28.13 (Dr.GRPO) +5.87

局限与改进

作者承认的局限性包括:Principia VerifyBench的构造方式(专门采样o3和math-verify分歧的案例)可能对math-verify不利;ParaGator在Instruct模型上的效果提升不如Base模型明显(可能是因为模型已经过大量训练);RLLM在非可验证任务上的on-policy训练实验有限。自己的观察包括:所有实验在Qwen和OctoThinker模型上进行,缺乏对其他模型家族(如Llama)的广泛验证;训练数据都是合成生成的,可能缺乏真实世界问题的复杂性;ParaGator的聚合训练只有单轮,推理时扩展到多轮可能存在训练-推理间隔。

独立分析的弱点

独立分析的弱点:1)数据合成依赖强LM(GPT-OSS-120B),如果教师模型有偏见会被传播到训练数据;2)Principia Collection的答案通过多数投票确定,可能排除正确但少数派的等价形式;3)RLLM需要较大generator-verifier能力差距(32B RM训练1.7B policy),如果资源有限效果可能打折扣;4)ParaGator需要在线生成大量候选(32个),训练和推理成本较高;5)缺乏对真实科学文献中数学对象生成任务的评估,当前基准仍偏向竞赛式问题。改进方向:1)采用多教师集成标注减少偏见;2)探索更鲁棒的多数投票机制(如基于语义相似度的加权投票);3)研究更小RM的有效训练方法;4)探索动态候选数量或压缩方法降低计算成本;5)增加真实科研任务的评估。

未来方向

作者提出的未来方向:在非可验证任务上进行on-policy训练LM-as-RM的实验;扩展ParaGator到多轮聚合训练;探索更复杂的候选生成策略(如动态分支)。基于成果可延伸的方向:1)将Principia Collection的生成pipeline应用到其他领域(计算机科学、经济学);2)研究RLLM在不同模型架构(MoE、扩散模型)上的应用;3)探索ParaGator与检索增强、工具使用结合的框架;4)研究奖励模型的持续学习和适应能力,使其能随策略提升而进化;5)分析pass@k优化在不同任务类型(创意写作、代码生成)上的效果。

复现评估

复现评估:代码和数据集已开源:Principia Collection和PrincipiaBench在HuggingFace公开;RLLM使用fairseq2和verl实现,hyperparameters详细;ParaGator使用GRPO算法,训练配置完整。算力需求:主要实验在8 H200节点(64 GPU)或64 H200 GPU上进行,资源需求较高。难度:中等偏上,主要挑战是需要强验证器(o3或GPT-OSS-120B)和大规模GPU集群。但较小的基线实验(如单模型训练)可在有限资源上复现核心发现。