In-Context Benign Overfitting: A Feature-Selection Model in In-Context Linear Regression
Abstract
In in-context learning (ICL), a frozen pre-trained model solves tasks by conditioning on a prompt of a few input–output examples, without gradient updates. If the task was present in pretraining but the particular prompt sequence was not, the resulting in-distribution generalization is retrieval-based ICL. Learning-based ICL instead reflects out-of-distribution generalization: the model succeeds on prompts generated by a novel task. Empirically, both forms improve with scale. By analogy to benign overfitting in supervised learning, we call this in-context benign overfitting: larger models more faithfully memorize the pretraining tasks (improving retrieval ICL) while also generalizing better to novel tasks (improving learning ICL). We prove that this phenomenon already arises in a minimal in-context linear-regression feature-selection model. In contrast, standard in-context linear-regression models exhibit a retrieval–learning tradeoff, where the emergence of learning-based ICL coincides with degraded retrieval-based performance.
BibTeX
@inproceedings{deora2026context,
author = {Puneesh Deora and Bhavya Vasudeva and Christos Thrampoulidis},
title = {{In-Context Benign Overfitting: A Feature-Selection Model in In-Context Linear Regression}},
booktitle = {Advances in Neural Information Processing Systems},
year = {2026},
url = {https://openreview.net/forum?id=BCHILY5fm6},
}Ask Althea to put this paper to the test.