Layer Collapse Can be Induced by Unstructured Pruning

Zhu Liao, Victor Quétu, Van-Tam Nguyen, Enzo Tartaglione

TL;DR

It is widely assumed that unstructured pruning only creates sparse weight matrices and cannot shorten a neural network’s computational critical path. This paper challenges that assumption by proving that unstructured magnitude pruning naturally drives rectifier activations into purely linear or inactive states (zero entropy). Building on this insight, the authors introduce NEPENTHE, a method that guides unstructured pruning to safely collapse and remove entire layers without hurting accuracy.

What Problem Does This Paper Address?

Deep neural network compression generally falls into two camps:

  1. Structured pruning: Removes whole filters, channels, or layers. It provides immediate hardware speedups on standard GPUs by shortening depth or width, but it often degrades predictive accuracy quickly.
  2. Unstructured pruning: Removes individual weights based on magnitude. It achieves high sparsity with minimal accuracy loss, but irregular sparse matrices rarely yield inference speedups on GPUs due to kernel overhead and memory bottlenecks.

The forward-propagation bottleneck on modern accelerators is the critical path—the sequential depth of layers a signal must traverse. Conventional wisdom holds that unstructured pruning cannot shorten this path. The authors ask: Can unstructured pruning induce structural collapse and shorten network depth?

Methods

  • Neuron & Layer Activation Entropy: For any rectifier activation (e.g., ReLU), a neuron essentially operates in an ON state ($z > 0$, linear regime) or an OFF state ($z < 0$, zero/suppressed regime). The authors define the frequentist entropy $H_{l,i}$ of each neuron's state transitions over the dataset. When a neuron’s entropy drops to zero, it is either dead (always OFF) and can be pruned, or strictly linear (always ON) and can be folded directly into the subsequent layer via matrix composition: $$W_{l+1}(W_l x) = (W_{l+1}W_l)x$$ A layer's average neuron entropy $\widehat{H}_l$ serves as an empirical proxy for layer linearizability.

  • Theoretical Mechanism: Assuming Gaussian-distributed inputs and weights, the authors show that magnitude thresholding narrows the pre-activation distribution, naturally driving activation entropy downward toward zero.

  • NEPENTHE Framework: An iterative pruning algorithm that:
  • Computes an intra-layer irrelevance score $I_l = \frac{\|w_l\|_1}{\|w_l\|_0} \cdot \widehat{H}_l$, prioritizing layers that combine lower entropy and smaller parameter norms.
  • Dynamically allocates the unstructured pruning budget toward these low-entropy layers using an inter-layer score $R_l \propto 1/I_l$.
  • Once a layer's average entropy hits zero, the layer is excised from the computational graph, physically reducing network depth.

Datasets

The authors evaluate their method across standard computer vision and NLP benchmarks (no new datasets were introduced):

  • Image Classification & Domain Generalization: CIFAR-10, Tiny-ImageNet, ImageNet, PACS, VLCS, and SVIRO.
  • Natural Language Understanding (GLUE benchmark): SST-2, QNLI, and RTE.
  • LLM Evaluation: MMLU (High school US history subset) evaluated on Llama 3.1-8B.

Key Insights and Ideas

  • Unstructured pruning is an implicit depth regularizer: Pruning small weights naturally reduces variance and concentrates activations into single regimes, causing non-linearities to collapse into linear maps without explicit structural penalties.
  • Information reallocation: Unlike standard Iterative Magnitude Pruning (IMP), which scatters sparsity evenly, NEPENTHE pushes information out of redundant layers into high-entropy layers, driving target layers all the way to zero entropy.
  • Loss landscape flattening: By measuring the maximum Hessian eigenvalue, the authors find that NEPENTHE significantly flattens the model's loss landscape sharpness (e.g., from 20.62 down to 1.17–1.72 on Swin-T), which explains why the pruned and shallower models often generalize better than the dense originals.
  • Actual hardware gains: Rather than relying on sparse matrix multiplication kernels (which suffer from fill-in when composed), zero-entropy layers are deleted from the computational graph, directly cutting GPU kernel launches, memory traffic, and activation caching.

Key Results

  • ResNet-18 on CIFAR-10: NEPENTHE removes 3 out of 17 layers while improving top-1 accuracy from 91.66% to 92.55%. On an NVIDIA A4500, this reduces latency from 3.32 ms to 2.96 ms and peak memory usage from 230 MB to 170 MB.
  • MobileNet-V2 on Tiny-ImageNet: Successfully collapses 12 out of 35 layers, improving top-1 accuracy from 45.86% to 47.92%.
  • Deep ResNets: On CIFAR-10, NEPENTHE prunes 16/49 layers on ResNet-50 (top-1 increases from 87.37% to 89.06%) and 82/151 layers on ResNet-152 (85.61% to 89.20%).
  • Vision Transformers & NLP: Successfully removes 2/12 layers in Swin-T on CIFAR-10 (91.54% $\to$ 92.29%) and up to 4/12 layers in BERT on QNLI and RTE.
  • Zero-shot Layer Removal in LLMs: Applied to Llama 3.1-8B without fine-tuning, NEPENTHE safely eliminates 7 out of 32 transformer layers on MMLU while maintaining a test accuracy of 35.08% (compared to the 33.82% dense baseline).

Limitations and Future Work

  • Theoretical Scope: The closed-form mathematical proof assumes strict piecewise-linear ReLU activations. While the authors bound the approximation error for smooth rectifiers (GELU, SiLU), the core derivation relies on approximations.
  • First-Order Proxy: Layer entropy $\widehat{H}_l$ is computed as the average of individual neuron entropies, serving as a scalable heuristic rather than calculating the true joint entropy of layer activation vectors.
  • Compute Overhead: The iterative pruning-and-retraining loop is computationally intensive, limiting exhaustive end-to-end retraining on massive multi-billion-parameter foundation models. Future work will investigate low-cost, one-shot strategies to accelerate layer collapse.

Summary updated

BibTeX
@article{liao2025layer,
  author = {Zhu LIAO and Victor Quétu and Van-Tam Nguyen and Enzo Tartaglione},
  title = {{Layer Collapse Can be Induced by Unstructured Pruning}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=rfDYZNZIZT},
}
Figure