NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Instance-wise Sparsity for Accelerating Deep Models

Chuanjian Liu, Yunhe Wang, Kai Han, Chunjing Xu, Chang Xu

Introduction

Deep convolutional neural networks (CNNs) have revolutionized computer vision but remain computationally expensive, hindering deployment on resource-constrained edge devices. Traditional acceleration methods, such as static weight pruning or quantization, apply a uniform compression strategy across all inputs. However, visual data is inherently variable; a simple image of a bird against a clear sky requires significantly less processing than a complex, cluttered street scene.

This paper proposes a dynamic, instance-wise feature pruning framework. By shifting the focus from static weights to dynamic activations, the model learns to drop redundant feature channels at runtime based on the complexity of the specific input, optimizing computation without substantial loss in accuracy.

Methodology

The proposed approach involves two main phases: training with feature decay and dynamic inference.

Feature Decay Regularization

During training, the authors apply an $\ell_{2,1}$-norm regularization directly to the intermediate feature maps ($F_l$). This "feature decay" encourages the network to produce sparse activations across different training instances, effectively polarizing the importance of various channels.

Dynamic Pruning at Inference

At runtime, the network dynamically determines which channels to compute for each specific input. The process follows a structured decision logic:

  1. Norm Calculation: The $\ell_2$-norm of each channel's feature map is calculated.
  2. Coefficient of Variation (CV): The model computes the CV for each layer, measuring the dispersion of these norms. A high CV indicates that only a few channels are critical for that specific input.
  3. Pruning Decision: If a layer's CV exceeds a threshold ($\alpha$), it is flagged for pruning. Channels within these layers whose $\ell_2$-norm falls below a dynamic threshold ($\beta \times \text{mean norm}$) are zeroed out ($F_l^i = 0$). Only the surviving channels are passed to subsequent layers.
The dynamic pruning test procedure during inference.

Experimental Results

The method was evaluated on CIFAR-10 and ImageNet (ILSVRC2012) using architectures like VGG16, ResNet-18, and MobileNet-V2.

  • CIFAR-10: On VGG16, the model achieved 93.3% accuracy while dynamically pruning 45.1% of channels (baseline: 94.2% accuracy with 0% pruning).
  • ImageNet: Even on the highly optimized MobileNet-V2, the method maintained 69.2% accuracy while dropping 47.5% of channels (baseline: 70.6%).

Compared to other dynamic methods like Channel Gating and LCCL, this approach offers a superior trade-off between error rate and floating-point operations (FLOPs). For instance, VGG16 achieved a 6.61% error rate with only $1.84 \times 10^8$ FLOPs.

Discussion and Insights

The study reveals several key characteristics of instance-wise sparsity:

  • Dynamic Complexity: The network naturally allocates more resources to "hard" images (complex textures) and fewer to "easy" images (clean backgrounds).
  • Layer-wise Semantics: Lower layers (edges/textures) tend to drop similar channels across categories, whereas higher layers (semantic features) show category-specific pruning patterns.
  • Complementary Nature: Since this method operates on feature maps rather than weights, it is fully compatible with existing static compression techniques like weight pruning or quantization.

While this approach significantly reduces runtime FLOPs and memory access, it does not reduce the static disk footprint of the model. Future research will focus on combining dynamic and static pruning to achieve even higher efficiency.

Summary updated

BibTeX
@inproceedings{liu2019learning,
  author = {Chuanjian Liu and Yunhe Wang and Kai Han and Chunjing Xu and Chang Xu},
  title = {{Learning Instance-wise Sparsity for Accelerating Deep Models}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/416},
}
Figure