Device-Circuit-Architecture Co-Exploration for Computing-in-Memory Neural Accelerators

Weiwen Jiang, Qiuwen Lou, Zheyu Yan, Lei Yang, Jingtong Hu, Xiaobo Sharon Hu, Yiyu Shi

TL;DR

This paper introduces NACIM, a novel framework that co-explores neural network architectures, computing-in-memory (CiM) hardware designs, and device variations to create highly efficient and accurate AI accelerators. By tackling the memory wall inherent in traditional architectures and accounting for device non-idealities, NACIM significantly improves robustness and energy efficiency for CiM-based neural networks.

What Problem Does This Paper Address?

The increasing demand for AI applications has led to a surge in deep neural network (DNN) research and deployment. However, traditional von Neumann architectures face a significant bottleneck known as the "memory wall," where the time and energy spent moving data between memory and processing units limit overall performance. Computing-in-memory (CiM) architectures offer a promising solution by performing computations directly within memory cells, thus transcending this limitation.

While Neural Architecture Search (NAS) has automated the design of high-accuracy neural networks, and hardware-aware NAS has begun to consider hardware constraints, existing methods are largely tailored for conventional architectures. Furthermore, co-exploring both neural architecture and hardware design simultaneously, especially for CiM, presents unique challenges. These include a vast optimization space spanning device types, circuit topologies, and neural architectures, the necessity of automatic quantization for efficiency, and the critical issue of device variation (non-idealities in emerging memory devices) which can drastically degrade network accuracy. This paper aims to bridge this gap by proposing a framework that jointly optimizes these aspects for CiM accelerators.

Methods

The core of this work is the NACIM (Neural Architecture and Computing-in-Memory Architecture Co-Exploration) framework. NACIM tackles the problem through a cross-layer optimization approach, integrating four key components:

  1. Controller: This component, implemented using a reinforcement learning approach (specifically, Monte Carlo policy gradient), predicts hyperparameters for the neural architecture, quantization, and circuit/device parameters. It learns by optimizing a reward function that balances accuracy and hardware performance (latency, energy, area).
  2. Optimizer Selector: This module allows designers to choose which aspects of the system to optimize. It offers four configurations, enabling selective exploration of architecture, quantization, device, and circuit design. For this work, two key configurations are highlighted:
  3. "Hardware Perturbation Aware NAS" (ptbNAS): This configuration focuses on identifying robust neural architectures by considering device variation during the search process. It uses a novel training method that incorporates device variation.
  4. "Hardware Resource Aware NAS" (rNAS): This configuration further optimizes the circuit design and quantization to improve hardware performance metrics.
  5. Network Accuracy Evaluator: This component assesses the accuracy of the identified neural architecture. Crucially, it employs a modified training method to account for device variation. This method uses a Monte Carlo approach to sample weights based on a Gaussian distribution representing device variation, adding these samples to the weights in the forward pass. This significantly reduces the accuracy loss caused by non-idealities compared to standard training.
  6. Hardware Performance Evaluator: This component estimates hardware metrics like latency, energy, and area. It utilizes the NeuroSim framework for circuit-level simulation and incorporates circuit optimization to determine the most efficient design for a given architecture, quantization, and device.

NACIM iteratively refines its predictions based on the reward signal generated by these evaluators, aiming to find a Pareto-optimal solution that balances accuracy and hardware efficiency.

Datasets

  • CIFAR-10: Used for image classification tasks.
  • Nuclei: Used for object segmentation tasks.

The paper also mentions using a VGG-Like Space (VLS) and a Resource Limited Space (RLS) backbone architecture for CIFAR-10, and an Encoder-Decoder (Enc-Dec-Like, EDS) architecture for Nuclei.

Key Insights and Ideas

  • The "Memory Wall" is Not Just for CPUs: The paper convincingly demonstrates that the memory wall is a critical bottleneck for CiM accelerators as well, especially when considering the overhead of data movement between analog computation and digital interfaces.
  • Device Variation is a Major Hurdle for CiM: Directly mapping trained DNNs to CiM hardware without accounting for device non-idealities leads to catastrophic accuracy degradation. This highlights the necessity of "hardware perturbation aware" training and search.
  • Co-Exploration is Essential: Optimizing neural architecture, quantization, and circuit design in isolation is suboptimal. NACIM's cross-layer approach shows significant gains by jointly considering these factors.
  • Robustness Through Targeted Training: The proposed Monte Carlo-based training method for incorporating device variation is a key innovation, enabling the identification of accurate and robust neural architectures for CiM without prohibitively long training times.
  • Bi-Objective Optimization is Key: Simply maximizing accuracy is insufficient. The paper emphasizes the importance of optimizing for hardware metrics like latency, energy, and area, and shows how NACIM can push the Pareto frontier for these trade-offs.

Key Results

  • Dramatic Accuracy Improvement Under Variation: NACIM achieved a robust neural network with only 0.45% accuracy loss in the presence of device variation. In stark contrast, state-of-the-art NAS without variation consideration suffered a 76.44% accuracy loss.
  • Significant Energy Efficiency Gains: NACIM achieved an energy efficiency of up to 16.3 TOPS/W, which is 3.17x higher than state-of-the-art NAS.
  • Area and EDP Improvements: Compared to QuantNAS (a state-of-the-art quantization-architecture co-exploration method), NACIMhw achieved a 1.82x reduction in area and a 3.66x improvement in energy delay product (EDP).
  • Scalability Demonstrated: The framework showed effectiveness across different backbone architectures and for more complex tasks like object segmentation.

Limitations and Future Work

  • Training Time for Variation-Awareness: While the proposed method is more efficient than conventional approaches, training with device variation can still be time-consuming.
  • Future Work: The authors suggest exploring ways to speed up the trainer, potentially by replacing the Monte Carlo sampling method with Quasi-Monte Carlo sampling. They also plan to investigate further optimization of the trainer to improve accuracy.

Summary updated

BibTeX
@article{jiang2020device,
  author = {Weiwen Jiang and Qiuwen Lou and Zheyu Yan and Lei Yang and Jingtong Hu and Xiaobo Sharon Hu and Yiyu Shi},
  title = {{Device-Circuit-Architecture Co-Exploration for Computing-in-Memory Neural Accelerators}},
  journal = {IEEE Transactions on Computers},
  year = {2020},
  doi = {10.1109/tc.2020.2991575},
}
Figure