Heimdall: test-time scaling on the generative verification

📄 arXiv: 2504.10337v2 📥 PDF

作者: Wenlei Shi, Xing Jin

分类: cs.AI

发布日期: 2025-04-14 (更新: 2025-04-16)


💡 一句话要点

提出Heimdall,通过生成式验证提升LLM在复杂问题上的推理和验证能力

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: LLM验证 强化学习 长链思维 问题求解 知识发现

📋 核心要点

  1. 现有LLM在解决复杂问题时,验证自身知识的能力较弱,限制了其知识的创建和维护。
  2. Heimdall通过强化学习训练LLM,使其能够准确判断解决方案的正确性,并利用悲观验证原则提升问题求解能力。
  3. 实验表明,Heimdall显著提升了数学问题验证和求解的准确率,并能有效识别数据集中的错误。

📝 摘要(中文)

本文提出Heimdall,一种长链思维(CoT)验证LLM,旨在提升LLM对解决方案正确性的判断能力。通过纯强化学习,Heimdall在竞争性数学问题上的验证准确率从62.5%提升至94.5%。通过重复采样进行扩展,准确率进一步提高到97.5%。人工评估表明,Heimdall具有出色的泛化能力,能够成功检测具有挑战性的数学证明中的大多数问题,而这些问题类型在训练期间并未包含。此外,本文提出了悲观验证(Pessimistic Verification),将Heimdall的功能扩展到问题求解的扩展。它调用Heimdall来判断求解器模型的解决方案,并基于悲观原则,选择不确定性最小的最有可能正确的解决方案。以DeepSeek-R1-Distill-Qwen-32B作为求解器模型,悲观验证将AIME2025上的求解准确率从54.2%提高到16倍计算预算下的70.0%,以及更多计算预算下的83.3%。使用更强大的求解器Gemini 2.5 Pro,得分达到93.0%。最后,本文构建了一个自动知识发现系统的原型,这是一个三元系统,其中一个提出问题,另一个提供解决方案,第三个验证解决方案。使用数据合成工作NuminaMath作为前两个组件,Heimdall有效地识别了数据集中的问题记录,并揭示了近一半的数据存在缺陷,这与NuminaMath最近的消融研究结果有趣地吻合。

🔬 方法详解

问题定义:论文旨在解决大型语言模型(LLM)在复杂推理问题中验证自身答案的不足。现有方法,如直接判断或简单的投票机制,在面对需要长链推理的复杂问题时,准确率较低,无法有效区分正确和错误的答案,导致LLM难以可靠地构建和维护知识。

核心思路:论文的核心思路是训练一个专门用于验证的LLM(Heimdall),使其能够像人类专家一样,仔细检查推理过程的每一步,从而判断最终答案的正确性。通过强化学习,Heimdall能够学习到更有效的验证策略,并利用悲观验证原则,在多个候选答案中选择最可靠的答案。

技术框架:Heimdall的整体框架包含以下几个主要部分:1) 验证模型:使用LLM作为验证模型,输入问题和候选答案的推理过程,输出答案正确性的置信度。2) 强化学习训练:使用强化学习算法训练验证模型,奖励正确的验证结果,惩罚错误的验证结果。3) 悲观验证:对于问题求解,首先生成多个候选答案,然后使用Heimdall对每个答案进行验证,选择置信度最高的答案作为最终答案。4) 自动知识发现系统:构建一个三元系统,包含问题生成器、答案求解器和Heimdall验证器,用于自动发现和验证知识。

关键创新:论文的关键创新在于:1) 专门的验证模型:不同于以往直接使用LLM进行验证的方法,论文训练了一个专门用于验证的LLM,使其能够更专注于验证任务。2) 强化学习训练:使用强化学习算法训练验证模型,使其能够学习到更有效的验证策略。3) 悲观验证原则:利用悲观验证原则,在多个候选答案中选择最可靠的答案,从而提高问题求解的准确率。

关键设计:1) 强化学习奖励函数:设计合适的奖励函数,鼓励验证模型给出正确的验证结果。2) 采样策略:采用重复采样策略,生成多个候选答案,提高找到正确答案的概率。3) 模型规模:选择合适的模型规模,平衡验证准确率和计算成本。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

Heimdall在竞争性数学问题上的验证准确率从62.5%提升至94.5%,通过重复采样进一步提高到97.5%。使用DeepSeek-R1-Distill-Qwen-32B作为求解器模型,悲观验证将AIME2025上的求解准确率从54.2%提高到70.0%(16倍计算预算)和83.3%(更多计算预算)。使用Gemini 2.5 Pro作为求解器,得分达到93.0%。

🎯 应用场景

该研究成果可应用于多个领域,例如自动阅卷系统、智能客服、科学研究等。通过提高LLM的验证能力,可以构建更可靠的AI系统,减少错误信息的传播,并促进知识的自动化发现和验证。未来,该技术有望应用于更广泛的知识密集型任务,例如法律咨询、医疗诊断等。

📄 摘要(原文)

An AI system can create and maintain knowledge only to the extent that it can verify that knowledge itself. Recent work on long Chain-of-Thought reasoning has demonstrated great potential of LLMs on solving competitive problems, but their verification ability remains to be weak and not sufficiently investigated. In this paper, we propose Heimdall, the long CoT verification LLM that can accurately judge the correctness of solutions. With pure reinforcement learning, we boost the verification accuracy from 62.5% to 94.5% on competitive math problems. By scaling with repeated sampling, the accuracy further increases to 97.5%. Through human evaluation, Heimdall demonstrates impressive generalization capabilities, successfully detecting most issues in challenging math proofs, the type of which is not included during training. Furthermore, we propose Pessimistic Verification to extend the functionality of Heimdall to scaling up the problem solving. It calls Heimdall to judge the solutions from a solver model and based on the pessimistic principle, selects the most likely correct solution with the least uncertainty. Taking DeepSeek-R1-Distill-Qwen-32B as the solver model, Pessimistic Verification improves the solution accuracy on AIME2025 from 54.2% to 70.0% with 16x compute budget and to 83.3% with more compute budget. With the stronger solver Gemini 2.5 Pro, the score reaches 93.0%. Finally, we prototype an automatic knowledge discovery system, a ternary system where one poses questions, another provides solutions, and the third verifies the solutions. Using the data synthesis work NuminaMath for the first two components, Heimdall effectively identifies problematic records within the dataset and reveals that nearly half of the data is flawed, which interestingly aligns with the recent ablation studies from NuminaMath.