Source-linked AI summary

Everything of Thoughts: Defying the Law of Penrose Triangle for Thought Generation

Ruomeng Ding, Chaoyun Zhang, Lu Wang, Yong Xu, Minghua Ma, Wei Zhang, Si Qin, Saravan Rajmohan, Qingwei Lin, Dongmei Zhang

arXiv:2311.04254v3cs.AIcs.LG

TL;DR

Existing prompting paradigms cannot jointly deliver performance, efficiency, and flexibility. XOT combines pretrained reinforcement learning and MCTS with collaborative thought revision; across challenging tasks, it outperforms existing approaches and provides multiple solutions with few LLM calls.

  • Problem

    Existing thought-generation paradigms cannot simultaneously achieve performance, efficiency, and flexibility.

    Source: §1 · p. 2
  • Method

    XOT uses pretrained reinforcement learning, MCTS, and low-cost policy and value networks for thought search, followed by collaborative MCTS–LLM thought revision.

    Source: §1 · p. 2
  • Results

    Across Game of 24, 8-Puzzle, and Pocket Cube, XOT outperforms existing prompting approaches and provides multiple solutions with few LLM calls.

    Source: §1 · p. 2, §4.6 · p. 15
  • Takeaways & Limitations

    The paper presents XOT as an effective thought-generation approach for challenging problem-solving tasks.

    Source: §1 · p. 2

    XOT requires training additional policy and value models using real-world environment datasets, adding costs and effort, particularly beyond well-defined tasks.

    Source: §6 · p. 16

Abstract

from arXiv · show

Recent advancements in Large Language Models (LLMs) have revolutionized decision-making by breaking down complex problems into more manageable language sequences referred to as "thoughts". An effective thought design should consider three key perspectives: performance, efficiency, and flexibility. However, existing thought can at most exhibit two of these attributes. To address these limitations, we introduce a novel thought prompting approach called "Everything of Thoughts" (XoT) to defy the law of "Penrose triangle of existing thought paradigms. XoT leverages pretrained reinforcement learning and Monte Carlo Tree Search (MCTS) to incorporate external domain knowledge into thoughts, thereby enhancing LLMs' capabilities and enabling them to generalize to unseen problems efficiently. Through the utilization of the MCTS-LLM collaborative thought revision framework, this approach autonomously produces high-quality comprehensive cognitive mappings with minimal LLM interactions. Additionally, XoT empowers LLMs to engage in unconstrained thinking, allowing for flexible cognitive mappings for problems with multiple solutions. We evaluate XoT on several challenging multi-solution problem-solving tasks, including Game of 24, 8-Puzzle, and Pocket Cube. Our results demonstrate that XoT significantly outperforms existing approaches. Notably, XoT can yield multiple solutions with just one LLM call, showcasing its remarkable proficiency in addressing complex problems across diverse domains.

1 INTRODUCTION

Existing prompting paradigms cannot jointly deliver performance, efficiency, and flexibility. XOT combines pretrained reinforcement learning and MCTS with collaborative thought revision, and is reported to outperform existing approaches across challenging tasks.

1 INTRODUCTION

  • The three desired dimensions are solution accuracy, the number of LLM inference calls, and the diversity of thought topologies.Flexibility includes chain, tree, and graph structures.Source: §1 · p. 2
  • Existing prompting paradigms cannot jointly achieve performance, efficiency, and flexibility: IO and CoT have limited structures, while ToT and GoT incur costly LLM-based thought evaluation.The paper frames this trade-off as a “Penrose triangle” constraint.Source: §1 · p. 2
  • XOT uses pretrained reinforcement learning, MCTS, and lightweight policy and value networks to search thoughts, then revises them collaboratively with an LLM.The approach aims to incorporate external domain knowledge and planning capability while minimizing LLM interactions.Source: §1 · p. 2
  • Across Game of 24, 8-Puzzle, and Pocket Cube, XOT outperforms existing approaches and provides multiple solutions with few LLM calls.The paper presents these findings as evidence that XOT is an effective thought-generation approach.Source: §1 · p. 2

2 BACKGROUND

The background introduces thoughts as intermediate processes or outcomes expressed in language and surveys prompting paradigms from direct input-output prompting to tree- and graph-structured search.

2 BACKGROUND

  • Thoughts are intermediate cognitive processes or outcomes expressed as linguistic prompt sequences, organized into chains, trees, or graphs.Source: §2 · pp. 2–3
  • IO prompting provides no intermediate thoughts, while CoT uses a sequential chain and CoT-SC selects among multiple CoT outputs.CoT-SC generates multiple outputs and selects the best result.Source: §2 · p. 3
  • ToT searches a tree of thoughts but relies on costly LLM calls to evaluate intermediate steps.Source: §2 · p. 3
  • GoT permits graph-like thought structures through aggregation and refinement, yet still requires multiple LLM inference calls for evaluation.Source: §2 · p. 3

3 XOT: EVERYTHING OF THOUGHTS

XoT combines MCTS-based thought exploration with LLM review and revision to support complex problem-solving with performance, efficiency, and flexibility. Its workflow formulates thought search as a reward-maximizing trajectory and uses trained policy/value networks to guide inference.

3 XOT: EVERYTHING OF THOUGHTS

  • XoT pairs MCTS simulations that generate candidate thoughts with LLM revision and grounding, forming a collaborative framework for complex problem-solving.The authors describe this collaboration as supporting performance, efficiency, and flexibility.Source: §3 · p. 3, §3.4 · p. 6

3.1 XOT IN A NUTSHELL

  • During task-specific training, MCTS simulations record states, values, and node visits to train policy/value networks; LLMs then review and refine the resulting thoughts.The extracted thoughts are supporting references rather than definitive answers, and LLMs may continue the MCTS search when needed.Source: §3.1 · pp. 3–4

3.2 THOUGHT SEARCHING FORMULATION

  • The formulation treats each thought as a state-action pair and complete thought generation as finding a trajectory that maximizes accumulated reward.States represent problem status, actions are one-step solutions, and reward evaluates whether decomposition resolves the original problem.Source: §3.2 · p. 4

3.3 THOUGHTS SEARCHING WITH MCTS

  • MCTS selects actions using Q-values, network-predicted priors, and an exploration–exploitation trade-off, then expands leaf states using predicted action probabilities and values.Backpropagation updates action values using estimated values for unexplored nodes and true rewards for terminal nodes.Source: §3.3 · pp. 4–5
  • Search simulations produce state, action-probability, and reward-value data that train a combined policy/value network to align its predictions with search outcomes.Training proceeds alongside simulation to improve the network’s thought-searching performance.Source: §3.3 · p. 5

3.4 THOUGHT INFERENCE WITH MCTS

  • At inference, MCTS extracts one or multiple trajectories; multiple trajectories can form graph-like structures and are concatenated into a single prompt for one LLM call.For multiple solutions, trajectories are sampled from action visit counts and duplicates are removed.Source: §3.4 · pp. 5–6
  • When the LLM detects a thought error, MCTS runs additional simulations from the parent state to revise it, and the process can be repeated.Each solution undergoes revision individually in multi-solution cases.Source: §3.4 · p. 6

4 EXPERIMENT

The experiments compare XOT with prompting, standalone MCTS, and fine-tuning across three challenging tasks. The Game of 24 section details task setup, baseline configurations, and single- and multi-solution results.

4.1.3 RESULTS

  • XOT consistently beats baselines; after three revisions, accuracy reaches 90.51% (GPT-3.5) and 85.40% (GPT-4), versus 79.56% and 74.45% after one.The table compares performance on Game of 24.Source: Table 3 · p. 8, §4.1.3 · p. 9
  • In multi-solution evaluation, XOT leads MultiAcc despite producing fewer answers than some baselines, using 2.31 GPT-4 LLM calls.XOT’s multi-solution results are reported in Table 4.Source: Table 4 · p. 8, §4.1.3 · p. 9

4.1.1 TASK SETUP

  • The Game of 24 dataset contains 1,362 games: 137 were randomly selected for testing and the remaining 1,225 for MCTS policy/value-network training.Games span difficulty levels ranked by human solving time; success is measured across the test games.Source: §4.1.1 · p. 8

4.1.2 BASELINES & XOT SETUP

  • Baselines use five in-context examples for IO, three intermediate equations for CoT, and one- or three-branch candidate selection for ToT.GoT selects a thought for merging; CoT-SC uses the majority output from 10 samples. XOT runs 200 simulations per action and 500 during revision.Source: §4.1.2 · p. 8
  • For multi-solution evaluation, ToT retains up to three final candidates, GoT selects one to three thoughts, and XOT samples 500 trajectories and keeps its three most-counted thoughts.XOT removes duplicate trajectories before selecting the top three.Source: §4.1.2 · p. 9

4.1.3 RESULTS

  • ToT (b=3) with GPT-4 reaches 60.58% accuracy at 39.83 LLM calls, whereas XOT needs fewer than 1.8 calls with revision.XOT also outperforms standalone MCTS, with its advantage growing over more revision iterations.Source: Table 3 · p. 8, §4.1.3 · p. 9

4.2 8-PUZZLE

The 8-Puzzle experiments evaluate XOT on generated short-horizon instances and compare it with prompting baselines. XOT substantially outperforms the best prompting baseline, including in the multi-solution setting.

4.2.1 TASK SETUP

  • The evaluation uses 419 randomly generated solvable puzzles: 300 training instances and 119 test instances, all solvable within nine steps.Each thought represents a step-by-step move and the resulting puzzle state.Source: §4.2.1 · p. 9

4.2.2 BASELINES & XOT SETUP

  • The setup enriches CoT examples with legal actions, current actions, and states, while XOT uses more simulations for revision and samples trajectories for multi-solution exploration.The maximum step limit is nine; XOT uses 20 simulations per action and 50 for revision, then samples 50 trajectories and selects the top three thoughts in the multi-solution setting.Source: §4.2.2 · pp. 9–10

4.2.3 RESULTS

  • GPT-4 XOT reaches 95.80% accuracy after three revisions, versus 13.45% for the best prompting baseline, ToT (b=3).With one revision, GPT-4 XOT reaches 93.28% accuracy; the three-revision setting requires approximately 1.6 LLM calls.Source: §4.2.3 · p. 10, Table 5 · p. 10
  • XOT outperforms other baselines on MultiAcc for both GPT-3.5 and GPT-4, with or without revision.For GPT-4, revision raises MultiAcc from 51.26% with single MCTS to 76.33%.Source: §4.2.3 · p. 10, Table 6 · p. 10

4.3 POCKET CUBE

The Pocket Cube experiments compare XOT with prompting baselines on single- and multi-solution tasks, then examine revision and incomplete thoughts. XOT achieves higher reported performance, while the ablations show that revision helps and incomplete thoughts can sharply reduce accuracy.

4.3.1 TASK SETUP

  • The task uses 1,000 training and 183 testing samples, generated from five random face rotations and solvable within four steps.The experiments reduce the 27 legal operations to nine actions: U, U’, U2, R, R’, R2, F, F’, and F2.Source: §4.3.1 · p. 11

4.3.2 BASELINES & XOT SETUP

  • For multi-solution experiments, XOT samples 50 trajectories after MCTS and keeps the three thoughts with the highest counts.The prompting baselines use three examples, each with three unique solutions; ToT and GoT receive a seven-step limit.Source: §4.3.2 · p. 11

4.3.3 RESULTS

  • GPT-4 XOT exceeds 77.60% accuracy with one revision and 80% with three, versus 19.57% for the best prompting baseline, ToT (b=3).XOT requires approximately two LLM inference calls for both GPT-3.5 and GPT-4.Source: §4.3.3 · p. 12
  • In the multi-solution setting, GPT-4 XOT achieves over 77% MultiAcc, while the closest competitor, GoT (k=3), reaches 16.85%.GoT requires 13.36 LLM invocations versus 4.08 for XOT.Source: §4.3.3 · p. 12

4.4 ABLATION STUDY

  • The revision ablation tests performance and efficiency as revision counts vary, and separately examines sensitivity to incomplete thoughts.The incomplete-thought test removes the final step of a trajectory to simulate inaccurate or incomplete MCTS thoughts.Source: §4.4 · p. 12, §4.4.2 · p. 13

4.4.1 NUMBER OF REVISIONS

  • Accuracy generally rises with more revisions: GPT-3.5 improves from 45.36% to 84.70%, and GPT-4 from 45.90% to 83.61%.The paper reports comparable inference times and model calls between models, with GPT-4 showing a substantial increase in calls after the third revision; additional revisions do not dramatically increase LLM invocations, though fθ is called more often.Source: §4.4.1 · p. 12, Figure 4 · p. 13
  • Revision success rate increases with the number of revisions for both GPT-3.5 and GPT-4.The study reports the rates in Tables 9 and 10.Source: §4.4.1 · pp. 12–13, Table 9 · p. 13, Table 10 · p. 13

4.4.2 INCOMPLETE THOUGHT

  • Incomplete thoughts reduce performance across all three tasks; GPT-4 XOT retains over 40% accuracy on Game of 24 and 8-Puzzle but drops to 6% on Pocket Cube.GPT-3.5 is more affected, reaching 0% accuracy on several baselines.Source: §4.4.2 · p. 14, Table 11 · p. 14

4.5 CASE STUDY

The case study shows XOT producing flexible, interwoven thought structures for multiple solutions, including recurrent state transitions and distinct paths to goals. The experiment summary presents performance, efficiency, and flexibility across the evaluated tasks as XOT’s combined strengths.

4.5 CASE STUDY

  • In the multi-solution examples, XOT’s thought paths intertwine at intermediate steps and converge on the goal, forming graph-like structures.The Pocket Cube example contains four distinct paths; the 8-Puzzle example includes recurrent state transitions described as reflection.Source: §4.5 · p. 14
  • The case examples are presented as evidence that flexible thought generation can yield multiple high-quality answers to one problem.The authors connect this flexibility with diverse and creative thinking.Source: §4.5 · p. 15

4.6 EXPERIMENT SUMMARY

  • The summary characterizes XOT as improving performance through streamlined thought-trajectory revision across Game of 24, 8-Puzzle, and Pocket Cube.It highlights Game of 24 performance and the method’s ability to handle spatial-reasoning challenges in the two puzzles.Source: §4.6 · p. 15

5 RELATED WORK

Related work covers LLM thought structures for decision-making and planning, reinforcement-learning augmentation, and MCTS integration. The paper distinguishes XOT by its stated aim of combining performance, efficiency, and flexibility.

Decision Making & Planning with LLMs

Augmenting LLMs with RL

6 DISCUSSION

XoT combines MCTS with pretrained policy and value networks and LLM thought revision to pursue performance, efficiency, and flexibility. The discussion reports evaluation advantages while noting training costs and risks from inaccurate intermediate thoughts.

6 DISCUSSION

  • XoT is presently used for reasoning and search, while broader applicability is proposed for decomposable tasks with well-defined objectives.The discussion notes MCTS's supportive role and possible substitution with other models for thought exploration and generation.Source: §6 · p. 16
  • XoT requires additional policy and value models trained using real-world environment datasets, adding costs and effort; these costs are described as low for the study's well-defined tasks.The authors identify less straightforward objectives, including multi-agent planning and code generation, as areas for future efficiency work.Source: §6 · p. 16
  • Incorrect MCTS intermediate thoughts or LLM deviations can lead to inaccurate answers or hallucinations, and environmental changes can make MCTS inaccurate.The discussion says LLMs can revise thoughts using internal knowledge, mitigating risks from inaccurate initial thoughts.Source: §6 · p. 16
  • XoT concurrently achieves performance, efficiency, and flexibility, and significantly outperforms existing prompting paradigms, particularly on multi-solution problems.The conclusion describes evaluations on Game of 24, 8-Puzzle, and Pocket Cube.Source: §6 · p. 16
  • MCTS with pretrained policy and value networks injects domain knowledge and planning, offloads thought searching, and supports unconstrained exploration; LLM revision further enhances thought quality.The discussion also describes MCTS as a supportive component that could be replaced by other supervised or reinforcement-learning models.Source: §6 · p. 16

A LLAMA-2-13B SETUP

The LLaMA-2-13B setup tests whether knowledge from simulations can be distilled into a smaller model, using ground-truth question-answer labels for supervised prediction.

A LLAMA-2-13B SETUP

  • The setup tests whether simulation knowledge can be distilled into LLaMA-2-13B to potentially avoid GPT-4 during testing.Ground-truth labels were used because they were considered more accurate than MCTS simulation labels.Source: A LLAMA-2-13B SETUP · p. 19
  • Training used a dataset of question-answer pairs to turn an optimization or search problem into a supervised prediction task.The setup used ground-truth labels.Source: A LLAMA-2-13B SETUP · p. 19
  • The model was fine-tuned for 5 epochs on eight V100 GPUs, with a learning rate of 2e-5 and train batch size of 32.The reported training run lasted approximately 5 hours.Source: A LLAMA-2-13B SETUP · p. 19

B COMPUTATIONAL TRAINING COSTS OF MCTS

XoT uses offline policy/value pretraining to reduce testing-time computation, while ToT makes repeated LLM calls during testing.

B COMPUTATIONAL TRAINING COSTS OF MCTS

  • 50.18 LLM invocations on average per test problem for ToT across three tasks, exceeding XoT's pretraining cost in recurring testing computation.The reported ToT task averages are 39.83, 54.13, and 56.58 calls.Source: B COMPUTATIONAL TRAINING COSTS OF MCTS · p. 19
  • XoT trains its policy/value model through three iterations, each containing 10 MCTS self-play episodes, and uses one-time offline pretraining to reduce testing computation.Table 12 is identified as listing training and testing policy/value model calls by task and iteration.Source: B COMPUTATIONAL TRAINING COSTS OF MCTS · p. 19
  • Approximately 1e6 total parameters across the policy/value networks for all three tasks, compared with GPT-3.5's 175 billion parameters and GPT-4's estimated over 1 trillion.The passage says this smaller model design remains efficient even with additional training calls.Source: B COMPUTATIONAL TRAINING COSTS OF MCTS · p. 19

C EXPERIMENT RESULTS ON OTHER NLP TASKS

The paper explores XoT on Document Merging, an NLP task, and reports that it achieves the highest score while retaining resource efficiency. It also frames other NLP tasks as possible MCTS searches using LLM-based rewards.

C EXPERIMENT RESULTS ON OTHER NLP TASKS

D PROMPT EXAMPLE

The section presents task-specific CoT prompt examples for Game of 24, 8-Puzzle, and Pocket Cube, usable by CoT, ToT, GoT, and XoT. Each thought step records an action and the resulting state.

  • Each thought step records the action taken and the resulting new state.Source: D PROMPT EXAMPLE · p. 20
  • The Game of 24 prompt uses basic arithmetic operations and demonstrates identifying Step 2 as the point where the remaining numbers cannot reach 24.Source: D PROMPT EXAMPLE · pp. 20–21
  • The 8-Puzzle prompt specifies valid moves toward the ordered goal state, and its example reaches that goal in four moves.The prompt limits solutions to nine steps and asks for the fewest steps.Source: D PROMPT EXAMPLE · pp. 21–23
  • The Pocket Cube prompt defines a 2x2 restoration task and gives R U’ F’ as an example move sequence.The prompt says problems can be solved in 1 to 4 moves and sets an 11-move maximum.Source: D PROMPT EXAMPLE · pp. 24, 33
  • For failed processes, the examples ask the model to identify the wrong step, with the Pocket Cube example naming Step 3 and the 8-Puzzle example naming Step 4.Source: D PROMPT EXAMPLE · pp. 23, 24, 33, 34
Loading 2311.04254v3…