English
Related papers

Related papers: Transformers Can Implement Preconditioned Richards…

200 papers

The original softmax-based attention mechanism (regular attention) in the extremely successful Transformer architecture computes attention between $N$ tokens, each embedded in a $D$-dimensional head, with a time complexity of $O(N^2D)$.…

Machine Learning · Computer Science 2025-10-28 Armin Gerami , Ramani Duraiswami

Transformers excel across domains, yet their quadratic attention complexity poses a barrier to scaling. Random-feature attention, as in Performers, can reduce this cost to linear in the sequence length by approximating the softmax kernel…

Machine Learning · Computer Science 2026-03-05 Amirhossein Farzam , Hossein Mobahi , Nolan Andrew Miller , Luke Sernau

The problem of efficient approximation of a linear operator induced by the Gaussian or softmax kernel is often addressed using random features (RFs) which yield an unbiased approximation of the operator's result. Such operators emerge in…

Machine Learning · Computer Science 2023-02-03 Valerii Likhosherstov , Krzysztof Choromanski , Avinava Dubey , Frederick Liu , Tamas Sarlos , Adrian Weller

Softmax Attention has a quadratic time complexity in sequence length, which becomes prohibitive to run at long contexts, even with highly optimized GPU kernels. For example, FlashAttention-2/3 (exact, GPU-optimized implementations of…

Machine Learning · Computer Science 2026-04-21 Sahil Joshi , Agniva Chowdhury , Amar Kanakamedala , Ekam Singh , Evan Tu , Anshumali Shrivastava

The transformer architecture, which processes sequences of input tokens to produce outputs for query tokens, has revolutionized numerous areas of machine learning. A defining feature of transformers is their ability to perform previously…

Machine Learning · Computer Science 2025-10-02 Hongbo Li , Lingjie Duan , Yingbin Liang

Recent works have empirically analyzed in-context learning and shown that transformers trained on synthetic linear regression tasks can learn to implement ridge regression, which is the Bayes-optimal predictor, given sufficient capacity…

Machine Learning · Computer Science 2023-07-10 Arvind Mahankali , Tatsunori B. Hashimoto , Tengyu Ma

Several recent works demonstrate that transformers can implement algorithms like gradient descent. By a careful construction of weights, these works show that multiple layers of transformers are expressive enough to simulate iterations of…

Machine Learning · Computer Science 2023-11-13 Kwangjun Ahn , Xiang Cheng , Hadi Daneshmand , Suvrit Sra

Transformer models have become foundational across a wide range of scientific and engineering domains due to their strong empirical performance. A key capability underlying their success is in-context learning (ICL): when presented with a…

Machine Learning · Computer Science 2026-04-29 Zhen Qin , Jiachen Jiang , Zhihui Zhu

Pre-trained transformers are able to learn from examples provided as part of the prompt without any weight updates, a remarkable ability known as in-context learning (ICL). Despite its demonstrated efficacy across various domains, the…

Machine Learning · Computer Science 2026-05-07 Alexander Hsu , Zhaiming Shen , Wenjing Liao , Rongjie Lai

Understanding whether attention mechanisms converge to the kernel regime is foundational to the validity of influence functions for transformer accountability. Exact NTK characterization of softmax attention is precluded by its exponential…

Machine Learning · Computer Science 2026-05-08 Jose Marie Antonio Miñoza , Paulo Mario P. Medina , Sebastian C. Ibañez

We propose a new class of random feature methods for linearizing softmax and Gaussian kernels called hybrid random features (HRFs) that automatically adapt the quality of kernel estimation to provide most accurate approximation in the…

Despite the remarkable success of transformer-based models in various real-world tasks, their underlying mechanisms remain poorly understood. Recent studies have suggested that transformers can implement gradient descent as an in-context…

Machine Learning · Computer Science 2024-08-09 Xingwu Chen , Lei Zhao , Difan Zou

Understanding the internal mechanisms of GPT-style transformers, particularly their capacity to perform in-context learning (ICL), is critical for advancing AI alignment and interpretability. In-context learning allows transformers to…

Machine Learning · Computer Science 2024-10-24 Samarth Bhargav , Alexander Gu

Transformers with linear attention allow for efficient parallel training but can simultaneously be formulated as an RNN with 2D (matrix-valued) hidden states, thus enjoying linear-time inference complexity. However, linear attention…

Machine Learning · Computer Science 2024-08-28 Songlin Yang , Bailin Wang , Yikang Shen , Rameswar Panda , Yoon Kim

Transformers excel at in-context learning (ICL) -- learning from demonstrations without parameter updates -- but how they do so remains a mystery. Recent work suggests that Transformers may internally run Gradient Descent (GD), a…

Machine Learning · Computer Science 2024-11-19 Deqing Fu , Tian-Qi Chen , Robin Jia , Vatsal Sharan

We investigate the ability of transformers to perform in-context reinforcement learning (ICRL), where a model must infer and execute learning algorithms from trajectory data without parameter updates. We show that a linear self-attention…

Machine Learning · Statistics 2026-05-08 Haodong Liang , Lifeng Lai

Large language models (LLMs) have initiated a paradigm shift in transfer learning. In contrast to the classic pretraining-then-finetuning procedure, in order to use LLMs for downstream prediction tasks, one only needs to provide a few…

Computation and Language · Computer Science 2025-09-16 Chi Han , Ziqi Wang , Han Zhao , Heng Ji

In pursuit of faster computation, Efficient Transformers demonstrate an impressive variety of approaches -- models attaining sub-quadratic attention complexity can utilize a notion of sparsity or a low-rank approximation of inputs to reduce…

Machine Learning · Computer Science 2022-11-09 Uladzislau Yorsh , Alexander Kovalenko

In-context learning (ICL) is a key building block of modern large language models, yet its theoretical mechanisms remain poorly understood. It is particularly mysterious how ICL operates in real-world applications where tasks have a common…

Disordered Systems and Neural Networks · Physics 2026-04-24 Kaito Takanami , Takashi Takahashi , Yoshiyuki Kabashima

Transformers are state-of-the-art in a wide range of NLP tasks and have also been applied to many real-world products. Understanding the reliability and certainty of transformer model predictions is crucial for building trustable machine…

Computation and Language · Computer Science 2021-12-28 Jiahuan Pei , Cheng Wang , György Szarvas