aiqbench analysis
This research challenges the conventional wisdom of training transformers by proving that attention mechanisms often require delayed updates relative to output layers when processing unbounded inputs. The study establishes a specific three-phase gradient descent protocol where updating the output layer first is essential for recognizing star-free languages, a finding with broader implications for language recognition and in-context learning tasks.
Training Dynamics of Transformers on Unbounded Inputs: Attention Learning Can Lag Output Layer Learning
arXiv:2610.20337v1 Announce Type: new Abstract: The success of transformers is attributed to several factors, including their capacity to express formal languages over variable-length inputs, and ability of the attention mechanism to focus on relevant input features. However, there is limited understanding of the training dynamics of shallow transformers, specifically how to decouple the learning of the attention and the output (feedforward) layer. A natural extension of the theory of one-step gradient feature learning in feedforward networks suggests that one could first learn the attention weights with a single gradient step, and then train the output layer. We show that this fails for a shallow transformer trained to recognize a star-free language from unbounded-length input. We prove that the transformer can be trained to recognize the language with a three-phase gradient descent: the output layer is updated first, followed by an attention update, and the output layer is fine-tuned in the third phase. In contrast, the language cannot be learned by training only the attention or output layer, or by a single attention-layer update followed by finetuning the output layer. We empirically show that ``attention learning lagging output layer learning" is beneficial in other language recognition, regression, and in-context learning tasks as well.
Abstract:The success of transformers is attributed to several factors, including their capacity to express formal languages over variable-length inputs, and ability of the attention mechanism to focus on relevant input features. However, there is limited understanding of the training dynamics of shallow transformers, specifically how to decouple the learning of the attention and the output (feedforward) layer. A natural extension of the theory of one-step gradient feature learning in feedforward networks suggests that one could first learn the attention weights with a single gradient step, and then train the output layer. We show that this fails for a shallow transformer trained to recognize a star-free language from unbounded-length input. We prove that the transformer can be trained to recognize the language with a three-phase gradient descent: the output layer is updated first, followed by an attention update, and the output layer is fine-tuned in the third phase. In contrast, the language cannot be learned by training only the attention or output layer, or by a single attention-layer update followed by finetuning the output layer. We empirically show that ``attention learning lagging output layer learning" is beneficial in other language recognition, regression, and in-context learning tasks as well.
Machine Learning (cs.LG)
arXiv:2610.20337 [cs.LG]
(or arXiv:2610.20337v1 [cs.LG] for this version)
https://doi.org/10.48550/arXiv.2610.20337 Focus to learn more arXiv-issued DOI via DataCite (pending registration)
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Full text under the publisher's open licence · 291 words
Related coverage

Challenge: Hand coding weights for efficient sequence memorisation
AI Alignment Forum · Jul 23, 2026

PIRAMID: Progress and Plans
LessWrong · Jul 27, 2026

Build an explainable next-best-product recommendation system for banking on AWS
AWS · Jul 24, 2026
How might continual learning affect safety and alignment?
LessWrong · Jun 13, 2026