atlas

Research map / Architectures and efficiency / Attention and transformers

Vocabulary In-Context Learning in Transformers: Benefits of Positional Encoding

NeurIPS 2025 · Architectures and efficiency › Attention and transformers · approach: Training dynamics of in-context learning · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows that single-layer Transformers doing in-context learning over a finite vocabulary cannot reach the universal approximation property without positional encoding, but can with suitable (dense, unbounded) positional encodings.

Problem

Whether in-context learning in single-layer Transformers, where context tokens come from a finite vocabulary, can achieve the universal approximation property (UAP), and what role positional encoding plays.

Approach

Treats context as a control parameter so a single-layer attention block reduces to a one-hidden-layer FNN; without positional encoding, finite-vocabulary contexts give a finite-dimensional function span (non-UAP), while adding positional encodings whose shifted vocabulary is dense lets constructed contexts approximate any continuous function, with weaker density requirements for ReLU and exponenti

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
restrict context tokens to a finite vocabulary without positional encodingsingle-layer Transformer VICL · VICL function approximationuniversal approximation property (UAP)Hurt
add absolute positional encoding satisfying the theorem's density and vocabulary conditionssingle-layer Transformer VICL · VICL function approximationuniversal approximation property (UAP)Helped
restrict the positional-encoding density condition to S dense in [-1, 1]^{d_x}single-layer ReLU Transformer VICL · VICL function approximationuniversal approximation property (UAP)Helped
use exponential activation with S dense only in a neighborhood of a pointsingle-layer exponential Transformer VICL · VICL function approximationuniversal approximation property (UAP)Helped
allow context tokens to come from the entire vector space rather than a finite vocabularysingle-layer Transformer ICL · ICL function approximationuniversal approximation property (UAP)Helped

Limitations

Experimental setup

Builds on: universal approximation theorem for FNNs Kronecker approximation theorem Stone-Weierstrass theorem

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy