A Flexible Approach to Automated RNN Architecture Generation

Martin Schrimpf, Stephen Merity, James Bradbury, Richard Socher

This paper explores how we can move beyond human intuition to discover more powerful Recurrent Neural Network (RNN) architectures. By creating a flexible "language" for describing networks and using machine learning to navigate that space, the authors discovered novel architectures that outperform standard models like the LSTM and GRU.

TL;DR

The authors propose a flexible Domain-Specific Language (DSL) and a meta-learning strategy to automatically search for novel RNN architectures. Their approach discovered the "BC3" cell—a highly effective but unintuitive architecture—proving that the space of functional RNNs is far larger and more diverse than human-designed models suggest.

What Problem Does This Paper Address?

Designing neural network architectures is traditionally a "black art" reserved for experts. While architectures like the LSTM (Long Short-Term Memory) have dominated the field for decades, they were designed based on human intuition about how memory should work (e.g., using specific "gates").

Existing Automated Machine Learning (AutoML) methods often search within very narrow constraints, essentially just "filling in the blanks" of a pre-defined template. This paper aims to break those constraints by allowing a search algorithm to explore a much broader, more flexible space of mathematical operations to find architectures that humans might never think to build.

Methodology

The researchers introduced three core components to their search strategy:

  1. A Flexible DSL: They created a Domain-Specific Language that describes an RNN as a tree of operations. It includes standard operators (matrix multiplication, Sigmoid, Tanh) but also allows for "non-standard" ones like trigonometric functions (Sine, Cosine), division, and layer normalization. Crucially, it allows the model to "re-use" internal nodes as long-term memory.
  2. Candidate Generation: They tested two ways to propose new designs:
  3. Random Search + Ranking Function: They generated thousands of random architectures and used a "Ranking Function" (a recursive neural network) to predict which ones would perform best without actually training them.
  4. Reinforcement Learning (RL): They used an RL agent (trained via REINFORCE) to incrementally build architectures node-by-node, learning which combinations lead to higher rewards.
  5. The Evaluator: The most promising candidates were compiled into executable code and trained on real-world tasks to get their actual performance scores, which were then used to improve the Ranking Function and RL agent.
Overview of the automated architecture search framework.

Datasets

The authors evaluated their approach across two major domains:

  • Language Modeling: Used the WikiText-2 dataset for the initial search and the Penn Treebank (PTB) for final evaluation.
  • Machine Translation: Used the Multi30k (English-to-German) dataset for the search and tested transferability on the larger IWSLT 2016 dataset.

Key Insights and Ideas

  • The "BC3" Cell: The search discovered a specific architecture named BC3. It features an unexpected layering of two "Gate3" operators and lacks a traditional output gate. Despite looking "wrong" to a human expert, it performed exceptionally well.
  • Unintuitive Success: Many of the top-performing discovered architectures do not follow standard design principles. They use complex, nested interactions between the current input and previous hidden states that are difficult to interpret but mathematically efficient.
  • The Power of Non-Standard Operators: When the search was allowed to use "weird" operators like Sine curves or positional encodings, the RL agent actually incorporated them into successful architectures, suggesting these are underutilized in manual design.
Evolution of operator distribution during the architecture search.
  • Ranking vs. Training: The use of a recursive neural network as a "ranking function" is a key efficiency gain. It allows the system to "hallucinate" the performance of a design in milliseconds rather than hours of training.

Key Results

  • Language Modeling: The discovered BC3 cell achieved a test perplexity of 61.4 on Penn Treebank, outperforming the standard NASCell and the Recurrent Highway Network (RHN) while using similar parameter counts.
  • Machine Translation: The RL generator found 806 architectures that outperformed the baseline LSTM on the Multi30k task. The best-discovered architecture achieved a BLEU score of 36.53, significantly higher than the standard LSTM's 34.05.
  • Robustness: The study showed that while human-designed cells are "safe," the automated search found a wide variety of "heterogeneous" architectures that parse input in fundamentally different ways, which could be highly effective for ensemble modeling.

Limitations and Future Work

  • Transferability Issues: The authors noted that architectures optimized for a small dataset (like Multi30k) didn't always maintain their lead when moved to much larger datasets (like IWSLT). This suggests that architecture search should ideally be performed on data that closely matches the final target.
  • Search Scope: The translation experiments focused primarily on the encoder. The authors suggest that jointly searching for both encoder and decoder architectures could yield even better results.
  • Compute Requirements: While more efficient than brute force, the search still required significant resources (28 GPUs over 5 days). Future work could focus on even more efficient "proxy" tasks to speed up the evaluation phase.

Summary updated

BibTeX
@inproceedings{schrimpf2018flexible,
  author = {Martin Schrimpf and Stephen Merity and James Bradbury and Richard Socher},
  title = {{A Flexible Approach to Automated RNN Architecture Generation}},
  booktitle = {Workshops @ ICLR},
  year = {2018},
}
Figure