Experimentally validated memristive memory augmented neural network with efficient hashing and similarity search

Ruibin Mao, Bo Wen, Arman Kazemi, Yahui Zhao, Ann Franchesca Laguna, Rui Lin, Ngai Wong, Michael Niemier, Xiaobo Sharon Hu, Xia Sheng, Catherine E. Graves, John Paul Strachan, Can LiNature Communications 2022

Abstract

Lifelong on-device learning is a key challenge for machine intelligence, requiring systems to learn from few, often single, samples. Memory-augmented neural networks (MANNs) have been proposed to achieve this, but traditional hardware implementations suffer from the von Neumann bottleneck due to constant data shuffling between processor and memory. This work experimentally validates a fully integrated memristive crossbar platform implementing all MANN components. By leveraging memristor stochasticity for locality sensitive hashing and repurposing crossbars for content-addressable memory, the system achieves near-digital accuracy with significant improvements in energy efficiency and latency. This demonstration paves the way for practical on-device lifelong learning.

Introduction

Deep Neural Networks (DNNs) excel at pattern recognition but typically require extensive datasets to learn new concepts. Humans, by contrast, exhibit "one-shot learning," identifying new objects from a single example. Memory-Augmented Neural Networks (MANNs) attempt to replicate this by pairing a neural network controller with an external memory module to store and recall information rapidly.

However, implementing MANNs on standard CPUs or GPUs is hindered by the "memory wall." While memristors (resistors with memory) have been used to accelerate the "thinking" part of neural networks, using them for the "remembering" and "searching" tasks—specifically similarity search and hashing—has remained a significant hardware challenge. This research presents a solution by integrating the entire MANN pipeline onto a memristive crossbar platform.

Hardware Implementation and Methods

The researchers developed a complete MANN pipeline where every stage occurs within memristor crossbar arrays. The system was fabricated using 50 nm $\text{Ta}/\text{TaO}_x/\text{Pt}$ memristors monolithically integrated on top of 180 nm CMOS peripheral circuits.

Overview of the memristive MANN architecture and hardware implementation, including the CNN controller, LSH module, and ternary key memory.

The architecture consists of three primary stages:

  1. CNN Controller: A Convolutional Neural Network extracts feature vectors from input images using memristive matrix-vector multiplication (Analog Matrix Multiplication).
  2. Locality Sensitive Hashing (LSH): High-dimensional features are compressed into compact "signatures." The team utilized the intrinsic stochasticity (natural randomness) of memristor conductance to generate random projection matrices, effectively turning device variability into a functional asset for generating hashing vectors.
  3. In-Memory Search: The crossbar is repurposed as a Ternary Content-Addressable Memory (TCAM) to perform parallel similarity searches. This allows the system to compare a new input against all stored memories simultaneously, calculating the Hamming distance in a single constant-time step.
Detail of the in-memory nearest neighbor search mechanism, showing how memristor conductance states (G_on, G_off) are used to identify mismatches and find the closest match.

To combat analog noise, the authors introduced Ternary LSH (TLSH). This method uses a "wildcard" (X) bit for values near decision boundaries, making the system robust to device fluctuations and narrowing the accuracy gap between analog hardware and digital software.

Experimental Results

The system was validated using the Omniglot dataset (handwritten characters) for 5-way and 25-way one-shot learning tasks, and the Mini-ImageNet dataset for scalability testing.

  • Accuracy: On the 5-way 1-shot Omniglot task, the hardware achieved 94.9% accuracy, nearly identical to the 95.2% software baseline.
  • Energy Efficiency: The system consumed approximately 5.36 μJ per inference, which is 257x lower energy than a high-end Nvidia Tesla P100 GPU.
  • Speed: The memristor approach offered a 10,466x speedup in search latency compared to the GPU for the Omniglot dataset.
  • Scalability: Simulations on the more complex Mini-ImageNet dataset showed the system could reach 58.7% accuracy, only 1.3% behind digital implementations.

Discussion and Future Outlook

This work demonstrates that "imperfections" like memristor variability can be harnessed for algorithmic benefits, such as providing "free" entropy for hashing. The successful integration of the entire MANN loop on-chip paves the way for efficient, lifelong on-device learning in edge robotics and mobile AI.

Future work will focus on reducing the programming overhead associated with the "write-and-verify" process and improving material stability to scale to even larger memory banks. These advancements could eventually support more complex attention-based algorithms that are currently impractical on conventional hardware.

Summary updated

BibTeX
@inproceedings{mao2022experimentally,
  author = {Ruibin Mao and Bo Wen and Arman Kazemi and Yahui Zhao and Ann Franchesca Laguna and Rui Lin and Ngai Wong and Michael Niemier and Xiaobo Sharon Hu and Xia Sheng and Catherine E. Graves and John Paul Strachan and Can Li},
  title = {{Experimentally validated memristive memory augmented neural network with efficient hashing and similarity search}},
  booktitle = {Nature Communications},
  year = {2022},
  doi = {10.1038/s41467-022-33629-7},
}
Figure