[Paper Review] Recurrent Independent Mechanisms
We introduce Recurrent Independent Mechanisms (RIMs), a modular recurrent architecture where multiple independent mechanisms interact sparsely via attention to improve generalization under distribution shifts.
Learning modular structures which reflect the dynamics of the environment can lead to better generalization and robustness to changes which only affect a few of the underlying causes. We propose Recurrent Independent Mechanisms (RIMs), a new recurrent architecture in which multiple groups of recurrent cells operate with nearly independent transition dynamics, communicate only sparingly through the bottleneck of attention, and are only updated at time steps where they are most relevant. We show that this leads to specialization amongst the RIMs, which in turn allows for dramatically improved generalization on tasks where some factors of variation differ systematically between training and evaluation.
Motivation & Objective
- Motivate learning modular structures that reflect environment dynamics to improve generalization and robustness to changes affecting only some causes.
- Propose RIMs, a recurrent architecture with near-independent mechanisms that communicate sparsely and update only when relevant.
- Show that specialization among RIMs yields better generalization on tasks with varying factors of variation between training and evaluation.
Proposed method
- Divide the model into k recurrent mechanisms (RIMs) with shared parameters per mechanism.
- Activate and update only a subset of RIMs per time step via input-driven top-k attention over RIMs.
- Each activated RIM applies its own independent transition dynamics (e.g., GRU/LSTM) and can read from other RIMs via a residual, sparse communication attention.
- Use key-value attention to read from input and to enable sparse inter-RIM communication through queries from RIM states and keys/values from inputs and other RIMs.
- Optionally apply spatial sparsity by computing attention per spatial position when inputs are structured (e.g., images).
- Provide multi-head attention for input and communication, with per-RIM learned parameters governing attention.
Experimental results
Research questions
- RQ1Can a gradient-based model discover and leverage independent, sparsely interacting recurrent mechanisms to model dynamic environments?
- RQ2Do RIMs improve generalization when a subset of underlying mechanisms changes between training and testing?
- RQ3How does sparse activation and communication affect robustness to distribution shifts and novel objects/distractors?
- RQ4Are RIMs effective as drop-in replacements for standard recurrent layers in reinforcement learning and vision tasks?
Key findings
- RIMs specialize over temporal patterns, enabling some mechanisms to activate on distinct patterns and maintain performance under longer dormant phases.
- On the copying task, RIMs generalize to longer sequences (Test 200) where traditional models degrade, e.g., outperforming LSTM, NTM, and RMC in certain settings.
- In Sequential MNIST, RIMs are more robust to resolution changes (14x14 training to 19x19/24x24 testing) than LSTM and several baselines.
- RIMs improve robustness to novel distractors and partial observability in object-picking tasks, outperforming LSTM and competitive baselines.
- In PPO-based Atari experiments, replacing LSTM with RIMs yields substantial performance gains across games.
- Ablations show input attention, sparse activation, and inter-RIM communication are important for performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.