Saved in:
Bibliographic Details
Main Authors: Tan, Xiaojun, Zhao, Yuchen
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2604.13656
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913034682761216
author Tan, Xiaojun
Zhao, Yuchen
author_facet Tan, Xiaojun
Zhao, Yuchen
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2604_13656
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Ordinary Least Squares is a Special Case of Transformer
Tan, Xiaojun
Zhao, Yuchen
Machine Learning
Artificial Intelligence
Statistics Theory
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.
title Ordinary Least Squares is a Special Case of Transformer
topic Machine Learning
Artificial Intelligence
Statistics Theory
url https://arxiv.org/abs/2604.13656