Design Automation for Efficient Deep Learning Computing

Song Han, Han Cai, Ligeng Zhu, Ji Lin, Kuan Wang, Zhijian Liu, Yujun LinarXiv 2019

Abstract

Efficient deep learning deployment on diverse hardware remains a significant challenge due to the vast design space and hardware-specific constraints. This paper presents a hardware-aware design automation framework that integrates hardware feedback directly into the optimization loop. By automating model specialization, channel pruning, and mixed-precision quantization, the proposed methods achieve up to a 200x reduction in design time while outperforming human-designed models in both speed and accuracy across various edge and cloud platforms.

Introduction

As deep learning applications transition from massive data centers to "the edge"—including mobile phones, IoT devices, and specialized AI chips—computational efficiency has become a paramount concern. Traditionally, human engineers have relied on trial-and-error heuristics to compress models through techniques such as pruning (removing redundant connections) and quantization (reducing numerical precision).

However, the design space for these optimizations is far too vast for manual exploration. Furthermore, hardware diversity complicates the process; an architecture optimized for a high-end GPU may perform poorly on a mobile CPU due to differences in memory bandwidth and parallelism. This research addresses these challenges by introducing hardware-aware design automation, where neural network algorithms and hardware constraints are co-optimized to achieve peak performance on specific target devices.

Methods: A Three-Pillar Approach

The proposed framework automates the design process through three integrated pillars, as illustrated in the overview below:

Overview of the design automation framework, including (a) Auto Model Specialization, (b) Auto Channel Pruning, and (c) Auto Mixed-Precision Quantization.
  1. Auto Model Specialization (ProxylessNAS): To avoid the prohibitive costs of traditional Neural Architecture Search (NAS), the authors utilize a "super network" containing all candidate paths. By employing path-level binarization, only one path remains active in memory during training, significantly reducing GPU overhead. A differentiable latency prediction model is integrated into the loss function, allowing the search to be fully hardware-aware.
  2. Auto Channel Pruning (AMC): This pillar utilizes a Reinforcement Learning (RL) agent to determine the optimal sparsity for each layer. The agent learns to balance model size and accuracy by receiving layer feature embeddings and outputting specific pruning actions.
  3. Auto Mixed-Precision Quantization (HAQ): Recognizing that different layers have varying sensitivities to precision, an actor-critic RL agent assigns bit-widths (1–8 bits) to weights and activations. The agent leverages direct feedback from hardware simulators to optimize for both latency and energy consumption.

Key Insights and Hardware Co-Design

A central theme of this work is "Reverse Specialization," the idea that neural network architectures should be tailored to the specific constraints of target hardware rather than the other way around. For instance, the automated search discovered that $7 \times 7$ filters, often avoided by human engineers to save computation, are actually more efficient on certain GPUs because they better utilize high parallelism compared to multiple small kernel calls.

Furthermore, the framework effectively navigates the Roofline Model of hardware performance. The RL agent for quantization learned to assign fewer bits to memory-bounded layers (such as depthwise convolutions on edge devices) to alleviate bottlenecks, demonstrating a sophisticated understanding of hardware limits that surpasses manual tuning.

Results and Performance

The automated framework demonstrates significant improvements over state-of-the-art manual and automated designs:

  • Search Efficiency: The search cost for specialized models was reduced from 40,000 GPU hours to just 200 GPU hours, a 200x speedup.
  • Mobile Benchmarks: On a Google Pixel 1, the specialized model achieved higher accuracy while running 1.83x faster than the human-designed MobileNet-V2.
  • Compression Gains: The AMC pipeline achieved a 1.81x speedup on Android with negligible accuracy loss, while the HAQ framework reduced energy consumption by 1.9x compared to standard 8-bit quantization.
Comparison of Top-1 Accuracy vs. Mobile Latency, showing the specialized model outperforming MobileNetV2 with a 1.83x speedup.

Conclusion

This research highlights the power of integrating hardware feedback into the AI design loop. By automating the complex trade-offs between accuracy, latency, and energy, the framework enables the rapid deployment of efficient deep learning models across a diverse hardware landscape. Future work aims to expand this co-design philosophy, potentially including the hardware architecture itself within the automated search space.

Summary updated

BibTeX
@misc{han2019design,
  author = {Song Han and Han Cai and Ligeng Zhu and Ji Lin and Kuan Wang and Zhijian Liu and Yujun Lin},
  title = {{Design Automation for Efficient Deep Learning Computing}},
  year = {2019},
  eprint = {1904.10616},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1904.10616},
}
Figure