Hugging Face Blog

Nyströmformer: Approximating self-attention in linear time and memory via the Nyström method

arXiv Machine Learning
Oct 9

What can linear attention learn from nonlinear teachers in-context?

The paper extends linear attention theory from linear regression to nonlinear single‑index targets, showing that linear attention only captures the linear Hermite component of the nonlinearity while treating the rest as effective noise. This nonlinearity‑noise equivalence lets existing linear results be applied to nonlinear tasks, and the authors demonstrate how finite pretraining data and increasing task diversity affect the shift from memorisation to generalisation. The work highlights a limitation of reduced linear‑attention models and offers a tractable framework for future studies of nonlinear in‑context learning.

By Mary Letey, Arman Rysmakhanov, Yue M. Lu, Cengiz Pehlevan, Jacob Zavatone-Veth
arXiv Machine Learning
5d ago

Kernel Ridge Attention: Nonlinear Memory with Selective Forgetting

Kernel Ridge Attention (KRA) is a recurrent sequence mixer that blends learned nonlinear features with covariance-guided memory updates. It uses recursive ridge regression to store associations, with correlations among past keys guiding how new observations modify memory. A content-dependent Ornstein–Uhlenbeck transition controls retention, restores uncertainty for future writes, and the design allows an exact temporal‑kernel interpretation while keeping inference state size independent of context length.

By Haowei Chen, Yichen Wang, Congfu Xu
arXiv AI
Oct 31

Understanding axial attention in TSFMs through single location regression

The paper investigates axial attention mechanisms used in Time Series Foundation Models (TSFMs) by extending the Single Location Regression framework to two‑dimensional structured data. It introduces an analytically tractable axial attention‑type predictor, rigorously analyzes its statistical properties and training dynamics, and proves Bayes optimality under a specific asymptotic regime when the oracle parameters are known. The study also demonstrates that a class of semi‑linear simplifications fails to achieve optimality, highlights the importance of inner non‑linearity, and shows that Projected Gradient Descent converges globally for a particular temperature scaling, with experiments confirming the theoretical insights and the critical role of inverse temperature scheduling.

By Andrei-Tiberiu Pantea, Aymeric Dieuleveut
arXiv Machine Learning
Sep 14

RunningTensor: Generalizing Linear Attention to Higher-Order Recurrent States

RunningTensor generalizes linear attention and state‑space models by extending the recurrent memory from a second‑order tensor (matrix) to an order‑o tensor. The memory is updated via a rank‑1 outer product and read by contracting with o‑1 vector queries, with order‑2 recovering linear attention. Experiments on synthetic associative recall and real language tasks show that RunningTensor improves memory capacity from O(W²) to O(Wᵒ) and outperforms existing baselines.

By Luca Herranz-Celotti, Vincent Guigue
arXiv Machine Learning
Oct 27

Approaching I/O-optimality for Approximate Attention

arXiv:2605.23751v2 Announce Type: replace Abstract: We revisit the I/O complexity of attention in large language models. Given query-key-value matrices $Q,K,V\in\mathbb{R}^{n\times d}$, and a machine...

By P\'al Andr\'as Papp, Aleksandros Sobczyk, Anastasios Zouzias
arXiv AI
Oct 12

Not All Dimensions Are Equal: Outlier-Aware Attention Linearization with Grouped Quadratic Kernels

The paper introduces Outlier-Aware Attention Linearization (OAL), a method that improves linearized softmax attention by explicitly accounting for a few outlier dimensions that disproportionately affect query-key dot products. OAL builds on a second-order Taylor approximation, uses a Hadamard-product formulation to expose dimension-specific contributions, and groups dimensions with similar scales to share coefficients while treating outliers separately. Experiments on Qwen2.5-0.5B show an 8.9% reduction in frozen-attention output MSE, and fine-tuning with LoRA lowers WikiText-103 perplexity from 31.71 to 27.50 while boosting performance on PIQA, HellaSwag, and ARC-E.

By Weiqi Sun, Qianyue Wu, Wenjia Wang, Tianyang Hu
arXiv Machine Learning
Sep 4

High-Dimensional Learning Dynamics of Attention-Indexed Models

The paper investigates the training dynamics of attention mechanisms in high-dimensional settings, focusing on attention-indexed models that encompass multi-layer and multi-head architectures. It shows that while the loss landscape can be described by a finite set of trace order parameters, the online stochastic gradient descent dynamics involve an infinite hierarchy of matrix moments that can be accurately approximated by a finite truncated system. The study further reveals that the choice of attention parameterization acts as an implicit bias: untied attention can get trapped in uninformative states, whereas tied attention induces symmetry breaking and enables weak recovery with θ(d² log d) samples, and untied attention exhibits a fast-slow dynamic leading to weak recovery when symmetry is broken.

By Yizhou Xu, Margarita Sagitova, Lenka Zdeborov\'a, Florent Krzakala