Sliding-Window Merging for Compacting Patch-Redundant Layers in LLMs

Read full text
Authors: Association for Artificial Intelligence 2026, Xuan Ding, Suzhong Fu, Kaihao Huang, Angelica I. Avilés-Rivero, Rui Sun, Chuanlong Xie, Xiu Yan, Yunjian Zhang, Yueqi Zhou, Yao Zhu
Cited by: 0

Abstract

Depth-wise pruning accelerates LLM inference in resource-constrained scenarios but suffers from performance degradation due to indiscriminate removal of entire Transformer layers. This paper reveals ``Patch-Like'' redundancy across layers via correlation analysis of the outputs of different layers in reproducing kernel Hilbert space, demonstrating consecutive layers exhibit high functional similarity. Building on this observation, this paper proposes Sliding-Window Merging (SWM) - a dynamic compression method that selects consecutive layers from top to bottom using a pre-defined similarity threshold, and compacts patch-redundant layers through a parameter consolidation, thereby simplifying the model structure while maintaining its performance. Extensive experiments on LLMs with various architectures and different parameter scales show that our method outperforms existing pruning techniques in both zero-shot inference performance and retraining recovery quality after pruning. In particular, in the experiment with 35\% pruning on the Vicuna-7B model, our method achieved a 1.654\% improvement in average performance on zero-shot tasks compared to the existing method. Moreover, we further reveal the potential of combining depth pruning with width pruning to enhance the pruning effect.

Fields of Study & Subjects

Advanced Neural Network Applications Topic Modeling Domain Adaptation and Few-Shot Learning

Publication details

Journal / source
Underline Science Inc.
Publication date
7 January 2026
Language
EN