arXiv Machine Learning

Transformers as Cross-Task Learners: Shared Structure Drives Sample Efficiency in In-Context Learning

Transformers can learn broad families of tasks during pretraining and adapt to unseen tasks from a short prompt, but a rigorous understanding of this capability is limited. This paper studies how shared cross‑task structure influences the sample complexity of in‑context learning (ICL) by characterizing task‑space complexity through covering numbers, yielding a set of anchor functions that localize unseen tasks and predict responses. The authors construct a Transformer with Softmax attention to approximate this procedure and derive an error bound that separates the effects of pretraining tasks and prompt length, showing that once enough tasks are available the dependence on prompt length becomes dimension‑free.

arXiv Machine Learning
Oct 12

Transformer-based In-Context Score Operator Learning for Diffusion Models

The paper introduces a transformer-based framework that learns an in‑context score operator for diffusion models, allowing the model to perform reverse‑diffusion sampling on unseen target distributions specified by a small empirical context set. By representing the task‑dependent score as a Gaussian‑kernel conditional mean and approximating it with a transformer‑based query‑dependent attention architecture, the method can adapt to new tasks without retraining or parameter updates. The authors provide theoretical generalization‑error bounds and evaluate the approach on scientific and visual datasets, noting strong performance on simple task families and limitations as task complexity grows.

By Wuzhe Xu, Zhaiming Shen, Yulong Lu, Wenjing Liao, Rongjie Lai
arXiv AI
6d ago

Distributional Alignment as a Criterion for Designing Task Vectors in In-Context Learning

The paper proposes using distributional alignment, measured by the $d_{ ext{NTP}}$ metric, as a criterion for designing task vectors in in-context learning. It introduces Linear Task Vector (LTV), a closed‑form linear mapping that minimizes $d_{ ext{NTP}}$ and improves downstream accuracy across multiple benchmarks and language models. LTV also demonstrates transferability, enabling larger‑model task vectors to boost smaller‑model performance.

By Jihoon Kwon, Jiwon Choi, Jy-yong Sohn
arXiv Machine Learning
Oct 19

Out of Support, Not Out of Reach: In-Context Learning with Unsupported Instructions and Composed Tasks

The paper investigates when in‑context learning (ICL) can succeed even if the instruction or target task is not covered by a model’s pretraining data. It introduces a theoretical framework that distinguishes two types of distribution shift—unsupported instructions and unsupported target tasks—and shows how demonstrations can mitigate these shifts. The authors further extend the analysis to long‑horizon tasks that can be decomposed into pretraining‑supported subtasks, providing error bounds that explain how ICL can handle tasks beyond the model’s original support.

By Xuhan Tong, Yuchen Zeng, Jiawei Zhang
arXiv Machine Learning
Oct 9

What can linear attention learn from nonlinear teachers in-context?

The paper extends linear attention theory from linear regression to nonlinear single‑index targets, showing that linear attention only captures the linear Hermite component of the nonlinearity while treating the rest as effective noise. This nonlinearity‑noise equivalence lets existing linear results be applied to nonlinear tasks, and the authors demonstrate how finite pretraining data and increasing task diversity affect the shift from memorisation to generalisation. The work highlights a limitation of reduced linear‑attention models and offers a tractable framework for future studies of nonlinear in‑context learning.

By Mary Letey, Arman Rysmakhanov, Yue M. Lu, Cengiz Pehlevan, Jacob Zavatone-Veth