Papers › Understanding In-Context Learning from Repetitions

Understanding In-Context Learning from Repetitions

30 Sep 2023arXiv:2310.00297archive 2025-07-28

Jianhao Yan, Jin Xu, Chiyu Song, Chenming Wu, Yafu Li, Yue Zhang

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.00297")

Code

Syntology Ran 4 of 16 code samples harvested from 1 repository linked to this paper; 12 have no recorded run. Of those that ran: 4 ran with no contract checked.

By repository: official repository: 16 samples from 1 repository, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

elliottyan/understand-icl-from-repetition officialmentioned in papermentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested; 4 ran; 0 honoured the contract we drafted; 12 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

4ran
12unverified

Licence: 16 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from elliottyan/understand-icl-from-repetition. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

build_custom_parser elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_random_2_tokens.py official repository ran no licence file found · pointer only · 29f5d4f54911d0c4 · report
build_custom_parser elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_semantic_2_phrase.py official repository ran no licence file found · pointer only · c027fc249dfe28e3 · report
format_subject elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_mmlu_label_space.py official repository ran fingerprinted no licence file found · pointer only · da9a2d07dd8aa31a · report
replace_idx_with_random_tokens elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_gsm8k_cot.py official repository ran no licence file found · pointer only · cc095a6dcfbe16c4 · report
build_custom_parser elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_gsm8k_cot.py official repository unverified no licence file found · pointer only · 127d4c9d3dee7015 · report
compute_stats_dict elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_random_mask.py official repository unverified no licence file found · pointer only · 4e66424c29ed15de · report
replace_text_with_random_tokens elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_gsm8k_cot.py official repository unverified no licence file found · pointer only · 94272d35afe37f93 · report
single_sentence_eval elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_self_reinforce.py official repository unverified no licence file found · pointer only · e1b97bfe6a33ee26 · report
single_sentence_eval_2_phrase elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_random_2_phrase.py official repository unverified no licence file found · pointer only · c39bbde81028ab56 · report
single_sentence_eval_2_phrase elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_random_2_phrase_control_distance.py official repository unverified no licence file found · pointer only · e4546e761c326e3e · report
single_sentence_eval_2_phrase elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_random_2_phrase_stop_words.py official repository unverified no licence file found · pointer only · a215a17f8a43dd5b · report
single_sentence_eval_2_phrase elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_semantic_2_phrase.py official repository unverified no licence file found · pointer only · 405e51c0abc050da · report
single_sentence_eval_2_phrase_neighbour elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_random_2_phrase_control_distance_embed_neighbour.py official repository unverified no licence file found · pointer only · 5ee4fd4e2eaab0d2 · report
single_sentence_eval_icl elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_random_mask.py official repository unverified no licence file found · pointer only · 562a31edcf54442e · report
single_sentence_eval_phrase elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_suffix.py official repository unverified no licence file found · pointer only · 1300344adb669654 · report
single_sentence_eval_token_dependency elliottyan/understand-icl-from-repetition/analyze_icl_rep/analyze_icl_random_2_tokens.py official repository unverified no licence file found · pointer only · ada2836a4626ca22 · report

Tasks

In-Context LearningText Generation

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections