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

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

Abstract

Contrary to the common belief that unstructured pruning only reduces parameter counts without affecting network depth, this paper demonstrates that it can actually induce "layer collapse." By introducing a novel metric called neuron entropy, the authors show that magnitude-based pruning naturally drives layers toward linearity, allowing them to be removed entirely with minimal performance loss. We present NEPENTHE (eNtropy-basEd Pruning as a nEural Network depTH’s rEducer), which strategically reallocates pruning budgets to low-entropy layers to facilitate depth reduction.

Introduction

Deep Neural Networks (DNNs) are notoriously resource-hungry, often requiring billions of operations for a single prediction. While unstructured pruning (removing individual weights) is a popular way to compress models, it usually doesn't speed up inference on modern hardware like GPUs because the "computational critical path"—the number of layers the data must pass through—remains unchanged.

To truly speed up models on hardware, researchers usually turn to structured pruning (removing entire filters or layers). However, structured pruning often degrades accuracy more quickly than unstructured methods. This research investigates whether the "fine-grained" removal of weights can be guided to eventually collapse entire layers, effectively shortening the network's depth.

Overview of the NEPENTHE process: pruning leads to reduced neuron entropy and eventual layer collapse.

Methods: Neuron Entropy and NEPENTHE

The core of the paper is the introduction of Neuron Entropy. For networks using rectifier activations (like ReLU), a neuron can be in one of three states:

  1. ON: Acting linearly.
  2. OFF: Outputting zero.
  3. Zero: A special case of being exactly at the boundary.

The authors define entropy based on how often a neuron switches between these states across a dataset. A neuron that is always "ON" or always "OFF" has zero entropy and is effectively linear or dead.

Statistical basis of entropy reduction: (a) weight distribution under pruning, (b) resulting probability density of activations, and (c) the decrease in entropy $H(t)$ as pruning threshold $t$ increases.

The NEPENTHE algorithm operates in three main stages:

  • Measures Entropy: It calculates the average neuron entropy for every layer.
  • Reallocates Pruning Budget: It strategically prunes more weights from layers that already have low entropy.
  • Induces Collapse: By pushing these low-entropy layers toward zero entropy, the layers become "linearizable." Once a layer is purely linear, it can be mathematically merged into the next layer, reducing the total depth of the network.

Experimental Evaluation

The authors validated their approach across a wide range of tasks and architectures, including Computer Vision (ResNet, MobileNet-V2, Swin Transformer), Natural Language Processing (BERT, RoBERTa), and Large Language Models (Llama 3.1-8B).

Key Results

NEPENTHE achieved significant depth reduction across various models:

  • MobileNet-V2 on Tiny-ImageNet: Removed 12 out of 35 layers while actually increasing top-1 accuracy by 2%.
  • ResNet-18 on CIFAR-10: Collapsed 3 out of 17 layers with a slight accuracy boost (+0.89%).
  • NLP Models: For BERT and RoBERTa, the method successfully removed 3 to 4 layers while maintaining performance comparable to the dense baseline.
  • Hardware Efficiency: On an NVIDIA A4500 GPU, collapsing 5 layers in a ResNet-18 resulted in a 21% reduction in inference time and a 74% reduction in memory usage.
  • LLM Scaling: Even on a massive model like Llama 3.1-8B, NEPENTHE removed 11 layers without any fine-tuning, though this did come with a significant performance trade-off.

Discussion and Insights

A surprising finding is that standard magnitude pruning naturally reduces neuron entropy. Even without special guidance, pruning individual weights tends to make layers more linear. A layer with zero entropy isn't just "sparse"; it's a linear transformation. In a deep network, two consecutive linear layers are mathematically equivalent to a single layer. This is the "collapse" that allows for depth reduction.

The authors found that layers near the end of the network often have the lowest entropy, typically capturing task-specific features that are more redundant than the general features found in early layers. Furthermore, pruning with NEPENTHE leads to "flatter" loss landscapes (lower Hessian eigenvalues), which is generally associated with better generalization and robustness.

Limitations

While effective, NEPENTHE relies on iterative pruning and retraining cycles, which can be computationally expensive for very large models. Additionally, the current theoretical framework is primarily built around ReLU and its variants; while it works for GELU and SiLU, the error bounds for these "smooth" rectifiers are approximations. Future work will explore reducing iteration costs to make the method more practical for foundation-scale models.

Summary updated

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