Table of Contents
Fetching ...

ShiftAddNAS: Hardware-Inspired Search for More Accurate and Efficient Neural Networks

Haoran You, Baopu Li, Huihong Shi, Yonggan Fu, Yingyan Celine Lin

TL;DR

ShiftAddNAS tackles the high computation cost of multiplications in NNs by automatically searching for hybrid networks that mix multiplication-based blocks (Conv/Attn) with multiplication-free blocks (Shift/Add). It introduces a first-of-its-kind hybrid search space and a heterogeneous weight-sharing strategy that aligns Gaussian and Laplacian weight distributions across operators, enabling efficient one-shot NAS. Through extensive NLP and CV experiments, ShiftAddNAS achieves up to substantial accuracy gains and significant energy/latency savings over state-of-the-art baselines and prior NAS methods. The framework demonstrates practical potential for deploying accurate, hardware-aware models on resource-constrained devices, with quantized variants further boosting efficiency.

Abstract

Neural networks (NNs) with intensive multiplications (e.g., convolutions and transformers) are capable yet power hungry, impeding their more extensive deployment into resource-constrained devices. As such, multiplication-free networks, which follow a common practice in energy-efficient hardware implementation to parameterize NNs with more efficient operators (e.g., bitwise shifts and additions), have gained growing attention. However, multiplication-free networks usually under-perform their vanilla counterparts in terms of the achieved accuracy. To this end, this work advocates hybrid NNs that consist of both powerful yet costly multiplications and efficient yet less powerful operators for marrying the best of both worlds, and proposes ShiftAddNAS, which can automatically search for more accurate and more efficient NNs. Our ShiftAddNAS highlights two enablers. Specifically, it integrates (1) the first hybrid search space that incorporates both multiplication-based and multiplication-free operators for facilitating the development of both accurate and efficient hybrid NNs; and (2) a novel weight sharing strategy that enables effective weight sharing among different operators that follow heterogeneous distributions (e.g., Gaussian for convolutions vs. Laplacian for add operators) and simultaneously leads to a largely reduced supernet size and much better searched networks. Extensive experiments and ablation studies on various models, datasets, and tasks consistently validate the efficacy of ShiftAddNAS, e.g., achieving up to a +7.7% higher accuracy or a +4.9 better BLEU score compared to state-of-the-art NN, while leading to up to 93% or 69% energy and latency savings, respectively. Codes and pretrained models are available at https://github.com/RICE-EIC/ShiftAddNAS.

ShiftAddNAS: Hardware-Inspired Search for More Accurate and Efficient Neural Networks

TL;DR

ShiftAddNAS tackles the high computation cost of multiplications in NNs by automatically searching for hybrid networks that mix multiplication-based blocks (Conv/Attn) with multiplication-free blocks (Shift/Add). It introduces a first-of-its-kind hybrid search space and a heterogeneous weight-sharing strategy that aligns Gaussian and Laplacian weight distributions across operators, enabling efficient one-shot NAS. Through extensive NLP and CV experiments, ShiftAddNAS achieves up to substantial accuracy gains and significant energy/latency savings over state-of-the-art baselines and prior NAS methods. The framework demonstrates practical potential for deploying accurate, hardware-aware models on resource-constrained devices, with quantized variants further boosting efficiency.

Abstract

Neural networks (NNs) with intensive multiplications (e.g., convolutions and transformers) are capable yet power hungry, impeding their more extensive deployment into resource-constrained devices. As such, multiplication-free networks, which follow a common practice in energy-efficient hardware implementation to parameterize NNs with more efficient operators (e.g., bitwise shifts and additions), have gained growing attention. However, multiplication-free networks usually under-perform their vanilla counterparts in terms of the achieved accuracy. To this end, this work advocates hybrid NNs that consist of both powerful yet costly multiplications and efficient yet less powerful operators for marrying the best of both worlds, and proposes ShiftAddNAS, which can automatically search for more accurate and more efficient NNs. Our ShiftAddNAS highlights two enablers. Specifically, it integrates (1) the first hybrid search space that incorporates both multiplication-based and multiplication-free operators for facilitating the development of both accurate and efficient hybrid NNs; and (2) a novel weight sharing strategy that enables effective weight sharing among different operators that follow heterogeneous distributions (e.g., Gaussian for convolutions vs. Laplacian for add operators) and simultaneously leads to a largely reduced supernet size and much better searched networks. Extensive experiments and ablation studies on various models, datasets, and tasks consistently validate the efficacy of ShiftAddNAS, e.g., achieving up to a +7.7% higher accuracy or a +4.9 better BLEU score compared to state-of-the-art NN, while leading to up to 93% or 69% energy and latency savings, respectively. Codes and pretrained models are available at https://github.com/RICE-EIC/ShiftAddNAS.
Paper Structure (21 sections, 8 equations, 10 figures, 11 tables)

This paper contains 21 sections, 8 equations, 10 figures, 11 tables.

Figures (10)

  • Figure 1: Unit energy comparisons.
  • Figure 2: Supernets for NLP and CV tasks: (a) For NLP, we adopt a multi-branch structure for each block of the supernet, where Attn+Conv represents the channel-wise concatenation of these two blocks, and (b) for CV tasks, we consider a multi-resolution pipeline for each block of the supernet.
  • Figure 3: Heterogeneous weight distributions in supernets.
  • Figure 4: (a) Illustration of the proposed heterogeneous weight sharing strategy, where weights of shift blocks are quantized to powers of two; (b) visualization of the adopted learnable transformation kernel $\mathcal{T}(\cdot)$ for mapping the shared weights of Gaussian distribution to a Laplacian distribution.
  • Figure 5: BLEU scores vs. FLOPs of ShiftAddNAS over SOTA baselines on NLP tasks.
  • ...and 5 more figures