Skip to main content
QUICK REVIEW

[Paper Review] DepthShrinker: A New Compression Paradigm Towards Boosting Real-Hardware Efficiency of Compact Neural Networks

Yonggan Fu, Haichuan Yang|arXiv (Cornell University)|Jun 2, 2022
Advanced Neural Network ApplicationsComputer Science7 citations
TL;DR

DepthShrinker proposes a novel compression paradigm that enhances real-hardware efficiency of compact neural networks by merging consecutive layers—specifically, depthwise and pointwise convolutions in inverted residual blocks—into single dense convolutions after identifying and removing non-essential activation functions. This approach boosts hardware utilization and throughput by up to 1.53× on Tesla V100 while improving accuracy by 3.06% over state-of-the-art channel pruning methods.

ABSTRACT

Efficient deep neural network (DNN) models equipped with compact operators (e.g., depthwise convolutions) have shown great potential in reducing DNNs' theoretical complexity (e.g., the total number of weights/operations) while maintaining a decent model accuracy. However, existing efficient DNNs are still limited in fulfilling their promise in boosting real-hardware efficiency, due to their commonly adopted compact operators' low hardware utilization. In this work, we open up a new compression paradigm for developing real-hardware efficient DNNs, leading to boosted hardware efficiency while maintaining model accuracy. Interestingly, we observe that while some DNN layers' activation functions help DNNs' training optimization and achievable accuracy, they can be properly removed after training without compromising the model accuracy. Inspired by this observation, we propose a framework dubbed DepthShrinker, which develops hardware-friendly compact networks via shrinking the basic building blocks of existing efficient DNNs that feature irregular computation patterns into dense ones with much improved hardware utilization and thus real-hardware efficiency. Excitingly, our DepthShrinker framework delivers hardware-friendly compact networks that outperform both state-of-the-art efficient DNNs and compression techniques, e.g., a 3.06% higher accuracy and 1.53$ imes$ throughput on Tesla V100 over SOTA channel-wise pruning method MetaPruning. Our codes are available at: https://github.com/facebookresearch/DepthShrinker.

Motivation & Objective

  • To address the gap between theoretical efficiency and real-hardware efficiency in compact DNNs, which stems from low hardware utilization of irregular operations like depthwise convolutions.
  • To explore whether activation functions in efficient DNN blocks can be removed post-training without sacrificing accuracy, enabling layer merging.
  • To develop a new compression paradigm that improves hardware utilization by transforming irregular, low-utilization operations into dense, highly parallelizable layers.
  • To achieve both high model accuracy and superior hardware efficiency, outperforming existing pruning and compression techniques.
  • To demonstrate generalizability across diverse hardware platforms, including GPUs, edge devices, and CPUs.

Proposed method

  • Identify and remove activation functions from intermediate layers in efficient DNN blocks (e.g., inverted residuals) that are found to be non-essential for inference accuracy.
  • Merge the remaining linear operations—pointwise and depthwise convolutions—into a single, dense convolution with equivalent kernel size and channel dimensions.
  • Use a differentiable search mechanism to automatically identify which activation functions can be safely removed during training.
  • Apply an 'Expand-Then-Shrink' strategy to enhance training stability by first expanding the network with free activation functions before pruning them via the DepthShrinker process.
  • Convert the resulting models into ONNX and TFLite formats for evaluation on CPU-based edge devices like Pixel 3 and Raspberry Pi 4.
  • Leverage the improved data reuse and parallelism of dense convolutions to maximize hardware utilization on modern accelerators.

Experimental results

Research questions

  • RQ1Can activation functions in efficient DNN blocks be removed post-training without degrading model accuracy?
  • RQ2Can merging consecutive linear layers (e.g., depthwise and pointwise convolutions) into a single dense layer improve hardware utilization and real-world inference speed?
  • RQ3Does the proposed DepthShrinker framework outperform existing channel-wise and layer-wise pruning methods in both accuracy and throughput?
  • RQ4Can the DepthShrinker approach be generalized across diverse hardware platforms, including CPUs and edge devices?
  • RQ5Does the 'Expand-Then-Shrink' training strategy enhance the performance of compact models like MobileNetV2 and VGG11?

Key findings

  • DepthShrinker achieves 1.53× higher throughput and 3.06% higher top-1 accuracy on Tesla V100 compared to the SOTA channel-wise pruning method MetaPruning.
  • On the RTX 2080Ti GPU, DepthShrinker outperforms random search baselines by 4.30–5.46% in accuracy and 1.19–1.24× in throughput.
  • On CPU devices, DepthShrinker reduces latency by up to 43.1% on Raspberry Pi 4 and 38.4% on Google Pixel 3, with comparable accuracy.
  • The 'Expand-Then-Shrink' strategy boosts accuracy by 1.26–1.62% across VGG11, VGG13, MCUNet, and MobileNetV2 on ImageNet.
  • The method consistently improves hardware efficiency across diverse platforms, including GPUs, edge GPUs, and mobile CPUs, due to enhanced data reuse and parallelism in dense convolutions.
  • Experiments confirm that removing certain activation functions does not harm accuracy, enabling safe merging of layers into dense operations.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.