English
Related papers

Related papers: Provably learning a multi-head attention layer

200 papers

The transformer is the most popular neural architecture for language modeling. The cornerstone of the transformer is its global attention mechanism, which lets the model aggregate information from all preceding tokens before generating the…

Computation and Language · Computer Science 2026-05-20 Jiaoda Li , Ryan Cotterell

This work presents an analysis of the effectiveness of using standard shallow feed-forward networks to mimic the behavior of the attention mechanism in the original Transformer model, a state-of-the-art architecture for sequence-to-sequence…

Computation and Language · Computer Science 2024-02-06 Vukasin Bozic , Danilo Dordevic , Daniele Coppola , Joseph Thommes , Sidak Pal Singh

Attention-based models have been widely used in many areas, such as computer vision and natural language processing. However, relevant applications in time series classification (TSC) have not been explored deeply yet, causing a significant…

Machine Learning · Computer Science 2022-07-18 Bowen Zhao , Huanlai Xing , Xinhan Wang , Fuhong Song , Zhiwen Xiao

Self-attention mechanism is the key of the Transformer but often criticized for its computation demands. Previous token pruning works motivate their methods from the view of computation redundancy but still need to load the full network and…

Computer Vision and Pattern Recognition · Computer Science 2024-04-09 Sihao Lin , Pumeng Lyu , Dongrui Liu , Tao Tang , Xiaodan Liang , Andy Song , Xiaojun Chang

State-of-the-art results on neural machine translation often use attentional sequence-to-sequence models with some form of convolution or recursion. Vaswani et al. (2017) propose a new architecture that avoids recurrence and convolution…

Artificial Intelligence · Computer Science 2017-11-08 Karim Ahmed , Nitish Shirish Keskar , Richard Socher

Attention models are typically learned by optimizing one of three standard loss functions that are variously called -- soft attention, hard attention, and latent variable marginal likelihood (LVML) attention. All three paradigms are…

Machine Learning · Computer Science 2023-10-16 Rahul Vashisht , Harish G. Ramaswamy

Masked diffusion models (MDMs), which leverage bidirectional attention and a denoising process, are narrowing the performance gap with autoregressive models (ARMs). However, their internal attention mechanisms remain under-explored. This…

Artificial Intelligence · Computer Science 2026-01-13 Pengcheng Huang , Tianming Liu , Zhenghao Liu , Yukun Yan , Shuo Wang , Tong Xiao , Zulong Chen , Maosong Sun

Transformer-based models, even though achieving super-human performance on several downstream tasks, are often regarded as a black box and used as a whole. It is still unclear what mechanisms they have learned, especially their core module:…

Computation and Language · Computer Science 2023-10-17 Chong Li , Shaonan Wang , Yunhao Zhang , Jiajun Zhang , Chengqing Zong

As the quality of large language models has improved, there has been increased interest in using them to model non-linguistic tokens. For example, the Decision Transformer recasts agentic decision making as a sequence modeling problem,…

Machine Learning · Computer Science 2025-03-12 Nate Gillman , Daksh Aggarwal , Michael Freeman , Saurabh Singh , Chen Sun

In this work, we aim to predict human eye fixation with view-free scenes based on an end-to-end deep learning architecture. Although Convolutional Neural Networks (CNNs) have made substantial improvement on human attention prediction, it is…

Computer Vision and Pattern Recognition · Computer Science 2018-03-26 Wenguan Wang , Jianbing Shen

Attention mechanisms represent a fundamental paradigm shift in neural network architectures, enabling models to selectively focus on relevant portions of input sequences through learned weighting functions. This monograph provides a…

Machine Learning · Computer Science 2026-01-08 Hasi Hays

The success of the self-attention mechanism in classical machine learning models has inspired the development of quantum analogs aimed at reducing computational overhead. Self-attention integrates learnable query and key matrices to…

The transformer architecture is widely used in machine learning models and consists of two alternating sublayers: attention heads and MLPs. We prove that an MLP neuron can be implemented by a masked attention head with internal dimension 1…

Machine Learning · Computer Science 2023-09-18 Robert Huben , Valerie Morris

Since its inception in "Attention Is All You Need", transformer architecture has led to revolutionary advancements in NLP. The attention layer within the transformer admits a sequence of input tokens $X$ and makes them interact through…

Machine Learning · Computer Science 2024-02-23 Davoud Ataee Tarzanagh , Yingcong Li , Christos Thrampoulidis , Samet Oymak

An attention matrix of a transformer self-attention sublayer can provably be decomposed into two components and only one of them (effective attention) contributes to the model output. This leads us to ask whether visualizing effective…

Computation and Language · Computer Science 2021-05-20 Kaiser Sun , Ana Marasović

In the classical transformer attention scheme, we are given three $n \times d$ size matrices $Q, K, V$ (the query, key, and value tokens), and the goal is to compute a new $n \times d$ size matrix $D^{-1} \exp(QK^\top) V$ where $D =…

Data Structures and Algorithms · Computer Science 2023-10-09 Josh Alman , Zhao Song

Sequence models face a fundamental tradeoff between memory capacity and computational efficiency. Transformers achieve expressive context modeling at quadratic cost, while linear attention and state-space models run in linear time by…

Machine Learning · Computer Science 2026-05-11 Yaxita Amin , Helen Zichen Li , Mengfan Zhang , Samet Ayhan

In-context learning with attention enables large neural networks to make context-specific predictions by selectively focusing on relevant examples. Here, we adapt this idea to supervised learning procedures such as lasso regression and…

Machine Learning · Statistics 2025-12-11 Erin Craig , Robert Tibshirani

Answering multi-hop reasoning questions requires retrieving and synthesizing information from diverse sources. Language models (LMs) struggle to perform such reasoning consistently. We propose an approach to pinpoint and rectify multi-hop…

Computation and Language · Computer Science 2024-11-11 Mansi Sakarvadia

Pairwise dot product-based attention allows Transformers to exchange information between tokens in an input-dependent way, and is key to their success across diverse applications in language and vision. However, a typical Transformer model…