Towards Budget-Driven Hardware Optimization for Deep Convolutional Neural Networks using Stochastic Computing

Zhe Li, Ji Li, Ao Ren, Caiwen Ding, Jeffrey Draper, Qinru Qiu, Bo Yuan, Yanzhi Wang

Abstract

Deep Convolutional Neural Networks (DCNNs) are computationally intensive, often exceeding the resource limits of edge devices. This paper presents an automated framework that utilizes Stochastic Computing (SC) to optimize DCNN hardware implementations. By employing a budget-driven allocation algorithm, the framework balances area, power, and accuracy, enabling the deployment of complex models on resource-constrained IoT and wearable platforms.

Introduction

The proliferation of DCNNs in image and speech recognition has primarily been supported by high-performance server clusters. However, deploying these models on "edge" devices—such as smartwatches and embedded sensors—requires strictly adhering to area, power, and energy budgets. Traditional hardware accelerators often prioritize throughput over these constraints. Stochastic Computing (SC) offers a promising alternative due to its minimal hardware footprint, but a systematic approach to designing entire DCNN architectures under specific hardware budgets has been lacking.

Methodology: Stochastic Computing and Neuron Architectures

Stochastic Computing represents numbers as the probability of "1s" in a random bit-stream. This paradigm simplifies complex arithmetic; for instance, multiplication can be implemented with a single logic gate. The researchers explore two primary SC neuron architectures:

  1. APC-based (Accumulative Parallel Counter): Offers higher accuracy but scales poorly in terms of area and power as input size increases.
  2. MUX-based: Highly area-efficient but introduces more approximation noise (error) with larger input sizes.
MUX-based neuron architecture and FSM-based activation function.

The framework also implements activation functions, such as tanh, using Finite State Machines (FSMs) directly within the stochastic domain. To manage the design space, two optimization algorithms are proposed:

  • Minimum Feasible Solution: A greedy search to find a valid configuration within the budget.
  • Joint Design Allocation: An iterative process that re-allocates neuron designs across layers to maximize a comprehensive design score, balancing hardware metrics against error rates.

Experimental Evaluation

The framework was evaluated using the LeNet-5 architecture on the MNIST handwritten digit dataset. Hardware synthesis was performed using a 45nm CMOS library to obtain precise metrics for area, delay, and power.

Key Results and Insights

The study reveals that SC neurons provide a significant reduction in hardware footprint compared to binary implementations. A critical insight is the effectiveness of heterogeneous layer implementations; some layers can tolerate the higher error of MUX-based neurons to save area, while others require APC-based precision.

Hardware performance metrics and absolute error vs. input size across different bit-stream lengths.

As shown in the performance analysis, increasing the input size leads to predictable increases in area and power, while absolute error varies significantly with bit-stream length. The joint optimization algorithm consistently outperformed naive configurations. For example, in an energy-focused test case, the optimized network achieved a 2.0% error rate within a 4μJ budget, whereas non-optimized versions either exceeded the budget or suffered from much higher error.

Conclusion and Future Work

This budget-driven framework demonstrates that SC can effectively bridge the gap between DCNN complexity and edge device constraints. While currently demonstrated on LeNet-5, future work will focus on scaling the optimization algorithms for modern, larger-scale architectures like ResNet and automating the selection of design weights to better align with high-level application goals.

Summary updated

BibTeX
@inproceedings{li2018towards,
  author = {Zhe Li and Ji Li and Ao Ren and Caiwen Ding and Jeffrey Draper and Qinru Qiu and Bo Yuan and Yanzhi Wang},
  title = {{Towards Budget-Driven Hardware Optimization for Deep Convolutional Neural Networks using Stochastic Computing}},
  booktitle = {ISVLSI},
  year = {2018},
  url = {https://openreview.net/forum?id=kRy4yFiFMx-j},
}
Figure