On theEmergence ofThinking in LLMs I: Searching for the Right Intuition

Khiem Pham

TL;DR

This paper introduces Reinforcement Learning via Self-Play (RLSP), a novel post-training framework for Large Language Models (LLMs) that encourages "thinking" or complex reasoning. RLSP uses a combination of supervised fine-tuning, an exploration reward signal, and outcome verification to train LLMs to exhibit emergent reasoning behaviors like backtracking and self-correction, leading to significant performance improvements on challenging math benchmarks.

What Problem Does This Paper Address?

The rapid advancement of LLMs has led to the emergence of "Large Reasoning Models" (LRMs) that can perform complex reasoning during inference. However, the underlying algorithmic framework for training these LRMs, particularly how to elicit sophisticated reasoning abilities, remains an open question. Existing approaches like self-consistency and process reward modeling suggest that reasoning is a form of guided search. This paper aims to discover the simplest and most scalable framework for training LLMs that leads to the emergence of this crucial search behavior, enabling them to perform more complex reasoning tasks.

Methods

The core contribution is the Reinforcement Learning via Self-Play (RLSP) framework, a post-training technique designed to foster reasoning in LLMs. RLSP comprises three key steps:

  1. Supervised Fine-Tuning (SFT): If available, human or synthetic demonstrations of reasoning processes are used to fine-tune the model. This step is optional but can help.
  2. Exploration Reward: An exploration reward signal is introduced, independent of the final answer's correctness. This reward incentivizes the model to explore diverse reasoning behaviors, such as backtracking, considering alternative possibilities, and verification. This is a key innovation, decoupling exploration from strict correctness.
  3. Reinforcement Learning (RL) with Outcome Verifier: Proximal Policy Optimization (PPO) is used for RL training. An outcome verifier provides a binary signal of correctness, while the exploration reward encourages the reasoning process. The framework carefully balances these two signals to prevent reward hacking and improve performance and efficiency.

The paper emphasizes that the exploration reward, particularly one that incentivizes longer reasoning chains (more intermediate steps), is crucial for eliciting emergent behaviors.

Datasets

  • QwQ-LongCoT: Used for supervised fine-tuning (SFT) in experiments with the Llama-3.1-8B-Instruct model. This dataset consists of long Chain-of-Thought (CoT) reasoning traces.
  • MATH-500: A benchmark dataset used for evaluating reasoning abilities.
  • AIME 2024: Another challenging math benchmark used for evaluation.
  • AIME 918 problems (1983-2003): Used for training the larger Qwen2.5-32B-Instruct model, as it performs exceptionally well on MATH and requires a more challenging setting.

Key Insights and Ideas

  • Reasoning as Guided Search: The paper builds on the principle that reasoning is a form of guided search, and RLSP aims to implement this search in a scalable way.
  • Decoupling Exploration and Correctness: A critical insight is that an exploration reward, separate from the outcome reward, is essential for encouraging diverse and robust reasoning behaviors. This prevents models from simply finding the shortest path to a correct answer and instead encourages them to explore the reasoning process itself.
  • Emergent Behaviors: Even with a simple exploration reward (e.g., rewarding longer responses), LLMs trained with RLSP exhibit emergent behaviors like backtracking, exploring alternative ideas, and self-correction. These behaviors are not explicitly programmed but arise from the training process.
  • RLSP as a General Framework: The RLSP framework is shown to be effective across different model families (Llama, Qwen), sizes, and domains (math, coding), suggesting its broad applicability.
  • CoT and Reasoning Power: The paper theorizes that RLSP's effectiveness is linked to recent findings that Chain-of-Thought (CoT) reasoning provably enhances LLM computational power, and that more steps in CoT lead to better reasoning. RLSP essentially synthesizes new CoT data through self-play.

Key Results

  • Performance Boosts:
    • On Llama-3.1-8B-Instruct, RLSP boosted performance by 23% on the MATH-500 test set.
  • On Qwen2.5-32B-Instruct, RLSP improved performance by 10% on AIME 2024 math problems.
  • The self-consistency accuracy of Llama-3.1-8B-Instruct on MATH-500 increased from 61.8% (standard CoT) to 73.4% with RLSP.
  • Emergent Behaviors: Models trained with RLSP, even without SFT, demonstrated significant emergent behaviors such as backtracking, exploration of alternative possibilities, and self-correction. These were observed across multiple model families and domains.
  • Token Efficiency: RLSP-trained models showed better reasoning capabilities compared to standard CoT with majority voting, suggesting improved token efficiency for achieving accurate results.

Limitations and Future Work

  • Model Scale and Data: The authors note that emergent behaviors can vary based on pretraining data and base models. They also speculate that small model sizes, limited data, and compute might have prevented even more advanced emergent behaviors in their experiments.
  • Generalization: While RLSP shows promise across domains, further large-scale experiments are needed to fully understand its capabilities and limitations.
  • Test-Time Search: The paper raises questions about enabling finer-grained test-time search where search time directly influences solution quality, and how context length impacts reasoning.
  • Pure RL: The paper investigates whether pure RL (without exploration reward) can lead to thinking behavior at certain model scales.
  • Truly Emergent Behavior: The authors question whether there can be truly emergent behaviors that surpass human reasoning, akin to discovering new theories.
  • Higher Forms of Reasoning: Future work could explore training recipes for unlocking higher forms of reasoning, such as creating abstractions, theories, and solving open-ended problems like climate change.

Summary updated

BibTeX
@misc{pham2025theemergence,
  author = {Khiem Pham},
  title = {{On theEmergence ofThinking in LLMs I: Searching for the Right Intuition}},
  year = {2025},
  eprint = {2502.06773},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.06773},
}
Figure