Lune

NeurIPS2024顶会

Weight decay induces low-rank attention layers

Seijin Kobayashi, Yassir Akram, Johannes von Oswald

2024年份
41被引次数
14顶会引用

摘要

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.

问问这篇 Paper

智能体会读完全文。

Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。

可以从这些问题问起

智能体调用

Luneget_paper_fulltext

在 Lune 里问

免费开始,无需绑卡

引用它的顶会 Paper14

问问它们各自怎么用它

它引用的顶会 Paper18

相关 Paper

黄昏的海面,两侧是细线勾勒的悬崖