Backpropagating Errors Through Memristive Spiking Neural Networks

Peng Zhou, Dong-Uk Choi, Sung-Mo Kang, Jason K. Eshraghian

Abstract

Spiking Neural Networks (SNNs) offer a path toward ultra-low-power neuromorphic computing, yet they remain difficult to train due to the non-differentiable nature of discrete spikes. This paper presents SPICEprop, a training framework that enables backpropagation through time (BPTT) directly on the circuit-level dynamics of fully memristive spiking neural networks (MSNNs). By utilizing the continuous, differentiable voltage waveforms of analog memristive neurons, SPICEprop eliminates the need for surrogate gradients. We demonstrate state-of-the-art performance for fully memristive architectures, achieving 97.58% accuracy on MNIST and 75.26% on Fashion-MNIST.

Introduction

Spiking Neural Networks (SNNs) represent the "third generation" of neural network architectures, designed to mimic the temporal sparsity and energy efficiency of biological brains. While promising for edge computing, SNNs face a fundamental optimization challenge: the "dead neuron" problem. In standard mathematical models, a spike is represented as a discrete step function. Because the derivative of a step function is zero everywhere except at the point of the jump (where it is undefined), traditional gradient-based optimization—the backbone of deep learning—fails to propagate errors through the network.

Memristors (resistors with memory) are ideal candidates for implementing SNNs due to their non-volatile state and nonlinear dynamics. However, most existing work uses memristors only for synapses or relies on simplified models that still require "surrogate gradients"—mathematical approximations used to bypass non-differentiability. SPICEprop addresses these limitations by treating the physical dynamics of a memristive circuit as a naturally differentiable system.

The Memristive Integrate-and-Fire (MIF) Neuron

The core of the SPICEprop framework is the Memristive Integrate-and-Fire (MIF) neuron. Unlike idealized digital neurons, the MIF circuit is composed of two memristors and a capacitor. This configuration produces realistic, continuous voltage waveforms during the processes of depolarization, hyperpolarization, and repolarization.

Because the "spikes" in this analog model are continuous voltage curves rather than instantaneous mathematical events, the entire membrane potential trajectory $v(t)$ is differentiable. This physical realism allows the network to be optimized directly using standard calculus, as the gradient of the loss function with respect to the circuit parameters remains well-defined throughout the spiking event.

The SPICEprop Training Framework

To bridge the gap between analog circuit simulation and deep learning software, the authors developed SPICEprop. The framework operates through a two-step process:

  1. Discretization: The Ordinary Differential Equations (ODEs) describing the memristive circuit dynamics are discretized using the Forward Euler method.
  2. RNN Mapping: This discretization allows the circuit's behavior to be "unrolled" over time. In this form, the hardware circuit is represented as a recurrent neural network (RNN) graph within the PyTorch environment.

By unrolling the simulation (typically over 1,000 time steps), the framework can compute gradients across the entire temporal evolution of the circuit. This allows the optimizer to adjust synaptic weights and neuron parameters so that the membrane potential of the "correct" class is driven toward a spike while others remain suppressed.

Experimental Results

The framework was evaluated using SPICE models of commercially available KNOWM™ memristors, ensuring the results are grounded in physical hardware behavior. The MSNN was tested on two primary benchmarks:

  • MNIST: The network achieved an accuracy of 97.58%. This is the highest reported accuracy for a fully memristive SNN to date, significantly outperforming previous error-driven optimization methods which peaked at approximately 83.24%.
  • Fashion-MNIST: On this more challenging dataset of clothing items, the network achieved 75.26% accuracy, proving the architecture's ability to generalize to complex visual patterns.

Furthermore, the researchers demonstrated that the network maintains high performance even with extreme temporal sparsity. By presenting input data at only 3 out of every 1,000 simulation time steps, they confirmed that the memristive dynamics can effectively integrate information over time without requiring constant stimulation.

Discussion and Future Work

SPICEprop demonstrates that the complex, nonlinear physics of memristors can be a feature rather than a bug. By embracing the analog nature of the device, researchers can bypass the mathematical hurdles that have hindered SNN training for decades.

From a hardware perspective, a fully memristive approach allows for high-density integration. By using memristors for both synapses and neurons, the architecture is compatible with Vertical Back-End-Of-Line (BEOL) CMOS integration. This could eliminate the need for bulky Analog-to-Digital Converters (ADCs), leading to massive savings in chip area and power consumption.

However, challenges remain. The current simulations use idealized models; future iterations must account for real-world device non-idealities, such as cycle-to-cycle noise and device-to-device variation. Additionally, the computational cost of unrolling long temporal simulations remains high. Future research will focus on incorporating stochasticity and scaling the framework to deeper architectures and more complex datasets.

Summary updated

BibTeX
@inproceedings{zhou2023backpropagating,
  author = {Peng Zhou and Dong-Uk Choi and Sung-Mo Kang and Jason K. Eshraghian},
  title = {{Backpropagating Errors Through Memristive Spiking Neural Networks}},
  booktitle = {ISCAS},
  year = {2023},
  url = {https://openreview.net/forum?id=2W4CdWdLuv},
}

Loading related content...

Figure