Examining and Mitigating the Impact of Crossbar Non-idealities for Accurate Implementation of Sparse Deep Neural Networks

Abhiroop Bhattacharjee, Lakshya Bhatnagar, Priyadarshini Panda

Abstract

Recently several structured pruning techniques have been introduced for energy-efficient implementation of Deep Neural Networks (DNNs) with lesser number of crossbars. Although, these techniques have claimed to preserve the accuracy of the sparse DNNs on crossbars, none have studied the impact of the inexorable crossbar non-idealities on the actual performance of the pruned networks. To this end, we perform a comprehensive study to show how highly sparse DNNs, that result in significant crossbar-compression-rate, can lead to severe accuracy losses compared to unpruned DNNs mapped onto non-ideal crossbars. We perform experiments with multiple structured-pruning approaches (such as, C/F pruning, XCS and XRS) on VGG11 and VGG16 DNNs with benchmark datasets (CIFAR10 and CIFAR100). We propose two mitigation approaches - Crossbar column rearrangement and Weight-Constrained-Training (WCT) - that can be integrated with the crossbar-mapping of the sparse DNNs to minimize accuracy losses incurred by the pruned models. These help in mitigating non-idealities by increasing the proportion of low conductance synapses on crossbars, thereby improving their computational accuracies.

Introduction

Memristive crossbars are a leading candidate for analog AI hardware, enabling massive Multiply-and-Accumulate (MAC) operations with exceptional energy efficiency. To fit complex Deep Neural Networks (DNNs) onto these compact circuits, researchers often use structured pruning—removing entire rows or columns of weights. However, real-world analog hardware is subject to "non-idealities," such as interconnect parasitic resistances and synaptic variations. While pruning is effective in idealized software environments, this study reveals a "Sparsity Paradox": high sparsity can paradoxically make models significantly more vulnerable to hardware noise. This paper addresses this gap and proposes hardware-aware strategies to mitigate these effects.

Methodology: Modeling and Mitigation

To bridge the gap between software and hardware, the researchers developed a custom PyTorch-based simulation framework. This framework models circuit-level non-idealities by integrating Kirchhoff’s and Ohm’s laws into the DNN inference process, allowing for a realistic assessment of hardware performance.

The simulation framework maps DNN weights to crossbar instances and integrates non-ideal characteristics like parasitic resistances and synaptic variation.

The study introduces two primary mitigation techniques designed to shield the model from noise:

  1. Crossbar-column rearrangement (R): A mathematical transformation that reorders columns based on their weight distribution. By concentrating low-conductance synapses in noise-sensitive regions of the crossbar, the model's overall resilience is improved.
  2. Weight-Constrained-Training (WCT): A training-time intervention where weights are clipped to a specific range. This forces the network to rely on lower conductance states, which are naturally more resilient to the hardware's Non-Ideality Factor (NF).

Key Insights: The Sparsity Paradox and Size Trap

The experiments, conducted on VGG11 and VGG16 models using CIFAR10 and CIFAR100 datasets, uncovered critical vulnerabilities in sparse models. In software, higher sparsity typically improves efficiency without significant accuracy loss. In analog hardware, however, as sparsity increases, the remaining weights become more critical. A single "noisy" synapse in a sparse model exerts a disproportionately large impact on the total output compared to a dense, unpruned model.

Furthermore, the "Size Trap" indicates that while larger crossbars (e.g., 64x64) are more area-efficient, they suffer from significantly higher non-ideality impacts. On these larger arrays, the accuracy of sparse models can plummet by nearly 40% compared to their software baselines.

Results and Performance Recovery

The proposed mitigation strategies effectively counter the accuracy degradation caused by hardware noise. As shown in the experimental results, sparse models fare much worse than unpruned ones without intervention, but the proposed techniques reverse this trend.

Accuracy comparisons across different crossbar sizes show that mitigation strategies like Column Rearrangement (R) and Weight-Constrained-Training (WCT) significantly recover performance in pruned models.

Key findings include:

  • Vulnerability: On 64x64 crossbars (CIFAR10), unpruned VGG11 models saw a ~21% accuracy drop. Sparse models (C/F, XCS, XRS) saw even steeper drops of 24% to 39%.
  • Rearrangement Success: Applying column rearrangement (R) improved the accuracy of C/F pruned models by approximately 9% on 64x64 arrays.
  • WCT Dominance: WCT proved most effective; sparse models trained with WCT achieved 6-7% higher accuracy than unpruned models on large, non-ideal crossbars, proving that hardware-aware training can make "less" perform like "more."

Conclusion

This research highlights a critical oversight in the deployment of sparse DNNs on analog hardware: the increased sensitivity of pruned models to non-idealities. By employing hardware-aware techniques like column rearrangement and Weight-Constrained-Training, researchers can leverage the efficiency of sparsity while maintaining, or even exceeding, the accuracy of dense models in real-world analog environments.

Summary updated

BibTeX
@inproceedings{bhattacharjee2022examining,
  author = {Abhiroop Bhattacharjee and Lakshya Bhatnagar and Priyadarshini Panda},
  title = {{Examining and Mitigating the Impact of Crossbar Non-idealities for Accurate Implementation of Sparse Deep Neural Networks}},
  booktitle = {DATE},
  year = {2022},
  url = {https://openreview.net/forum?id=qCk1CdPIDvz},
}
Figure