Iterative Deepening Sampling as Efficient Test-Time Scaling

Weizhe Chen, Sven Koenig, Bistra Dilkina · DOI

Abstract

Recent reasoning models, such as OpenAI's o1 series, have demonstrated exceptional performance on complex reasoning tasks and revealed new test-time scaling laws. Inspired by this, many people have been studying how to train models to achieve effective self-evaluation and self-correction to further enable the scaling paradigm. However, less studied is how to efficiently scale test-time compute from a fixed model, and this remains a challenge. In this paper, we address this challenge by focusing on enhancing the quality of self-reflection data generation for complex problem-solving at test time, which can also subsequently improve the training of next-generation large language models (LLMs). Specifically, we explore how systematically triggering a model's self-correction mechanisms can improve performance on challenging reasoning tasks. To this end, we propose a novel iterative deepening sampling algorithm framework designed to enhance self-correction and generate higher-quality samples. Through extensive experiments on Math500 and AIME benchmarks, we demonstrate that our method achieves a higher success rate on difficult tasks and provide detailed ablation studies to analyze its effectiveness across diverse settings.

Introduction

Since the release of OpenAI’s o1, "test-time scaling"—the idea that models can solve harder problems if allowed to "think" longer during inference—has become a massive area of interest. While much research focuses on training models to spontaneously self-evaluate and self-correct, less attention has been paid to efficiently scaling test-time compute for fixed, already-trained models.

While models can sometimes spontaneously self-correct, they often fail to trigger this behavior when they actually need to. Researchers know that manually injecting prompts like "Wait, I made a mistake" can force a model to rethink, but doing this efficiently is an unsolved challenge. If triggers are injected too often, compute is wasted; if too rarely, the model fails to correct errors. This paper introduces a systematic approach to trigger self-reflection to maximize reasoning accuracy without excessive inference costs.

Methodology: Iterative Deepening Sampling

The authors propose Iterative Deepening Sampling (ID-Sampling). Instead of letting a model generate a response from start to finish uninterrupted, ID-Sampling strategically pauses the process to force reflection.

The ID-Sampling framework uses geometric budget expansion and trigger sentence injection to force self-correction.
  1. Budget Allocation: The model is initially assigned a token budget ($B_0$).
  2. Trigger Injection: If the model has not reached an end-of-sequence (EOS) token when the budget expires, a trigger sentence is injected. For standard models, a full sentence is used: "Wait! Maybe I made some mistakes! I need to rethink from scratch." For specialized reasoning models, the single word "wait" is often sufficient.
  3. Geometric Expansion: The budget is then multiplied by a scaling factor $\gamma$ (e.g., $\gamma = 2.0$), and generation resumes.

This geometric progression ensures that triggers are injected frequently in the early stages of problem-solving—where foundational errors typically occur—and less frequently as the response grows, preventing infinite loops of overthinking. ID-Sampling can be integrated with standard aggregation strategies like Best-of-N (BoN) and Majority Voting.

Empirical Motivation: The Anatomy of "Thinking"

By analyzing the outputs of DeepSeek-R1, the authors discovered a distinct pattern in how successful models reason. Correct answers typically feature "thinking" markers (such as "wait" or "hmm") concentrated heavily within the first 1,000 tokens. In contrast, incorrect answers show these markers scattered randomly or appearing too late.

Analysis of thinking markers in DeepSeek-R1 shows that correct answers concentrate self-reflection early in the generation process.

This insight directly motivated the geometric budget expansion: forcing reflection early is significantly more valuable than forcing it late. ID-Sampling acts as a catalyst for the latent self-correction abilities already present in strong reasoning models.

Key Results

The authors evaluated ID-Sampling on challenging mathematical benchmarks including MATH-500 and AIME (2024/2025), using symbolic-based checkers to ensure mathematical accuracy.

  • Accuracy Boosts: On the AIME-24 dataset using DeepSeek-R1-Distill-Qwen-32B, ID-Sampling improved Pass@1 from 72.6% to 75.5%. With Majority Voting (cons@32), accuracy rose from 83.3% to 86.7%.
  • Efficiency: For reasoning models, the runtime overhead of ID-Sampling is negligible, typically within $1 \pm 0.1\times$ wall-clock time compared to vanilla sampling.
  • Performance Ceiling: On smaller models like Llama-3.1-1B, ID-Sampling with a single sample ($N=1$) outperformed vanilla sampling with 32 samples ($N=32$), demonstrating its power as a compute-efficient scaling method.

Limitations and Future Work

While effective, ID-Sampling's success depends on the underlying model's inherent capacity for self-correction. Furthermore, the iterative nature of the algorithm requires custom KV-cache management in serving engines like vLLM to maintain high throughput. Currently limited to math and logic, future work may extend this geometric trigger framework to tree-search algorithms like Monte Carlo Tree Search (MCTS) or apply it to broader domains like code generation.

Summary updated

BibTeX
@misc{chen2025iterative,
  author = {Weizhe Chen and Sven Koenig and Bistra Dilkina},
  title = {{Iterative Deepening Sampling as Efficient Test-Time Scaling}},
  year = {2025},
  eprint = {2502.05449},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.05449},
}
Figure