mlsanityData to 14 Oct 2026

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

arXiv 2609.29060 ↗First posted 24 Sep 2026stat.ML cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Transformers achieve remarkable performance by jointly learning broad families of tasks during pretraining and adapting to unseen tasks from only a short prompt. Yet a rigorous mathematical and statistical understanding of this phenomenon remains limited. This paper aims to study how Transformers exploit shared cross-task structure and how this structure affects the sample complexity of in-context learning (ICL). Specifically, we characterize task-space complexity through covering numbers under a prescribed metric, thereby quantifying the low-dimensional cross-task structure without requiring an explicit parametric representation. The resulting cover provides a set of anchor functions, which we use to introduce a task-identification-and-evaluation procedure: context observations localize an unseen task among the anchor functions, and the response at a query is predicted by aggregating the corresponding anchor function query evaluations. For approximation, we explicitly construct a Transformer with Softmax attention to approximate this procedure. For generalization, we derive an error bound that separates the effects of the number of pretraining tasks and the prompt length. The scaling with respect to the number of pretraining tasks is governed by the intrinsic dimensions of the task space and input domain; once sufficiently many tasks are available, the dependence on the prompt context length becomes dimension-free. To the best of our knowledge, this is the first work to quantify cross-task complexity for general nonlinear task families and explicitly construct a Transformer that exploits their low-dimensional structure to perform ICL. Our theory provides a quantitative explanation of how joint pretraining across related tasks improves in-context generalization.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 8 of its 63 references that are in the map. First posted on arXiv 24 Sep 2026.

Builds on

8 of 63 references.

References · 8

  1. 2024Surveying the Effects of Quality, Diversity, and Complexity in Synthetic Data From Large Language Modelscited by 35
  2. 2026In-Context Operator Learning on the Space of Probability Measurescited by 11
  3. 2025Transformers Meet In-Context Learning: A Universal Approximation Theorycited by 6
  4. 2025Transformers for Learning on Noisy and Task-Level Manifolds: Approximation and Generalization Insightscited by 5
  5. 2026Understanding In-Context Learning for Nonlinear Regression with Transformers: Attention as Featurizercited by 3
  6. 2026Learning Theory of Transformers: Local-to-Global Approximation via Softmax Partition of Unitycited by 2
  7. 2026Transformers Can Implement Preconditioned Richardson Iteration for In-Context Gaussian Kernel Regressioncited by 1
  8. 2026Ghost in the Kernel: In-Context Learning with Efficient Transformers via Domain Generalizationcited by 1

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.