Implementation of Ternary Weights With Resistive RAM Using a Single Sense Operation Per Synapse

Axel Laborieux, Marc Bocquet, Tifenn Hirtzlin, Jacques-Olivier Klein, Etienne Nowak, Elisa Vianello, Jean-Michel Portal, Damien Querlioz

TL;DR

This paper presents a novel hardware architecture for implementing ternary neural networks (TNNs) using resistive RAM (RRAM). By cleverly using a precharge sense amplifier, they can read ternary weights (+1, -1, 0) in a single operation, achieving high energy efficiency and demonstrating that TNNs can outperform binary neural networks (BNNs) even with hardware-level bit errors.

What Problem Does This Paper Address?

Deploying artificial intelligence (AI) on edge devices is severely hampered by the high energy consumption of deep neural networks. While low-precision neural networks, like Binarized Neural Networks (BNNs), offer a solution by reducing computational and memory demands, they might sacrifice accuracy. Ternary Neural Networks (TNNs) offer a middle ground, using three weight values (+1, -1, 0) which can potentially offer better accuracy than BNNs while still being computationally efficient. However, implementing TNNs efficiently in hardware, especially with emerging non-volatile memories like RRAM, presents challenges. Specifically, reading these multiple resistance states from RRAM reliably and quickly, while also being resilient to the inherent variability of these devices, is a key hurdle.

Methods

The core innovation lies in adapting a previously developed architecture for BNNs (using a two-transistor/two-resistor, or 2T2R, cell) for TNNs. Instead of just differentiating between two resistance states (low and high), they leverage the timing of a precharge sense amplifier (PCSA) to distinguish three states.

Here's how it works:

  • Differential Storage: Each synapse uses two RRAM devices.
  • +1 weight: One device in Low Resistance State (LRS), the other in High Resistance State (HRS).
  • -1 weight: One device in HRS, the other in LRS.
  • 0 weight: Both devices in HRS.
  • Single Sense Operation: The PCSA precharges two nodes and then allows them to discharge through the RRAM devices. The key insight is that the discharge speed is highly dependent on the resistance. When both devices are in HRS (representing a '0' weight), the resistance is much higher, leading to a slower discharge. This slower discharge is detected by the PCSA within a fixed sensing time (50ns), allowing it to differentiate the '0' state from the '±1' states where one device is LRS and the other is HRS, resulting in faster discharge.
  • Low Voltage Operation: The architecture is shown to be particularly effective at low supply voltages (1.2V), which is crucial for energy efficiency. This low voltage exacerbates the resistance-dependent discharge time differences, making the ternary weight detection more robust.
  • Experimental Validation: The proposed scheme was implemented and tested on a hybrid 130nm CMOS/RRAM chip.

Datasets

  • CIFAR-10: Used for training and evaluating the performance of both BNN and TNN models for image recognition.

Key Insights and Ideas

  • Ternary Weights are More Accurate than Binary: Even with the same number of synapses, TNNs consistently outperformed BNNs on the CIFAR-10 task, suggesting that the extra precision of ternary weights is beneficial for accuracy.
  • Hardware-Friendly Ternary Readout: The single-operation sense amplifier approach is a significant step towards efficient hardware TNNs, avoiding complex multi-step readouts.
  • Resilience to Bit Errors: Surprisingly, TNNs are shown to be remarkably immune to the specific types of bit errors (especially Type 3 errors, where a '0' weight is misread as '±1') that are common in this RRAM implementation. This is attributed to the fact that '0' weights in TNNs often correspond to less "important" synapses in BNNs.
  • Low Voltage Operation is Key: The sense amplifier's ability to differentiate ternary states is amplified at low supply voltages, making the design ideal for ultra-low power applications.
  • Process, Voltage, and Temperature (PVT) Robustness: The proposed scheme demonstrates good resilience to variations in manufacturing processes, supply voltage, and temperature, which is critical for real-world deployment.

Key Results

  • Experimental Demonstration: The paper successfully demonstrates the ternary weight reading capability on a fabricated 130nm CMOS/RRAM chip.
  • Accuracy Improvement: TNN simulations on CIFAR-10 showed a statistically significant accuracy gain over BNNs (e.g., 0.84-0.86% improvement for quantized activations).
  • Error Resilience: Even with Type 3 bit errors (0 misread as ±1) at rates up to 18.5%, the test accuracy degradation was minimal (e.g., from 92.2% to 92.05%). This suggests that error correction codes might not be necessary for this specific TNN implementation.
  • PVT Variation Tolerance: Simulations confirmed that the ternary readout scheme remains functional across a range of process, voltage, and temperature variations.

Limitations and Future Work

  • RRAM Variability: While the scheme is robust, the inherent variability of RRAM, particularly in the HRS, leads to different error rates for different weight values (Type 3 errors are more frequent). The paper suggests that specific RRAM technologies or programming techniques could further reduce these error rates.
  • Low Voltage Regime: The paper notes that while the scheme is suitable for low voltage operation, performance can degrade significantly if the supply voltage is too close to the transistor threshold voltage.
  • Comparison to Three-Level Programming: The paper briefly discusses an alternative approach of programming individual devices to three levels. It argues that their differential approach is more robust to errors and drift, but acknowledges that the three-level approach might be better for devices with well-controlled analog storage.
  • Future Work: The authors suggest exploring RRAM technologies with better multilevel storage capabilities and further investigating the impact of different error types on network accuracy. They also highlight the potential for this architecture in extremely energy-conscious applications like wireless sensors and medical devices.

Summary updated

Abstract

The design of systems implementing low precision neural networks with emerging memories such as resistive random access memory (RRAM) is a significant lead for reducing the energy consumption of artificial intelligence. To achieve maximum energy efficiency in such systems, logic and memory should be integrated as tightly as possible. In this work, we focus on the case of ternary neural networks, where synaptic weights assume ternary values. We propose a two-transistor/two-resistor memory architecture employing a precharge sense amplifier, where the weight value can be extracted in a single sense operation. Based on experimental measurements on a hybrid 130 nm CMOS/RRAM chip featuring this sense amplifier, we show that this technique is particularly appropriate at low supply voltage, and that it is resilient to process, voltage, and temperature variations. We characterize the bit error rate in our scheme. We show based on neural network simulation on the CIFAR-10 image recognition task that the use of ternary neural networks significantly increases neural network performance, with regards to binary ones, which are often preferred for inference hardware. We finally evidence that the neural network is immune to the type of bit errors observed in our scheme, which can therefore be used without error correction.
BibTeX
@article{laborieux2020implementation,
  author = {Axel Laborieux and Marc Bocquet and Tifenn Hirtzlin and Jacques-Olivier Klein and Etienne Nowak and Elisa Vianello and Jean-Michel Portal and Damien Querlioz},
  title = {{Implementation of Ternary Weights With Resistive RAM Using a Single Sense Operation Per Synapse}},
  journal = {IEEE Trans. Circuits Syst. I Regul. Pap.},
  year = {2020},
  doi = {10.1109/tcsi.2020.3031627},
}
Figure