NEPENTHE: Entropy-Based Pruning as a Neural Network Depth's Reducer

Zhu Liao, Victor Quétu, Van-Tam Nguyen, Enzo TartaglioneSubmission to ICLR 2025 · Withdrawn

TL;DR

While standard neural network pruning trims parameters or channels to make models narrower, modern GPU latency is bottlenecked by network depth—the sequential "critical path" of forward propagation. NEPENTHE leverages the theoretical insight that unstructured magnitude pruning naturally drives rectifier activation entropy toward zero. By adaptively allocating the pruning budget to low-entropy layers, it completely collapses non-linearities in redundant layers, allowing entire layers to be folded or removed with negligible performance loss.

What Problem Does This Paper Address?

Modern deep neural networks are often heavily over-parameterized when applied to downstream tasks. Traditional compression focuses on pruning weights or entire channels (structured pruning). However, because modern GPUs execute wide matrix operations in parallel, cutting layer width often yields diminishing returns on runtime latency.

The real performance bottleneck is often network depth—the number of sequential layer computations that must be executed in order. Existing depth-reduction techniques (like layer folding or teacher-student distillation) often enforce fixed target architectures, cause substantial performance degradation when multiple layers are removed, or require non-trivial architectural surgery during training.

Methods

NEPENTHE (eNtropy-basEd Pruning as a nEural Network depTH’s rEducer) systematically identifies and eliminates whole layers via targeted iterative unstructured pruning:

  1. Neuron-Level Activation Entropy: For rectifier activations (such as ReLU, GELU, SiLU), a neuron operates primarily in two states across an input distribution: an ON (linear) state or an OFF (inactive/zero) state. The authors compute each neuron’s entropy $H_{l,i}$ based on the empirical probabilities of occupying these states. When a neuron's entropy drops to zero, it is either dead (permanently OFF, hence prunable) or fully linear (permanently ON, meaning its activation function can be eliminated and the layer folded into adjacent linear operations).
  2. Entropy Reduction via Sparsity: The authors theoretically demonstrate that unstructured magnitude pruning naturally compresses the pre-activation distribution, inherently driving activation entropy downward.
  3. Entropy-Weighted Pruning Budget: Rather than applying uniform pruning across the network, NEPENTHE defines an intra-layer irrelevance score $I_l$ (factoring both average weight magnitude and layer entropy) and an inter-layer relevance score $R_l$. Pruning iterations disproportionately target layers that are already close to zero entropy.
  4. Iterative Layer Removal: Once all neurons in a layer reach zero entropy ($\hat{H}_l = 0$), the layer is linearized and merged or completely dropped, reducing the architectural depth.

Datasets

The authors evaluated NEPENTHE across both vision and natural language processing tasks:

  • Computer Vision: CIFAR-10, Tiny-ImageNet, PACS, VLCS, and SVIRO (from DomainBed); ResNet-18 on ImageNet is discussed in the appendix.
  • Natural Language Processing: SST-2, QNLI, and RTE from the GLUE benchmark.
  • Note: No new datasets were introduced; standard public benchmarks were used.

Key Insights and Ideas

  • Unstructured pruning naturally drives linearity: Conventional wisdom treats unstructured pruning simply as a way to zero out weights. Here, the authors show that pruning forces activations into extremes—either permanently OFF or permanently ON.
  • Closing the "last mile" to zero entropy: Standard iterative magnitude pruning (IMP) lowers layer entropy, but usually plateaus at intermediate values where layers remain non-linear. NEPENTHE actively reallocates the pruning budget to "finish off" near-zero layers, converting them into purely linear, collapsible blocks.
  • Where redundant layers sit: Unlike gradient- or weight-norm-based layer removal methods (which preferentially drop input layers because of smaller absolute weight counts), NEPENTHE removes layers closer to the network output, matching where representations naturally stabilize and require less non-linear capacity.

Key Results

  • ResNet-18 (CIFAR-10): Removed 3 out of 17 layers while actually improving accuracy over the dense baseline (92.55% vs. 91.66%). Inference time decreased from 3.32 ms to 2.96 ms, memory usage dropped from 230 MB to 170 MB, and FLOPs decreased from 725.47M to 231.79M.
  • MobileNet-V2 (CIFAR-10 & Tiny-ImageNet): Successfully removed 7 out of 35 layers on CIFAR-10 (retaining 93.26% vs. 93.68%) and 12 out of 35 layers on Tiny-ImageNet while maintaining 47.92% vs. 45.86%.
  • Vision Transformers & NLP:
  • On Swin-T, NEPENTHE pruned 2 out of 12 layers on CIFAR-10 (92.29% top-1) with virtually no loss.
  • On BERT and RoBERTa, it removed between 1 and 4 layers across QNLI, RTE, and SST-2 while remaining within ~1–3% of dense baseline performance.
  • Activation Agnostic: Validated across ReLU, SiLU, PReLU, LeakyReLU, and GELU, consistently pruning 3 layers on ResNet-18 without accuracy degradation.

Limitations and Future Work

  • Iterative Retraining Overhead: Because it relies on iterative prune-and-retrain cycles, the approach requires substantial wall-clock training time.
  • Non-Differentiable Metric: Because the entropy metric relies on step-like activation counts, it cannot be added directly as a differentiable penalty into end-to-end one-shot loss optimization.
  • Extension to Large Language Models (LLMs): Due to compute constraints, full iterative retraining was not run on massive autoregressive LLMs. A preliminary lightweight variant (NEPENTHE-finetuning) tested on smaller models showed feasibility, but removed fewer layers than the full iterative retraining protocol. Scaling to foundation models remains an open direction.

Summary updated

Abstract

While deep neural networks are highly effective at solving complex tasks, their computational demands can hinder their usefulness in real-time applications and with limited-resources systems. Besides, it is a known fact that, for many downstream tasks, off-the-shelf models are over-parametrized. While classical structured pruning can reduce the network's width, the computation's critical path, namely the maximum number of layers encountered at forward propagation, apparently can not be reduced. In this paper, we aim to reduce the depth of over-parametrized deep neural networks: we propose an e**N**tropy-bas**E**d **P**runing as a n**E**ural **N**etwork dep**TH**'s r**E**ducer (NEPENTHE) to alleviate deep neural networks' computational burden. Based on our theoretical finding, NEPENTHE leverages "unstructured'' pruning to bias sparsity enhancement in layers with low entropy to remove them entirely. We validate our approach on popular architectures such as MobileNet, Swin-T and RoBERTa, showing that, when in the overparametrization regime, some layers are linearizable (hence reducing the model's depth) with little to no performance loss. The code will be publicly available upon acceptance of the article.
BibTeX
@article{liao2025nepenthe,
  author = {Zhu LIAO and Victor Quétu and Van-Tam Nguyen and Enzo Tartaglione},
  title = {{NEPENTHE: Entropy-Based Pruning as a Neural Network Depth's Reducer}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=rfDYZNZIZT},
}
Figure