A Simple Way to Initialize Recurrent Networks of Rectified Linear Units

Quoc V. Le, Navdeep Jaitly, Geoffrey E. HintonarXiv 2015

Abstract

Learning long term dependencies in recurrent networks is difficult due to vanishing and exploding gradients. To overcome this difficulty, researchers have developed sophisticated optimization techniques and network architectures. In this paper, we propose a simpler solution that use recurrent neural networks composed of rectified linear units. Key to our solution is the use of the identity matrix or its scaled version to initialize the recurrent weight matrix. We find that our solution is comparable to LSTM on our four benchmarks: two toy problems involving long-range temporal structures, a large language modeling problem and a benchmark speech recognition problem.

Introduction

Training Recurrent Neural Networks (RNNs) is notoriously difficult because of the vanishing and exploding gradient problems. When backpropagating errors through many time steps, gradients tend to either shrink to zero (making the network "forget" distant past events) or grow uncontrollably. To solve this, the field largely moved toward the Long Short-Term Memory (LSTM) architecture. LSTMs use complex "gates" to maintain a constant error flow, but they are computationally expensive and have many parameters. This paper explores whether standard RNNs can be fixed simply by changing their initialization and activation functions.

The IRNN Architecture

The authors propose a simple model called the IRNN, which consists of two key components:

  1. ReLU Activations: Instead of the traditional tanh or sigmoid functions, the network uses Rectified Linear Units ($f(x) = \max(0, x)$). ReLUs are easier to train in deep networks because they do not saturate for positive values.
  2. Identity Initialization: The recurrent weight matrix is initialized as the Identity Matrix ($I$), and all biases are set to zero.

The Logic: If a recurrent weight matrix is initialized as the identity, the hidden state at time $t$ is initially a copy of the hidden state at time $t-1$ (plus new input). This means that, by default, the network perfectly preserves information over time. During backpropagation, the gradient flows through the identity matrix, remaining constant rather than vanishing. This mimics the "constant error carousel" of an LSTM without the need for complex gating machinery. For tasks requiring shorter-term memory, the authors suggest using a scaled identity matrix (e.g., $0.01I$) to encourage the network to "forget" more quickly.

Experimental Benchmarks

The researchers evaluated the IRNN across four diverse benchmarks:

  • The Adding Problem: A classic toy task where the network must sum two specific numbers hidden in a long sequence of noise.
  • Sequential MNIST (and Permuted MNIST): The network reads MNIST digits one pixel at a time (784 steps). In the "Permuted" version, the pixel order is randomly shuffled, making it much harder for the network to rely on local patterns.
  • 1 Billion Word Benchmark: A large-scale language modeling task used to test the model's ability to predict the next word in a massive corpus.
  • TIMIT: A standard benchmark for acoustic modeling in speech recognition.
Schematic of the 'Adding Problem' task, where the network must sum two numbers marked by a mask in a long sequence of random signals.

Key Results and Analysis

The IRNN demonstrates that the "memory" capability of LSTMs isn't necessarily tied to their complex gating, but rather to the ability to maintain a linear gradient flow.

  • Outperforming LSTMs on MNIST: On the sequential MNIST task, the IRNN achieved a 3% test error, vastly outperforming the standard LSTM implementation used in the study, which struggled at 34% error.
  • Competitive Language Modeling: On the 1 Billion Word Benchmark, a 4-layer IRNN achieved a perplexity of 69.4, remarkably close to the 68.8 achieved by a 512-unit LSTM, despite the IRNN being a much simpler architecture.
  • The Adding Problem: As shown in the results below, the IRNN (red) converges quickly to a low Mean Squared Error (MSE) across various sequence lengths, matching or exceeding the performance of LSTMs (green) while standard RNNs with tanh (blue) or ReLUs with random initialization (cyan) often fail to learn the long-term dependencies.
Test MSE on the Adding Problem for sequences of length 150, 200, 300, and 400. IRNN (red) shows competitive convergence compared to LSTM (green).

Discussion and Limitations

While the IRNN is simple, its performance can be sensitive to the scale of the identity matrix. For tasks that don't require long-term memory (like some speech tasks), a full identity matrix can actually hinder performance, requiring a scaled-down version ($0.01I$).

Furthermore, an IRNN is computationally efficient; an LSTM step can be roughly 4x more expensive than an IRNN step. While a "better tuned" LSTM might still outperform the IRNN on certain tasks, the IRNN serves as a proof that simple architectures with appropriate initialization can go much further than previously thought in solving the vanishing gradient problem.

Summary updated

BibTeX
@misc{le2015simple,
  author = {Quoc V. Le and Navdeep Jaitly and Geoffrey E. Hinton},
  title = {{A Simple Way to Initialize Recurrent Networks of Rectified Linear Units}},
  year = {2015},
  eprint = {1504.00941},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1504.00941},
}
Figure