LayerMerge: Neural Network Depth Compression through Layer Pruning and Merging
Jinuk Kim, Marwa El Halabi, Mingi Ji, Hyun Oh Song
Abstract
Recent works show that reducing the number of layers in a convolutional neural network can enhance efficiency while maintaining the performance of the network. Existing depth compression methods remove redundant non-linear activation functions and merge the consecutive convolution layers into a single layer. However, these methods suffer from a critical drawback; the kernel size of the merged layers becomes larger, significantly undermining the latency reduction gained from reducing the depth of the network. We show that this problem can be addressed by jointly pruning convolution layers and activation functions. To this end, we propose LayerMerge, a novel depth compression method that selects which activation layers and convolution layers to remove, to achieve a desired inference speedup while minimizing performance loss. Since the corresponding selection problem involves an exponential search space, we formulate a novel surrogate optimization problem and efficiently solve it via dynamic programming. Empirical results demonstrate that our method consistently outperforms existing depth compression and layer pruning methods on various network architectures, both on image classification and generation tasks. We release the code at https:// github.com/snu-mllab/LayerMerge .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext af5caafa-dd2f-4e5b-8b0e-0c9c1e69eeb2Cited by top-tier papers4
- HierarchicalPrune: Position-Aware Compression for Large-Scale Diffusion ModelsYoung D. Kwon, Rui Li, Sijia Li, Da Li et al.AAAI 2026 · 5 citations
- FastFLUX: Pruning FLUX with Block-wise Replacement and Sandwich TrainingFuhan Cai, Yong Guo, Jie Li, Wenbo Li et al.AAAI 2026 · 2 citations
- Transformer Block Coupling and its Correlation with Generalization in LLMsMurdock Aubry, Haoming Meng, Anton Sugolov, Vardan PapyanICLR 2025
- NanoFLUX: Distillation-Driven Compression of Large Text-to-Image Generation Models for Mobile DevicesRuchika Chavhan, Malcolm Chadwick, Alberto Gil Couto Pimentel Ramos, Luca Morreale et al.ICML 2026
Builds on13
- Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 citations
- Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 citations
- A ConvNet for the 2020sZhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer et al.CVPR 2022 · 6,782 citations
- Improved Denoising Diffusion Probabilistic ModelsAlexander Quinn Nichol, Prafulla DhariwalICML 2021 · 5,234 citations
- MetaPruning: Meta Learning for Automatic Neural Network Channel PruningZechun Liu, Haoyuan Mu, Xiangyu Zhang, Zichao Guo et al.ICCV 2019 · 633 citations
Related papers
- Efficient Latency-Aware CNN Depth Compression via Two-Stage Dynamic ProgrammingJinuk Kim, Yeonwoo Jeong, Deokjae Lee, Hyun Oh SongICML 2023 · 1 citation
- Neuron Merging: Compensating for Pruned NeuronsWoojeong Kim, Suhyun Kim, Mincheol Park, Geunseok JeonNeurIPS 2020 · 42 citations
- Convolutional Neural Network Pruning With Structural Redundancy ReductionZi Wang, Chengcheng Li, Xiangyang WangCVPR 2021
- Automatic Neural Network Compression by Sparsity-Quantization Joint Learning: A Constrained Optimization-Based ApproachHaichuan Yang, Shupeng Gui, Yuhao Zhu, Ji LiuCVPR 2020
- GPTailor: Large Language Model Pruning Through Layer Cutting and StitchingGuinan Su, Li Shen, Lu Yin, Shiwei Liu et al.ICLR 2026 · 3 citations
