Skip to main content
QUICK REVIEW

[Paper Review] Learning Recurrent Binary/Ternary Weights

Arash Ardakani, Zhengyun Ji|arXiv (Cornell University)|Sep 28, 2018
Topic ModelingComputer Science45 references3 citations
TL;DR

This paper proposes a method to train recurrent neural networks (RNNs) with binary and ternary weights during backpropagation, replacing computationally expensive multiply-accumulate operations with simple accumulations. The approach achieves up to 12× memory reduction and 10× inference speedup in custom hardware while maintaining competitive accuracy on sequence modeling tasks like language modeling and classification.

ABSTRACT

Recurrent neural networks (RNNs) have shown excellent performance in processing sequence data. However, they are both complex and memory intensive due to their recursive nature. These limitations make RNNs difficult to embed on mobile devices requiring real-time processes with limited hardware resources. To address the above issues, we introduce a method that can learn binary and ternary weights during the training phase to facilitate hardware implementations of RNNs. As a result, using this approach replaces all multiply-accumulate operations by simple accumulations, bringing significant benefits to custom hardware in terms of silicon area and power consumption. On the software side, we evaluate the performance (in terms of accuracy) of our method using long short-term memories (LSTMs) on various sequential models including sequence classification and language modeling. We demonstrate that our method achieves competitive results on the aforementioned tasks while using binary/ternary weights during the runtime. On the hardware side, we present custom hardware for accelerating the recurrent computations of LSTMs with binary/ternary weights. Ultimately, we show that LSTMs with binary/ternary weights can achieve up to 12x memory saving and 10x inference speedup compared to the full-precision implementation on an ASIC platform.

Motivation & Objective

  • To address the high computational and memory demands of RNNs on resource-constrained mobile devices.
  • To enable efficient hardware deployment of RNNs by learning binary and ternary weights during training.
  • To reduce reliance on full-precision multiplications during inference, minimizing power and silicon area.
  • To demonstrate that binary and ternary RNNs can match full-precision accuracy on diverse sequential tasks.
  • To design and evaluate custom ASIC accelerators for binary/ternary RNN inference with low power and high throughput.

Proposed method

  • The method trains RNNs using backpropagation with weights constrained to {+1, -1} (binary) or {+1, 0, -1} (ternary) via differentiable approximation of the sign function.
  • A learnable scaling factor is used to preserve gradient flow during training, enabling effective optimization of binary and ternary weights.
  • The approach integrates into standard RNN architectures such as LSTMs and GRUs, maintaining recurrent computation with quantized weights.
  • Hardware acceleration is achieved by replacing multipliers with multiplexers in MAC units, reducing area and power consumption.
  • Two ASIC implementations are developed: a low-power design with 100 MAC units and a high-throughput design with 10× more MAC units.
  • The hardware uses 12-bit fixed-point representations for activations and binary/ternary weights, ensuring no accuracy loss.

Experimental results

Research questions

  • RQ1Can recurrent binary and ternary weights be effectively learned during backpropagation without significant accuracy degradation?
  • RQ2To what extent can binary and ternary RNNs maintain performance on long sequential tasks like language modeling and sequence classification?
  • RQ3How much improvement in memory efficiency and inference speed can be achieved with binary/ternary RNNs in custom hardware?
  • RQ4Can the proposed method overcome the exploding gradient problem that typically hinders RNN binarization?
  • RQ5What are the trade-offs between power consumption, silicon area, and throughput in ASICs optimized for binary/ternary RNNs?

Key findings

  • The proposed method achieves competitive accuracy on character-level language modeling (BPC: 1.39 for full-precision, 1.37 for binary, 1.37 for ternary) and sequence classification tasks.
  • Binary and ternary RNNs achieve up to 12× reduction in memory bandwidth and storage requirements compared to full-precision models.
  • The high-speed ASIC implementation achieves up to 10× inference speedup over full-precision hardware by using 10× more MAC units due to reduced area per unit.
  • The low-power ASIC design reduces power consumption by up to 9× and silicon area by 10.6× compared to full-precision counterparts at 400 MHz.
  • The method generalizes well across diverse tasks, including long sequences and complex temporal dependencies, without performance degradation.
  • Hardware results confirm that replacing multipliers with multiplexers enables significant energy and area savings while preserving model accuracy.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.