Hardware-Aware DNN Compression via Diverse Pruning and Mixed-Precision Quantization

Konstantinos Balaskas, Andreas Karatzas, Christos Sad, Kostas Siozios, Iraklis Anagnostopoulos, Georgios Zervakis, Jörg HenkelIEEE Trans. Emerg. Top. Comput 2023

Abstract

Deep Neural Networks (DNNs) face significant deployment challenges on resource-constrained edge devices due to high computational and energy demands. This paper presents an automated framework that optimizes DNNs through a simultaneous application of diverse pruning granularities and mixed-precision quantization. By utilizing a composite Reinforcement Learning (RL) agent, the framework achieves significant energy reductions without the need for costly retraining. Experimental results demonstrate an average energy saving of 39% with a minimal 1.7% accuracy degradation across various architectures and datasets.

Introduction

The increasing complexity of state-of-the-art DNNs has led to an "energy wall," hindering their deployment on mobile and IoT platforms. While compression techniques like pruning and quantization are common, they often require extensive retraining or fail to account for actual hardware energy consumption. Furthermore, existing methods typically apply a single pruning granularity, which may not be optimal for all network layers. There is a critical need for a "one-shot" compression approach that is both hardware-aware and flexible in its optimization strategies.

Methodology

The proposed framework treats DNN compression as a multi-objective search problem, optimized via a composite RL agent.

Diverse Pruning and Mixed-Precision

Unlike traditional methods, this framework selects from seven different pruning algorithms—ranging from fine-grained weight pruning to coarse-grained channel pruning—on a per-layer basis. Simultaneously, it assigns varying bit-widths (mixed-precision) to different layers, protecting sensitive layers while aggressively compressing others.

Composite RL Agent

The "brain" of the framework is a composite agent combining two RL architectures:

  1. Deep Deterministic Policy Gradient (DDPG): Manages continuous decision spaces, such as pruning ratios and quantization bit-widths.
  2. Rainbow: Handles discrete decisions, specifically the selection of the pruning algorithm for each layer.
System architecture showing the interaction between the composite RL agent and the hardware-in-the-loop environment.

Hardware-Aware Reward System

To ensure real-world efficiency, the agent receives feedback from a custom energy model based on the Eyeriss accelerator. A non-linear Look-Up Table (LUT) reward function incentivizes the agent to prioritize configurations that maintain high accuracy while maximizing energy gains. This "one-shot" execution identifies the optimal configuration and applies it immediately, bypassing the need for retraining cycles.

Results and Discussion

The framework was evaluated on CIFAR-10/100 and ImageNet datasets using architectures like VGG, ResNet, and MobileNetV2.

Energy-Accuracy Trade-offs

The system consistently outperformed state-of-the-art (SOTA) methods such as AMC and HAQ. On average, it achieved a 39% energy reduction with only a 1.7% drop in accuracy. Notably, for ResNet34 on CIFAR-100, the framework achieved a 51.07% energy gain with a mere 1.4% accuracy loss.

Energy reduction vs. accuracy loss, highlighting the superiority of mixed-precision over uniform precision.

The Granularity Paradox

A key finding was that optimal pruning granularity is model-dependent. For instance, MobileNetV2 showed high sensitivity to coarse-grained pruning but was resilient to fine-grained methods. The framework's ability to mix granularities allows it to exploit these layer-specific sensitivities, finding efficiencies that monolithic approaches miss.

Conclusion

This research demonstrates that a hardware-aware, multi-strategy approach to DNN compression can yield significant energy savings without the overhead of retraining. By combining diverse pruning and mixed-precision quantization through a composite RL agent, the framework provides a robust solution for deploying high-performance models on energy-constrained edge devices. Future work will focus on reducing the computational cost of the RL search and extending the framework to a broader range of hardware architectures.

Summary updated

BibTeX
@article{balaskas2023hardware,
  author = {Konstantinos Balaskas and Andreas Karatzas and Christos Sad and Kostas Siozios and Iraklis Anagnostopoulos and Georgios Zervakis and Jörg Henkel},
  title = {{Hardware-Aware DNN Compression via Diverse Pruning and Mixed-Precision Quantization}},
  journal = {IEEE Trans. Emerg. Top. Comput.},
  year = {2023},
}
Figure