Supervised learning pays attention
Not on the map. Why?
Abstract (arXiv)
In-context learning with attention enables large neural networks to make context-specific predictions by selectively focusing on relevant examples. Here, we adapt this idea to supervised learning procedures such as lasso regression and gradient boosting, for tabular data. Our goals are to (1) flexibly fit personalized models for each prediction point and (2) retain model simplicity and interpretability. Our method fits a local model for each test observation by weighting the training data according to attention, a supervised similarity measure that emphasizes features and interactions that are predictive of the outcome. Attention weighting allows the method to adapt to heterogeneous data in a data-driven way, without requiring cluster or similarity pre-specification. Further, our approach is uniquely interpretable: for each test observation, we identify which features are most predictive and which training observations are most relevant. We then show how to use attention weighting for time series and spatial data, and we present a method for adapting pretrained tree-based models to distributional shift using attention-weighted residual corrections. Across real and simulated datasets, attention weighting improves predictive performance while preserving interpretability, and theory shows that attention-weighting linear models attain lower mean squared error than the standard linear model under mixture-of-models data-generating processes with known subgroup structure.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 6 of its 22 references that are in the map. First posted on arXiv 10 Dec 2025.
Builds on
6 of 22 references.
References · 6
- 2017Attention Is All You Needcited by 60,361
- 2022Transformers learn in-context by gradient descentcited by 732
- 2017Quasi-Oracle Estimation of Heterogeneous Treatment Effectscited by 332
- 2015ranger: A Fast Implementation of Random Forests for High Dimensional Data in C++ and Rcited by 172
- 2023In-context Learning and Gradient Descent Revisitedcited by 20
- 2023Towards Understanding How Transformers Learn In-context Through a Representation Learning Lenscited by 15
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026Interpretable AI with Local Distillationcited by 0
- 2026Interpretable AI with Local Distillation24 Aug 2026