mlsanityData to 14 Oct 2026

Positional Information Matters for Invariant In-Context Learning: A Case Study of Simple Function Classes

arXiv 2311.18194 ↗First posted 30 Nov 2023cs.LG cs.CLcited by 3

Not on the map. Why?

Abstract (arXiv)

In-context learning (ICL) refers to the ability of a model to condition on a few in-context demonstrations (input-output examples of the underlying task) to generate the answer for a new query input, without updating parameters. Despite the impressive ICL ability of LLMs, it has also been found that ICL in LLMs is sensitive to input demonstrations and limited to short context lengths. To understand the limitations and principles for successful ICL, we conduct an investigation with ICL linear regression of transformers. We characterize several Out-of-Distribution (OOD) cases for ICL inspired by realistic LLM ICL failures and compare transformers with DeepSet, a simple yet powerful architecture for ICL. Surprisingly, DeepSet outperforms transformers across a variety of distribution shifts, implying that preserving permutation invariance symmetry to input demonstrations is crucial for OOD ICL. The phenomenon specifies a fundamental requirement by ICL, which we termed as ICL invariance. Nevertheless, the positional encodings in LLMs will break ICL invariance. To this end, we further evaluate transformers with identical positional encodings and find preserving ICL invariance in transformers achieves state-of-the-art performance across various ICL distribution shifts

Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). Builds on 22 of its 25 references that are in the map. First posted on arXiv 30 Nov 2023.

Builds on

22 of 25 references.

References · 22

  1. 2017Attention Is All You Needcited by 60,361
  2. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,744
  3. 2020Language Models are Few-Shot Learnerscited by 32,419
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  5. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  6. 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,386
  7. 2022Scaling Instruction-Finetuned Language Modelscited by 3,024
  8. 2017Deep Setscited by 1,421
  9. 2021Calibrate Before Use: Improving Few-Shot Performance of Language Modelscited by 1,392
  10. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  11. 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 841
  12. 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 715
10 more
  1. 2023On the Robustness of ChatGPT: An Adversarial and Out-of-distribution Perspectivecited by 211
  2. 2022Exploring Length Generalization in Large Language Modelscited by 206
  3. 2022Transformer Language Models without Positional Encodings Still Learn Positional Informationcited by 150
  4. 2022Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrationscited by 116
  5. 2023Mitigating Label Biases for In-context Learningcited by 89
  6. 2016Discovering Causal Signals in Imagescited by 79
  7. 2023Large Language Models Can be Lazy Learners: Analyze Shortcuts in In-Context Learningcited by 69
  8. 2023Measuring Inductive Biases of In-Context Learning with Underspecified Demonstrationscited by 49
  9. 2023A Closer Look at In-Context Learning under Distribution Shiftscited by 25
  10. 2022On the Compositional Generalization Gap of In-Context Learningcited by 24

Built on by

Cited by year (2026 to 14 Oct)

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

3 papers.