Skip to main content
QUICK REVIEW

[论文解读] Q*: Improving Multi-step Reasoning for LLMs with Deliberative Planning

Chaojie Wang, Yanchen Deng|arXiv (Cornell University)|Jun 20, 2024
Semantic Web and OntologiesComputer Science被引用 9
一句话总结

Q* 将多步推理视为由可插拔的 Q 值模型引导的启发式搜索,从而使 LLMs 在无需微调的情况下规划下一步,提升在数学推理和代码生成任务上的准确性。

ABSTRACT

Large Language Models (LLMs) have demonstrated impressive capability in many natural language tasks. However, the auto-regressive generation process makes LLMs prone to produce errors, hallucinations and inconsistent statements when performing multi-step reasoning. In this paper, by casting multi-step reasoning of LLMs as a heuristic search problem, we aim to alleviate the pathology by introducing Q*, a general, versatile and agile framework for guiding LLMs decoding process with deliberative planning. By learning a plug-and-play Q-value model as heuristic function for estimating expected future rewards, our Q* can effectively guide LLMs to select the most promising next reasoning step without fine-tuning LLMs for the current task, which avoids the significant computational overhead and potential risk of performance degeneration on other tasks. Extensive experiments on GSM8K, MATH and MBPP demonstrate the superiority of our method, contributing to improving the reasoning performance of existing open-source LLMs.

研究动机与目标

  • 将 LLMs 中的多步推理形式化为马尔可夫决策过程,以实现深思熟虑的规划。
  • 引入 Q*,一个可插拔的 Q 值驱动框架,用以引导 LLM 解码而无需微调。
  • 开发基于 A* 的深思熟虑过程,具备可学习的 Q 值代理,以选择有前景的下一步。
  • 证明 Q* 在数学与代码任务上提升了开源 LLMs 的推理性能。

提出的方法

  • 将推理过程建模为一个 MDP,其中状态 s_t 将提示和先前步骤结合起来。
  • 定义 Q 函数 Q^πθ(s_t,a_t) 以表示采取行动 a_t 后的期望未来回报。
  • 使用可插拔代理 Q 值模型 Ŷ 通过离线 RL、滚动或更强的 LLM 完成来估计最优 Q 值。
  • 结合 A* 搜索,使用 f(s_t)=g(s_t)+λ max_a Q*(s_t,a) 来引导最优先探索。
  • 将行动限定为来自当前 LLM 策略的前 K 个候选,以保持规划可行。
  • 使用如 FQI(离线 RL)、基于回滚的标签,或更强的 LLM 完成等方法来训练代理 Q 值模型。
Figure 1: Overview of Q*. (a) : the deliberation process of Q*. Each state is associated with an $f$ -value which is the weighted sum of the aggregated utility (cf. Eq. ( 5 )) and the heuristic value (cf. Eq. ( 6 )). (b-d) : estimating optimal Q-value with fitted-Q-iteration, rollout and completion
Figure 1: Overview of Q*. (a) : the deliberation process of Q*. Each state is associated with an $f$ -value which is the weighted sum of the aggregated utility (cf. Eq. ( 5 )) and the heuristic value (cf. Eq. ( 6 )). (b-d) : estimating optimal Q-value with fitted-Q-iteration, rollout and completion

实验结果

研究问题

  • RQ1在不进行微调的情况下,是否可以用可插拔的 Q 值模型引导 LLM 选择更具前瞻性的下一步推理?
  • RQ2将多步推理建模为启发式搜索是否能提高在数学推理和代码生成任务上的准确性?
  • RQ3在该设定中,离线 Q 学习、基于回滚的标注或更强模型的完成在估计最优 Q 值方面有多有效?
  • RQ4与基线提示与验证方法相比,Q* 在 GSM8K、MATH 和 MBPP 上的经验性能如何?

主要发现

  • 在 GSM8K、MATH 和 MBPP 上,采用 Q* 与 QVM/QRM 指导的性能优于 Best-of-N 基线。
  • 在 GSM8K 上使用 Llama-2-7b 时,Q* 与 PRM+QVM 达到 80.8% 的准确率,超过了若干闭源和开源模型。
  • 在 MATH 上,Q* 提升了多个基础模型的结果,其中 Q* (QVM) 和 Q* (PRM+QVM) 相对于基线取得显著提升。
  • 在 MBPP 上,CodeQwen1.5-7b-Chat 结合 Q* (PRM+QVM) 达到 77.0% 的准确率,优于 Best-of-N 基线。
  • 该方法保持可插拔性质,避免对 LLM 进行微调,并降低在其他任务上退化的风险。
Q*: Improving Multi-step Reasoning for LLMs with Deliberative Planning

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。