Understanding In-Context Learning from Repetitions

Jianhao Yan, Jin Xu, Chiyu Song, Chenming Wu, Yafu Li +1 more
2/12/2026

No official code found. Best implementation: ElliottYan/understand-icl-from-repetition (8 stars, last commit 2024-02-23).

Abstract

This paper explores the elusive mechanism underpinning in-context learning in Large Language Models (LLMs). Our work provides a novel perspective by examining in-context learning via the lens of surface repetitions. We quantitatively investigate the role of surface features in text generation, and empirically establish the existence of \emph{token co-occurrence reinforcement}, a principle that strengthens the relationship between two tokens based on their contextual co-occurrences. By investigating the dual impacts of these features, our research illuminates the internal workings of in-context learning and expounds on the reasons for its failures. This paper provides an essential contribution to the understanding of in-context learning and its potential limitations, providing a fresh perspective on this exciting capability.

View on arXivView PDF

Code Implementations(1)

80Shell, PythonSep 30, 20232 years ago

Similar Papers

Cite this paper

@article{yan2026understanding,
  title  = {Understanding In-Context Learning from Repetitions},
  author = {Jianhao Yan and Jin Xu and Chiyu Song and Chenming Wu and Yafu Li and Yue Zhang},
  year   = {2026},
  eprint = {2310.00297},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2310.00297},
  journal = {ICLR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.00297.svg)](https://codeofpaper.com/paper/2310.00297)

Discussion