TL;DR
RxNN is a simulation framework that evaluates large-scale Deep Neural Networks (DNNs) on resistive crossbar hardware. It features a "Fast Crossbar Model" (FCM) that is $10^4$ to $10^5$ times faster than standard circuit simulations, enabling the first quantitative analysis of how hardware non-idealities like wire resistance and sneak paths degrade ImageNet-scale model accuracy.
Introduction: The Promise and Pitfalls of Resistive Crossbars
Resistive crossbars, utilizing emerging non-volatile memories like ReRAM or PCM, are considered the "holy grail" for AI hardware. They perform Vector-Matrix Multiplication (VMM) directly in memory with exceptional energy efficiency. However, real-world implementations suffer from "non-idealities" including interconnect resistance (IR drop), sneak paths, and peripheral circuit non-linearities.
Evaluating these effects on modern DNNs (e.g., ResNet, VGG) has historically been difficult because standard circuit simulators like SPICE are too slow for models with millions of parameters. Simplified architectural models often fail to capture how errors change based on the specific data being processed.
Methodology: The Fast Crossbar Model (FCM)
The authors developed RxNN, a framework integrated with the Caffe deep learning library. The core innovation is the Fast Crossbar Model (FCM), which abstracts VMM operations into three stages:
- Non-linear I/O Models: Capturing the behavior of Digital-to-Analog (DAC) and Analog-to-Digital (ADC) converters.
- The $G_{non-ideal}$ Matrix: Pre-solving Kirchhoff’s and Ohm’s laws to derive an "equivalent non-ideal conductance matrix," avoiding the need for per-inference circuit simulation.
- BLAS Integration: Utilizing optimized linear algebra libraries to maintain high simulation speeds.
This approach allows RxNN to achieve the fidelity of circuit simulators while running at the speeds required for deep learning research, including model-in-the-loop retraining.
Key Insights: Hardware Sensitivity at Scale
RxNN reveals that the resilience of DNNs to hardware noise, often observed in small datasets like MNIST, vanishes at scale. ImageNet-scale models are significantly more sensitive to hardware imperfections.
Key findings include:
- The Size-Efficiency Trade-off: While larger crossbars are more energy-efficient due to amortized peripheral costs, they suffer from more severe IR drops and sneak paths, leading to higher accuracy degradation.
- Data-Dependent Errors: Errors are dynamic, changing based on input voltages and programmed weights—a behavior captured by FCM but missed by simpler models.
- Retraining Benefits: Retraining with hardware-aware gradients can recover significant accuracy (e.g., ~26% for GoogleNet), though it cannot fully bridge the gap to ideal software performance.
Results and Future Outlook
FCM achieved a 4-5 orders of magnitude speedup over HSPICE with a functional error of less than 0.28%. On ImageNet models, hardware non-idealities caused accuracy drops of 9.6% to 32% depending on the architecture. While retraining improved performance for AlexNet, VGG-16, and GoogleNet, a substantial accuracy gap remains.
Future work must explore cross-layer mitigation techniques, combining hardware circuit improvements with robust algorithmic compensation, to make resistive crossbars a viable reality for production-grade AI.
Summary updated