STOC-TOT: Stochastic Tree-of-Thought with Constrained Decoding for Complex Reasoning in Multi-Hop Question Answering

Xuan Wang, Zhenyu Bi, Daniel Hajialigol, Zhongkai Sun, Jie Hao, Xuan Wang 0008 · DOI

Abstract

Multi-hop question answering (MHQA) requires Large Language Models (LLMs) to integrate information across multiple documents, a task often plagued by reasoning dead-ends and factual hallucinations. We introduce STOC-TOT (Stochastic Tree-of-Thought), a novel framework that decomposes complex queries into a probabilistic tree of reasoning paths. By combining stochastic validity estimation with constrained decoding—restricting model outputs to a vocabulary bank derived from source evidence—STOC-TOT ensures grounded reasoning and significantly outperforms standard Chain-of-Thought (CoT) and Tree-of-Thought (ToT) baselines across multiple benchmarks.

Introduction: The Multi-Hop Challenge

Multi-hop question answering is a significant hurdle for modern AI. Unlike simple fact retrieval, MHQA requires a model to find and synthesize information across disparate sources (e.g., identifying a director based on an actor's specific award). Current LLMs face two primary failure modes in this domain:

  1. Reasoning Dead-ends: Linear "Chain-of-Thought" prompting lacks backtracking capabilities; a single error in an early "hop" leads to an incorrect final answer.
  2. Hallucination: Models often prioritize internal parametric knowledge over provided evidence, generating plausible but factually incorrect responses.

While existing Tree-of-Thought (ToT) methods allow for branching paths, they struggle with evaluating intermediate steps in natural language. STOC-TOT addresses these issues by treating reasoning as a search problem guided by probabilistic validity and strict evidence grounding.

Methodology: Stochastic Trees and Constrained Decoding

The STOC-TOT architecture: from sub-question generation to stochastic tree building and constrained decoding.

STOC-TOT operates through a four-stage pipeline designed to maximize reasoning accuracy and minimize hallucinations:

  1. Sub-Question Generation & Pruning: The model breaks the primary question into smaller, manageable sub-questions. A Paraphrase Detection module prunes redundant branches to maintain tree efficiency.
  2. Evidence Retrieval & Answering: For each sub-question, the system retrieves relevant snippets and generates intermediate answers.
  3. Validity Estimation (Stochastic Search): Rather than selecting a single path, the model evaluates each branch based on question clarity, reasoning coherence, and evidence support. This results in a probability score for each path, allowing the system to gravitate toward the most grounded reasoning chain.
  4. Constrained Decoding: To eliminate hallucinations, the authors implement a Vocabulary Bank containing only words from the original question and the provided evidence. For open-source models like Llama, the system sets the probability of any word outside this bank to negative infinity during generation. For closed-source models like GPT-4, specialized prompting enforces this constraint.

Experimental Results and Key Insights

The researchers evaluated STOC-TOT on the HotpotQA and MuSiQue datasets. MuSiQue is particularly challenging, requiring up to four hops of reasoning in a "distractor" setting where models must filter out irrelevant information.

Performance comparison of STOC-TOT against Chain-of-Thought and Tree-of-Thought across varying numbers of reasoning hops.

Key Findings:

  • Superior Accuracy: STOC-TOT consistently outperformed vanilla prompting, CoT, and standard ToT across five different LLMs (GPT-3.5, GPT-4, Llama 2, and Llama 3). On HotpotQA, GPT-4 achieved a 62.0% Exact Match (EM) score, a 7% improvement over standard ToT.
  • Scaling with Complexity: As shown in the performance metrics, STOC-TOT maintains a significant lead as the number of reasoning hops increases, effectively navigating the "reasoning maze" where linear models fail.
  • The Power of Grounding: Ablation studies confirmed that "constrained decoding" is a critical driver of accuracy. Removing this step led to a noticeable drop in performance, proving that restricting the model's vocabulary to the source text is essential for factual synthesis.

Conclusion and Future Work

STOC-TOT demonstrates that treating multi-hop reasoning as a stochastic search problem with strict vocabulary constraints can dramatically improve LLM reliability. While the framework involves higher computational costs due to multiple LLM calls, the gains in accuracy and the reduction in hallucinations provide a robust path forward for complex information retrieval. Future work will focus on optimizing sub-question generation and refining validity metrics to further reduce "No Answer" and "Wrong Answer" error categories.

Summary updated

BibTeX
@misc{wang2024stoc,
  author = {Xuan Wang and Zhenyu Bi and Daniel Hajialigol and Zhongkai Sun and Jie Hao and Xuan Wang},
  title = {{STOC-TOT: Stochastic Tree-of-Thought with Constrained Decoding for Complex Reasoning in Multi-Hop Question Answering}},
  year = {2024},
  eprint = {2407.03687},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.03687},
}
Figure