MomentumRNN: Integrating Momentum into Recurrent Neural Networks

Tan M. Nguyen, Richard G. Baraniuk, Andrea L. Bertozzi, Stanley J. Osher, Bao Wang

Abstract

MomentumRNN is a novel framework that interprets the hidden state updates of Recurrent Neural Networks (RNNs) as steps in a gradient descent optimization. By incorporating momentum and adaptive optimization techniques directly into the RNN architecture, the authors develop a family of models that exhibit faster training convergence, improved accuracy, and increased resilience to the vanishing gradient problem.

Introduction

Recurrent Neural Networks (RNNs) are fundamental to processing sequential data, yet they remain notoriously difficult to design and train. Traditional architectures like the Long Short-Term Memory (LSTM) often rely on ad-hoc gating mechanisms rather than rigorous mathematical foundations. This lack of principled design contributes to two primary challenges: the vanishing gradient problem, where signals decay over long sequences, and the computationally expensive search for optimal architectures.

MomentumRNN addresses these issues by treating the hidden state update as a single step of gradient descent toward an optimal representation. By integrating "momentum"—a well-established acceleration technique in optimization theory—into the network's internal dynamics, this framework creates RNNs that are faster, more accurate, and mathematically robust.

Methods: Optimization as Architecture

The core innovation of MomentumRNN lies in the Gradient Descent (GD) analogy. The authors demonstrate that a standard RNN update can be viewed as a gradient step. By extending this analogy, they "plug in" advanced optimization techniques directly into the cell's architecture:

  • MomentumRNN: Adds a momentum term ($\mu$) and a step size ($s$), introducing an auxiliary "velocity" state to carry information forward.
  • NAG-style & Scheduled Restart: Incorporates Nesterov Accelerated Gradient and periodic momentum resets to stabilize training.
  • AdamRNN & RMSPropRNN: Derives cells based on adaptive optimizers, using moving averages of squared gradients to scale updates.
Evolution of RNN cells from standard recurrent units to Momentum and Adam-based architectures.

Importantly, MomentumRNN acts as a "wrapper." It can be applied to existing models, transforming an LSTM into a MomentumLSTM or enhancing state-of-the-art Orthogonal RNNs.

Key Insights: Propping Up Gradients

A significant theoretical contribution of this work is the proof that momentum acts as a gradient buffer. In the Jacobian matrix—the mathematical engine of backpropagation—the momentum coefficient $\mu$ prevents eigenvalues from collapsing to zero. This effectively "props up" the gradients, allowing the network to learn dependencies across much longer sequences than vanilla RNNs.

Comparison of gradient flow over time steps between a standard RNN and MomentumRNN, illustrating the mitigation of vanishing gradients.

Experimental Results

The authors evaluated MomentumRNN across diverse benchmarks, including Pixel-by-pixel MNIST, the TIMIT speech dataset, and synthetic memory tasks.

  • Performance Gains: On the Permuted MNIST (PMNIST) task, MomentumLSTM achieved 94.72% accuracy, compared to 92.29% for a standard LSTM.
  • Training Efficiency: The speedups are substantial. To reach a baseline accuracy on PMNIST, a standard LSTM required 767 minutes, whereas AdamRNN achieved the same result in just 225 minutes—a 3.4x improvement.
  • Long-Term Memory: In the "Copying Task" with sequences of length 2,000, Momentum-based models successfully converged while standard LSTMs struggled to maintain information.

Conclusion and Future Work

MomentumRNN demonstrates that principles from optimization can directly inform neural architecture design. While the current implementation requires manual tuning of the momentum coefficient and step size, future work may focus on adaptive versions where these parameters are learned. This "optimization-as-design" approach holds potential for extension to other architectures, such as Convolutional or Graph Neural Networks.

Summary updated

BibTeX
@inproceedings{nguyen2020momentumrnn,
  author = {Tan M. Nguyen and Richard G. Baraniuk and Andrea L. Bertozzi and Stanley J. Osher and Bao Wang},
  title = {{MomentumRNN: Integrating Momentum into Recurrent Neural Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=cfsueLeuoq},
}
Figure