In-memory Realization of In-situ Few-shot Continual Learning with a Dynamically Evolving Explicit Memory

Geethan Karunaratne, Michael Hersche, Jovin Langenegger, Giovanni Cherubini, Manuel Le Gallo, Urs Egger, Kevin Brew, Samuel Choi, Injo Ok, Mary Claire Silvestre, Ning Li, Nicole Saulnier, Victor Chan, Ishtiaq Ahsan, Vijay Narayanan, Luca Benini, Abu Sebastian, Abbas Rahimi

Introduction

Modern artificial intelligence systems often struggle to replicate the human ability to learn new concepts rapidly from limited data while retaining previously acquired knowledge. This dual challenge, known as Few-shot Continual Learning (FSCL), is typically hindered by "catastrophic forgetting," where new information overwrites existing neural weights. While Explicit Memory (EM) architectures—which store class prototypes in a separate buffer—offer a solution, their implementation on conventional hardware is limited by the von Neumann bottleneck, where frequent data movement between processor and memory incurs high energy costs.

In this work, researchers from IBM and ETH Zurich present a hardware-based solution using an in-memory computing (IMC) chip. By leveraging the physical properties of phase-change memory (PCM), the team demonstrated a system capable of in-situ learning and retrieval, achieving near-software accuracy with superior energy efficiency.

System Architecture

The proposed architecture utilizes a hybrid approach consisting of two primary components:

  1. Frozen Controller: A pre-trained ResNet-12 convolutional neural network serves as a feature extractor. This controller maps input images into 256-dimensional "holographic" vectors. To maintain stability during continual learning, this component remains "frozen" and does not undergo further weight updates.
  2. Dynamically Evolving Explicit Memory (EM): The core of the innovation lies in the EM, implemented on the Hermes chip—a 256x256 crossbar array of PCM devices. This unit stores class prototypes and evolves as new classes are introduced.

In-situ Learning via Progressive Crystallization

The system's "in-situ" learning capability is driven by the physical characteristics of PCM. Rather than calculating class averages digitally and then writing them to memory, the researchers utilize "progressive crystallization." By applying fine-grained electrical SET pulses, the conductance of the PCM cells is incrementally adjusted. This allows the hardware to physically "superpose" or add multiple training examples directly into the memory state.

This analog accumulation effectively performs the mathematical averaging required for few-shot learning within the memory itself. For inference, the chip executes a 4-quadrant Matrix-Vector Multiply (MVM) to perform a similarity search between the input vector and stored prototypes. Because this operation occurs across the entire crossbar array simultaneously via Kirchhoff’s laws, the search complexity is $O(1)$, meaning the search time does not increase with the number of classes.

Experimental Evaluation

The system was benchmarked using the CIFAR-100 and miniImageNet datasets, adapted for the FSCL setting. The protocol involved:

  • Initial training on 60 "base" classes.
  • Incremental learning of 40 "novel" classes across eight subsequent sessions.
  • A 5-shot learning constraint (only five examples per novel class).

The hardware implementation demonstrated remarkable robustness, achieving accuracy within 1.28% to 2.5% of a full-precision software model. Furthermore, the high-dimensional (256-D) holographic vectors provided inherent resilience against the noise and variability typical of analog PCM devices.

Energy Efficiency and Performance

The IMC approach yielded significant gains in power metrics:

  • Programming Efficiency: The in-situ accumulation method proved at least 4.7x more energy-efficient than traditional memory programming due to the use of shorter, incremental pulses.
  • Operational Energy: The energy cost was measured at 8.78 pJ per PCM device for updates and 19.1 pJ for a similarity search (normalized to a 256-length vector).
  • Scalability: The system represents the largest realization of a truly $O(1)$ similarity search engine using analog states, successfully managing up to 100 classes on a single chip.

Conclusion and Future Work

This research demonstrates that in-memory computing can effectively bridge the gap between the flexibility of few-shot learning and the efficiency of hardware-level execution. While the current implementation relies on a software-trained frozen controller and faces challenges such as PCM conductance drift, it establishes a powerful precedent for energy-efficient, scalable, and non-volatile AI hardware. Future iterations may focus on integrating the controller into the IMC fabric and developing more robust drift-compensation techniques to ensure long-term stability in complex environments.

Summary updated

BibTeX
@inproceedings{karunaratne2022memory,
  author = {Geethan Karunaratne and Michael Hersche and Jovin Langenegger and Giovanni Cherubini and Manuel Le Gallo and Urs Egger and Kevin Brew and Samuel Choi and Injo Ok and Mary Claire Silvestre and Ning Li and Nicole Saulnier and Victor Chan and Ishtiaq Ahsan and Vijay Narayanan and Luca Benini and Abu Sebastian and Abbas Rahimi},
  title = {{In-memory Realization of In-situ Few-shot Continual Learning with a Dynamically Evolving Explicit Memory}},
  booktitle = {ESSCIRC},
  year = {2022},
  url = {https://openreview.net/forum?id=UcQkrlwArE},
}
Figure