Reviving and Improving Recurrent Back-Propagation

Renjie Liao, Yuwen Xiong, Ethan Fetaya, Lisa Zhang, KiJung Yoon, Xaq Pitkow, Raquel Urtasun, Richard S. Zemel

Introduction

Training Recurrent Neural Networks (RNNs) on long sequences is notoriously memory-intensive due to the need to unroll the network over time. This paper revives Recurrent Back-Propagation (RBP)—an elegant 1987 algorithm designed for RNNs that reach a steady state—and introduces a highly stable, memory-efficient variant called Neumann-RBP. Neumann-RBP matches the computational speed of Truncated Back-Propagation Through Time (TBPTT) but requires only constant memory and provides a more stable gradient approximation.

The Problem with Standard Back-Propagation

The standard method for training RNNs is Back-Propagation Through Time (BPTT). However, BPTT's memory and compute costs scale linearly with the number of sequence steps, making it impractical for very long sequences. Practitioners usually fall back on Truncated BPTT (TBPTT), which caps the unrolling steps to save memory. Unfortunately, the quality of the resulting gradient approximation in TBPTT is poorly understood.

For a specific class of RNNs—those where the hidden state eventually converges to a steady state (e.g., Graph Neural Networks, continuous Hopfield networks, or the meta-learning process of hyperparameter optimization)—there is an alternative. In 1987, researchers discovered Recurrent Back-Propagation (RBP). RBP uses the implicit function theorem to compute the exact gradient at the steady state without unrolling the forward pass. However, the original RBP algorithm relies on a fixed-point iteration method to solve a linear system, which is highly sensitive to initialization and often fails to converge in practice. This paper aims to fix RBP's instability while maintaining its theoretical elegance and efficiency.

Proposed Methods: Modernizing RBP

The authors propose two modern variants of RBP to solve the linear system required by the implicit function theorem:

  1. CG-RBP (Conjugate Gradient RBP): Because the Jacobian matrix of a general RNN is non-symmetric, standard solvers struggle. CG-RBP applies the Conjugate Gradient method on the Normal Equations (CGNE) to force symmetry.
  2. Neumann-RBP: This is the paper's standout contribution. It uses a Neumann series (the matrix equivalent of a geometric series) to approximate the inverse matrix needed for the gradient. Instead of explicitly computing the massive Jacobian matrix, Neumann-RBP cleverly uses reverse and forward mode auto-differentiation (vector-Jacobian products) to compute the series efficiently.

Crucially, the authors prove that Neumann-RBP is mathematically equivalent to TBPTT when the hidden states converge, but it can be implemented with an in-place loop. This means its memory footprint is $O(1)$ rather than scaling with the truncation steps.

Key Insights

  • TBPTT has a theoretical twin: The authors prove that $K$-step Neumann-RBP is mathematically equivalent to $K$-step TBPTT for convergent RNNs. This provides a rigorous justification for why TBPTT works well in certain settings.
  • Constant memory is a game-changer: Because Neumann-RBP only relies on the final fixed-point hidden state, it doesn't need to store the intermediate hidden states of the forward pass. You get the benefits of TBPTT without the linear memory cost.
  • Original RBP is too fragile: Experiments clearly show that the 1987 RBP algorithm frequently blows up or fails to converge due to the stochasticity of mini-batches. Neumann-RBP completely stabilizes the process.

Experimental Results

The authors evaluate their methods across three distinct domains: Associative Memory, Semi-supervised Document Classification, and Hyperparameter Optimization.

Associative Memory

Using a continuous Hopfield network trained to memorize and retrieve corrupted MNIST images, the original RBP's training loss diverges wildly. In contrast, both CG-RBP and Neumann-RBP remain stable and perfectly match the exact gradients of full BPTT.

Training stability comparison

Document Classification (GNNs)

When training Graph Neural Networks (GNNs) on the Cora and Pubmed citation networks, Neumann-RBP matches the accuracy of TBPTT (46.6% on Cora, 53.5% on Pubmed) and actually outperforms full BPTT. BPTT struggles here because numerical errors accumulate over the long unrolling steps required for the graph to reach a steady state.

GNN classification performance

Hyperparameter Optimization

Neumann-RBP shines in meta-learning. Compared to standard BPTT (which took 310.4 seconds and 4061MB of GPU memory per meta-step), Neumann-RBP was roughly 3x faster and used 4x less memory, all while achieving the same final meta-training loss. TBPTT, on the other hand, tended to oscillate and fail to converge smoothly.

Limitations and Future Work

  • CG-RBP's Condition Number: CG-RBP can perform poorly (e.g., on the Cora dataset) because using Normal Equations squares the condition number of the linear system, making it ill-conditioned. The authors suggest exploring more advanced numerical methods like LSQR.
  • Scope of Application: RBP inherently assumes the dynamical system converges to a steady state. It is not applicable to standard sequence-to-sequence tasks (like language modeling) where the input changes at every time step and no steady state is reached.
  • Future Work: The authors plan to scale Neumann-RBP to hyperparameter optimization for much larger deep neural networks, where the memory savings will be even more critical.

Summary updated

BibTeX
@inproceedings{liao2018reviving,
  author = {Renjie Liao and Yuwen Xiong and Ethan Fetaya and Lisa Zhang and KiJung Yoon and Xaq Pitkow and Raquel Urtasun and Richard S. Zemel},
  title = {{Reviving and Improving Recurrent Back-Propagation}},
  booktitle = {International Conference on Machine Learning},
  year = {2018},
  url = {https://openreview.net/forum?id=B14JbnWubH},
}
Figure