Rethinking Co-design of Neural Architectures and Hardware Accelerators

Yanqi Zhou, Xuanyi Dong, Berkin Akin, Mingxing Tan, Daiyi Peng, Tianjian Meng, Amir Yazdanbakhsh, Da Huang, Ravi Narayanaswami, James LaudonarXiv 2021

Introduction

In the rapidly evolving field of deep learning, a persistent "chicken and egg" problem exists between software and hardware. Hardware designers typically build accelerators, such as TPUs or GPUs, based on the requirements of current popular models. However, by the time the silicon is manufactured and deployed, the state-of-the-art (SOTA) architectures have often shifted. Conversely, Neural Architecture Search (NAS) typically focuses on finding the optimal model for a fixed piece of hardware, which may have sub-optimal compute-to-memory ratios for the specific task at hand.

This paper introduces NAHAS (Neural Architecture and Hardware Accelerator Search), a framework designed to break this cycle by jointly searching for neural architectures and hardware accelerator configurations. By treating both as a single, unified search space, NAHAS achieves significant improvements in both accuracy and energy efficiency.

The Hardware-Software Gap

The authors argue that the traditional decoupled approach to design leaves substantial performance on the table. Fixed hardware often creates bottlenecks that limit the effectiveness of NAS. Furthermore, while previous research into hardware-software co-design has existed, it has largely focused on FPGAs or academic prototypes. NAHAS targets industry-standard edge accelerators, making its findings directly applicable to real-world mobile and IoT devices.

The NAHAS Framework

NAHAS operates by parameterizing both the software and hardware components into a unified search space:

  1. Software Search Space: Beyond standard mobile building blocks like Inverted Bottleneck (IBN) layers, NAHAS introduces Fused-IBN layers. These layers fuse depthwise and projection convolutions. While they may increase the total number of operations (FLOPs), they often achieve higher utilization and faster execution on specialized hardware.
  2. Hardware Search Space: The framework parameterizes an industry-standard edge accelerator. Adjustable "knobs" include the number of Processing Elements (PEs), SIMD units, local memory size, and I/O bandwidth.
Conceptual comparison of decoupled NAS vs. joint hardware-software search.

To manage the complexity of this bi-level optimization, the authors utilize two primary search strategies. The first is a joint search using Reinforcement Learning (PPO) to sample pairs of models and hardware. The second is a more efficient "one-shot" approach that optimizes a super-network and hardware configurations simultaneously using weight sharing. To avoid the computational bottleneck of cycle-accurate simulations, they trained a multi-layer perceptron (MLP) cost model on 500,000 samples to predict latency and area.

Key Insights: Moving the Pareto Frontier

A central finding of the research is that NAHAS effectively "joins" multiple Pareto frontiers from different hardware configurations. While standard NAS finds the best trade-off for a single device, joint search creates a new, superior frontier that no single fixed device could achieve.

Furthermore, the paper reinforces that FLOPs are deceptive. Fused-IBN layers, despite having higher FLOP counts, are often faster on edge accelerators because they better utilize the hardware's parallel processing capabilities. The search also revealed that hardware specialization is highly task-specific: small, low-latency models benefit from more processing elements but smaller local memories, whereas larger, more accurate models require increased memory capacity.

Key Results

NAHAS was evaluated primarily on ImageNet for classification and Cityscapes for semantic segmentation. The results demonstrate clear superiority over decoupled approaches:

  • Accuracy: NAHAS models consistently outperformed platform-aware NAS (like MnasNet) and manual models by approximately 1% top-1 accuracy on ImageNet across various latency targets.
  • Efficiency: For a given accuracy level, NAHAS reduced energy consumption by up to 2x compared to baseline methods.
  • Latency: NAHAS achieved an average 20% reduction in inference latency compared to models like EfficientNet-B3 when both were evaluated on their respective optimized hardware.
ImageNet accuracy vs. EdgeTPU energy consumption, showing NAHAS models pushing the Pareto frontier.

Conclusion and Future Work

NAHAS demonstrates that joint hardware-software co-design is essential for maximizing the efficiency of deep learning on the edge. By co-adapting the search space—such as introducing hardware-friendly Fused-IBN layers—the framework pushes the boundaries of what is possible in mobile computer vision.

Future work remains in scaling these joint searches to even larger models and exploring chip area as a primary optimization objective rather than a hard constraint. Nonetheless, NAHAS provides a powerful blueprint for the next generation of efficient AI systems.

Summary updated

BibTeX
@misc{zhou2021rethinking,
  author = {Yanqi Zhou and Xuanyi Dong and Berkin Akin and Mingxing Tan and Daiyi Peng and Tianjian Meng and Amir Yazdanbakhsh and Da Huang and Ravi Narayanaswami and James Laudon},
  title = {{Rethinking Co-design of Neural Architectures and Hardware Accelerators}},
  year = {2021},
  eprint = {2102.08619},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.08619},
}
Figure