Skip to main content
QUICK REVIEW

[Paper Review] FastGRNN: A Fast, Accurate, Stable and Tiny Kilobyte Sized Gated Recurrent Neural Network

Aditya Kusupati, Manish Singh|arXiv (Cornell University)|Jan 8, 2019
Neural Networks and Applications47 references97 citations
TL;DR

The paper introduces FastRNN and FastGRNN, architectures that stabilize training and drastically reduce model size while preserving accuracy, enabling kilobyte-sized RNNs for on-device inference on resource-constrained devices.

ABSTRACT

This paper develops the FastRNN and FastGRNN algorithms to address the twin RNN limitations of inaccurate training and inefficient prediction. Previous approaches have improved accuracy at the expense of prediction costs making them infeasible for resource-constrained and real-time applications. Unitary RNNs have increased accuracy somewhat by restricting the range of the state transition matrix's singular values but have also increased the model size as they require a larger number of hidden units to make up for the loss in expressive power. Gated RNNs have obtained state-of-the-art accuracies by adding extra parameters thereby resulting in even larger models. FastRNN addresses these limitations by adding a residual connection that does not constrain the range of the singular values explicitly and has only two extra scalar parameters. FastGRNN then extends the residual connection to a gate by reusing the RNN matrices to match state-of-the-art gated RNN accuracies but with a 2-4x smaller model. Enforcing FastGRNN's matrices to be low-rank, sparse and quantized resulted in accurate models that could be up to 35x smaller than leading gated and unitary RNNs. This allowed FastGRNN to accurately recognize the "Hey Cortana" wakeword with a 1 KB model and to be deployed on severely resource-constrained IoT microcontrollers too tiny to store other RNN models. FastGRNN's code is available at https://github.com/Microsoft/EdgeML/.

Motivation & Objective

  • Address unstable and inaccurate training of standard RNNs and high prediction costs in gated/unitary models.
  • Develop a residual-connection based RNN (FastRNN) with minimal extra parameters to stabilize training.
  • Extend FastRNN to FastGRNN by introducing a gate that reuses RNN matrices for competitive accuracy with smaller models.
  • Enable extreme model compression through low-rank, sparsity, and quantization without large accuracy loss.

Proposed method

  • Introduce a weighted residual connection in FastRNN with two trainable scalar weights (α, β) to stabilize gradients.
  • Derive theoretical bounds showing convergence of FastRNN independent of sequence length T and generalization bounds independent of T.
  • Develop FastGRNN by replacing the scalar residual with a per-coordinate gate z_t that reuses RNN matrices.
  • Apply low-rank, sparsity, and quantization to W and U to obtain kilobyte-sized models (1–6 KB) while maintaining accuracy.
  • Train FastGRNN with a three-stage procedure: learn low-rank representation, learn sparsity structure, and optimize with fixed support; then apply byte quantization for integer- arithmetic inference.

Experimental results

Research questions

  • RQ1Can a residual-enabled RNN (FastRNN) achieve stable training and competitive accuracy with minimal added parameters compared to standard RNNs?
  • RQ2Does a gate-based extension (FastGRNN) that reuses RNN matrices maintain state-of-the-art-like accuracy at a fraction of the model size?
  • RQ3To what extent can low-rank, sparse, and quantized representations compress FastGRNN without substantial accuracy loss?
  • RQ4Are kilobyte-sized FastGRNN models suitable for real-time on-device wakeword detection and other IoT tasks?

Key findings

  • FastRNN achieves provably stable training and faster convergence than standard RNNs due to a residual connection with two learned weights.
  • FastGRNN matches or exceeds state-of-the-art gated RNN accuracies while using 2–4x fewer parameters than leading gated/unitary RNNs.
  • With low-rank, sparse, and quantized constraints, FastGRNN models can be up to 35x smaller than leading gated/unitary RNNs.
  • A 1 KB FastGRNN model can recognize the Hey Cortana wakeword with accuracy comparable to larger models and can be deployed on severely resource-constrained IoT devices.
  • On IoT hardware, FastGRNN is substantially faster at prediction (e.g., 18–42x faster on certain boards) than leading RNN methods; 25–45x faster in other comparisons.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.