mlsanityData to 14 Oct 2026

Learning in the Recurrent State: Gradient Descent with Linear Recurrent Networks

arXiv 2410.11687 ↗First posted 15 Oct 2024cs.LG cs.AI cs.NEcited by 3

Not on the map. Why?

Abstract (arXiv)

In-context learning lets a sequence model adapt to a new task from examples in its input. A prominent line of work shows how self-attention can be constructed to implement gradient descent on a linear predictor fit to the in-context examples during the forward pass. State-space models (SSMs) and other linear recurrent networks (LRNNs) model sequences at linear time cost, but it is unclear how their recurrent update could carry out the same in-context gradient descent. We introduce Gradient-based Recurrent In-context Learner (GRIL), a diagonal LRNN that factorizes a supervised gradient step into a short-window cross-product write and a multiplicative readout of the next query. For linear regression, this construction accumulates the context gradient in a matrix state and applies it in a single forward pass, with O(f2) learned degrees of freedom. The same design extends to multi-step updates and cross-entropy classification, with a limited MLP-based extension to non-linear regression. We show empirically that trained GRILs recover the behavior and parameters analytically predicted by the construction on synthetic ICL tasks. Furthermore, the same architecture can be extended and trained on general-purpose benchmarks, including Long Range Arena, language modeling and associative recall. Together, these results establish windowed cross-product self-attention as a concrete inductive bias that lets LRNNs learn in context through gradient-descent-like updates, while remaining trainable on general-purpose tasks.

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 41 of its 63 references that are in the map. First posted on arXiv 15 Oct 2024.

Builds on

41 of 63 references.

References · 41

  1. 2017Attention Is All You Needcited by 60,361
  2. 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
  3. 2016Pointer Sentinel Mixture Modelscited by 3,096
  4. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,465
  5. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
  6. 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
  7. 2016Optimization Methods for Large-Scale Machine Learningcited by 1,150
  8. 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 938
  9. 2022Simplified State Space Layers for Sequence Modelingcited by 788
  10. 2022Transformers learn in-context by gradient descentcited by 732
  11. 2020Long Range Arena: A Benchmark for Efficient Transformerscited by 700
  12. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 684
29 more
  1. 2016Learning to learn by gradient descent by gradient descentcited by 620
  2. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 502
  3. 2022Hungry Hungry Hippos: Towards Language Modeling with State Space Modelscited by 499
  4. 2022On the Parameterization and Initialization of Diagonal State Space Modelscited by 424
  5. 2023Resurrecting Recurrent Neural Networks for Long Sequencescited by 408
  6. 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 396
  7. 2023Larger language models do in-context learning differentlycited by 394
  8. 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 393
  9. 2016Learning to reinforcement learncited by 377
  10. 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
  11. 2023In-Context Learning Creates Task Vectorscited by 312
  12. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 279
  13. 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 242
  14. 2024Simple linear attention language models balance the recall-throughput tradeoffcited by 208
  15. 2016Using Fast Weights to Attend to the Recent Pastcited by 170
  16. 2023One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attentioncited by 170
  17. 2024Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrencecited by 159
  18. 2023Are Emergent Abilities in Large Language Models just In-Context Learning?cited by 109
  19. 2024Can Mamba Learn How to Learn? A Comparative Study on In-Context Learning Taskscited by 105
  20. 2023Uncovering mesa-optimization algorithms in Transformerscited by 100
  21. 2024In-Context Language Learning: Architectures and Algorithmscited by 89
  22. 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 76
  23. 2024Can Looped Transformers Learn to Implement Multi-step Gradient Descent for In-context Learning?cited by 65
  24. 2024Longhorn: State Space Models are Amortized Online Learnerscited by 59
  25. 2023Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regressioncited by 49
  26. 2024Is Mamba Capable of In-Context Learning?cited by 45
  27. 2024State Space Models as Foundation Models: A Control Theoretic Overviewcited by 19
  28. 2023Gated recurrent neural networks discover attentioncited by 7
  29. 2018Weighted Sigmoid Gate Unit for an Activation Function of Deep Neural Networkcited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 2.

3 papers.