Tree-of-Mixed-Thought: Combining Fast and Slow Thinking for Multi-hop Visual Reasoning

Pengbo Hu, Ji Qi, Xingyu Li, Hong Li, Xinqi Wang, Bing Quan, Ruiyu Wang, Yi ZhouarXiv 2023

Abstract

There emerges a promising trend of using large language models (LLMs) to generate code-like plans for complex inference tasks such as visual reasoning. This paradigm, known as LLM-based planning, provides flexibility in problem solving and endows better interpretability. However, current research is mostly limited to basic scenarios of simple questions that can be straightforward answered in a few inference steps. Planning for the more challenging multi-hop visual reasoning tasks remains under-explored. Specifically, under multi-hop reasoning situations, the trade-off between accuracy and the complexity of plan-searching becomes prominent. The prevailing algorithms either address the efficiency issue by employing the fast one-stop generation or adopt a complex iterative generation method to improve accuracy. Both fail to balance the need for efficiency and performance. Drawing inspiration from the dual system of cognition in the human brain, the fast and the slow think processes, we propose a hierarchical plan-searching algorithm that integrates the one-stop reasoning (fast) and the Tree-of-thought (slow). Our approach succeeds in performance while significantly saving inference steps. Moreover, we repurpose the PTR and the CLEVER datasets, developing a systematic framework for evaluating the performance and efficiency of LLMs-based plan-search algorithms under reasoning tasks at different levels of difficulty. Extensive experiments demonstrate the superiority of our proposed algorithm in terms of performance and efficiency.

Introduction

Large Language Models (LLMs) have shown remarkable potential as planners that generate executable code to solve visual tasks. However, multi-hop reasoning—tasks requiring several logical steps to reach a conclusion—remains a significant challenge. Current LLM-based planning approaches typically fall into two extremes: "Fast Thinking" (One-Stop generation), which is efficient but prone to errors in complex scenarios, and "Slow Thinking" (Tree-of-Thought searching), which is accurate but computationally expensive due to numerous iterative API calls. This research introduces Tree-of-Mixed-Thought (ToMT), a hierarchical planning algorithm designed to balance these two extremes by mimicking the human brain's dual-process cognition.

Methodology

ToMT integrates the speed of intuitive generation with the rigor of analytical searching through two primary strategies:

  1. ToT-One-Stop (ToT-OS): A greedy strategy where the model begins with a slow, step-by-step tree search. Upon reaching a specific "start depth," the model attempts to generate all remaining steps in a single "fast" burst. A sanity check evaluator verifies the executable code; if it fails, the system reverts to the slow search mode.
  2. ToT-Block: Instead of generating single atomic actions, the model generates blocks of $k$ steps at each node. This reduces the search tree's depth and the total number of iterations required.
Overview of multi-hop reasoning structures (Sequence, Parallel, Backtrack, Multi-Backtrack) and example planning steps.

The system relies on an Evaluator that performs sanity checks to ensure generated plans are syntactically correct and semantically consistent with the visual scene graph.

Experimental Setup

The authors evaluated ToMT using scene graphs from the PTR (Part-based conceptual, Relational reasoning) and CLEVR datasets. These were organized into four reasoning structures—Sequence, Parallel, Backtrack, and Multi-Backtrack—to specifically test long-range planning capabilities. Performance was measured across various metrics, including accuracy and the Reasoning Step Saving Index (RSSI).

Results and Discussion

Experimental results demonstrate that ToMT significantly improves efficiency without sacrificing accuracy. As shown in the performance table below, ToT-OS and ToT-Block consistently outperform the One-stop baseline, particularly in complex "Long Relation" tasks where One-stop accuracy is as low as 7.66%.

Accuracy comparison across different LLM-based planning algorithms and reasoning categories.

Key Insights:

  • Efficiency Gains: ToT-OS achieved an RSSI of up to 2.89x compared to standard Tree-of-Thought, often saving more than 50% of reasoning steps.
  • Optimal Depth: For ToT-OS, starting the "fast" generation at depth $d=2$ was found to be the optimal balance between speed and accuracy.
  • LLM Limitations: Despite improvements, LLMs still struggle with long chains of spatial logic and fine-grained semantic distinctions (e.g., mistaking a "leg bar" for a "central support").

Conclusion

Tree-of-Mixed-Thought provides a robust framework for multi-hop visual reasoning by effectively combining fast and slow thinking processes. While the dependency on a reliable evaluator and the model's inherent spatial awareness remain areas for improvement, ToMT sets a new benchmark for efficient and accurate LLM-based planning. Future work will focus on handling the noise inherent in real-world visual expert models and improving the spatial grounding of LLM planners.

Summary updated

BibTeX
@misc{hu2023tree,
  author = {Pengbo Hu and Ji Qi and Xingyu Li and Hong Li and Xinqi Wang and Bing Quan and Ruiyu Wang and Yi Zhou},
  title = {{Tree-of-Mixed-Thought: Combining Fast and Slow Thinking for Multi-hop Visual Reasoning}},
  year = {2023},
  eprint = {2308.09658},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.09658},
}
Figure