Algorithm for Training Neural Networks on Resistive Device Arrays

Tayfun Gokmen, Wilfried HaenscharXiv 2019

Abstract

Analog resistive crossbar arrays promise massive gains in AI energy efficiency by performing vector-matrix multiplications directly in hardware. However, they are plagued by "asymmetric" hardware switching that significantly degrades training accuracy. This paper introduces the Tiki-Taka algorithm, a dual-matrix approach that mathematically cancels out these hardware flaws, allowing non-ideal analog devices to match the accuracy of high-precision digital systems.

The Challenge of Analog Hardware

Training deep neural networks (DNNs) is incredibly power-hungry. To solve this, researchers are looking toward resistive cross-point device arrays (analog hardware) that can perform computations at the location of the data using Ohm’s and Kirchhoff’s laws.

However, standard Stochastic Gradient Descent (SGD) requires these analog devices to be "symmetric," meaning they must increase and decrease their conductance by the exact same amount when pulsed. In reality, most materials are non-ideal and asymmetric. As shown in the figure below, nonsymmetric devices exhibit a "symmetry point" where the conductance change for positive and negative updates is unequal except at a specific weight value.

Comparison of weight update characteristics for (A) Ideal, (B) Symmetric, and (C) Nonsymmetric resistive devices. The bottom row shows how conductance change varies with weight, highlighting the symmetry point in nonsymmetric devices.

The authors demonstrate that this asymmetry acts as an unintentional "hidden cost term"—similar to uncontrolled $L_2$ regularization—that competes with the neural network's optimization goal, leading to poor convergence and high error rates.

The Tiki-Taka Algorithm

The researchers propose a coupled dynamical system called the Tiki-Taka algorithm. Instead of representing a weight as a single value in one matrix, they represent it as a linear combination of two matrices: $W = \gamma A + C$.

  1. Matrix A (The Fast Accumulator): This matrix receives the frequent, noisy, and asymmetric updates from standard backpropagation. By using a "symmetry point shifting" technique, the sign of the gradient in $A$ remains mostly correct, even if the magnitude is distorted by hardware flaws.
  2. Matrix C (The Slow Learner): Periodically, the information accumulated in $A$ is transferred to $C$ via a sparse, parallel update. $C$ effectively filters the noise from $A$, growing the weights in the correct direction.
  3. Self-Consistency: As the network reaches a local minimum, updates to $A$ naturally push its values toward zero, creating a stable equilibrium for the whole system.

This approach is "hardware-invariant," fixing the problem at the algorithmic level rather than requiring perfect materials.

Experimental Evaluation

The algorithm was tested on three distinct architectures: FCN-MNIST (fully connected), CNN-MNIST (convolutional), and LSTM-WP (Long Short-Term Memory for text prediction).

Key Results

  • Matching Digital Accuracy: On FCN and CNN tasks, Tiki-Taka achieved test errors (~2% and ~1% respectively) indistinguishable from high-precision floating-point digital models. Standard SGD on asymmetric hardware failed, with errors reaching 15%.
  • LSTM Success: For the complex LSTM task, Tiki-Taka reached the same level of accuracy as a model using perfectly symmetric (ideal) analog devices, effectively nullifying the impact of hardware non-ideality.
  • Minimal Overhead: The speed penalty is low (~15% for LSTMs and near zero for CNNs), preserving the power and speed benefits of analog hardware.

Insights and Future Outlook

The most profound insight is the mathematical proof that hardware asymmetry is not just random noise, but a specific quadratic energy term ($w^2$) introduced into the optimization objective. By handling this in software, the Tiki-Taka algorithm significantly lowers the material requirements for resistive devices, potentially accelerating the commercial viability of analog AI accelerators.

Future work includes extending the algorithm to "one-sided" switching devices like Phase Change Memory (PCM) and testing its stability on much larger, industrial-scale networks like Transformers.

Summary updated

BibTeX
@misc{gokmen2019algorithm,
  author = {Tayfun Gokmen and Wilfried Haensch},
  title = {{Algorithm for Training Neural Networks on Resistive Device Arrays}},
  year = {2019},
  eprint = {1909.07908},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.07908},
}
Figure