Abstract
Uncertainty plays a key role in real-time machine learning. As a significant shift from standard deep networks, which do not consider any uncertainty formulation during training or inference, Bayesian deep networks are currently being investigated. In these networks, the system is envisaged as an ensemble of plausible models learned via Bayes' formulation in response to uncertainties in sensory data. Bayesian deep networks consider each synaptic weight as a sample drawn from a probability distribution with a learned mean and variance. This paper elaborates on a hardware design that exploits the cycle-to-cycle variability of oxide-based Resistive Random Access Memories (RRAMs) as a means to realize such a probabilistic sampling function, transforming a traditional hardware non-ideality into a computational advantage.
Introduction
Standard Deep Learning models are often "overconfident," providing single-point predictions without accounting for uncertainty. Bayesian Neural Networks (BNNs) address this by treating synaptic weights as probability distributions. However, implementing BNNs on conventional CMOS hardware is computationally expensive due to the need for frequent sampling from these distributions and the energy-intensive generation of Gaussian random numbers. This research proposes a hybrid RRAM-CMOS architecture that performs these operations directly in memory.
Proposed Hardware Architecture
The proposed system addresses the Von-Neumann bottleneck by partitioning the BNN computation into two distinct functional units: a Stochastic Unit and a Deterministic Unit. The Stochastic Unit leverages the inherent physical noise of RRAM devices to generate random samples, while the Deterministic Unit utilizes a standard RRAM crossbar array to store the learned variances and perform in-memory dot-product operations.
By mathematically reformulating the BNN weight sampling equation, the researchers mapped the physical mean and variance of RRAM hardware noise directly to the learned weights of the neural network. This eliminates the need for complex CMOS-based random number generators like Linear Feedback Shift Registers.
Turning Variability into a Computational Resource
In traditional semiconductor engineering, cycle-to-cycle variability is a defect to be suppressed. In this design, it is the primary mechanism for computation. When an RRAM device undergoes SET and RESET cycles, the resulting conductance varies in a manner that closely follows a Gaussian distribution. This physical stochasticity provides a "free" source of the randomness required for Bayesian inference.
Key Results and Performance
The design was validated using the MNIST handwritten digit dataset through a hybrid device-circuit-algorithm co-simulation. Key findings include:
- Energy Efficiency: The RRAM-based system achieved 106,567.2 Images/Joule, a 2x improvement over state-of-the-art CMOS-based BNN accelerators.
- Power Reduction: Generating 64 parallel Gaussian samples consumed only 32.54mW, compared to over 500mW for traditional CMOS implementations.
- Robust Accuracy: The system achieved 98% accuracy on MNIST. Even with simulated 10% device-to-device variation noise, the accuracy remained high at 93%, demonstrating the robustness of the Bayesian approach.
Conclusion
By embracing the inherent variability of RRAM devices, this hardware design offers a path toward energy-efficient, uncertainty-aware machine learning. Future work will focus on "hardware-in-the-loop" training to further adapt models to specific device characteristics and scaling the architecture for deeper, more complex neural network topologies.
Summary updated