EPIM: Efficient Processing-In-Memory Accelerators based on Epitome

Chenyu Wang, Zhen Dong, Daquan Zhou, Zhenhua Zhu, Yu Wang, Jiashi Feng, Kurt Keutzer

TL;DR

EPIM introduces a hardware-software co-design framework that replaces standard convolution operators with "epitomes"—compact tensors that reconstruct full weights through patch sampling. By optimizing epitome shapes and quantization for Processing-In-Memory (PIM) hardware, the authors achieve over 30× memory compression on ResNet-50 with high accuracy, enabling large-scale AI models to fit on resource-constrained memristor chips.

What Problem Does This Paper Address?

Processing-In-Memory (PIM) accelerators, which use memristor crossbars to perform computations directly within memory, offer massive energy efficiency gains over traditional CPUs and GPUs. However, they face a major "space" problem: memristor capacity is limited, and writing new weights to them is slow and energy-intensive.

Modern deep learning models like ResNet-50 are simply too large to fit on current PIM chips. While standard compression techniques like pruning and quantization help, they usually try to "fix" existing convolution operators. This paper argues that we should instead redesign the neural operator itself to be inherently more compact and PIM-compatible.

Methods

The authors propose EPIM, a framework centered around the Epitome operator.

  1. The Epitome Operator: Instead of storing a large 4D convolution kernel, an epitome stores a much smaller "source" tensor. During inference, the hardware repeatedly samples small, overlapping patches from this epitome to reconstruct the required weights. This significantly reduces the number of memristors needed.
  2. PIM-Aware Layer-Wise Design: Using epitomes creates a trade-off: smaller epitomes save memory but require more "activations" (cycles) of the memristor crossbar, increasing latency. The authors use an Evolutionary Search algorithm to find the optimal epitome shape for every single layer, balancing memory savings against energy and speed.
  3. Epitome-Aware Quantization: Standard 3-bit quantization usually destroys model accuracy. The authors noticed that because epitomes use overlapping samples, the "center" parts of the epitome are reused more often than the edges. They developed a weighted quantization scheme that prioritizes these high-repetition areas, maintaining accuracy even at ultra-low precision.
  4. Hardware-Software Co-Design: To handle the complex addressing of epitome patches without slowing down the chip, the authors added three specialized index tables (IFAT, IFRT, and OFAT) to the PIM data path. They also introduced "Channel Wrapping," a technique that reuses computed feature maps to reduce expensive writes to the output buffer.

Datasets

The researchers evaluated their approach on the ImageNet dataset, the gold standard for large-scale image classification. They applied EPIM to two primary architectures:

  • ResNet-50
  • ResNet-101

They compared their results against PIM-Prune, a state-of-the-art pruning framework specifically designed for PIM accelerators.

Key Insights and Ideas

  • Operator Redesign vs. Weight Pruning: The "aha moment" is that changing the fundamental way weights are stored (via epitomes) is more effective for PIM than simply deleting weights (pruning). It provides a more flexible "knob" to tune for hardware constraints.
  • Repetition Equals Importance: In an epitome, not all parameters are equal. Because the sampling process overlaps, some weights contribute to the output more frequently. By identifying these "highly repeated parts," the authors could apply more effective quantization.
  • The Latency-Memory Seesaw: There is no free lunch; saving memory with epitomes naturally increases latency because the crossbar must be activated multiple times. The success of EPIM lies in using automated search to find the "sweet spot" where the memory savings are massive but the latency hit is negligible.

Key Results

  • Massive Compression: For ResNet-50, EPIM achieved a 30.65× reduction in crossbar area compared to the baseline.
  • High Accuracy: Even with 3-bit quantization, the EPIM-ResNet50 maintained a 71.59% top-1 accuracy on ImageNet.
  • Energy Efficiency: The optimized models reduced inference energy by up to 23.01× for ResNet-50 and 22.64× for ResNet-101.
  • Superiority over Pruning: EPIM consistently outperformed PIM-Prune in both accuracy and compression rate, proving that epitome-based operators are a better fit for memristor-based hardware.

Limitations and Future Work

  • Control Logic Complexity: While the modifications to the data path are described as "minor," adding three index tables and an address controller increases the complexity of the PIM peripheral circuitry.
  • Search Overhead: The evolutionary search for optimal layer-wise shapes is a "pre-processing" step that can be computationally expensive, though it only needs to be done once during the design phase.
  • Beyond CNNs: The current work focuses on Convolutional Neural Networks. Future research could explore whether epitome-like operators can be adapted for Transformers (Attention mechanisms), which are currently dominating the AI landscape but face even steeper memory challenges.

Summary updated

BibTeX
@inproceedings{wang2024epim,
  author = {Chenyu Wang and Zhen Dong and Daquan Zhou and Zhenhua Zhu and Yu Wang and Jiashi Feng and Kurt Keutzer},
  title = {{EPIM: Efficient Processing-In-Memory Accelerators based on Epitome}},
  booktitle = {DAC},
  year = {2024},
  doi = {10.1145/3649329.3657377},
}
Figure