Fast weight programming and linear transformers: from machine learning to neurobiology
Kazuki Irie, Samuel J. Gershman
TL;DR
This Primer introduces Fast Weight Programmers (FWPs), a class of recurrent networks with 2D hidden states in which a slow network learns to modify the fast network's weights, creating a timeframe of short-term memory and a biologically plausible learning dynamic. It establishes formal connections between FWPs and transformers, including a vanilla unnormalized and a linear attention variant, and surveys a spectrum of update rules (e.g., DeltaNet) that modulate memory and expressivity. The work explores local online learning, meta-learning, and in-context learning within FWPs, analyzes their expressive power relative to RNNs and transformers, and discusses neurobiological interpretations and potential brain-inspired implementations. Overall, FWPs emerge as a versatile framework for sequence processing that combines parallel trainability with flexible, context-dependent weight modulation, offering a bridge between artificial sequence models and synaptic plasticity in the brain.
Abstract
Recent advances in artificial neural networks for machine learning, and language modeling in particular, have established a family of recurrent neural network (RNN) architectures that, unlike conventional RNNs with vector-form hidden states, use two-dimensional (2D) matrix-form hidden states. Such 2D-state RNNs, known as Fast Weight Programmers (FWPs), can be interpreted as a neural network whose synaptic weights (called fast weights) dynamically change over time as a function of input observations, and serve as short-term memory storage; corresponding synaptic weight modifications are controlled or programmed by another network (the programmer) whose parameters are trained (e.g., by gradient descent). In this Primer, we review the technical foundations of FWPs, their computational characteristics, and their connections to transformers and state space models. We also discuss connections between FWPs and models of synaptic plasticity in the brain, suggesting a convergence of natural and artificial intelligence.
