Introduction
Resistive RAM (RRAM) has emerged as a frontrunner for In-Memory-Computing (IMC) due to its ability to perform multiply-accumulate (MAC) operations directly within memory crossbars. By leveraging Ohm’s and Kirchhoff’s laws, RRAM-based accelerators can theoretically achieve massive parallelization and energy efficiency. However, a significant hurdle remains: the "slow-writing" characteristic of RRAM. Programming a single crossbar can take upwards of $10^4$ to $10^5$ cycles, creating a massive bottleneck for large-scale Deep Neural Networks (DNNs) that exceed on-chip memory capacity.
The Reprogramming Wall
Modern DNNs like ResNet and DenseNet often require more memory than is available on a single RRAM chip. For instance, a typical edge device might only house 48 crossbars. When the model size exceeds this capacity, the hardware must frequently "reprogram" its cells to load weights for subsequent layers. This process is so slow that the system spends the vast majority of its time waiting for memory updates rather than performing computations.
As shown in Figure 1, current state-of-the-art reprogramming strategies (row-based and block-based) result in a slowdown of several orders of magnitude. BasisN addresses this "reprogramming wall" by eliminating the need to rewrite weights during inference.
The BasisN Framework: Basis Combination
The core innovation of BasisN is the representation of neural kernels as linear combinations of a fixed set of global basis vectors. Instead of storing unique weights for every layer, the system stores a shared "vocabulary" of basis vectors in the RRAM crossbars.
As illustrated in Figure 2, the process involves:
- Kernel Decomposition: Every kernel is broken down into sub-kernels, which are then represented as a sum of basis vectors ($b_1, b_2, ..., b_d$) scaled by quantized control coefficients ($C$).
- Fixed Weights: These basis vectors are programmed into the RRAM crossbars exactly once at the start.
- Dynamic Reconstruction: During inference, simple transmission gates (TGs) at the bottom of the crossbar columns are toggled based on the coefficients. This allows the hardware to reconstruct the necessary kernel outputs on-the-fly without reprogramming the memristors.
Hardware-Software Co-design
To ensure high accuracy and performance, BasisN employs a co-design approach:
- Alternating Training: An algorithm that iteratively optimizes basis vectors and coefficients. By freezing one while training the other, the model converges to a state where the shared basis set can accurately represent the entire network's weights.
- Contest-Aware Regularization: To maximize throughput, multiple kernels should ideally be computed in parallel. However, if two kernels require the same basis vector simultaneously, a "contest" occurs. BasisN uses a specialized regularization term in the loss function during training to minimize these conflicts, ensuring efficient parallel execution.
Key Results and Impact
Evaluation on CIFAR100 and ImageNet benchmarks demonstrates that BasisN provides a transformative leap in performance for resource-constrained RRAM accelerators:
- Speed and Energy: BasisN reduces inference cycles and the Energy-Delay Product (EDP) to less than 1% of current reprogramming-based methods—a speedup of over 100x.
- Accuracy Preservation: The framework maintains competitive accuracy. For example, DenseNet on ImageNet achieved 72.71% accuracy, comparable to the 71.5% baseline. Accuracy remains stable across various crossbar sizes, though very large sizes (e.g., 512x512) can lead to slight drops due to coarser granularity.
- Area Efficiency: The addition of transmission gates and control logic adds only about 6.17% to the crossbar area, which translates to less than 1% of the total chip area.
Conclusion
BasisN effectively breaks the "reprogramming wall" by shifting the bottleneck from slow analog RRAM programming to fast digital coefficient loading. This paradigm shift makes large-scale DNN inference feasible on limited RRAM hardware, paving the way for high-performance AI on edge devices. Future work will explore scaling this approach to even larger architectures, such as Large Language Models (LLMs).
Summary updated