Skip to main content
QUICK REVIEW

[Paper Review] Going Beyond Linear Transformers with Recurrent Fast Weight Programmers

Kazuki Irie, Imanol Schlag|arXiv (Cornell University)|Jun 11, 2021
Reinforcement Learning in RoboticsComputer Science1 citations
TL;DR

This paper introduces Recurrent Fast Weight Programmers (RFWPs), a novel architecture that extends linear Transformers by incorporating recurrence into both the fast and slow neural networks of Fast Weight Programming. By combining the long-range modeling of Transformers with the sequential inductive bias of RNNs, RFWPs achieve state-of-the-art performance on algorithmic tasks, language modeling, and Atari reinforcement learning, outperforming LSTMs in several games.

ABSTRACT

Transformers with linearised attention (''linear Transformers'') have demonstrated the practical scalability and effectiveness of outer product-based Fast Weight Programmers (FWPs) from the '90s. However, the original FWP formulation is more general than the one of linear Transformers: a slow neural network (NN) continually reprograms the weights of a fast NN with arbitrary architecture. In existing linear Transformers, both NNs are feedforward and consist of a single layer. Here we explore new variations by adding recurrence to the slow and fast nets. We evaluate our novel recurrent FWPs (RFWPs) on two synthetic algorithmic tasks (code execution and sequential ListOps), Wikitext-103 language models, and on the Atari 2600 2D game environment. Our models exhibit properties of Transformers and RNNs. In the reinforcement learning setting, we report large improvements over LSTM in several Atari games. Our code is public.

Motivation & Objective

  • To extend the Fast Weight Programmer (FWP) framework beyond linear Transformers by introducing recurrence into both the fast and slow networks.
  • To investigate whether recurrent FWP architectures can combine the strengths of Transformers (long-range dependencies) and RNNs (sequential inductive bias) for better sequence modeling.
  • To evaluate the proposed RFWP models on diverse benchmarks, including algorithmic tasks, language modeling, and reinforcement learning.
  • To demonstrate that RFWPs can outperform standard RNNs and Transformers in specific sequence learning and decision-making tasks.

Proposed method

  • Proposes a recurrent Fast Weight Programming mechanism where both the fast and slow networks are recurrent, allowing dynamic, context-dependent weight updates.
  • Uses a recurrent slow network to generate reprogramming weights for a recurrent fast network, enabling the fast network to maintain and adapt internal state over time.
  • Applies the FWP mechanism with outer product-based weight updates, preserving the computational efficiency of linear attention while enabling recurrent dynamics.
  • Employs a differentiable training procedure to jointly optimize the recurrent slow and fast networks end-to-end.
  • Introduces a parameter-efficient design that maintains the fast inference speed of linear Transformers while adding temporal modeling capacity.
  • Applies the architecture to sequence modeling tasks using standard training and evaluation protocols on synthetic tasks, Wikitext-103, and Atari 2600.

Experimental results

Research questions

  • RQ1Can adding recurrence to both the fast and slow networks in a Fast Weight Programmer improve performance on long-sequence modeling tasks compared to feedforward FWP or standard RNNs?
  • RQ2To what extent do RFWPs inherit the long-context modeling strengths of Transformers while gaining the sequential inductive bias of RNNs?
  • RQ3How do RFWPs perform on algorithmic tasks requiring reasoning over sequences, such as code execution and ListOps?
  • RQ4Can RFWPs achieve superior performance in reinforcement learning settings, particularly in partially observable environments like Atari 2600?
  • RQ5Does the recurrent FWP architecture generalize across diverse sequence modeling benchmarks, including language modeling and decision-making tasks?

Key findings

  • RFWPs achieve state-of-the-art performance on the sequential ListOps benchmark, demonstrating improved generalization on long, nested sequences.
  • On the Wikitext-103 language modeling benchmark, RFWPs achieve competitive perplexity scores, indicating strong sequence modeling capacity.
  • In the Atari 2600 environment, RFWPs significantly outperform LSTM baselines in multiple games, showing strong performance in partially observable, sequential decision-making tasks.
  • The models exhibit hybrid characteristics of Transformers and RNNs, combining long-range dependency modeling with dynamic, recurrent state adaptation.
  • The proposed architecture maintains the computational efficiency of linear attention while enabling richer temporal dynamics through recurrence.
  • The code for RFWPs is publicly released, enabling reproducibility and further research in recurrent FWP architectures.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.