Think Longer to Explore Deeper: Learn to Explore In-Context via Length-Incentivized Reinforcement Learning

Futing Wang, Jianhao Yan, Yun Luo, Ganqu Cui, Zhi Wang, Xiaoye Qu, Yue Zhang, Yu Cheng, Tao Lin

Abstract

Achieving effective test-time scaling requires models to engage in In-Context Exploration (ICE)—the intrinsic ability to generate, verify, and refine multiple reasoning hypotheses within a single continuous context. Grounded in State Coverage theory, our analysis identifies a critical bottleneck to enabling this capability: while broader state coverage requires longer reasoning trajectories, the probability of sampling such sequences decays exponentially during autoregressive generation, a phenomenon we term the "Shallow Exploration Trap." To bridge this gap, we propose Length-Incentivized Exploration (LIE). This simple yet effective recipe explicitly encourages models to explore more via a length-based reward coupled with a redundancy penalty, thereby maximizing state coverage in a two-step manner. Comprehensive experiments across different models (Qwen3, Llama) demonstrate that LIE effectively incentivizes in-context exploration. As a result, our method achieves an average improvement of 4.4% on in-domain tasks and a 2.7% gain on out-of-domain benchmarks.

The Challenge of In-Context Exploration

In the quest for better reasoning, "test-time scaling" has become the new frontier. We want models to "think harder" before they answer. This usually happens in two ways: Parallel Scaling (generating many independent answers and picking the best) and Sequential Scaling (generating one long, continuous "Chain of Thought").

Researchers focus on the latter, specifically a capability called In-Context Exploration (ICE). This is the model's ability to generate a hypothesis, verify it, realize it's wrong, and refine it—all within a single context window. Standard Reinforcement Learning (RL) training often fails to activate this because of the sequential nature of the exploration flow.

LLM Training Exploration Flow illustrating sequential reasoning.

The Shallow Exploration Trap

A fundamental bottleneck identified in this research is the "Shallow Exploration Trap." Because Large Language Models (LLMs) generate tokens autoregressively, the probability of reaching a "deep" reasoning state—one that requires many tokens—drops off exponentially. Most models give up too early or get stuck in repetitive loops, never reaching the complex states needed to solve high-level mathematical problems.

Empirical evidence shows a strong correlation between sequence length and state coverage ($C_{context}$), yet base models consistently terminate reasoning sequences prematurely, as shown in the probability distribution of sequence termination.

State coverage correlation and the Shallow Exploration Trap.

Methodology: Length-Incentivized Exploration (LIE)

To overcome this trap, the authors propose Length-Incentivized Exploration (LIE), a reward-shaping recipe designed to be integrated into standard RL algorithms like GRPO or GSPO. LIE consists of two main components:

  1. Length-Incentivized Reward ($R_{len}$): If a model fails to find the correct answer, it is penalized for being shorter than a target length ($L_{target}$). This creates a "curriculum" that forces the model to keep searching when it's stuck, rather than just guessing and ending the sequence.
  2. Redundancy Penalty ($R_{red}$): Simply rewarding length leads to "thought padding"—the model might just repeat phrases indefinitely. To prevent this, the authors use a state-abstraction technique based on $n$-grams. If the model repeats the same "logical state" too many times, it receives a heavy penalty.

By combining these, the model is given a "computational budget" (length) and forced to spend it on "diverse states" (non-redundant reasoning).

Key Insights and Results

One of the most striking findings is that LIE doesn't just make models talk more; it changes how they think. Analysis of model behaviors revealed a massive spike in backtracking. The model learns that if one path is failing, it should "rewind" and try a different hypothesis. This suggests that while Supervised Fine-Tuning (SFT) injects reasoning primitives, LIE is what actually activates them.

The LIE recipe was tested across Qwen3 and Llama-3B models with consistent success:

  • Performance Boost: An average improvement of 4.4% on in-domain tasks and 2.7% on out-of-distribution benchmarks.
  • AIME 2025: On the difficult AIME25 set, GSPO+LIE achieved 26.7% accuracy, a significant jump over the 20.5% baseline.
  • Superior Scaling Curves: Models trained with LIE show a much healthier scaling curve, effectively converting extra tokens into higher accuracy at test-time.

Conclusion

By explicitly addressing the "Shallow Exploration Trap" through length incentives and redundancy penalties, LIE enables LLMs to escape the limitations of standard autoregressive generation. This approach provides a clear path forward for improving sequential reasoning and test-time scaling, allowing models to explore deeper state spaces and solve more complex problems through emergent behaviors like self-correction and backtracking.

Summary updated

Abstract

Achieving effective test-time scaling requires models to engage in In-Context Exploration -- the intrinsic ability to generate, verify, and refine multiple reasoning hypotheses within a single continuous context. Grounded in State Coverage theory, our analysis identifies a critical bottleneck to enabling this capability: while broader state coverage requires longer reasoning trajectories, the probability of sampling such sequences decays exponentially during autoregressive generation, a phenomenon we term the ``Shallow Exploration Trap''. To bridge this gap, we propose Length-Incentivized Exploration(\method). This simple yet effective recipe explicitly encourages models to explore more via a length-based reward coupled with a redundancy penalty, thereby maximizing state coverage in two-step manner. Comprehensive experiments across different models (Qwen3, Llama) demonstrate that \method effectively incentivize in-context exploration. As a result, our method achieves an average improvement of 4.4\% on in-domain tasks and a 2.7\% gain on out-of-domain benchmarks.
BibTeX
@misc{wang2026think,
  author = {Futing Wang and Jianhao Yan and Yun Luo and Ganqu Cui and Zhi Wang and Xiaoye Qu and Yue Zhang and Yu Cheng and Tao Lin},
  title = {{Think Longer to Explore Deeper: Learn to Explore In-Context via Length-Incentivized Reinforcement Learning}},
  year = {2026},
  eprint = {2602.11748},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.11748},
}
Figure