Skip to main content
QUICK REVIEW

[Paper Review] Quasi-Recurrent Neural Networks

James Bradbury, Stephen Merity|arXiv (Cornell University)|Nov 5, 2016
Topic ModelingComputer Science27 references326 citations
TL;DR

QRNNs combine parallel convolutional computations with a lightweight recurrent pooling to model sequences, yielding faster training/inference and competitive or better accuracy than LSTMs on language tasks.

ABSTRACT

Recurrent neural networks are a powerful tool for modeling sequential data, but the dependence of each timestep's computation on the previous timestep's output limits parallelism and makes RNNs unwieldy for very long sequences. We introduce quasi-recurrent neural networks (QRNNs), an approach to neural sequence modeling that alternates convolutional layers, which apply in parallel across timesteps, and a minimalist recurrent pooling function that applies in parallel across channels. Despite lacking trainable recurrent layers, stacked QRNNs have better predictive accuracy than stacked LSTMs of the same hidden size. Due to their increased parallelism, they are up to 16 times faster at train and test time. Experiments on language modeling, sentiment classification, and character-level neural machine translation demonstrate these advantages and underline the viability of QRNNs as a basic building block for a variety of sequence tasks.

Motivation & Objective

  • Motivate and address limited parallelism in traditional RNNs for long sequences.
  • Propose QRNN architecture that alternates convolutional layers with a minimal pooling mechanism.
  • Demonstrate QRNNs achieve better or comparable accuracy to LSTMs while significantly increasing speed across tasks.
  • Explore variants and extensions such as dense connections, attention, and encoder–decoder setups.
  • Show empirical gains on sentiment analysis, language modeling, and character-level machine translation.

Proposed method

  • Represent a QRNN layer as a convolutional component producing Z, F, and O via masked convolutions: Z = tanh(W_z * X), F = sigmoid(W_f * X), O = sigmoid(W_o * X).
  • Use a parameterless pooling function controlled by gates (f, o, i) to propagate state across timesteps with channelwise parallelism.
  • Stack multiple QRNN layers to increase capacity and enable deeper models.
  • Extend with regularization (zoneout on pooling gates), dense connections (DenseNet-like skip connections), and encoder–decoder attention for seq2seq tasks.
  • Incorporate encoder–decoder modifications to inject encoder state into decoder QRNN gates and use attention as context.
  • Utilize variants like f-pooling, fo-pooling, and ifo-pooling to control pooling dynamics across channels.

Experimental results

Research questions

  • RQ1Can QRNNs provide parallel computation across timesteps and channels without sacrificing sequence order information?
  • RQ2How do QRNNs perform in comparison to LSTMs in terms of accuracy on language modeling, sentiment analysis, and translation?
  • RQ3Do architectural extensions (dense connections, attention, and encoder–decoder configurations) enhance QRNN performance on sequence tasks?
  • RQ4What are the speedups of QRNNs relative to optimized LSTMs in training and inference across datasets and sequence lengths?

Key findings

  • QRNNs outperform LSTMs of equal hidden size on IMDb sentiment classification, Penn Treebank language modeling, and character-level German–English translation.
  • QRNNs deliver substantial speedups, up to 16x faster at train and test time in some settings, due to increased parallelism.
  • On IMDb, densely-connected 4-layer QRNN achieves 91.4% test accuracy with 4 layers of 256 units.
  • On PTB language modeling, QRNN (medium) achieves perplexities competitive with LSTMs, especially with zoneout regularization.
  • Char-level QRNN for IWSLT German–English translation yields BLEU of 19.41 with 1.0 hr/epoch training time, outperforming a similarly sized char-LSTM.
  • QRNNs maintain interpretable channel-wise states due to the independent channel pooling, aiding analysis and debugging.

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.