English

Efficient and Minimax Optimal In-context Nonparametric Regression with Transformers

Machine Learning 2026-05-20 v2 Machine Learning Statistics Theory Statistics Theory

Abstract

We study in-context learning for nonparametric regression with α\alpha-H\"older smooth regression functions, for some α>0\alpha>0. We prove that, with nn in-context examples and dd-dimensional regression covariates, a pretrained transformer with Θ(logn)\Theta(\log n) parameters and Ω(n2α/(2α+d)log3n)\Omega\bigl(n^{2\alpha/(2\alpha+d)}\log^3 n\bigr) pretraining sequences can achieve the minimax optimal rate of convergence O(n2α/(2α+d))O\bigl(n^{-2\alpha/(2\alpha+d)}\bigr) in mean squared error. Our result requires substantially fewer transformer parameters and pretraining sequences than previous results in the literature. This is achieved by showing that transformers are able to approximate local polynomial estimators efficiently by implementing a kernel-weighted polynomial basis and then running gradient descent.

Keywords

Cite

@article{arxiv.2601.15014,
  title  = {Efficient and Minimax Optimal In-context Nonparametric Regression with Transformers},
  author = {Michelle Ching and Ioana Popescu and Nico Smith and Tianyi Ma and William G. Underwood and Richard J. Samworth},
  journal= {arXiv preprint arXiv:2601.15014},
  year   = {2026}
}

Comments

30 pages, 7 figures

R2 v1 2026-07-01T09:14:11.925Z