Transformers learn through gradual rank increase

We identify incremental learning dynamics in transformers, where the difference between trained and initial weights progressively increases in rank. We rigorously prove this occurs under the simplifying assumptions of diagonal weight matrices and small initialization. Our experiments support the theory and also show that phenomenon can occur in practice without the simplifying assumptions.

Paper

References (56)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer yLKb6/10 · confidence 3/52023-07-06

Summary

This paper presents theoretical justifications and empirical evidence that transformers demonstrate incremental learning dynamics in the low-initialization regime. The authors consider a very restricted diagonal attention model along with a range of restrictive assumptions to theoretically characterize a number of features of learning dynamics in single-layer transformers (a single attention layer). The assumptions, which include nondegeneracy of dynamics (4.2), existence of stationary points that are strict local minima (4.3), and robustness of gradient flow to perturbations (4.4). These assumptions, in the diagonal model, allow the authors to prove that learning evolves through discrete, incremental stages of gradual rank increase. These assumptions and theoretical predictions are experimentally verified using a toy learning scenario matching the assumptions, and results are given on a full multi-layer, multi-head vision transformer which demonstrate similar learning dynamics despite being significantly far from the restrictive assumptions of the theory.

Strengths

1. **Convincing Theory**. The theoretical framework and proof of incremental learning dynamics is fairly easy to follow and, although based on a very restricted model and stringent assumptions, I think provides a number of useful tools of understanding and studying the learning dynamics of more complex models. 2. **Fairly Convincing Empirical Confirmation**. The empirical validation of incremental dynamics in the single attention layer model (Figure 3) are interesting -- in both the diagonal and full model the empirically observed behavior follows the predicted incremental "activation" of directions. However I find it odd that the evolution of singular values is so markedly different between the value-output and key-query matrices (Figures 3a-d and 3b-e). The value-output eigenvalues are significantly more sparse and their activations more "instantaneous". This difference is also roughly observable in the ViT results in Figure 2 (although reversed!).

Weaknesses

1. **Organization**. As will many theoretical papers, some of the most interesting observations are relegated to the Supplementary Material -- which I appreciate is inevitable. Reorganizing the preliminaries and theoretical development of the main paper I admit is delicate, but I think that the stable rank analysis in Figure 4 and illustration of low-rank bias in Figure 5 add little to the empirical results section of the main paper. Instead, I think this space could have been used better providing experimental evidence of the assumptions 4.2, 4.3, and 4.4 (is there an assumption 4.1 that I am missing?). Some of the plots in Figures 9 and 10 of the Supplementary Material, or even the *very* clear illustration of stepped behavior and dependence on $\alpha$ from Figure 6 would be excellent illustrations to include in the main paper. I find the plots in rescaled training time much easier to interpret. 2. **ViT Training Regime**. All of the empirical results on ViT were generated using Adam, which I fear might introduce its own dynamics into the learning process due to its modulation of gradients using the diagonal empirical Fisher matrix. It would be interesting to see results generated using vanilla SGD to verify that the observed learning dynamics are due to the low-initialization regime.

Questions

1. Why is the rank at initialization bounded (at 128?) in the plots in Figure 5? 2. Is the top/bottom organization of plots indicated in the captions of Figures 2 and 3 correct? If so, can you explain the difference between behavior between the key-query and value-output eigenvalues? 3. Are the same learning dynamics observed in ViT when training with SGD as opposed to Adam?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

4 excellent

Presentation

3 good

Contribution

3 good

Limitations

The authors provide a discussion of the limitations of the results presented in the paper, acknowledging that the restrictive assumptions and requirements of the theory are quite far from actual practice. They also connect their to recent work on low-rank model adaptation which could potentially exploit the theoretical and empirically observed incremental learning dynamics of transformers.

Reviewer 1Eo16/10 · confidence 3/52023-07-08

Summary

This paper conducts solid analysis and experiments to demonstrate the theory and proofs provided in the paper offer valuable insights into the incremental learning dynamics in transformers and how they can be better understood.

Strengths

1. The theory and proofs provided in the paper offer valuable insights into the incremental learning dynamics in transformers and how they can be better understood. 2. The experiments conducted in the paper also provide evidence to support the proposed approach.

Weaknesses

Besides LoRA, are there any other methods and techniques related to the proof and conclusions of this paper? A further discussion may help.

Questions

Please refers to the point listed in the Weakness part.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

4 excellent

Presentation

3 good

Contribution

3 good

Limitations

The proofs and conclusions of this study are dependent on the assumptions of the diagonal weights and small initialization. Such limitations have been discussed in an entire paragraph of Section 6.

Reviewer ZvU14/10 · confidence 3/52023-07-09

Summary

In this paper, the authors study the learning dynamics of transformers and argued that the difference between weights and their initial values increase in rank as the training progresses. Under small initialization, smoothness, non-degeneracy. convergence and robustness assumptions, the authors proof the incremental dynamics in diagonal-weighted transformers. Empirical results on toy models and VITs shows similar rank-progression dynamics on learned perturbations.

Strengths

The authors make an interesting observation that the learned perturbations in transformers are of low rank and exhibit an rank-increasing dynamics. Theoretical analysis is given under a simplified setting and the empirical results seem to support the observation. I do think this is a topic worth exploring as the findings could support the recently popular low ranking fine-tuning studies and potentially help identifying more efficient low-rank training methods through better understanding the learning dynamics.

Weaknesses

* The assumptions are very strong such that it is not clear if the theoretical results has real implications in practical cases. Not only does the theory only hold for attention layer only, diagonal weighted transformers, it also need strong assumptions on convergence, robustness. * The presentation of the paper could be improved. Section 4.1.1 and 4.1.2 are kind of confusing and does not help in understanding the reasoning behind the rank increasing dynamics. In addition, the author uses a lot of vague expressions like "very small", "non-negligible", "good approximation", when not providing quantitative reasoning like error/magnitude bounds. * Dynamic (3) seems to hold only for gradient descent training, which is hardly used in practice. It's not clear if the analysis holds for optimizers like SGD/Adam.

Questions

* Why is the non-toy experiments only conducted on VIT? Is there any reason to choose only the vision transformers but not regular NLP transformers? * How small is a "small initialization" in practice? * Dynamic (3) seems to hold only for gradient descent training, how does it apply to other optimizers like SGD/Adam? * The learning dynamics theories in this paper is proved in continuous setting (learning rate $\rightarrow$ 0, learning steps $\rightarrow\infty$). The real discretized GD training is just a forward finite difference approximation of the dynamics (3). Under what condition does the result hold in the later case?

Rating

4: Borderline reject: Technically solid paper where reasons to reject, e.g., limited evaluation, outweigh reasons to accept, e.g., good evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

1 poor

Contribution

2 fair

Limitations

The authors discussed about the limitations that the theory requires diagonal weights and small initialization. However, it is not discussed whether dynamics (3) could cover optimizers in practical cases. I don't think this paper would have potential negative societal impact.

Reviewer ryvs6/10 · confidence 3/52023-07-26

Summary

The article "Transformers learn through gradual rank increase" considers the dynamics of training for the neural networks models with attention mechanism. The authors relate the training dynamics to a particular type of gradient flow. They show under 3 important assumptions: i. diagonal weight matrices ii. initialization is small iii. only one coordinate is in "active" regime at a time that dynamics occur in discrete stages: (1) during most of each stage, the loss plateaus because the weights remain close to a saddle point (2) at the end, the saddle point is quickly escaped and the rank of the weights increases by at most one The developed theory is illustrated with a series of experiments.

Strengths

1. Nice and clean results that show us the dynamics of neural networks with attention mechanism 2. Well connected with the previous research on training dynamics 3. Paper is well written

Weaknesses

Assumptions are quite restrictive. It would be nice to relax the assumptions, especially assumption #3.

Questions

1. Is the paper more about attention in general than specifically about transformers? 2. What will happen if some weights activate simultaneously? How the theory would be affected?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

Limitations are adequately discussed

Reviewer ryvs2023-08-11

Rebuttal answer

Thanks for answering my questions. I tend to keep my score as my thoughts on the paper didn't change after reading other reviews and your answers.

Reviewer yLKb2023-08-16

Many thanks for your responses to my main questions, curiosities and concerns. The responses address all of my concerns and my opinion of this work after reading the rebuttal and the other reviews remains positive. If I interpret the results from Figures 2 and 3 in the Rebuttal PDF, the results using SGD not only exhibit the same rank-increasing trend, they are also quite a bit more stable compared to using Adam. I encourage the authors to include these observations, as well as the results on training GPT-2 provided in response to Reviewer ZvU1 in any final version of this work.

Reviewer ZvU12023-08-21

Thanks for the detailed rebuttal. That does clear some of my confusions. I have increased my score accordingly. However, I still think the paper has a large room for improvement in its presentation. Overall I am still inclined for reject but won't be unset if it's accepted with major refactoring.

Authorsrebuttal2023-08-21

Thank you for adjusting your score. In the revision, we will implement Reviewer yLKb's suggestions for improving the presentation. We will also implement the presentation changes (mostly in Section 4) that we promised in our response to you above. Apart from these, are there any other places where you would suggest changes to the presentation?

Program Chairsdecision2023-09-21

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC