Abstract
Recently, machine learning systems have gained prominence in real-time, critical decision-making domains, such as autonomous driving and industrial automation. Their implementations should avoid overconfident predictions through uncertainty estimation. Bayesian Neural Networks (BayNNs) are principled methods for estimating predictive uncertainty. However, their computational costs and power consumption hinder their widespread deployment in edge AI. Utilizing Dropout as an approximation of the posterior distribution, binarizing the parameters of BayNNs, and further implementing them in spintronics-based computation-in-memory (CiM) hardware arrays can be a viable solution. However, designing hardware Dropout modules for convolutional neural network (CNN) topologies is challenging and expensive, as they may require numerous Dropout modules and need to use spatial information to drop certain elements. In this paper, we introduce MC-SpatialDropout, a spatial dropout-based approximate BayNNs with spintronics emerging devices. Our method utilizes the inherent stochasticity of spintronics devices for efficient implementation of the spatial dropout module compared to existing implementations. Furthermore, the number of dropout modules per network layer is reduced by a factor of 9x and energy consumption by a factor of 300x, while still achieving comparable predictive performance and uncertainty estimates compared to related works.
Introduction
Deep learning is increasingly deployed in safety-critical applications like autonomous driving and medical diagnostics. In these domains, model reliability is paramount; a system must not only provide a prediction but also an estimate of its confidence. This is known as uncertainty estimation. While Bayesian Neural Networks (BayNNs) provide a robust framework for this, their high computational demands make them unsuitable for low-power edge devices.
To address this, researchers often employ Binary Neural Networks (BNNs)—where weights are restricted to 1-bit values—combined with Monte Carlo (MC) Dropout to approximate Bayesian inference. However, standard dropout in hardware for Convolutional Neural Networks (CNNs) is inefficient. It typically requires a unique random mask for every pixel in a feature map, necessitating thousands of random number generators that consume significant area and power.
MC-SpatialDropout and Network Architecture
The authors propose MC-SpatialDropout, a method that drops entire feature maps instead of individual pixels. This approach leverages the high spatial correlation between adjacent pixels in CNNs, where dropping individual elements is often redundant. By dropping the entire 2D array of data based on a single random decision, the hardware complexity is drastically reduced while maintaining a valid Bayesian approximation.
Strategically, the authors found that applying spatial dropout to every layer can degrade accuracy. Instead, the most effective configuration involves applying it to the extracted feature maps at the end of the convolutional pipeline or within the final residual blocks. This maintains high classification accuracy while providing robust out-of-distribution (OOD) detection.
Spintronic Hardware Implementation
The hardware implementation leverages Spin-Transfer-Torque Magnetic Random Access Memory (STT-MRAM) for Computation-in-Memory (CiM). A key innovation is using the inherent stochasticity of Magnetic Tunnel Junctions (MTJs). When written with a specific low-voltage pulse, MTJs switch states probabilistically, serving as a natural, low-power source of randomness for generating dropout masks.
By performing dropout and matrix multiplications directly within the memory array, the design bypasses the "von Neumann bottleneck," significantly reducing the energy cost associated with data movement. The same STT-MRAM technology stores the 1-bit weights and generates the random masks, leading to a highly unified and dense architecture.
Experimental Evaluation
The system was evaluated on the CIFAR-10 dataset for in-distribution (ID) accuracy and six additional datasets (e.g., Gaussian noise, SVHN, STL10) for out-of-distribution (OOD) uncertainty estimation.
Key results include:
- Hardware Efficiency: The design requires 9x fewer dropout modules per layer compared to previous spintronic implementations.
- Energy Savings: The implementation is 94.11x more energy-efficient than traditional FPGA-based Bayesian models and approximately 3x more efficient than previous spintronic state-of-the-art designs.
- Predictive Performance: The model achieved 91.34% accuracy on ResNet-18 (CIFAR-10), nearly matching non-Bayesian binary networks.
- Uncertainty Mastery: The system achieved up to a 100% OOD detection rate on noise-based datasets, effectively identifying unreliable inputs.
Conclusion
Spatial-SpinDrop demonstrates that hardware-software co-design can bring sophisticated Bayesian uncertainty estimation to the edge. While BNNs remain sensitive to dropout rates—requiring careful tuning to avoid accuracy drops—this work provides a scalable path for reliable AI in resource-constrained environments. Future work will explore scaling to larger datasets like ImageNet and testing on diverse hardware platforms.
Summary updated