Deep Neural Network Optimized to Resistive Memory with Nonlinear Current-Voltage Characteristics

Hyungjun Kim, Taesu Kim, Jinseok Kim, Jae-Joon Kim

TL;DR

This paper tackles the accuracy loss in neural networks when mapped to emerging non-volatile memory (NVM) crossbar arrays due to the inherent non-linear current-voltage (I-V) characteristics of these memory devices. The authors propose a novel approach: instead of trying to force the non-linear hardware to behave linearly, they reconstruct the neural network itself to be optimized for these non-linearities, leading to significantly improved accuracy.

What Problem Does This Paper Address?

Artificial Neural Networks (ANNs) are powerful tools for complex tasks, but they rely heavily on computationally intensive vector-matrix multiplications. Emerging non-volatile memory (NVM) technologies like Resistive Random Access Memory (RRAM) offer a promising, energy-efficient way to perform these operations directly within the memory array (in-memory computing). This is achieved by mapping input vectors to voltages and weight matrices to the resistance states of NVM devices in a crossbar structure.

However, a major hurdle is the non-linear I-V characteristics of these NVM devices. This non-linearity deviates from the ideal linear behavior assumed by conventional ANNs, leading to significant errors in the vector-matrix multiplication. Previous attempts to mitigate this issue, such as restricting the operating voltage range or tuning weights beforehand, have had limited success, often sacrificing DAC resolution or failing to fully address the impact of non-linearity. This paper addresses the fundamental mismatch between the linear assumptions of ANNs and the non-linear reality of NVM hardware.

Methods

The core innovation of this paper is a paradigm shift in how ANNs are designed for NVM hardware. Instead of adapting the hardware to the ANN, they adapt the ANN to the hardware.

  1. Non-linear I-V Modeling: The authors first characterize and model the non-linear I-V behavior of RRAM devices. They use an empirical model based on a sinh function, which captures the exponential nature of the current-voltage relationship. The degree of non-linearity is quantified by a parameter 'k'.
  2. Modified Perceptron Model: The key methodological contribution is the reconstruction of the neural network's basic computational block, the perceptron. The standard weighted sum transfer function ($s = \sum w_i x_i$) is replaced with a function that directly incorporates the non-linear I-V characteristics of the NVM device. For the sinh model, this becomes $y = g(\sum w_i \sinh(\beta x_i))$, where $g$ is the activation function and $\beta$ is a device-specific constant.
  3. Sub-weight Decomposition: To handle the positive-only nature of conductance in RRAM and to enable subtraction for representing negative weights, they employ a sub-weight decomposition technique. Each weight $w_i$ is represented as a pair of positive and negative sub-weights ($w_i = w_i^+ - w_i^-$), which are mapped to adjacent columns in the crossbar array.
  4. Optimized Training: The proposed network is trained using a gradient descent algorithm, similar to conventional ANNs. However, the gradient calculations are modified to account for the new non-linear transfer function and the sub-weight decomposition.

Datasets

  • MNIST: A widely used dataset for handwritten digit recognition.
  • CIFAR-10: A dataset of natural images, categorized into 10 classes.

The paper uses these standard datasets to train and evaluate shallow and deep Multilayer Perceptron (MLP) models, demonstrating the effectiveness of their proposed method across different network architectures and data complexities.

Key Insights and Ideas

  • Embrace Non-linearity: The most significant insight is that trying to linearize non-linear hardware is often less effective than designing neural networks that are inherently compatible with that non-linearity.
  • Network Reconstruction is Key: By modifying the fundamental transfer function of the perceptron to mirror the device's I-V curve, the authors bridge the gap between the ANN model and the physical hardware.
  • Impact of Network Depth and Data Distribution: The paper highlights how network depth and input data distribution can exacerbate accuracy loss in the presence of non-linearities. Deeper networks and datasets with more mid-range activation values are more susceptible.
  • Sub-weight Decomposition for Negative Weights: The clever use of sub-weights allows for the representation of negative weights, a crucial aspect for neural network functionality, using positive-valued memory devices.

Key Results

  • Significant Accuracy Improvement: The proposed method shows significantly higher inference accuracies compared to conventional ANNs when mapped to non-linear RRAM crossbars. For a device with k=7.5, the proposed network achieved 96.74% accuracy on shallow MNIST, compared to 87.90% for naive mapping, and 96.91% on deep MNIST, compared to 9.05% for naive mapping.
  • Robustness to Non-linearity: The proposed networks exhibit minimal accuracy degradation across a wide range of non-linearity (k values), whereas naive mapping methods show drastic accuracy loss as k increases.
  • Applicability to Complex Models: The method was successfully extended to a more complex empirical I-V model, demonstrating its general applicability beyond the initial sinh model.
  • CIFAR-10 Performance: While MLP performance on CIFAR-10 is inherently limited, the proposed method still showed better accuracy and robustness compared to naive mapping.

Limitations and Future Work

  • MLP Limitations for Complex Tasks: The paper acknowledges that for complex tasks like CIFAR-10 classification, the inherent limitations of MLP architectures, rather than the proposed method itself, limit the achievable accuracy.
  • Other Non-ideal Characteristics: The current simulations do not account for other non-ideal characteristics of NVM arrays, such as I-R drop.
  • Future Work: The authors suggest extending this methodology to more complex neural network architectures like Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs). They also plan to investigate the impact of other non-ideal device characteristics.

Summary updated

BibTeX
@article{kim2018deep,
  author = {Hyungjun Kim and Taesu Kim and Jinseok Kim and Jae-Joon Kim},
  title = {{Deep Neural Network Optimized to Resistive Memory with Nonlinear Current-Voltage Characteristics}},
  journal = {ACM J. Emerg. Technol. Comput. Syst.},
  year = {2018},
  doi = {10.1145/3145478},
}
Figure