[Paper Review] Q*: Improving Multi-step Reasoning for LLMs with Deliberative Planning
Q* treats multi-step reasoning as a heuristic search guided by a plug-and-play Q-value model, enabling LLMs to plan next steps without fine-tuning and improving accuracy on math reasoning and code generation tasks.
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.
Motivation & Objective
- Formalize multi-step reasoning in LLMs as a Markov Decision Process to enable deliberative planning.
- Introduce Q*, a plug-and-play Q-value driven framework to guide LLM decoding without fine-tuning.
- Develop an A* based deliberation process with a learnable Q-value proxy to select promising next steps.
- Show that Q* improves reasoning performance on math and code tasks across open-source LLMs.
Proposed method
- Model the reasoning process as an MDP where state s_t combines the prompt and prior steps.
- Define a Q-function Q^πθ(s_t,a_t) to represent expected future rewards from taking action a_t.
- Use a plug-and-play proxy Q-value model Ŷ to estimate optimal Q-values via offline RL, rollouts, or stronger LLM completion.
- Incorporate an A* search with f(s_t)=g(s_t)+λ max_a Q*(s_t,a) to guide best-first exploration.
- Restrict actions to the top-K candidates from the current LLM policy to keep planning tractable.
- Train the proxy Q-value model using methods like FQI (offline RL), rollout-based labels, or stronger LLM completions.

Experimental results
Research questions
- RQ1Can a plug-and-play Q-value model guide LLMs to choose more promising next reasoning steps without fine-tuning?
- RQ2Does framing multi-step reasoning as a heuristic search improve accuracy on mathematical reasoning and code generation tasks?
- RQ3How effective are offline Q-learning, rollout-based labeling, or stronger-model completions for estimating optimal Q-values in this setting?
- RQ4What is the empirical performance of Q* on GSM8K, MATH, and MBPP compared to baseline prompting and verification methods?
Key findings
- Q* with QVM/QRM guidance improves performance over Best-of-N baselines across GSM8K, MATH, and MBPP.
- On GSM8K with Llama-2-7b, Q* with PRM+QVM achieves 80.8% accuracy, surpassing several closed and open models.
- On MATH, Q* improves results for multiple base models, with Q* (QVM) and Q* (PRM+QVM) achieving strong gains over baselines.
- On MBPP, CodeQwen1.5-7b-Chat with Q* (PRM+QVM) reaches 77.0% accuracy, outperforming Best-of-N baselines.
- The method remains plug-and-play, avoiding fine-tuning LLMs and reducing risk of degradation on other tasks.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.