Abstract
Processing-In-Memory (PIM) is a promising hardware paradigm designed to overcome the "memory wall" by performing computations directly within memory arrays. While PIM offers substantial improvements in energy efficiency and throughput, its reliance on analog computing introduces significant challenges, specifically low-resolution quantization and hardware non-idealities. Standard Quantization-Aware Training (QAT) fails to account for these factors, leading to severe accuracy degradation upon deployment. We introduce PIM-QAT, a specialized training framework that integrates the hardware's analog computing flow—including partial sum quantization and noise—into the training loop. Our results demonstrate that PIM-QAT can restore model accuracy to near-digital levels on physical SRAM PIM prototypes while maintaining high energy efficiency.
Introduction: Bridging the Memory Wall
The performance of modern deep learning is increasingly limited by the "memory wall"—the energy and time overhead of moving data between processors and memory. Processing-In-Memory (PIM) addresses this by executing operations like matrix-vector multiplications directly within memory structures such as SRAM or ReRAM. By eliminating data movement, PIM systems can achieve orders of magnitude better efficiency than traditional GPUs or TPUs.
The PIM Computing Flow and its Challenges
Unlike conventional digital systems, PIM relies on analog signals to perform computations. This fundamental shift introduces a unique processing pipeline.
As shown in Figure 1, PIM systems decompose large operations into smaller subsets, perform analog multiplication and accumulation, and then use an Analog-to-Digital Converter (ADC) for PIM Quantization. This extra quantization step is often low-precision and subject to "non-idealities" such as thermal noise and circuit non-linearities. Standard QAT methods only optimize for weight and activation bit-widths, ignoring this critical hardware-level bottleneck. Consequently, models that perform well in digital simulations often collapse to near-random accuracy when deployed on real PIM hardware.
The PIM-QAT Framework
To bridge this gap, PIM-QAT incorporates the hardware's specific non-idealities directly into the training process.
Key Methodological Innovations
- Generalized Straight-Through Estimator (GSTE): PIM-QAT uses an improved GSTE to backpropagate gradients through the non-differentiable PIM quantization functions, ensuring stable learning.
- Forward and Backward Rescaling: The authors identified a "scale-enlarging" effect in PIM quantization that can lead to exploding gradients. Mathematical rescaling factors are applied to stabilize training dynamics, particularly for ultra-low bit-widths.
- Batch Normalization (BN) Calibration: To account for chip-to-chip variations, a small subset of data is used to re-calibrate BN layers on the target hardware. This "software fix" allows the model to absorb individual hardware imperfections without full retraining.
- Adjusted Precision Training: Training precision is dynamically matched to the hardware's Effective Number of Bits (ENOB), accounting for how noise effectively reduces the resolution of the ADC.
Experimental Results and Efficiency
The researchers evaluated PIM-QAT using ResNet and VGG architectures on CIFAR-10 and CIFAR-100 datasets, validating the results on a physical 28nm SRAM PIM prototype chip.
- Accuracy Recovery: On a 7-bit PIM system, baseline models achieved only ~10-13% accuracy. PIM-QAT successfully restored this to approximately 90%, nearly matching digital performance.
- Robustness: The framework proved highly resilient to injected thermal noise, where conventional models failed immediately.
- Hardware Efficiency: The SRAM PIM prototype achieved an efficiency of 49.6 TOPS/W, vastly outperforming the NVIDIA V100 GPU (0.1 TOPS/W) and Google TPU (2.3 TOPS/W).
Conclusion
PIM-QAT demonstrates that hardware imperfections in PIM systems can be effectively mitigated through algorithmic co-design. By modeling the "dirty secrets" of analog computing during training, PIM-QAT enables the deployment of high-accuracy neural networks on extremely energy-efficient hardware, paving the way for the next generation of edge AI accelerators.
Summary updated