Enhancing Chain-of-Thoughts Prompting with Iterative Bootstrapping in Large Language Models

Jiashuo Sun, Yi Luo, Yeyun Gong, Chen Lin, Yelong Shen, Jian Guo, Nan Duan

TL;DR

The authors introduce Iter-CoT (Iterative bootstrapping in Chain-of-Thoughts Prompting), a novel method that enables large language models (LLMs) to autonomously rectify errors in their own reasoning chains through multi-turn interactions. By selecting moderately challenging, self-corrected questions as exemplars, Iter-CoT creates high-quality demonstration pools that significantly enhance LLM performance across arithmetic, commonsense, and symbolic reasoning tasks without requiring manual human annotations.

What Problem Does This Paper Address?

Chain-of-Thought (CoT) prompting has drastically improved LLM performance on complex reasoning tasks by providing step-by-step exemplars. However, current paradigms face three major bottlenecks:

  1. Error-Prone Automations: Automatically generated CoT exemplars frequently contain logical errors. When these flawed chains are used as demonstrations, they mislead the model during inference.
  2. The Difficulty Mismatch: Exemplar difficulty matters. Overly simplistic demonstrations fail on complex questions, while excessively complex demonstrations degrade performance on simpler tasks.
  3. Missing Contextual Information: Standard generation methods do not allow the model to learn from its own intermediate mistakes, limiting its ability to synthesize robust reasoning paths.

Methods

Iter-CoT addresses these challenges by introducing a three-phase workflow to construct a high-quality demonstration pool before inference:

  1. Initialization: The model is evaluated on a training set using standard Zero-Shot-CoT. Questions answered incorrectly are flagged as candidates for the pool.
  2. Bootstrapping: For each erroneous example, the model is given a simple feedback hint ("Your answer is not right; can you think more carefully..."). The model iteratively attempts to self-correct until it arrives at the correct final answer.
  3. Summarization: Once the correct answer is found, a Summary-Prompt guides the model to review its multi-turn conversation history and distill it into a clean, comprehensive "Final CoT" reasoning chain.

During the subsequent Inference Stage, fixed exemplars are randomly sampled from this optimized pool to guide the target LLM. Crucially, Iter-CoT operates in two modes: Iter-CoT (w/ label), which uses ground-truth labels to verify correctness during bootstrapping, and Iter-CoT (w/o label), which leverages a stronger model (like GPT-4) as an automated evaluator when labels are unavailable.

Figure 5: The workflow of Iter-CoT: 1. The construction of the demonstration pool: 1) Initialization: we query the LLMs to generate reasoning chain and answer with Zero-Shot-CoT (Kojima et al., 2022). 2) Bootstrapping: we use Revise-Prompt to guide LLMs to revise the reasoning chain repeatedly until the generated CoT is completely accurate. 3) Summarization: we prompt LLMs with Summary-Prompt to generate the final reasoning chain (referred to as Final CoT) based on the contextual information provided within the overall process. Then, we add the Final CoT where the answer is correct with the corresponding question as an example to the demonstration pool. 2. Inference: LLMs generate answers for the test questions with the demonstrations sampled from the constructed demonstration pool.

Datasets

The authors evaluated Iter-CoT across ten distinct datasets spanning three reasoning categories:

  • Arithmetic Reasoning: GSM8K, AQuA, AddSub, SingleEq, SVAMP, and ASDiv.
  • Commonsense Reasoning: CSQA, StrategyQA, and Date Understanding.
  • Symbolic Reasoning: Letter Concatenation.

Key Insights and Ideas

  • LLMs Can Self-Correct with Minimal Hints: The paper demonstrates that LLMs possess a latent ability to fix their own mistakes. On the GSM8K training set, simply telling the model its answer was wrong caused the number of correct samples to jump from 4,089 to 5,726 over six iterations.
  • The Value of "Learning from Mistakes": Traditional methods filter out or ignore incorrect reasoning chains. Iter-CoT proves that exemplars derived from corrected mistakes are highly effective demonstrations because they represent a "challenging yet answerable" difficulty threshold for the model.
  • Summarization is Essential: Merely providing the raw multi-turn correction dialogue can confuse the model. Condensing the final chain ensures the exemplar is precise, clean, and significantly longer/more comprehensive than standard zero-shot outputs.
Figure 3: Effect of re-answering the question based on the hint and previous rationales.

Key Results

Using GPT-3.5-turbo as the baseline foundation model, Iter-CoT achieved state-of-the-art (SOTA) performance:

  • Supervised Superiority: Iter-CoT (w/ label) achieved an average accuracy of 81.5% across all ten datasets, outperforming Manual-CoT (77.7%) and Random-CoT (75.4%).
  • Label-Free Viability: Even without ground-truth training labels, Iter-CoT (w/o label) achieved a remarkable 81.1% average accuracy, proving that GPT-4 can successfully act as an unsupervised evaluator.
  • Consistency Boost: When paired with Self-Consistency (SC) decoding, Iter-CoT (w/ label)-SC reached an average accuracy of 84.8%, setting a new benchmark across the evaluated datasets.
  • Model Generalizability: The framework delivered consistent improvements when tested on other open-source and proprietary architectures, including Llama-2-70B-Chat, Llama-2-70B, and GPT-4.

Limitations and Future Work

  • Upfront Computational Cost: While Iter-CoT introduces no additional overhead during the inference stage, constructing the demonstration pool requires multi-turn API calls and iterations, making the preparation phase computationally expensive.
  • Evaluator Dependency: The label-free version relies heavily on the accuracy of the evaluator model. If a weaker evaluator is used, the quality of the demonstration pool degrades.

Future work includes exploring further iterations to generate even higher-quality exemplars and optimizing the selection of the initial seed examples.

Summary updated

Abstract

Large language models (LLMs) can achieve highly effective performance on various reasoning tasks by incorporating step-by-step chain-of-thought (CoT) prompting as demonstrations. However, the reasoning chains of demonstrations generated by LLMs are prone to errors, which can subsequently lead to incorrect reasoning during inference. Furthermore, inappropriate exemplars (overly simplistic or complex), can affect overall performance among varying levels of difficulty. We introduce Iter-CoT (Iterative bootstrapping in Chain-of-Thoughts Prompting), an iterative bootstrapping approach for selecting exemplars and generating reasoning chains. By utilizing iterative bootstrapping, our approach enables LLMs to autonomously rectify errors, resulting in more precise and comprehensive reasoning chains. Simultaneously, our approach selects challenging yet answerable questions accompanied by reasoning chains as exemplars with a moderate level of difficulty, which enhances the LLMs' generalizability across varying levels of difficulty. Experimental results indicate that Iter-CoT exhibits superiority, achieving competitive performance across three distinct reasoning tasks on ten datasets.
BibTeX
@inproceedings{sun2024enhancing,
  author = {Jiashuo Sun and Yi Luo and Yeyun Gong and Chen Lin and Yelong Shen and Jian Guo and Nan Duan},
  title = {{Enhancing Chain-of-Thoughts Prompting with Iterative Bootstrapping in Large Language Models}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-naacl.257},
}
Figure