mlsanityData to 7 Oct 2026

Ordinary Least Squares is a Special Case of Transformer

arXiv 2604.13656 ↗First posted 15 Apr 2026cs.LG cs.AI math.STcited by 0

Not on the map. Why?

Abstract (arXiv)

The statistical essence of the Transformer architecture has long remained elusive: Is it a universal approximator, or a neural network version of known computational algorithms? Through rigorous algebraic proof, we show that the latter better describes Transformer's basic nature: Ordinary Least Squares (OLS) is a special case of the single-layer Linear Transformer. Using the spectral decomposition of the empirical covariance matrix, we construct a specific parameter setting where the attention mechanism's forward pass becomes mathematically equivalent to the OLS closed-form projection. This means attention can solve the problem in one forward pass, not by iterating. Building upon this prototypical case, we further uncover a decoupled slow and fast memory mechanism within Transformers. Finally, the evolution from our established linear prototype to standard Transformers is discussed. This progression facilitates the transition of the Hopfield energy function from linear to exponential memory capacity, thereby establishing a clear continuity between modern deep architectures and classical statistical inference.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 12 of its 16 references that are in the map. First posted on arXiv 15 Apr 2026.

Builds on

12 of 16 references.

References · 12

  1. 2017Attention Is All You Needcited by 59,932
  2. 2022Transformers learn in-context by gradient descentcited by 714
  3. 2021Linear Transformers Are Secretly Fast Weight Programmerscited by 471
  4. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  5. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  6. 2023Transformers learn to implement preconditioned gradient descent for in-context learningcited by 274
  7. 2016Dense Associative Memory for Pattern Recognitioncited by 230
  8. 2016Using Fast Weights to Attend to the Recent Pastcited by 161
  9. 2023The emergence of clusters in self-attention dynamicscited by 133
  10. 2021Relating transformers to models and neural representations of the hippocampal formationcited by 62
  11. 2021Attractor and integrator networks in the braincited by 60
  12. 2024Linear Transformers are Versatile In-Context Learnerscited by 28

Built on by

Not cited yet.