Lune

NeurIPS2024Top-tier venue

Weight decay induces low-rank attention layers

Seijin Kobayashi, Yassir Akram, Johannes von Oswald

Abstract

The effect of regularizers such as weight decay when training deep neural networks is not well understood. We study the influence of weight decay as well as L2L2-regularization when training neural network models in which parameter matrices interact multiplicatively. This combination is of particular interest as this parametrization is common in attention layers, the workhorse of transformers. Here, key-query, as well as value-projection parameter matrices, are multiplied directly with each other: WKTWQW_K^TW_Q and PWVPW_V. We extend previous results and show on one hand that any local minimum of a L2L2-regularized loss of the form L(AB⊤)+λ(∥A∥2+∥B∥2)L(AB^\top) + \lambda (\|A\|^2 + \|B\|^2) coincides with a minimum of the nuclear norm-regularized loss L(AB⊤)+λ∥AB⊤∥∗L(AB^\top) + \lambda\|AB^\top\|_*, and on the other hand that the 2 losses become identical exponentially quickly during training. We thus complement existing works linking L2L2-regularization with low-rank regularization, and in particular, explain why such regularization on the matrix product affects early stages of training. Based on these theoretical insights, we verify empirically that the key-query and value-projection matrix products WKTWQ,PWVW_K^TW_Q, PW_V within attention layers, when optimized with weight decay, as usually done in vision tasks and language modelling, indeed induce a significant reduction in the rank of WKTWQW_K^TW_Q and PWVPW_V, even in fully online training. We find that, in accordance with existing work, inducing low rank in attention matrix products can damage language model performance, and observe advantages when decoupling weight decay in attention layers from the rest of the parameters.

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.

14 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

  • LoRA: Low-Rank Adaptation of Large Language Models cites Language Models are Few-Shot Learners
  • Weight Decay Improves Language Model Plasticity cites LoRA: Low-Rank Adaptation of Large Language Models
  • Weight Decay Improves Language Model Plasticity cites Language Models are Few-Shot Learners
  • Hyena Hierarchy: Towards Larger Convolutional Language Models cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Hyena Hierarchy: Towards Larger Convolutional Language Models cites Language Models are Few-Shot Learners
  • An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale cites Language Models are Few-Shot Learners
  • Single-Head Attention in High Dimensions: A Theory of Generalization, Weights Spectra, and Scaling Laws cites LoRA: Low-Rank Adaptation of Large Language Models
  • Single-Head Attention in High Dimensions: A Theory of Generalization, Weights Spectra, and Scaling Laws cites An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • Single-Head Attention in High Dimensions: A Theory of Generalization, Weights Spectra, and Scaling Laws cites Language Models are Few-Shot Learners
  • AlphaDecay: Module-wise Weight Decay for Heavy-Tailed Balancing in LLMs cites Language Models are Few-Shot Learners
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers14

  1. AlphaDecay: Module-wise Weight Decay for Heavy-Tailed Balancing in LLMsDi He, Songjun Tu, Ajay Jaiswal, Li Shen et al.NeurIPS 2025 · 14 citations
  2. Single-Head Attention in High Dimensions: A Theory of Generalization, Weights Spectra, and Scaling LawsFabrizio Boncoraglio, Vittorio Erba, Emanuele Troiani, Yizhou Xu et al.ICML 2026 · 5 citations
  3. Generalization Bounds for Rank-sparse Neural NetworksAntoine Ledent, Rodrigo Alves, Yunwen LeiNeurIPS 2025 · 4 citations
  4. Differentiable Sparsity via DD-Gating: Simple and Versatile Structured PenalizationChris Kolb, Laetitia Frost, Bernd Bischl, David RügamerNeurIPS 2025 · 4 citations
  5. Weight Decay Improves Language Model PlasticityTessa Han, Sebastian Bordt, Hanlin Zhang, Sham KakadeICML 2026 · 3 citations

Builds on18

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
  3. LoRA: Low-Rank Adaptation of Large Language ModelsEdward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu et al.ICLR 2022 · 18,833 citations
  4. Hyena Hierarchy: Towards Larger Convolutional Language ModelsMichael Poli, Stefano Massaroli, Eric Nguyen, Daniel Y. Fu et al.ICML 2023 · 481 citations
  5. A Geometric Analysis of Neural Collapse with Unconstrained FeaturesZhihui Zhu, Tianyu Ding, Jinxin Zhou, Xiao Li et al.NeurIPS 2021 · 303 citations

Related papers

  1. Initialization and Regularization of Factorized Neural LayersMikhail Khodak, Neil A. Tenenholtz, Lester Mackey, Nicolò FusiICLR 2021 · 74 citations
  2. Understanding Decoupled and Early Weight DecayJohan Bjorck, Kilian Q. Weinberger, Carla P. GomesAAAI 2021 · 37 citations
  3. Why Do We Need Weight Decay in Modern Deep Learning?Francesco D'Angelo, Maksym Andriushchenko, Aditya Vardhan Varre, Nicolas FlammarionNeurIPS 2024 · 101 citations
  4. Understanding the Disharmony between Weight Normalization Family and Weight DecayXiang Li, Shuo Chen, Jian YangAAAI 2020 · 18 citations
  5. On the Role of Attention Masks and LayerNorm in TransformersXinyi Wu, Amir Ajorlou, Yifei Wang, Stefanie Jegelka et al.NeurIPS 2024 · 54 citations
Dusk over the sea between two cliffs drawn in fine vertical lines