Nonparametric In-Context Learning under Growing Geometric Complexity: Minimax Optimality and Local Geometry-Adaptivity of Transformers
Organizations: Department of Statistics Seoul National University, Korea
Abstract
Transformers have become a central architecture for in-context learning (ICL), particularly through their state-of-the-art performance in large language models. This success motivates understanding how transformers exploit task-relevant structure in geometrically heterogeneous data. However, existing nonparametric ICL theory has largely focused on Euclidean domains or single-manifold models. To address this gap, we study the prediction problem under unknown local geometry, modeled by sample size-dependent mixtures of manifolds with heterogeneous dimensions, smoothness, and sampling masses. Under local separation and small-perturbation conditions, we establish a minimax lower bound capturing the aggregate difficulty of the components and construct an oracle tangent local-polynomial estimator with a matching upper bound. This estimator is connected to a structure-informed, two-stage softmax transformer with a geometric preconditioner and chartwise reduced local-polynomial solvers. The transformer achieves negligible approximation error relative to the minimax rate with logarithmic depth and polynomial size. Finally, we derive an in-context generalization bound for near empirical risk minimizers over this class. Together, these results identify conditions under which the resulting predictor exploits local geometry and attains the aggregate minimax rate.
Figures & tables
| 1: | Input: , query , , , , and . |
|---|---|
| 2: | Set . Evaluate in ( 3 ) for every . |
| 3: | Set and . Normalize . |
| 4: | Form and with fixed measurable tie-breaking. |
| 5: | For each , set , , and . |
| 6: | Form and . |
| 7: | Compute . |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Pretraining budget | Softmax workspace MSE | Transformer / LP-CV |
|---|---|---|
| LP-CV MSE | Transformer MSE | Ratio | |||
|---|---|---|---|---|---|
| 2 | 0.75 | 41 | 0.606 | 0.448 | 0.739 |
| 2 | 1.5 | 60 | 0.376 | 0.310 | 0.825 |
| 2 | 3 | 97 | 0.545 | 0.480 | 0.880 |
| 4 | 0.75 | 72 | 0.435 | 0.371 | 0.853 |
| 4 | 1.5 | 106 | 0.632 | 0.538 | 0.851 |
| 4 | 3 | 217 | 0.845 | 0.418 | 0.495 |
| Module | Input/range control | Stability used |
|---|---|---|
| Structural selector | Fixed observation cube; polynomially many centers | Exact ReLU construction |
| Tangent moment | ; fixed moment dimension | Polynomial Lipschitz bound |
| Moment-to-projector | Bounded moments; denominator | ( 38 ) |
| Spectral/chart maps | Fixed compact spectral domain and chart cube | Fixed Lipschitz bounds; global decoders |
| Regression summaries | Polynomial coordinate and weight boxes | Fixed-degree polynomial maps |
| Inverse decoder | on comparison domain | Polynomial Lipschitz bound |
In-Context Learning
In-context learning studies how models adapt to new tasks from examples or instructions supplied at inference time, without changing their weights.
See all 404 papers