Neural Sampling Machine with Stochastic Synapse allows Brain-like Learning and Inference

Sourav Dutta, Georgios Detorakis, Abhishek Khanna, Benjamin Grisafe, Emre Neftci, Suman Datta

Abstract

Modern mission-critical applications require systems capable of continual online learning from noisy data and real-time decision-making with quantifiable confidence levels. While probabilistic models and stochastic neural networks (SNNs) offer a path toward handling such uncertainty, their implementation on traditional low-power hardware remains a significant challenge. This paper introduces a novel hardware fabric implementing a Neural Sampling Machine (NSM) that leverages stochasticity in synaptic connections for approximate Bayesian inference. By harnessing the inherent non-linearities and atomic-level stochasticity of emerging materials, we replicate the molecular-level synaptic unreliability observed in biological brains. We experimentally demonstrate a hybrid stochastic synapse pairing a ferroelectric field-effect transistor (FeFET) analog weight cell with a two-terminal stochastic selector. This architecture enables automatic weight normalization for online learning without offline batch processing and provides robust Bayesian inferencing, achieving 98.25% accuracy on MNIST and effective uncertainty quantification in rotated samples.

Introduction

In traditional deep learning, stochasticity is often viewed as a nuisance to be suppressed. However, biological systems embrace noise; synapses frequently fail to release neurotransmitters, a phenomenon known as synaptic unreliability. This inherent randomness is thought to be a key feature enabling the brain to perform Bayesian inference—reasoning about the world while accounting for uncertainty.

While software-based Neural Sampling Machines (NSMs) have been proposed to exploit this noise, implementing them on standard silicon hardware is energy-inefficient. Digital processors must "fake" randomness using complex algorithms, consuming significant power and area. To bridge this gap, we propose a hardware-native NSM that utilizes the physics of emerging materials to generate "true" synaptic noise, enabling low-power, brain-like computation.

The Hardware Fabric: Hybrid Stochastic Synapses

The core of the NSM is a Compute-in-Memory (CIM) crossbar architecture utilizing a hybrid stochastic synapse. Each synapse consists of two primary components integrated in series:

  1. The Weight Cell (FeFET): A Ferroelectric Field-Effect Transistor serves as the non-volatile memory element. Its conductance, representing the synaptic weight, can be precisely tuned using voltage pulses.
  2. The Stochastic Selector (Ag/HfO2): A two-terminal device that switches between insulating and metallic states. This switching follows a stochastic Bernoulli process, effectively "sampling" the weight during every forward pass.

Unlike software techniques like "Dropout," which are typically disabled during inference, the NSM maintains this stochasticity during both learning and testing. To ensure accurate system-level modeling, we utilized an Ornstein-Uhlenbeck (OU) process to characterize the threshold voltage fluctuations of the selector, aligning our simulations with experimental device data.

Automatic Weight Normalization and Regularization

A significant challenge in online learning is "internal covariate shift," which usually requires computationally expensive Batch Normalization (BN) layers. The NSM addresses this through the inherent physics of its stochastic synapses. We mathematically demonstrate that the multiplicative noise introduced by the selector naturally decouples the magnitude and direction of the weight vector.

This interaction performs an automatic weight normalization, stabilizing the input distributions to hidden layers throughout the training process. Furthermore, the continuous "blank-out" noise acts as a hardware-level regularizer, similar to DropConnect, preventing the network from over-fitting or becoming trapped in local minima. This allows for stable, online learning without the need for offline batch processing.

Experimental Results

Classification Accuracy

We evaluated the hardware-calibrated NSM on the MNIST dataset of handwritten digits. The network achieved a test accuracy of 98.25%, a performance level comparable to state-of-the-art deterministic neural networks. This demonstrates that the introduction of significant hardware noise does not degrade the network's ability to learn complex patterns.

Uncertainty Quantification

To test the network's Bayesian inferencing capabilities, we utilized a "Rotated MNIST" dataset. When presented with digits (such as 1s and 2s) rotated at various angles, the NSM performed multiple noisy forward passes for each image—a physical form of Monte Carlo sampling.

As the rotation increased, the entropy (a measure of uncertainty) in the network's output increased significantly. While a standard, deterministic Multi-Layer Perceptron (MLP) might confidently misclassify a sideways "1" as a "2," the NSM correctly identifies its own uncertainty. This capability is vital for mission-critical applications where knowing when a model is unsure is as important as the prediction itself.

Discussion and Future Outlook

The NSM demonstrates that device-level non-idealities, often viewed as hurdles in hardware design, can be transformed into powerful computational features. While the current implementation is limited by the dynamic range of FeFET weight cells, future improvements in analog weight precision will likely enhance performance further.

Scaling these experimentally calibrated models into large-scale, fully integrated physical crossbar arrays remains the primary engineering challenge. However, the principles of the NSM are technology-agnostic; the same stochastic framework could be applied to other emerging technologies, such as Phase Change Memory (PCM) or Resistive RAM (RRAM), paving the way for a new generation of low-power, uncertainty-aware artificial intelligence.

Summary updated

Abstract

Many real-world mission-critical applications require continual online learning from noisy data and real-time decision making with a defined confidence level. Probabilistic models and stochastic neural networks can explicitly handle uncertainty in data and allow adaptive learning-on-the-fly, but their implementation in a low-power substrate remains a challenge. Here, we introduce a novel hardware fabric that implements a new class of stochastic NN called Neural-Sampling-Machine that exploits stochasticity in synaptic connections for approximate Bayesian inference. Harnessing the inherent non-linearities and stochasticity occurring at the atomic level in emerging materials and devices allows us to capture the synaptic stochasticity occurring at the molecular level in biological synapses. We experimentally demonstrate in-silico hybrid stochastic synapse by pairing a ferroelectric field-effect transistor -based analog weight cell with a two-terminal stochastic selector element. Such a stochastic synapse can be integrated within the well-established crossbar array architecture for compute-in-memory. We experimentally show that the inherent stochastic switching of the selector element between the insulator and metallic state introduces a multiplicative stochastic noise within the synapses of NSM that samples the conductance states of the FeFET, both during learning and inference. We perform network-level simulations to highlight the salient automatic weight normalization feature introduced by the stochastic synapses of the NSM that paves the way for continual online learning without any offline Batch Normalization. We also showcase the Bayesian inferencing capability introduced by the stochastic synapse during inference mode, thus accounting for uncertainty in data. We report 98.25%accuracy on standard image classification task as well as estimation of data uncertainty in rotated samples.
BibTeX
@inproceedings{dutta2022neural,
  author = {Sourav Dutta and Georgios Detorakis and Abhishek Khanna and Benjamin Grisafe and Emre Neftci and Suman Datta},
  title = {{Neural Sampling Machine with Stochastic Synapse allows Brain-like Learning and Inference}},
  booktitle = {Nature Communications},
  year = {2022},
  doi = {10.1038/s41467-022-30305-8},
}
Figure