Lune

ICML2025Top-tier venue

Residual Matrix Transformers: Scaling the Size of the Residual Stream

Brian Mak, Jeffrey Flanigan

Abstract

The residual stream acts as a memory bus where transformer layers both store and access features (Elhage et al., 2021) . We consider changing the mechanism for retrieving and storing information in the residual stream, and replace the residual stream of the transformer with an outer product memory matrix (Kohonen, 1972 , Anderson, 1972) . We call this model the Residual Matrix Transformer (RMT). We find that the RMT enjoys a number of attractive properties: 1) the size of the residual stream can be scaled independently of compute and model size, improving performance, 2) the RMT can achieve the same loss as the transformer with 58% fewer FLOPS, 25% fewer parameters, and 41% fewer training tokens tokens, and 3) the RMT outperforms the transformer on downstream evaluations. We theoretically analyze the transformer and the RMT, and show that the RMT allows for more efficient scaling of the residual stream, as well as improved variance propagation properties. Code for this project can be found at https://github.com/bmac3/residualmatrix-transformer .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • RWKV: Reinventing RNNs for the Transformer Era cites Locating and Editing Factual Associations in GPT
  • RWKV: Reinventing RNNs for the Transformer Era cites Scaling Data-Constrained Language Models
  • Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality cites RWKV: Reinventing RNNs for the Transformer Era
  • mHC: Manifold-Constrained Hyper-Connections cites Hyper-Connections
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. mHC: Manifold-Constrained Hyper-ConnectionsZhenda Xie, Yixuan Wei, Huanqi Cao, Chenggang Zhao et al.ICML 2026 · 72 citations
  2. KromHC: Manifold-Constrained Hyper-Connections with Kronecker-Product Residual MatricesWuyang Zhou, Yuxuan Gu, Giorgos Iacovides, Danilo MandicICML 2026 · 8 citations
  3. Hyper-ConnectionsDefa Zhu, Hongzhi Huang, Zihao Huang, Yutao Zeng et al.ICLR 2025

Builds on9

  1. Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
  2. Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space DualityTri Dao, Albert GuICML 2024 · 1,407 citations
  3. On Layer Normalization in the Transformer ArchitectureRuibin Xiong, Yunchang Yang, Di He, Kai Zheng et al.ICML 2020 · 1,388 citations
  4. Scaling Data-Constrained Language ModelsNiklas Muennighoff, Alexander M. Rush, Boaz Barak, Teven Le Scao et al.NeurIPS 2023 · 475 citations
  5. RWKV: Reinventing RNNs for the Transformer EraBo Peng, Eric Alcaide, Quentin Anthony, Alon Albalak et al.EMNLP Findings 2023 · 391 citations

Related papers

  1. Value Residual LearningZhanchao Zhou, Tianyi Wu, Zhiyun Jiang, Fares Obeid et al.ACL 2025 · 8 citations
  2. Outlier-Efficient Hopfield Layers for Large Transformer-Based ModelsJerry Yao-Chieh Hu, Pei-Hsuan Chang, Haozheng Luo, Hong-Yu Chen et al.ICML 2024 · 46 citations
  3. Recurrent Memory TransformerAydar Bulatov, Yuri Kuratov, Mikhail BurtsevNeurIPS 2022 · 252 citations
  4. Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
  5. MeSH: Memory-as-State-Highways for Recursive TransformersChengting Yu, Xiaobo Shu, Yadao Wang, Yizhen Zhang et al.ICLR 2026 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines