mlsanityData to 7 Oct 2026

In-context Learning in Presence of Spurious Correlations

arXiv 2410.03140 ↗First posted 4 Oct 2024cs.LG cs.CLcited by 2

Not on the map. Why?

Abstract (arXiv)

Large language models exhibit a remarkable capacity for in-context learning, where they learn to solve tasks given a few examples. Recent work has shown that transformers can be trained to perform simple regression tasks in-context. This work explores the possibility of training an in-context learner for classification tasks involving spurious features. We find that the conventional approach of training in-context learners is susceptible to spurious features. Moreover, when the meta-training dataset includes instances of only one task, the conventional approach leads to task memorization and fails to produce a model that leverages context for predictions. Based on these observations, we propose a novel technique to train such a learner for a given classification task. Remarkably, this in-context learner matches and sometimes outperforms strong methods like ERM and GroupDRO. However, unlike these algorithms, it does not generalize well to other tasks. We show that it is possible to obtain an in-context learner that generalizes to unseen tasks by training on a diverse dataset of synthetic in-context learning instances.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 52 of its 66 references that are in the map. First posted on arXiv 4 Oct 2024.

Builds on

52 of 66 references.

References · 52

  1. 2017Attention Is All You Needcited by 59,932
  2. 2015Deep Residual Learning for Image Recognitioncited by 51,809
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  4. 2020Language Models are Few-Shot Learnerscited by 32,199
  5. 2016Layer Normalizationcited by 5,579
  6. 2016"Why Should I Trust You?": Explaining the Predictions of Any Classifiercited by 5,040
  7. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  8. 2014Deep Learning Face Attributes in the Wildcited by 3,679
  9. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
  10. 2020Shortcut Learning in Deep Neural Networkscited by 1,928
  11. 2018ImageNet-trained CNNs are biased towards texture; increasing shape bias improves accuracy and robustnesscited by 1,430
  12. 2020WILDS: A Benchmark of in-the-Wild Distribution Shiftscited by 1,366
38 more
  1. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
  2. 2020In Search of Lost Domain Generalizationcited by 1,042
  3. 2022In-context Learning and Induction Headscited by 930
  4. 2019Right for the Wrong Reasons: Diagnosing Syntactic Heuristics in Natural Language Inferencecited by 864
  5. 2022Transformers learn in-context by gradient descentcited by 714
  6. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
  7. 2022What learning algorithm is in-context learning? Investigations with linear modelscited by 671
  8. 2018Annotation Artifacts in Natural Language Inference Datacited by 656
  9. 2018Recognition in Terra Incognitacited by 655
  10. 2013Domain Generalization via Invariant Feature Representationcited by 622
  11. 2023Larger language models do in-context learning differentlycited by 386
  12. 2022Last Layer Re-Training is Sufficient for Robustness to Spurious Correlationscited by 379
  13. 2018Confounding variables can degrade generalization performance of radiological deep learning modelscited by 374
  14. 2020Noise or Signal: The Role of Image Backgrounds in Object Recognitioncited by 342
  15. 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 303
  16. 2020Pretrained Transformers Improve Out-of-Distribution Robustnesscited by 293
  17. 2024Long-context LLMs Struggle with Long In-context Learningcited by 285
  18. 2018What is the Effect of Importance Weighting in Deep Learning?cited by 250
  19. 2024Many-Shot In-Context Learningcited by 203
  20. 2020On the Theory of Transfer Learning: The Importance of Task Diversitycited by 186
  21. 2021Simple data balancing achieves competitive worst-group-accuracycited by 177
  22. 2020Understanding the Failure Modes of Out-of-Distribution Generalizationcited by 146
  23. 2022On Feature Learning in the Presence of Spurious Correlationscited by 145
  24. 2023Pretraining task diversity and the emergence of non-Bayesian in-context learning for regressioncited by 138
  25. 2022Data Determines Distributional Robustness in Contrastive Language Image Pre-training (CLIP)cited by 137
  26. 2022General-Purpose In-Context Learning by Meta-Learning Transformerscited by 102
  27. 2023The Transient Nature of Emergent In-Context Learning in Transformerscited by 72
  28. 2023Large Language Models Can be Lazy Learners: Analyze Shortcuts in In-Context Learningcited by 69
  29. 2024Many-Shot In-Context Learning in Multimodal Foundation Modelscited by 64
  30. 2022Assaying Out-Of-Distribution Generalization in Transfer Learningcited by 53
  31. 2023Pretraining Data Mixtures Enable Narrow Model Selection Capabilities in Transformer Modelscited by 45
  32. 2024On the Out-Of-Distribution Generalization of Multimodal Large Language Modelscited by 30
  33. 2023A Closer Look at In-Context Learning under Distribution Shiftscited by 25
  34. 2023On the Connection between Pre-training Data Diversity and Fine-tuning Robustnesscited by 25
  35. 2022How Robust is Unsupervised Representation Learning to Distribution Shift?cited by 24
  36. 2023How Well Does GPT-4V(ision) Adapt to Distribution Shifts? A Preliminary Investigationcited by 22
  37. 2022You Only Need a Good Embeddings Extractor to Fix Spurious Correlationscited by 17
  38. 2024Dual Process Learning: Controlling Use of In-Context vs. In-Weights Strategies with Weight Forgettingcited by 15

50 most cited of 52 All 52 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 1; 2026: 1.

2 papers.