Chain-of-Thought Reasoning Without Prompting

Xuezhi Wang, Denny Zhou

Abstract

In enhancing the reasoning capabilities of large language models (LLMs), prior research primarily focuses on specific prompting techniques such as few-shot or zero-shot chain-of-thought (CoT) prompting. These methods, while effective, often involve manually intensive prompt engineering. Our study takes a novel approach by asking: Can LLMs reason effectively without prompting? Our findings reveal that, intriguingly, CoT reasoning paths can be elicited from pre-trained LLMs by simply altering the decoding process. Rather than conventional greedy decoding, we investigate the top-$k$ alternative tokens, uncovering that CoT paths are frequently inherent in these sequences. This approach not only bypasses the confounders of prompting but also allows us to assess the LLMs' intrinsic reasoning abilities. Moreover, we observe that the presence of a CoT in the decoding path correlates with a higher confidence in the model's decoded answer. This confidence metric effectively differentiates between CoT and non-CoT paths. Extensive empirical studies on various reasoning benchmarks show that the proposed CoT-decoding effectively elicits reasoning capabilities from language models, which were previously obscured by standard greedy decoding.

Introduction

To solve complex mathematical or logical problems, Large Language Models (LLMs) typically require explicit instructions to "think step-by-step"—a technique known as Chain-of-Thought (CoT) prompting. While highly effective, this reliance on prompt engineering introduces two significant challenges: the manual effort required to tailor prompts for specific tasks and the difficulty in determining whether a model is truly reasoning or merely mimicking a prompted format.

Researchers at Google DeepMind have addressed these challenges by investigating whether reasoning is an intrinsic property of LLMs that can be accessed without any prompting at all. They hypothesize that standard greedy decoding—the practice of always selecting the single most probable next token—actually suppresses a model's latent reasoning paths in favor of short, direct, and often incorrect answers.

Methodology: CoT-Decoding

The proposed solution, CoT-decoding, modifies the inference process to uncover these hidden reasoning paths. Unlike standard greedy decoding, which follows a single path from the first token, CoT-decoding explores the model's internal probability distribution at the start of the response.

Figure 1: Overview of the CoT-decoding process, showing how alternative tokens at step 0 can lead to reasoning paths that yield correct answers with higher confidence.

The Decoding Process

  1. Top-$k$ Branching: At the very first decoding step (step 0), the model identifies the top-$k$ alternative tokens instead of just the top-1 choice.
  2. Path Generation: The model then continues generating text greedily from each of these $k$ starting points until a final answer is reached.
  3. Confidence Filtering: The researchers discovered a strong correlation between the presence of a reasoning path and the model's confidence in its final answer. They measure this confidence ($\Delta$) by calculating the probability gap between the top choice and the second-best choice for the final answer tokens.
  4. Selection: The path that exhibits the highest average confidence score is selected as the final output.

This method is entirely unsupervised and task-agnostic, requiring no changes to the model's underlying weights or specialized prompt engineering.

Experimental Evaluation

The effectiveness of CoT-decoding was evaluated across several challenging benchmarks designed to test different facets of reasoning:

  • Mathematical Reasoning: GSM8K (grade-school math) and MultiArith.
  • Commonsense Reasoning: A "Year Parity" task, requiring the model to determine if a celebrity was born in an even or odd year.
  • Symbolic Reasoning: Tasks from the Big-Bench-Hard (BBH) suite, including Coin Flip, Web of Lies, and Multi-step Arithmetic.

Results and Key Insights

The results demonstrate that CoT-decoding significantly outperforms standard greedy decoding across all tested benchmarks. For example, on the GSM8K benchmark using a Mistral-7B model, accuracy increased from 9.9% to 25.1%. On the Year Parity task with PaLM-2 L, accuracy soared from 57.0% to 95.0%.

Figure 6: Accuracy on the GSM8K benchmark comparing standard greedy decoding against CoT-decoding across various model scales.

Key Findings

  • Reasoning is Inherent: Reasoning paths are already present in pre-trained models. Prompts do not "teach" reasoning; they merely act as a filter to bring existing latent paths to the surface.
  • The Greedy Bias: Greedy decoding is biased toward simplicity because pre-training data often contains direct Q&A pairs. However, the more accurate "reasoning" path is frequently lurking just below the top-1 choice in the probability distribution.
  • Confidence as a Signal: There is a verifiable link between "showing one's work" and answer certainty. When a model generates a CoT path, it becomes significantly more certain of its final result, providing a reliable signal for path selection.

Discussion and Limitations

While CoT-decoding reveals the intrinsic capabilities of LLMs, it comes with a higher computational cost, as generating $k$ paths is roughly $k$ times more expensive than standard decoding. Additionally, the current study focused on branching at the first token; future work may explore "pivot points" that occur later in the sequence.

Ultimately, CoT-decoding suggests that the "inner monologue" of an LLM is a powerful, untapped resource. By bypassing the need for manual prompting, this approach provides a clearer view of a model's true reasoning potential and offers a path toward self-improving models that can discover their own reasoning logic.

Summary updated

Abstract

In enhancing the reasoning capabilities of large language models (LLMs), prior research primarily focuses on specific prompting techniques such as few-shot or zero-shot chain-of-thought (CoT) prompting. These methods, while effective, often involve manually intensive prompt engineering. Our study takes a novel approach by asking: Can LLMs reason effectively without prompting? Our findings reveal that, intriguingly, CoT reasoning paths can be elicited from pre-trained LLMs by simply altering the \textit{decoding} process. Rather than conventional greedy decoding, we investigate the top-$k$ alternative tokens, uncovering that CoT paths are frequently inherent in these sequences. This approach not only bypasses the confounders of prompting but also allows us to assess the LLMs' \textit{intrinsic} reasoning abilities. Moreover, we observe that the presence of a CoT in the decoding path correlates with a higher confidence in the model's decoded answer. This confidence metric effectively differentiates between CoT and non-CoT paths. Extensive empirical studies on various reasoning benchmarks show that the proposed CoT-decoding effectively elicits reasoning capabilities from language models, which were previously obscured by standard greedy decoding.
BibTeX
@inproceedings{wang2024chain,
  author = {Xuezhi Wang and Denny Zhou},
  title = {{Chain-of-Thought Reasoning Without Prompting}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=4Zt7S0B0Jp},
}
Figure