Abstract
Analog in-memory computing is a promising future technology for efficiently accelerating deep learning networks. While using in-memory computing to accelerate the inference phase has been studied extensively, accelerating the training phase has received less attention, despite its arguably much larger compute demand to accelerate. While some analog in-memory training algorithms have been suggested, they either invoke significant amount of auxiliary digital compute—accumulating the gradient in digital floating point precision, limiting the potential speed-up—or suffer from the need for near perfectly programming reference conductance values to establish an algorithmic zero point. Here, we propose two improved algorithms for in-memory training, that retain the same fast runtime complexity while resolving the requirement of a precise zero point. We further investigate the limits of the algorithms in terms of conductance noise, symmetry, retention, and endurance which narrow down possible device material choices adequate for fast and robust in-memory deep neural network training.
Introduction
Analog In-Memory Computing (AIMC) is often considered the "holy grail" for efficient AI acceleration. By utilizing the physical properties of memory devices like ReRAM or ECRAM to perform matrix-vector multiplications via Kirchhoff’s and Ohm’s laws, computations can theoretically be performed in constant time ($O(1)$) with minimal energy consumption.
However, while AIMC is increasingly viable for inference, training remains a significant hurdle. Standard training algorithms assume the precision of digital math, whereas analog hardware is inherently "messy." Devices are often asymmetric, suffer from noise, and experience conductance drift over time. Previous attempts to stabilize training, such as the "Tiki-Taka" (TTv2) algorithm, required a perfectly programmed physical reference array to define a zero point. In practice, even a 5% error in programming these references can cause training to diverge.
Proposed Methods: Chopped-TTv2 and AGAD
To overcome the zero-point problem, researchers have developed two new algorithms that maintain the $O(1)$ speed of analog crossbars while keeping digital overhead low ($O(N)$).
- Chopped-TTv2 (c-TTv2): This method adapts a "chopper" technique from analog circuit design, periodically flipping the signs of input signals. This ensures that static hardware offsets and low-frequency noise cancel themselves out over time, similar to the mechanism in noise-canceling headphones.
- AGAD (Analog Gradient Accumulation with Dynamic reference): AGAD represents a more radical shift by eliminating the physical reference array entirely. Instead, it calculates a "leaky" moving average of recent analog states in digital memory to serve as a dynamic zero point. This temporal averaging makes the system immune to device drift and initial programming errors.
Experimental Results and Key Insights
The algorithms were evaluated using the AIHWKit (IBM's Analog AI Cloud tool) on several benchmarks, including MNIST, text prediction (LSTM), and a 4.3M parameter Vision Transformer (ViT) on CIFAR-10.
- Robustness to Error: While the original TTv2 algorithm failed when reference offsets reached 10%, AGAD remained stable even with 100% offset variation, maintaining accuracy close to digital floating-point (FP) baselines.
- Massive Speedup: Complexity analysis suggests these algorithms are 50x to 175x faster than Mixed-Precision (MP) training, where gradients are accumulated in digital floating-point memory.
- Algorithm-Hardware Co-design: The success of AGAD proves that a "zero point" does not have to be a physical state; it can be a temporal average. This relaxes the requirements for perfect analog devices and opens the door to a wider variety of materials (like capacitors or symmetric ECRAM) previously considered unsuitable.
Conclusion and Future Work
While c-TTv2 and AGAD resolve the zero-point problem, hardware endurance remains a critical bottleneck. The "A" array, where gradients accumulate, requires approximately four orders of magnitude more endurance (pulse cycles) than the "W" array. Future work will focus on full end-to-end hardware implementations on physical CMOS-integrated analog chips to validate these simulation-based breakthroughs in real-world environments.
Summary updated