Skip to main content
QUICK REVIEW

[Paper Review] Effective Quantization Methods for Recurrent Neural Networks

Qinyao He, He Wen|arXiv (Cornell University)|Nov 30, 2016
Advanced Neural Network ApplicationsComputer Science20 references65 citations
TL;DR

This paper proposes a novel quantization framework for recurrent neural networks (RNNs) that enables effective low-bit quantization of weights and activations in LSTM and GRU cells. By introducing balanced quantization with parameter-dependent thresholds and structural modifications to gates and interlinks, the method achieves state-of-the-art performance even at 2-bit weights, outperforming prior work on PTB and IMDB datasets.

ABSTRACT

Reducing bit-widths of weights, activations, and gradients of a Neural Network can shrink its storage size and memory usage, and also allow for faster training and inference by exploiting bitwise operations. However, previous attempts for quantization of RNNs show considerable performance degradation when using low bit-width weights and activations. In this paper, we propose methods to quantize the structure of gates and interlinks in LSTM and GRU cells. In addition, we propose balanced quantization methods for weights to further reduce performance degradation. Experiments on PTB and IMDB datasets confirm effectiveness of our methods as performances of our models match or surpass the previous state-of-the-art of quantized RNN.

Motivation & Objective

  • Address the significant performance degradation observed in low-bit quantized RNNs, especially with 2-bit weights and activations.
  • Design quantization-aware structures for LSTM and GRU cells to preserve model capacity under extreme bit-width constraints.
  • Develop a balanced quantization method that induces symmetric, evenly distributed quantized weights to maximize parameter space utilization.
  • Demonstrate that balanced quantization significantly improves performance over unbalanced counterparts, particularly at 2-bit precision.
  • Release open-source code for training quantized RNNs in TensorFlow to enable reproducibility and further research.

Proposed method

  • Apply uniform k-bit quantization to weights and activations using affine transformation to map values to [0,1] range before quantization.
  • Use the straight-through estimator (STE) to backpropagate gradients through the non-differentiable quantization function during training.
  • Introduce parameter-dependent thresholds in the quantization process to enforce balanced distributions of quantized weights, especially for 2-bit cases.
  • Modify the internal structure of LSTM and GRU cells by quantizing gate computations and interlink connections to maintain numerical stability.
  • Apply normalization and regularization techniques such as tanh activation and weight decay to prevent gradient explosion in low-bit settings.
  • Train models using ADAM optimizer with fixed hyperparameters and evaluate on standard NLP benchmarks (PTB and IMDB).

Experimental results

Research questions

  • RQ1Can effective quantization of RNNs be achieved at 2-bit weights and activations without significant performance degradation?
  • RQ2How does balanced quantization of weights—induced via parameter-dependent thresholds—affect model accuracy compared to unbalanced quantization?
  • RQ3What structural modifications to LSTM and GRU cells improve robustness under low-bit quantization?
  • RQ4Does the proposed method outperform prior state-of-the-art quantized RNNs on standard NLP benchmarks like Penn Treebank and IMDB?
  • RQ5Can the proposed quantization framework be generalized to other RNN architectures or extended to higher bit-widths beyond 4-bit?

Key findings

  • The proposed balanced quantization method reduces performance degradation significantly, achieving 146 perplexity (PPW) on the Penn Treebank dataset with 2-bit weights and 3-bit activations in LSTM.
  • For 2-bit weights and 2-bit activations, the GRU model achieves 150 PPW on PTB, outperforming the prior state-of-the-art by 74 PPW.
  • On the IMDB sentence classification task, the 2-bit weight and 2-bit activation GRU model achieves 87.08% accuracy, surpassing the unbalanced counterpart by 0.86 percentage points.
  • The 4-bit quantized models match or slightly exceed the performance of full-precision 32-bit models, with 104 PPW for GRU and 114 PPW for LSTM on PTB.
  • Binarized models (1-bit weights) converge but suffer from large performance drops, indicating that 1-bit quantization remains challenging for RNNs without architectural modifications.
  • The results confirm that balanced quantization is especially effective at low bit-widths, with performance gaps between balanced and unbalanced methods widening at 2-bit precision.

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.