Deciphering the Factors Influencing the Efficacy of Chain-of-Thought: Probability, Memorization, and Noisy Reasoning

Akshara Prabhakar, Thomas L. Griffiths, R. Thomas McCoy

TL;DR

Chain-of-Thought (CoT) prompting doesn't just unlock "pure" reasoning; it's a complex blend of memorization, output probability, and "noisy" step-by-step logic. By testing LLMs on shift ciphers, researchers found that performance is heavily biased toward common words and frequently seen tasks (like ROT-13), proving that linguistic priors often override logical steps.

What Problem Does This Paper Address?

Does an LLM actually "reason" when you ask it to "think step-by-step," or is it just performing a more sophisticated version of pattern matching? While CoT prompting significantly boosts performance on complex tasks, the community is divided on whether this represents abstract generalization or a reliance on shallow heuristics.

The authors address this by using shift ciphers (e.g., ROT-13) as a "model organism" for reasoning. Shift ciphers are ideal because they are logically simple but allow researchers to independently manipulate task difficulty (number of shifts), task frequency in training data (how often a specific shift appears online), and the probability of the final answer (common words vs. nonsense).

Methods

The researchers evaluated GPT-4, Claude 3, and Llama 3.1 on a decoding task. They compared several prompting strategies:

  • Standard: Just the task description and a single example.
  • Text-CoT: Decoding the message one letter at a time (e.g., "f -> s").
  • Math-CoT: Translating letters to numbers, performing modular arithmetic, and translating back.
  • Number-CoT: An isomorphic task using only number sequences to remove linguistic "interference."

To quantify what drives performance, they used a logistic regression model to weigh the impact of four factors: the probability of the output word, the frequency of the shift level in internet text, the number of steps required (one-way), and the minimum steps required (two-way, i.e., shifting forward vs. backward).

Datasets

The authors created a custom dataset of 7-letter words that are exactly two tokens long (to control for tokenization quirks). These words were categorized into five "probability bins" based on their frequency in natural language (using GPT-2 log-probabilities). The final dataset included 150 words per bin, tested across all 25 possible shift levels.

Key Insights and Ideas

  • Noisy Two-Way Reasoning: LLMs don't just follow a single direction. They tend to take the "shortest path" (e.g., shifting backward 1 instead of forward 25). However, this process is "noisy"—each implicit step has a chance of failure, and errors accumulate as the number of required shifts increases.
  • The "Self-Correction" Trap (Unfaithfulness): Models often produce correct intermediate reasoning steps but then "hallucinate" a more probable word as the final answer. For example, if the steps lead to "STAZ," a model might "correct" it to the more common word "STAY."
  • Memorization Spikes: There is a massive spike in accuracy at ROT-13, regardless of word probability. This is because ROT-13 is ubiquitous on the internet (used for spoilers/puzzles), proving that models lean heavily on memorized task instances even when prompted to reason.
  • CoT as Self-Conditioning: The authors found that "silent thinking" (replacing reasoning steps with filler tokens like *) fails. LLMs must explicitly generate the text of their reasoning to "condition" themselves for the correct final answer.
Figure 4: Hypothetical accuracy vs. shift-level for various types of reasoning. Under noisy one-way, the model only shifts letters backward; under noisy two- way, it adopts the shorter path between going forward and backward. The hypothetical memorization accuracy is based on shift level frequencies in internet corpora. Probabilistic would involve much higher scores on high prob than low prob.

Key Results

  • The "Reasoning Gap": GPT-4's accuracy on the number-based task (Number-CoT) was nearly 100%, but on the identical letter-based task (Text-CoT), it averaged only 32%. This suggests the "logic" is present, but linguistic biases (probability and memorization) interfere with its application to text.
  • Probability Impact: For GPT-4, simply changing the target word from a low-probability sequence to a high-probability common word shifted accuracy from 26% to 70%.
  • Faithfulness vs. Accuracy: As shown in Figure 6, "faithful" accuracy (what the model should have gotten based on its CoT steps) is often higher than actual accuracy for low-probability words, as the model's internal "language model" overrides its "reasoning chain."
Figure 6: Actual overall decoding accuracy vs. faith- ful accuracy across shift levels showing the effects of probability. The effect is amplified for low probability outputs as seen in the larger drop in accuracy between the orange and blue bin 5 (low probability) lines.

Limitations and Future Work

The study focuses on a single, relatively simple symbolic task. While this allows for clean variable isolation, it's unclear how these factors interact in more "natural" reasoning tasks like legal analysis or creative writing. Additionally, the study primarily used one-shot prompting; future work could explore if many-shot prompting or different "thinking" architectures (like OpenAI's o1) can mitigate the "noise" and probabilistic biases identified here.

Summary updated

BibTeX
@inproceedings{prabhakar2024deciphering,
  author = {Akshara Prabhakar and Thomas L. Griffiths and R. Thomas McCoy},
  title = {{Deciphering the Factors Influencing the Efficacy of Chain-of-Thought: Probability, Memorization, and Noisy Reasoning}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.findings-emnlp.212},
}
Figure