Skip to main content
QUICK REVIEW

[Paper Review] Reversible Recurrent Neural Networks

Matthew Mackay, Paul Vicol|arXiv (Cornell University)|Oct 25, 2018
Neural Networks and ApplicationsComputer Science21 citations
TL;DR

This paper proposes reversible recurrent neural networks (RNNs) that reduce memory usage during training by reconstructing hidden states instead of storing them, using a small number of bits to enable perfect reversal while preserving information. The method achieves 10–15× memory reduction in RNNs and 5–15× in attention-based sequence-to-sequence models, with performance comparable to standard models on language modeling and machine translation tasks.

ABSTRACT

Recurrent neural networks (RNNs) provide state-of-the-art performance in processing sequential data but are memory intensive to train, limiting the flexibility of RNN models which can be trained. Reversible RNNs---RNNs for which the hidden-to-hidden transition can be reversed---offer a path to reduce the memory requirements of training, as hidden states need not be stored and instead can be recomputed during backpropagation. We first show that perfectly reversible RNNs, which require no storage of the hidden activations, are fundamentally limited because they cannot forget information from their hidden state. We then provide a scheme for storing a small number of bits in order to allow perfect reversal with forgetting. Our method achieves comparable performance to traditional models while reducing the activation memory cost by a factor of 10--15. We extend our technique to attention-based sequence-to-sequence models, where it maintains performance while reducing activation memory cost by a factor of 5--10 in the encoder, and a factor of 10--15 in the decoder.

Motivation & Objective

  • Address the high memory cost of training recurrent neural networks (RNNs), particularly due to storing hidden activations during backpropagation.
  • Overcome the fundamental limitation of perfectly reversible RNNs, which cannot forget information and thus fail on basic sequence tasks.
  • Develop a memory-efficient RNN architecture that allows perfect reversal while supporting information forgetting through minimal bit storage.
  • Extend the reversible RNN framework to attention-based sequence-to-sequence models, maintaining performance while reducing activation memory.
  • Demonstrate competitive performance on language modeling and neural machine translation benchmarks with significant memory savings.

Proposed method

  • Design reversible variants of GRU and LSTM by modifying the hidden-to-hidden transition to be invertible using a coupling mechanism.
  • Introduce a small number of stored bits (1–5 bits per unit) to enable perfect reversal in models that need to forget information.
  • Use a reversible block structure inspired by RevNet, where hidden states are reconstructed during backpropagation using residual functions.
  • Apply attention over a small, fixed-size slice of the hidden state (e.g., 20–60 dimensions) concatenated with word embeddings to reduce memory in attention mechanisms.
  • Reconstruct hidden states during backpropagation using the inverse of the forward transformation, avoiding storage of intermediate activations.
  • Balance memory savings with computational cost by accepting a 33% increase in arithmetic operations due to reconstruction.

Experimental results

Research questions

  • RQ1Can perfectly reversible RNNs that store no hidden activations solve basic sequence prediction tasks requiring memory of past inputs?
  • RQ2What is the trade-off between memory efficiency and model expressivity when introducing a small number of bits to enable reversible RNNs with forgetting?
  • RQ3Can reversible RNNs achieve performance comparable to standard RNNs on language modeling and neural machine translation tasks?
  • RQ4How can the reversible RNN framework be extended to attention-based sequence-to-sequence models without sacrificing attention effectiveness?
  • RQ5What level of memory reduction is achievable in both encoder and decoder components of sequence-to-sequence models using reversible architectures?

Key findings

  • Perfectly reversible RNNs fail on a simple one-step prediction task because they cannot forget information, demonstrating a fundamental limitation.
  • By storing 1–5 bits per unit, the proposed method enables perfect reversal while supporting forgetting, allowing the model to solve tasks that require memory of past inputs.
  • On the Penn TreeBank dataset, reversible GRU and LSTM models achieve perplexity within 2–5 points of standard models, with 10–15× memory reduction.
  • On WikiText-2, reversible models lag by 2–5 perplexity points behind standard models, but still achieve 10–15× memory savings.
  • In sequence-to-sequence models, reversible RNNs reduce activation memory by 5–10× in the encoder and 10–15× in the decoder, with competitive performance on Multi30K and IWSLT 2016 benchmarks.
  • The method maintains performance when attention is computed over a small, fixed-size slice of the hidden state concatenated with word embeddings, enabling memory efficiency without significant accuracy loss.

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.