LAPO: Internalizing Reasoning Efficiency via Length-Adaptive Policy Optimization

Xingyu Wu, Yuchen Yan, Shangke Lyu, Linjuan Wu, Yiwen Qiu, Yongliang Shen, Weiming Lu, Jian Shao, Jun Xiao, Yueting Zhuang

TL;DR

LAPO (Length-Adaptive Policy Optimization) is a novel two-stage reinforcement learning framework that trains large reasoning models to internalize token efficiency as an intrinsic capability rather than an external constraint. By discovering natural reasoning lengths and embedding them as self-proposed budgets, LAPO reduces token usage by up to 40.9% while simultaneously boosting accuracy by 2.3% on challenging math benchmarks.

What Problem Does This Paper Address?

Modern large reasoning models (like OpenAI's o1 or DeepSeek-R1) achieve state-of-the-art performance by scaling test-time compute through extended chain-of-thought (CoT) sequences. However, this freedom often leads to "overthinking"—generating excessively verbose reasoning chains filled with redundant verification loops, even for simple problems. This verbosity incurs massive computational overhead and high inference costs.

Existing methods to curb overthinking typically impose hard external constraints (like rigid token limits or early-stopping mechanisms). Unfortunately, these approaches often disrupt the model's thinking process, truncate reasoning mid-thought, or fail to adapt flexibly to varying problem complexities. LAPO addresses this gap by teaching models to autonomously estimate and adhere to an appropriate reasoning depth based on the intrinsic difficulty of each problem.

Methods

LAPO introduces a two-stage reinforcement learning framework using Group Relative Policy Optimization (GRPO):

  1. Discovery Stage (LAPO-D): The model explores natural reasoning patterns by solving problems under a length-aware reward function. This reward penalizes deviations from a reasonable length range derived from the statistical distribution of successful rollouts. Through this, the framework maps each problem to its median successful solution length ($M(q)$).
  2. Internalization Stage (LAPO-I): To transform these patterns into an intrinsic capability, the problem prompt is augmented with a self-declarative statement placed immediately after the <think> token: "I will answer the question with $n$ tokens." (where $n = M(q)$). A Gaussian-inspired plan-adherence reward reinforces solutions that are both correct and closely align with this self-proposed budget.

Placing the budget inside the <think> block reframes it as part of the model's own cognitive plan rather than an external command, allowing the model to reason flexibly and efficiently at deployment without needing predefined length targets.

Figure 2: The LAPO framework consists of two stages: (1) Discovery stage learns natural reasoning patterns by rewarding efficient correct solutions and collecting length statistics; (2) Internalization stage embeds these statistics as self-proposed plans within the model’s reasoning context, teaching models to internalize efficient reasoning.

Datasets

  • Training: A mixed dataset of 10,000 mathematical problems, consisting of 6,000 examples from the DeepScaleR-Preview-Dataset and 4,000 intermediate-level problems from the MATH dataset.
  • Evaluation Benchmarks: Four challenging mathematical reasoning benchmarks: MATH-500, AIME2024, AMC23, and OlympiadBench.
  • Generalizability Testing: The GPQA benchmark (expert-level, knowledge-intensive, non-mathematical question answering).

Key Insights and Ideas

  • Genuine Internalization vs. Instruction Following: By embedding the length guidance inside the <think> block, the model genuinely internalizes resource allocation. When stress-tested with adversarial external prompts (e.g., forcing a "Short" or "Long" constraint), LAPO-trained models ignored the conflicting external instructions and maintained their stable, optimal reasoning lengths.
  • Selective Cognitive Pruning: Qualitative analysis revealed that LAPO does not blindly shorten responses. Instead, it dramatically curtails keywords associated with hesitant behaviors like "Self-Correction & Verification" (e.g., "But", "Wait") and "Exploration & Alternatives" (e.g., "Perhaps"), while keeping structural behaviors like "Context Setting" and "Conclusion Drawing" perfectly stable.
  • Emergent Difficulty-Aware Scaling: The trained models developed a near-linear positive correlation between problem complexity and reasoning length. Remarkably, for highly complex tasks like AIME, the models successfully extrapolated, generating reasoning chains substantially longer than any successful solution observed during training.

Key Results

LAPO achieves a superior Pareto frontier, operating in the highly desirable high-accuracy, low-token region of performance plots.

  • DeepScaleR-1.5B-Preview: LAPO-I reduced average token usage by 38.5% while boosting average accuracy by 2.3 percentage points.
  • DeepSeek-R1-1.5B: LAPO-I achieved a 41.0% token cut alongside a 1.2 percentage point accuracy gain.
  • Generalizability: On the non-mathematical GPQA benchmark, LAPO maintained or improved accuracy while slashing token generation by up to 26.2%, proving the skill is domain-agnostic.
Table 1: Main results on MATH500, AIME2024, AMC23, and OlympiadBench. We report Pass@1 accuracy (%) and the average number of generated tokens (#Tok). For each metric, bold indicates the best and underline indicates the second-best Pass@1 score within each base model group.

Limitations and Future Work

  • Context Window Constraints: Due to computational limitations during training, the maximum context length was restricted to 4,096 tokens. Evaluating how LAPO scales with much larger context windows remains an open direction.
  • Hyperparameter Optimization: The authors noted that they did not perform extensive hyperparameter tuning for the reward weights ($\alpha, \beta$) or the Gaussian variance ($\sigma$), suggesting that further optimization could yield even higher efficiency gains.
  • Scale and Domain Expansion: Future work includes validating LAPO on larger base models (e.g., 7B+ parameters) and expanding training to broader, multi-discipline reasoning tasks.

Summary updated

BibTeX
@misc{wu2025lapo,
  author = {Xingyu Wu and Yuchen Yan and Shangke Lyu and Linjuan Wu and Yiwen Qiu and Yongliang Shen and Weiming Lu and Jian Shao and Jun Xiao and Yueting Zhuang},
  title = {{LAPO: Internalizing Reasoning Efficiency via Length-Adaptive Policy Optimization}},
  year = {2025},
  eprint = {2507.15758},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.15758},
}
Figure