Toward Adaptive Reasoning in Large Language Models with Thought Rollback

Sijia Chen, Baochun Li
12/27/2024
cs.AIcs.CLcs.LG

No official code found. Best implementation: iQua/llmpebase (18 stars, MIT, last commit 2025-01-16).

Abstract

Large language models (LLMs) have been routinely used to solve various tasks using step-by-step reasoning. However, the structure of intermediate reasoning steps, or thoughts, is rigid and unidirectional, such as chains, trees, or acyclic-directed graphs. Consequently, the resulting inflexible and forward-only reasoning may not address challenging tasks and fail when the LLM frequently gives false responses, i.e., ``hallucinations''. This paper proposes a new reasoning framework, called Thought Rollback (TR), allowing LLMs to adaptively build thought structure while maintaining effective reasoning toward problem-solving under ``hallucinations''. The core mechanism of TR is rolling back thoughts, which allows LLMs to perform error analysis on thoughts, and thus roll back to any previously mistaken thought for revision. Subsequently, by including such trial-and-error in the prompt to guide the LLM, each rollback leads to one more reliable reasoning path. Therefore, starting with a simple prompt without human annotations, LLM with TR adaptively and gradually explores thoughts for a correct solution. Comprehensive experiments on mathematical problems and multi-task reasoning demonstrate the state-of-the-art performance of TR in terms of problem-solving rate and interaction cost. For instance, the solving rate of GPT-4 with TR outperforms the current best by $9\%$ on the MATH dataset.

View on arXivView PDF

Code Implementations(1)

iQua/llmpebaseCommunity100%
MIT

This is a unified platform for implementing and evaluating test-time reasoning mechanisms in Large Language Models (LLMs).

184PythonSep 18, 20231 years agoMIT

Similar Papers

Cite this paper

@article{chen2024toward,
  title  = {Toward Adaptive Reasoning in Large Language Models with Thought Rollback},
  author = {Sijia Chen and Baochun Li},
  year   = {2024},
  eprint = {2412.19707},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.19707v1},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.19707.svg)](https://codeofpaper.com/paper/2412.19707)

Discussion