An Empirical Exploration of Recurrent Network Architectures

Rafal Józefowicz, Wojciech Zaremba, Ilya SutskeverICML 2015

TL;DR

Researchers at Google and NYU conducted a massive evolutionary search over 10,000 different Recurrent Neural Network (RNN) architectures to see if the popular LSTM and GRU models are truly optimal. Their findings show that while a few discovered variants (MUT1-3) can outperform them on specific tasks, the most impactful takeaway is surprisingly simple: adding a bias of 1 to the LSTM's forget gate makes it nearly as competitive as any modern alternative.

What Problem Does This Paper Address?

Recurrent Neural Networks (RNNs) are the go-to models for sequential data, but they are notoriously difficult to train due to the "vanishing gradient" problem—where signals from the past fade away before the model can learn from them.

The Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) were designed to fix this using "gates" that control information flow. However, these architectures often feel "ad-hoc." Why three gates? Why these specific connections? The authors set out to determine if these standard architectures are actually the best possible designs or if we’ve simply settled on them because they were the first ones that worked.

Methods

The authors employed an evolutionary architecture search. They started with a "population" of 100 best-performing architectures (initially just LSTMs and GRUs) and evolved them through several steps:

  1. Mutation: They randomly altered architectures by changing activation functions (tanh, sigmoid, ReLU), swapping element-wise operations (addition, multiplication), or adding/removing hidden nodes.
  2. Filtering: To save time, new candidates had to pass a "memorization" test (reproducing a short sequence) before being evaluated on harder tasks.
  3. Hyperparameter Optimization: Since a good architecture can fail with bad settings, they evaluated each candidate across hundreds of different hyperparameter combinations.

In total, they evaluated over 10,000 architectures and 230,000 hyperparameter configurations.

Datasets

The search was driven by three primary tasks:

  • Arithmetic: Computing the sum or difference of two numbers hidden among distractor symbols.
  • XML Modeling: Predicting the next character in a synthetic XML dataset to test long-term structural memory.
  • Penn Tree-Bank (PTB): A standard word-level language modeling benchmark.

To test how well the discovered architectures generalized, they also evaluated them on Polyphonic Music datasets (Nottingham and Piano-midi), which were not used during the initial search.

Key Insights and Ideas

  • The Forget Gate is Essential: Ablation studies revealed that the forget gate is the most critical component of the LSTM. Without it, performance on tasks requiring long-term memory (like the XML task) collapses.
  • The "Bias = 1" Trick: Most practitioners initialize LSTM biases to zero. The authors found that simply initializing the forget gate bias to 1 (effectively starting the gate in an "open" state) significantly boosts performance, allowing gradients to flow more easily at the start of training. This simple tweak closed the performance gap between the LSTM and the GRU.
  • The Input Gate Matters, the Output Gate Doesn't: The input gate was found to be the second most important component, while the output gate was largely redundant for most tasks except for specific music modeling scenarios.
  • Evolutionary "MUT" Architectures: The search discovered three architectures (MUT1, MUT2, and MUT3) that are essentially variants of the GRU. These models performed slightly better than the GRU on the search tasks but didn't represent a radical departure from existing gated logic.

Key Results

  • Top Performers: The discovered MUT1 architecture achieved the highest accuracy on the Arithmetic (0.921) and XML (0.474) tasks, outperforming both the standard LSTM and GRU.
Performance comparison on Arithmetic, XML, and PTB tasks
  • LSTM with Dropout: On the Penn Tree-Bank (PTB) language task, the standard LSTM with the forget gate bias fix (denoted as LSTM-b) remained the champion when dropout was applied, achieving a test perplexity of 79.83.
PTB language modeling results showing LSTM-b achieving 79.83 perplexity
  • Generalization: While the MUT architectures won on the tasks they were evolved for, they were often matched or beaten by the standard LSTM/GRU on the music generalization tasks, suggesting that the classic architectures are remarkably robust.

Limitations and Future Work

The authors acknowledge that their search space, while large, was still somewhat constrained to architectures that look like LSTMs or GRUs (nodes with a few inputs and outputs). A more "open-ended" search might find even more exotic and efficient structures.

Additionally, the computational cost of this search was immense. Future work could look into more efficient ways to estimate an architecture's potential without training it to completion. The main takeaway for the community remains: before switching to a complex new architecture, try adding a bias of 1 to your LSTM's forget gate.

Summary updated

BibTeX
@inproceedings{jozefowicz2015empirical,
  author = {Rafal Józefowicz and Wojciech Zaremba and Ilya Sutskever},
  title = {{An Empirical Exploration of Recurrent Network Architectures}},
  booktitle = {International Conference on Machine Learning},
  year = {2015},
  url = {https://openreview.net/forum?id=SJECLj-ObS},
}
Figure