paper-with-me

Papers

Transformers are Universal In-context Learners

2024-08-02 · Takashi Furuya, Maarten V. de Hoop, Gabriel Peyré

Transformers are deep architectures that define "in-context mappings" which enable predicting new tokens based on a given set of tokens (such as a prompt in NLP applications or a set of patches for a vision transformer). In this work, we study in particular the ability of these architectures to handle an arbitrarily large number of context tokens. To mathematically, uniformly address their expressivity, we consider the case that the mappings are conditioned on a context represented by a probability distribution of tokens which becomes discrete for a finite number of these. The relevant notion of smoothness then corresponds to continuity in terms of the Wasserstein distance between these contexts. We demonstrate that deep transformers are universal and can approximate continuous in-context mappings to arbitrary precision, uniformly over compact token domains. A key aspect of our results, compared to existing findings, is that for a fixed precision, a single transformer can operate on an arbitrary (even infinite) number of tokens. Additionally, it operates with a fixed embedding dimension of tokens (this dimension does not increase with precision) and a fixed number of heads (proportional to the dimension). The use of MLPs between multi-head attention layers is also explicitly controlled. We consider both unmasked attentions (as used for the vision transformer) and masked causal attentions (as used for NLP and time series applications). We tackle the causal setting leveraging a space-time lifting to analyze causal attention as a mapping over probability distributions of tokens.

📄 PDF Abstract BibTeX arXiv:2408.01367

Code (0)

등록된 구현이 없습니다.

Methods 이 논문이 사용한 방법론

Attention 설명 없음
SET Dynamic Sparse Training method where weight mask is updated randomly periodically
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Multi-Head Attention 설명 없음

Similar Papers 제목 키워드 기반

Adversarially Pretrained Transformers may be Universally Robust In-Context Learners

2025-05-20 · Soichiro Kumano, Hiroshi Kera, Toshihiko Yamasaki

Adversarial training is one of the most effective adversarial defenses, but it incurs a high computational cost. In this study, we show that transformers adversarially pretrained on diverse tasks can serve as robust foun…

In-Context Learning

Is In-Context Universality Enough? MLPs are Also Universal In-Context

2025-02-05 · Anastasis Kratsios, Takashi Furuya

The success of transformers is often linked to their ability to perform in-context learning. Recent work shows that transformers are universal in context, capable of approximating any real-valued continuous function of a…

In-Context LearningInductive Bias

What learning algorithm is in-context learning? Investigations with linear models

2022-11-28 · Ekin Akyürek, Dale Schuurmans, Jacob Andreas, Tengyu Ma 외

Neural sequence models, especially transformers, exhibit a remarkable capacity for in-context learning. They can construct new predictors from sequences of labeled examples $(x, f(x))$ presented in the input without furt…

In-Context Learningregression

Communication Drives the Emergence of Language Universals in Neural Agents: Evidence from the Word-order/Case-marking Trade-off

2023-01-30 · Yuchen Lian, Arianna Bisazza, Tessa Verhoef

Artificial learners often behave differently from human learners in the context of neural agent-based simulations of language emergence and change. A common explanation is the lack of appropriate cognitive biases in thes…

Transformers Meet In-Context Learning: A Universal Approximation Theory

2025-06-05 · Gen Li, Yuchen Jiao, Yu Huang, Yuting Wei 외

Modern large language models are capable of in-context learning, the ability to perform new tasks at inference time using only a handful of input-output examples in the prompt, without any fine-tuning or parameter update…

In-Context Learning