A Closer Look at In-Context Learning under Distribution Shifts
In-context learning, a capability that enables a model to learn from input examples on the fly without necessitating weight updates, is a defining characteristic of large language models. In this work, we follow the setting proposed in (Garg et al., 2022) to better understand the generality and limitations of in-context learning from the lens of the simple yet fundamental task of linear regression. The key question we aim to address is: Are transformers more adept than some natural and simpler architectures at performing in-context learning under varying distribution shifts? To compare transformers, we propose to use a simple architecture based on set-based Multi-Layer Perceptrons (MLPs). We find that both transformers and set-based MLPs exhibit in-context learning under in-distribution evaluations, but transformers more closely emulate the performance of ordinary least squares (OLS). Transformers also display better resilience to mild distribution shifts, where set-based MLPs falter. However, under severe distribution shifts, both models' in-context learning abilities diminish.
Code (1)
Tasks
In-Context LearningSimilar Papers 제목 키워드 기반
A Closer Look at Distribution Shifts and Out-of-Distribution Generalization on Graphs
Distribution shifts, in which the training distribution differs from the testing distribution, can significantly degrade the performance of Graph Neural Networks (GNNs). Although some existing graph classification benchm…
Domain GeneralizationGraph ClassificationOut-of-Distribution GeneralizationBeyond Discrepancy: A Closer Look at the Theory of Distribution Shift
Many machine learning models appear to deploy effortlessly under distribution shift, and perform well on a target distribution that is considerably different from the training distribution. Yet, learning theory of distri…
Learning TheoryModeling the Q-Diversity in a Min-max Play Game for Robust Optimization
Models trained with empirical risk minimization (ERM) are revealed to easily rely on spurious correlations, resulting in poor generalization. Group distributionally robust optimization (group DRO) can alleviate this prob…
DiversityOut-of-Distribution Generalizationtext-classificationText ClassificationProvable Adversarial Robustness in In-Context Learning
Large language models adapt to new tasks through in-context learning (ICL) without parameter updates. Current theoretical explanations for this capability assume test tasks are drawn from a distribution similar to that s…
Adversarial RobustnessA Closer Look at the Learnability of Out-of-Distribution (OOD) Detection
Machine learning algorithms often encounter different or "out-of-distribution" (OOD) data at deployment time, and OOD detection is frequently employed to detect these examples. While it works reasonably well in practice,…
Learning TheoryOut of Distribution (OOD) DetectionPAC learning