Steering Tree-of-Thought Reasoning via Deductive Verification
Haoliang Cheng, Enyi Tang, Shuoxiao Zhang, Jiahe Mao, Yanling Fu, Jason Ma, Keyu Cui, Yuchuan Liu,
Key points
From the paper's conclusion- 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.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- ProofCoder: Continuous Reasoning for Automated Software VerificationarXiv · 2026
- Reasoning-Trace Overflow in Code Generation: An Empirical Study of Explicit Reasoning ModelsarXiv · 2026
- Learning to Prove, Not Just to Answer: Reinforcement Learning from Formal Verification for Natural-Language Logical ReasoningarXiv · 2026
- CORE: Conflict-Oriented Reasoning Elimination for Verifiable Language-Model SearcharXiv · 2026
- Stepwise Reasoning Verification: Don't Generate, Classify!arXiv · 2026
- Trajectory-Retrieval Speculative Decoding: When Does a Model's Own History Help?arXiv · 2026