Manuscript Offprint

arXiv:2610.25679

LOOP: Recovery-Aligned Iterative Layer Pruning via On-Policy Distillation

Liang Xu, Shufan Shen, Zhongni Hou, Yufei Zhang, Wei Lin, Guojun Yin, Shuhui Wang

Abstract

Layer-level pruning is attractive for large language model (LLM) deployment as it reduces the model size while preserving a dense architecture that can be efficiently executed on standard hardware. Current methods typically follow a one-shot paradigm, which first removes selected layers to reach a target model size and then performs additional training to recover model capabilities. However, pruning directly to the target size can substantially degrade reasoning capabilities, making subsequent recovery more difficult under a limited training budget. Moreover, this paradigm separates layer selection from recovery, limiting the use of recovery information to guide selection and potentially hindering the recovery of reasoning capabilities. To address these limitations, we propose LOOP, a Layer-level Recovery-Oriented On-Policy Pruning framework that interleaves pruning and recovery across multiple shots. In each shot, LOOP removes a single layer and performs short on-policy distillation, mitigating the abrupt degradation in reasoning capabilities associated with one-shot pruning. To guide layer selection in subsequent shots, LOOP reuses on-policy trajectories and optimization signals from recovery to jointly assess each remaining layer's reasoning contribution and recovery sensitivity, thereby making layer selection recovery-aware. Evaluations on several benchmarks show that LOOP consistently outperforms one-shot baselines in average accuracy across different model scales and pruning ratios.

Contact: xuliang23z@ict.ac.cn, wangshuhui@ict.ac.cn

1 Introduction

Large language models (LLMs) (Kaplan et al., 2020; OpenAI, 2023, 2026) have achieved remarkable capabilities through scaling. However, their increasing memory consumption and computational cost create substantial challenges for efficient deployment. These deployment challenges have motivated extensive research into model compression, including quantization (Yan et al., 2026), knowledge distillation (Shin et al., 2026), low-rank decomposition (Zhou et al., 2026; Xu et al., 2026), and pruning (Yang et al., 2026). These approaches reduce memory and computational requirements from different perspectives.

Among these approaches, layer-level pruning removes entire Transformer layers, producing a smaller, shallower model while preserving the remaining network's dense structure (Zhu et al., 2024). The resulting model can be efficiently executed on standard hardware using conventional dense computation libraries (Kim et al., 2024; Yang et al., 2024). Together, these properties make layer-level pruning a practical approach for reducing inference cost and memory usage while requiring only minimal changes to the existing model architecture and deployment stack.

Current layer-level pruning methods usually follow a one-shot paradigm that separates compression into two sequential stages: pruning and recovery. In this paradigm, layers are typically selected based on importance scores estimated on a calibration prompt set, for example, using changes in representations (Men et al., 2025). The selected layers are then removed together to reach the target model size. In the recovery stage, the pruned model undergoes additional training to recover reasoning performance (Muralidharan et al., 2024). Despite its practical advantages, layer-level pruning can introduce errors that propagate through subsequent steps of multi-step reasoning. The one-shot paradigm poses two key challenges to preserving such reasoning capabilities. First, pruning directly to the target size can substantially degrade reasoning performance and induce a large distributional shift in model predictions. As a result, subsequent recovery starts from a more degraded state, making it harder to restore the lost reasoning capabilities. Second, one-shot pruning finalizes layer selection before recovery begins. As a result, the importance scores used for pruning may not fully reflect each layer's role in the recovery process. In particular, scores computed on calibration prompts may fail to capture a layer's contribution along the complete on-policy trajectories encountered during recovery training. Moreover, criteria that measure only the immediate effect of removing a layer do not directly reflect its influence on the recovery objective. Such criteria may therefore overlook layers that are important for effective recovery. These limitations highlight the need to limit reasoning degradation during pruning while accounting for each layer's role in subsequent recovery.

To address these limitations, we propose LOOP, a Layer-level Recovery-Oriented On-Policy Pruning framework that interleaves pruning and recovery over multiple shots to preserve reasoning capabilities during compression. First, to mitigate the severe capability degradation caused by pruning directly to the target size, LOOP adopts an iterative pruning-and-recovery process that distributes layer removal across multiple shots. In each shot, LOOP removes a single layer and performs a short phase of on-policy recovery. The recovered model serves as the starting point for the next shot, where the remaining layers are re-evaluated before the next pruning decision. This process continues until the target model size is reached. By allowing the model to adapt after each layer removal, LOOP mitigates the abrupt degradation in reasoning capabilities associated with one-shot pruning and supports recovery throughout compression. Second, to better reflect each layer's role in subsequent recovery, LOOP combines two complementary importance signals: reasoning contribution and recovery sensitivity. Reasoning contribution captures a layer's importance to the reasoning process, while recovery sensitivity reflects its influence on the recovery objective. For reasoning contribution, LOOP measures the representational changes induced by each remaining layer. The measurement is performed over complete on-policy trajectories generated by the current model during recovery. For recovery sensitivity, LOOP uses gradient information produced during recovery training. The gradients are used to estimate how strongly the recovery loss depends on each remaining layer, thereby reflecting its influence on the recovery objective. These two signals are combined into a recovery-oriented importance score, which is updated after each recovery stage to guide layer selection. Together, these designs enable progressive pruning and recovery while incorporating both reasoning contribution and recovery sensitivity into layer selection.

Extensive experiments on mathematical and scientific reasoning benchmarks demonstrate the effectiveness of LOOP across different pruning ratios and model scales. On Qwen3-4B-Instruct, LOOP outperforms the strongest evaluated one-shot baseline by 7.37, 9.10, and 6.34 percentage points in average mathematical reasoning accuracy at pruning ratios of 15%, 20%, and 25%, respectively. At a 20% layer pruning ratio, LOOP consistently outperforms the baselines on Qwen3 models ranging from 1.7B to 8B parameters. LOOP also achieves higher average accuracy than the baseline on scientific reasoning benchmarks across all evaluated pruning ratios, suggesting that the effectiveness of LOOP extends beyond mathematical reasoning. Further analyses show that both iterative pruning and recovery-oriented layer selection contribute to the performance gains of LOOP.

References (47)