SeerNet: Predicting Convolutional Neural Network Feature-Map Sparsity Through Low-Bit Quantization.

Shijie Cao, Lingxiao Ma, Wencong Xiao, Chen Zhang, Yunxin Liu, Lintao Zhang, Lanshun Nie, Zhi YangCVPR 2019 · DOI

Introduction

Deep learning models are computationally intensive, posing significant challenges for deployment on edge devices and in low-latency environments. While weight sparsity (pruning) is a well-studied optimization, feature-map sparsity—the phenomenon where a large percentage of values in a feature map become zero after activation layers like ReLU—remains underutilized. Unlike static weight pruning, feature-map sparsity is dynamic and depends entirely on the input data.

SeerNet introduces a novel, training-free framework that exploits this dynamic sparsity by using a low-bit "preview" to accurately predict which outputs will be zero before full-precision computation occurs. By skipping these unnecessary calculations, SeerNet achieves substantial speedups on standard CPUs with negligible impact on model accuracy.

The SeerNet Framework

The core of SeerNet is a two-stage execution pipeline for each convolutional layer, designed to minimize computational overhead while maintaining precision.

Overview of the SeerNet framework showing the two-stage execution: Quantized Prediction and Sparse Convolution.

1. Quantized Prediction

In the first stage, the input feature map and weights are compressed into a low-bit format (typically 4-bit). A "dequantization-free" integer convolution is then performed. Because activation functions like ReLU only require knowledge of a value's sign, and Max-pooling only requires identifying the largest value, the system can generate a binary sparsity mask without converting results back to floating-point values. This pass is accelerated using Intel’s AVX2 vector instructions to simulate low-bit hardware efficiency on standard CPUs.

2. Sparse Convolution (S-Conv)

The binary mask generated in the first stage acts as a guide for the second stage. The network performs a full-precision convolution only on the locations predicted to be non-zero. This targeted approach avoids the bulk of the floating-point operations typically required by dense layers.

Key Insights: Exploiting Dynamic Sparsity

Evaluation across various industry-standard architectures demonstrates that feature-map sparsity is a pervasive and exploitable characteristic of modern CNNs.

Sparse ratio across various popular CNN architectures, demonstrating substantial potential for computational savings.
  • Low Precision Sufficiency: 4-bit quantization serves as a "sweet spot," providing enough information to predict sparsity with approximately 96.5% accuracy while remaining extremely fast to compute.
  • The Impact of Max-Pooling: While ReLU naturally induces sparsity (often >50%), following it with Max-pooling causes sparsity to skyrocket, sometimes exceeding 80% in deeper layers of models like VGG16.
  • Training-Free Integration: Unlike methods requiring auxiliary networks, SeerNet works with off-the-shelf pre-trained models by simply quantizing existing weights, avoiding additional training overhead.

Performance and Results

SeerNet was tested on the CIFAR-10 and ImageNet (ILSVRC-2012) datasets using models such as VGG16, ResNet18/34, and InceptionV3.

  • Speedup: The framework achieved a 1.2x to 3.4x speedup on individual layers. For the full VGG16 model, it delivered a 40.1% wall-clock speedup on an Intel Xeon CPU.
  • Accuracy Preservation: The trade-off for this efficiency is remarkably low; top-1 accuracy on ImageNet dropped by only 0.18% to 0.42% across most tested models.
  • Efficiency Threshold: The total time for prediction and sparse convolution is significantly lower than standard dense convolution, provided the layer exhibits at least 60% sparsity.

Conclusion and Future Work

SeerNet demonstrates that low-bit quantization is a powerful tool for accelerating CNN inference by predicting dynamic feature-map sparsity. While current performance is constrained by the lack of native 4-bit arithmetic on commodity CPUs, the potential for even greater speedups on specialized hardware (like GPUs with INT4 support or FPGAs) is significant. Future work will focus on extending the framework to these platforms and further reducing the overhead of the prediction pass.

Summary updated

BibTeX
@inproceedings{cao2019seernet,
  author = {Shijie Cao and Lingxiao Ma and Wencong Xiao and Chen Zhang and Yunxin Liu and Lintao Zhang and Lanshun Nie and Zhi Yang},
  title = {{SeerNet: Predicting Convolutional Neural Network Feature-Map Sparsity Through Low-Bit Quantization.}},
  booktitle = {CVPR},
  year = {2019},
  doi = {10.1109/cvpr.2019.01147},
}
Figure