Diffusion Transformers are Provably Optimal In-context Generators
cs.LG, math.ST, stat.ML, stat.TH
Submitted: 2026-10-04
Updated: 2026-10-04
Code: https://github.com/facebookresearch/DiT
License: http://creativecommons.org/licenses/by/4.0/
The gist: Generative foundation models are attracting interest for their ability to produce desired outputs from demonstrations given at inference time, without updating parameters.
Terminology
Abstract
Generative foundation models are attracting interest for their ability to produce desired outputs from demonstrations given at inference time, without updating parameters. However, since a few demonstrations cannot uniquely identify the intended task, the challenge is how to learn and sample from an output distribution that reflects this task uncertainty. In this work, we theoretically analyze how a Diffusion Transformer (DiT), pretrained across diverse tasks, learns and generates predictive distributions for a new query from demonstrations. We first show that the natural target to generate from finite demonstrations is not an output derived from estimating a single task, but rather a predictive distribution that captures the task uncertainty remaining after observing the demonstrations. We then prove that a DiT can learn this predictive distribution through score estimation, using attention to aggregate information from demonstrations and diffusion to generate samples. Owing to this property, with sufficient pretraining resources and diffusion sampling steps, the resulting DiT achieves the minimax optimal rate over a Hölder class of test-time tasks. These results imply that DiT acts as a statistically grounded in-context generator capable of generating distributions adapted to new tasks while retaining the uncertainty inherent in finite demonstrations.
Sources
- Transformers as In-Context Samplers: From Closed-Form Diffusion to Estimation-Free Sampling
- Convergence of Diffusion Models Under the Manifold Hypothesis in High-Dimensions
- Optimal In-context Adaptivity and Distributional Robustness of Transformers
- In-Context Learning Is Provably Bayesian Inference: A Generalization Theory for Meta-Learning
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks