Kernel Approximation using Analog In-Memory Computing

Julian Büchel, Giacomo Camposampiero, Athanasios Vasilopoulos, Corey Lammie, Manuel Le Gallo, Abbas Rahimi, Abu SebastianarXiv 2024 · DOI

Abstract

Kernel methods are essential for capturing non-linear relationships in machine learning, yet their computational complexity often scales quadratically with the number of data points. While kernel approximation techniques like Random Fourier Features (RFF) mitigate this by mapping inputs into a finite-dimensional space, the resulting matrix-vector multiplications (MVMs) remain a significant bottleneck on traditional von Neumann architectures. This paper explores a novel hardware-software co-design using the IBM HERMES Project Chip, an analog in-memory computing (AIMC) platform. By performing high-dimensional mappings directly within phase-change memory (PCM) crossbar arrays, the proposed approach achieves near-digital accuracy across diverse benchmarks while delivering up to 12.4x better energy efficiency than state-of-the-art GPUs.

1. Introduction: The Scalability Challenge

Kernel functions allow machine learning algorithms to operate in high-dimensional feature spaces, enabling the modeling of complex, non-linear data patterns. However, the practical utility of these methods is frequently limited by their memory and computational requirements, which typically grow quadratically ($O(N^2)$) with the number of samples.

To address this, researchers utilize kernel approximation methods, such as the "FAVOR+" algorithm used in Performer architectures. These methods map input data into a finite-dimensional space where simple inner products approximate the kernel function. While this reduces algorithmic complexity, the physical execution of these mappings involves massive MVM operations. On conventional CPUs and GPUs, the constant movement of weight matrices between memory and the processor creates a "von Neumann bottleneck," leading to high energy consumption and latency.

2. Analog In-Memory Computing (AIMC) with IBM HERMES

To bypass the data-movement bottleneck, this study utilizes the IBM HERMES Project Chip, a 14-nm CMOS accelerator designed for analog in-memory computing. The core of this approach is the use of Phase-Change Memory (PCM) devices arranged in crossbar arrays.

2.1 Hardware Architecture

The HERMES chip features 64 cores, each containing a crossbar array of PCM devices. In this architecture, the random mapping weights ($\omega$) required for kernel approximation are programmed directly into the physical state of the PCM devices as analog conductance values.

2.2 The Computing Process

When input data is fed into the chip, it is converted into voltage pulses. As these pulses traverse the crossbar, the MVM is performed instantaneously in the analog domain, governed by Kirchhoff’s and Ohm’s laws. This hybrid architecture offloads the heavy linear projection to the analog domain, while subsequent non-linear operations (such as $sin$, $cos$, or $exp$) are handled by local digital processing units. This synergy allows for high-throughput computation without the energy overhead of traditional memory fetching.

3. Application to Transformers and Kernel Ridge Classification

The researchers evaluated the AIMC approach on two primary fronts: standard machine learning benchmarks and long-sequence Transformer models.

  • Kernel Ridge Classification: The system was tested on six standard datasets, including IJCNN01, letter, magic04, EEG, cod-rna, and skin.
  • Long-Sequence Transformers: The study integrated AIMC into the Performer architecture, which approximates the Softmax attention mechanism. By applying the FAVOR+ algorithm, the standard $O(L^2)$ complexity of attention is reduced to $O(L)$, where $L$ is the sequence length. This was validated using the Long Range Arena (LRA) benchmark, covering tasks such as ListOps, IMDb, and CIFAR-10 image-to-sequence mapping.

4. Key Insights and Results

4.1 Robustness and Regularization

A significant finding of this research is the inherent resilience of random feature mappings to the non-idealities of analog hardware. Because the weights are sampled from a distribution rather than precisely learned, the minor noise and conductance variations in PCM devices do not significantly degrade the mathematical guarantees of the kernel approximation. Furthermore, the practice of periodically re-sampling mapping matrices during training acts as a form of hardware-aware regularization, making the models robust to different hardware noise profiles.

4.2 Performance Metrics

The AIMC implementation demonstrated impressive performance across all metrics:

  • Accuracy: The system maintained accuracy within 1% of the digital software baseline for nearly all classification and LRA tasks.
  • Energy Efficiency: The projection operations were estimated to be 6.2x to 12.4x more energy-efficient than an NVIDIA A100 GPU running at INT8 precision.
  • Throughput: The HERMES chip achieved a peak throughput of 63.1 Tera Operations Per Second (TOPS).
  • Computational Offloading: By moving the attention mapping to the AIMC hardware, the researchers successfully offloaded between 1/3 and 1/2 of the total Floating Point Operations (FLOPs) required for the attention mechanism.

5. Limitations and Future Outlook

Despite the success of the HERMES implementation, certain limitations remain. As the feature dimension ($D$) increases, the approximation error in AIMC eventually saturates due to analog noise, whereas digital systems continue to improve with higher dimensions. Additionally, the peripheral circuitry—specifically Digital-to-Analog (DAC) and Analog-to-Digital (ADC) converters—remains a significant consumer of chip area and power.

Future work will focus on 3D integration of non-volatile memory and more advanced CMOS nodes to reduce the hardware footprint. The ultimate goal is to transition from offloading specific mappings to deploying entire neural network architectures on-chip, further maximizing the efficiency gains of analog in-memory computing.

Summary updated

BibTeX
@misc{buchel2024kernel,
  author = {Julian Büchel and Giacomo Camposampiero and Athanasios Vasilopoulos and Corey Lammie and Manuel Le Gallo and Abbas Rahimi and Abu Sebastian},
  title = {{Kernel Approximation using Analog In-Memory Computing}},
  year = {2024},
  eprint = {2411.03375},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.03375},
}
Figure