Steering Tree-of-Thought Reasoning via Deductive Verification
Haoliang Cheng, Enyi Tang, Shuoxiao Zhang, Jiahe Mao, Yanling Fu, Jason Ma, Keyu Cui, Yuchuan Liu, Yu Tian, Xinyu Gao, Haibin Wang
Abstract
Large language models (LLMs) have demonstrated great potential in code reasoning tasks, but their reasoning processes lack reliable verification mechanisms, making it difficult to ensure logical correctness. The Tree of Thoughts (ToT) framework improves reasoning by exploring multiple paths and employing backtracking, yet its path selection relies entirely on LLM-based self-evaluation—a heuristic and error-prone mechanism—leading to frequent erroneous pruning and unproductive exploration. We identify a key insight: LLMs’ encoding capability is stronger than their reasoning capability—translating code semantics into formal constraints is a pattern-matching task that LLMs can perform reliably, while verification should be delegated to SMT(Satisfiability Modulo Theories) solvers. Based on this insight, we propose Deductive Steering, a mechanism that integrates SMT solver verification into Tree of Thoughts exploration. It consists of four core components: (1) Candidate Generator produces candidate reasoning steps, each comprising a natural language thought t and its SMT constraint encoding ϕ; (2) Deductive Evaluator verifies whether a candidate constraint ϕ is a logical consequence of the accumulated constraint Φ by checking the unsatisfiability of Φ ∧ ¬ ϕ; (3) Counterexample Refinement uses counterexample to guide the LLM in correcting its reasoning when verification fails; (4) Exploration and Backtracking Strategy manages path exploration and backtracks to alternative candidates when verification fails. Experiments on five benchmarks covering fault localization, program synthesis, and loop invariant generation show that, compared with ToT, Deductive Steering improves task-level effectiveness by 9.2–32.6 percentage points while reducing token consumption by 35.7–52.4%. The method generalizes across different LLMs and extends to mathematical reasoning, demonstrating broad applicability to domains where reasoning can be encoded as formal constraints.
Ask Lune
Know where this paper stands in minutes, not an afternoon.
Lune can read the top-tier papers that cite it and the ones closest to it, and tells you what it claims, what came after and where it falls short, each point cited to the paper it comes from. No skimming, no AI slop.
Related papers
- Chain of Preference Optimization: Improving Chain-of-Thought Reasoning in LLMsXuan Zhang, Chao Du, Tianyu Pang, Qian Liu et al.NeurIPS 2024 · 177 citations
- Breaking the Reward Barrier: Accelerating Tree-of-Thought Reasoning via Speculative ExplorationShuzhang Zhong, Haochen Huang, Shengxuan Qiu, Pengfei Zuo et al.OSDI 2026
- Policy Guided Tree Search for Enhanced LLM ReasoningYang LiICML 2025
- Can LLMs Reason Like Automated Theorem Provers for Rust Verification? VCoT-Bench: Evaluating via Verification Chain of ThoughtZichen Xie, Wenxi WangICML 2026
- Code Repair with LLMs gives an Exploration-Exploitation TradeoffHao Tang, Keya Hu, Jin Zhou, Sicheng Zhong et al.NeurIPS 2024 · 85 citations
