English
Related papers

Related papers: How Transformers Utilize Multi-Head Attention in I…

200 papers

Transformers have demonstrated remarkable capabilities in multi-step reasoning tasks. However, understandings of the underlying mechanisms by which they acquire these abilities through training remain limited, particularly from a…

Machine Learning · Computer Science 2025-12-09 Tong Yang , Yu Huang , Yingbin Liang , Yuejie Chi

Transformer layers, which use an alternating pattern of multi-head attention and multi-layer perceptron (MLP) layers, provide an effective tool for a variety of machine learning problems. As the transformer layers use residual connections…

Machine Learning · Computer Science 2022-12-13 Yaofeng Desmond Zhong , Tongtao Zhang , Amit Chakraborty , Biswadip Dey

Attention layers are widely used in natural language processing (NLP) and are beginning to influence computer vision architectures. Training very large transformer models allowed significant improvement in both fields, but once trained,…

Machine Learning · Computer Science 2021-05-21 Jean-Baptiste Cordonnier , Andreas Loukas , Martin Jaggi

"Induction heads" are attention heads that implement a simple algorithm to complete token sequences like [A][B] ... [A] -> [B]. In this work, we present preliminary and indirect evidence for a hypothesis that induction heads might…

Large language models based on the Transformer architecture have demonstrated impressive capabilities to learn in context. However, existing theoretical studies on how this phenomenon arises are limited to the dynamics of a single layer of…

Machine Learning · Statistics 2024-06-04 Juno Kim , Taiji Suzuki

Multi-head attention plays a crucial role in the recent success of Transformer models, which leads to consistent performance improvements over conventional attention in various applications. The popular belief is that this effectiveness…

Computation and Language · Computer Science 2021-06-18 Liyuan Liu , Jialu Liu , Jiawei Han

Sequence modelling requires determining which past tokens are causally relevant from the context and their importance: a process inherent to the attention layers in transformers, yet whose underlying learned mechanisms remain poorly…

Machine Learning · Computer Science 2026-04-14 Francesco D'Angelo , Nicolas Flammarion

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

Transformer-based models have been achieving state-of-the-art results in several fields of Natural Language Processing. However, its direct application to speech tasks is not trivial. The nature of this sequences carries problems such as…

Computation and Language · Computer Science 2022-05-17 Gerard Sant , Gerard I. Gállego , Belen Alastruey , Marta R. Costa-Jussà

Transformers have demonstrated remarkable success across various applications. However, the success of transformers have not been understood in theory. In this work, we give a case study of how transformers can be trained to learn a classic…

Machine Learning · Statistics 2025-04-14 Chenyang Zhang , Xuran Meng , Yuan Cao

Transformers have achieved great success across a wide range of applications, yet the theoretical foundations underlying their success remain largely unexplored. To demystify the strong capacities of transformers applied to versatile…

Machine Learning · Computer Science 2026-03-25 Chenyang Zhang , Qingyue Zhao , Quanquan Gu , Yuan Cao

Attention-based neural networks such as transformers have demonstrated a remarkable ability to exhibit in-context learning (ICL): Given a short prompt sequence of tokens from an unseen task, they can formulate relevant per-token and…

Machine Learning · Statistics 2023-10-23 Ruiqi Zhang , Spencer Frei , Peter L. Bartlett

The remarkable ability of transformers to learn new concepts solely by reading examples within the input prompt, termed in-context learning (ICL), is a crucial aspect of intelligent behavior. Here, we focus on understanding the learning…

Machine Learning · Computer Science 2025-10-14 Sara Dragutinović , Andrew M. Saxe , Aaditya K. Singh

Some autoregressive models exhibit in-context learning capabilities: being able to learn as an input sequence is processed, without undergoing any parameter changes, and without being explicitly trained to do so. The origins of this…

In-context learning, a capability that enables a model to learn from input examples on the fly without necessitating weight updates, is a defining characteristic of large language models. In this work, we follow the setting proposed in…

Machine Learning · Computer Science 2023-05-29 Kartik Ahuja , David Lopez-Paz

This paper studies the relative importance of attention heads in Transformer-based models to aid their interpretability in cross-lingual and multi-lingual tasks. Prior research has found that only a few attention heads are important in each…

Computation and Language · Computer Science 2021-08-20 Weicheng Ma , Kai Zhang , Renze Lou , Lili Wang , Soroush Vosoughi

Transformers have shown a remarkable ability for in-context learning (ICL), making predictions based on contextual examples. However, while theoretical analyses have explored this prediction capability, the nature of the inferred context…

Machine Learning · Computer Science 2025-05-20 Fei Lu , Yue Yu

Transformers have the capacity to act as supervised learning algorithms: by properly encoding a set of labeled training ("in-context") examples and an unlabeled test example into an input sequence of vectors of the same dimension, the…

Machine Learning · Computer Science 2024-12-16 Spencer Frei , Gal Vardi

Large pretrained language models have shown surprising in-context learning (ICL) ability. With a few demonstration input-label pairs, they can predict the label for an unseen input without parameter updates. Despite the great success in…

Computation and Language · Computer Science 2023-05-16 Damai Dai , Yutao Sun , Li Dong , Yaru Hao , Shuming Ma , Zhifang Sui , Furu Wei

Transformer models have emerged as fundamental tools across various scientific and engineering disciplines, owing to their outstanding performance in diverse applications. Despite this empirical success, the theoretical foundations of…

Machine Learning · Computer Science 2026-04-14 Zhen Qin , Jinxin Zhou , Jiachen Jiang , Zhihui Zhu