paper-with-me

홈 › Papers

Transformers Learn Nonlinear Features In Context: Nonconvex Mean-field Dynamics on the Attention Landscape

2024-02-02 · Juno Kim, Taiji Suzuki

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 attention trained on linear regression tasks. In this paper, we study the optimization of a Transformer consisting of a fully connected layer followed by a linear attention layer. The MLP acts as a common nonlinear representation or feature map, greatly enhancing the power of in-context learning. We prove in the mean-field and two-timescale limit that the infinite-dimensional loss landscape for the distribution of parameters, while highly nonconvex, becomes quite benign. We also analyze the second-order stability of mean-field dynamics and show that Wasserstein gradient flow almost always avoids saddle points. Furthermore, we establish novel methods for obtaining concrete improvement rates both away from and near critical points. This represents the first saddle point analysis of mean-field dynamics in general and the techniques are of independent interest.

📄 PDF Abstract BibTeX arXiv:2402.01258

Code (0)

등록된 구현이 없습니다.

Tasks

In-Context Learning

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
BPE Byte Pair Encoding, or BPE, is a subword segmentation algorithm that encodes rare and unknown words as sequences of subword units. The intuition is that various word…
Multi-Head Attention 설명 없음
Residual Connection 설명 없음
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…

Similar Papers 제목 키워드 기반

How Do Nonlinear Transformers Learn and Generalize in In-Context Learning?

2024-02-23 · Hongkang Li, Meng Wang, Songtao Lu, Xiaodong Cui 외

Transformer-based large language models have displayed impressive in-context learning capabilities, where a pre-trained model can handle new tasks without fine-tuning by simply augmenting the query with some input-output…

Binary ClassificationIn-Context Learning

Understanding In-Context Learning for Nonlinear Regression with Transformers: Attention as Featurizer

2026-05-06 · Alexander Hsu, Zhaiming Shen, Wenjing Liao, Rongjie Lai arxiv

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 variou…

Training Nonlinear Transformers for Chain-of-Thought Inference: A Theoretical Generalization Analysis

2024-10-03 · Hongkang Li, Meng Wang, Songtao Lu, Xiaodong Cui 외

Chain-of-Thought (CoT) is an efficient prompting method that enables the reasoning ability of large language models by augmenting the query using multiple examples with multiple intermediate steps. Despite the empirical …

In-Context Learning

Provable In-Context Learning of Nonlinear Regression with Transformers

2025-07-28 · Hongbo Li, Lingjie Duan, Yingbin Liang arxiv

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 p…

Binary Classification

One-Layer Transformer Provably Learns One-Nearest Neighbor In Context

2024-11-16 · Zihao Li, Yuan Cao, Cheng Gao, Yihan He 외

Transformers have achieved great success in recent years. Interestingly, transformers have shown particularly strong in-context learning capability -- even without fine-tuning, they are still able to solve unseen tasks w…

In-Context Learning