Fast And Slow Learning Of Recurrent Independent Mechanisms

Kanika Madan, Nan Rosemary Ke, Anirudh Goyal, Bernhard Schölkopf, Yoshua Bengio

Introduction

Standard deep learning models are typically "monolithic"—composed of a single, highly interconnected block of parameters. While powerful, these models often struggle with out-of-distribution (OOD) generalization. For instance, an agent trained in a small room might experience "catastrophic interference" when placed in a large warehouse, forgetting old skills while failing to learn new ones because it attempts to update all its weights simultaneously.

To address this, researchers have developed a new meta-learning framework called Meta-RIMs that mimics the "fast and slow" thinking processes of the human brain. By decomposing knowledge into independent, competing modules and training their connectivity patterns to change slowly while their internal logic adapts quickly, the system achieves significantly better generalization and faster adaptation in complex, changing environments.

Architecture and Methods

The paper builds upon Recurrent Independent Mechanisms (RIMs). In a RIMs architecture, the network is divided into $N$ independent modules. At any given time step, only a subset ($k$) of these modules are "activated" based on an attention mechanism.

Meta-RIMs Architecture

The core innovation is the introduction of Fast and Slow meta-learning loops:

  • The Fast (Inner) Loop: When the agent encounters a task, an input attention mechanism selects the most relevant modules. The parameters inside these selected modules are updated quickly to adapt to the current experience.
  • The Slow (Outer) Loop: The parameters of the attention mechanisms (which control how modules are selected and how they communicate) are updated much more slowly. These act as "meta-parameters" that capture the stable, underlying structure of the world that remains consistent across tasks.

This setup ensures the agent doesn't "re-invent the wheel" for every task; it keeps structural rules stable while letting specific skills flex.

Experimental Setup and Key Results

The researchers evaluated their model on reinforcement learning (RL) tasks involving grounded language learning, specifically using the MiniGrid (2D grid-world navigation based on text) and BabyAI (complex spatial and multi-step instruction) environments.

Key Findings

  • Sample Efficiency: Meta-RIMs reached high success rates much faster than vanilla LSTMs or standard RIMs. In navigation tasks, Meta-RIMs achieved near-perfect success in half the time of the baselines.
  • Zero-Shot Generalization: When trained on simple, small rooms and then evaluated in larger, more difficult rooms, Meta-RIMs maintained a success rate of 0.47. In contrast, a vanilla LSTM dropped to 0.19, and a standard modular approach crashed to 0.02.
  • Curriculum Learning: The model demonstrated superior knowledge transfer. An agent pre-trained on simple tasks adapted to complex ones significantly faster than baselines, successfully reusing its modular "knowledge pieces."

Insights and Future Directions

A major takeaway is the concept of modularity as a shield. By only updating a few modules at a time, the model prevents new information from overwriting existing knowledge. Interestingly, the authors found that reversing the fast/slow roles—making attention adapt quickly and modules slowly—resulted in poor performance. This suggests that the routing of information is a fundamental, slowly changing property of the environment.

Furthermore, visualizations revealed emergent specialization: specific modules naturally claimed specific roles, such as activating only near a goal or when navigating junctions.

Limitations: Currently, the independent modules are still trained using a single global objective (the overall reward). A promising future direction is assigning each module its own specific objective, further encouraging specialization in distinct physical or logical mechanisms. Additionally, scaling this "fast and slow" modularity to high-dimensional continuous control or real-world robotics remains an open challenge.

Summary updated

BibTeX
@inproceedings{madan2021fast,
  author = {Kanika Madan and Nan Rosemary Ke and Anirudh Goyal and Bernhard Schölkopf and Yoshua Bengio},
  title = {{Fast And Slow Learning Of Recurrent Independent Mechanisms}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
}
Figure