Papers › Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond...

Does In-Context Learning Really Learn? Rethinking How Large Language Models Respond and Solve Tasks via In-Context Learning

11 Apr 2024arXiv:2404.07546archive 2025-07-28

Quanyu Long, Yin Wu, Wenya Wang, Sinno Jialin Pan

In-context Learning (ICL) has emerged as a powerful capability alongside the development of scaled-up large language models (LLMs). By instructing LLMs using few-shot demonstrative examples, ICL enables them to perform a wide range of tasks without updating millions of parameters. However, the precise contributions of demonstrations towards improving end-task performance have not been thoroughly investigated in recent analytical studies. In this paper, we empirically decompose the overall performance of ICL into three dimensions, label space, format, and discrimination, and we evaluate four general-purpose LLMs across a diverse range of tasks. Counter-intuitively, we find that the demonstrations have a marginal impact on provoking discriminative knowledge of language models. However, ICL exhibits significant efficacy in regulating the label space and format, which helps LLMs respond to desired label words. We then demonstrate that this ability functions similar to detailed instructions for LLMs to follow. We additionally provide an in-depth analysis of the mechanism of retrieval helping with ICL. Our findings demonstrate that retrieving the semantically similar examples notably boosts the model's discriminative capability. However, we also observe a trade-off in selecting good in-context examples regarding label diversity.

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="2404.07546")

Code

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

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

ruyue0001/decompose_icl_improvement officialmentioned in paperpytorch 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

24 samples harvested; 20 ran; 0 honoured the contract we drafted; 4 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.

20ran
4unverified

Licence: 24 of the 24 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 ruyue0001/decompose_icl_improvement. “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.

SARIngram ruyue0001/decompose_icl_improvement/sari.py official repository ran no licence file found · pointer only · aed9f558bc97e642 · report
corpus_bleu1 ruyue0001/decompose_icl_improvement/handle_generation.py official repository ran no licence file found · pointer only · 1eeea749ec1a866b · report
corpus_bleu2 ruyue0001/decompose_icl_improvement/handle_generation.py official repository ran no licence file found · pointer only · a569a12d62394751 · report
create_generation_demo ruyue0001/decompose_icl_improvement/prepare_prompt.py official repository ran no licence file found · pointer only · 67237d6d80179fce · report
create_sample_ner ruyue0001/decompose_icl_improvement/prepare_prompt.py official repository ran no licence file found · pointer only · ec2425ceccbfcfcc · report
get_ner ruyue0001/decompose_icl_improvement/txt2jsonl.py official repository ran no licence file found · pointer only · 62d9ca729ee37577 · report
is_business ruyue0001/decompose_icl_improvement/post_process/ag_news.py official repository ran no licence file found · pointer only · 116f6785089f9155 · report
is_entailment ruyue0001/decompose_icl_improvement/post_process/glue_rte.py official repository ran no licence file found · pointer only · 0a551c743a828127 · report
is_equivalent ruyue0001/decompose_icl_improvement/post_process/medical_question.py official repository ran no licence file found · pointer only · 1e19118ef42994b1 · report
is_hate ruyue0001/decompose_icl_improvement/post_process/hs18.py official repository ran no licence file found · pointer only · 29e820b828a67c24 · report
is_mistral_entailment ruyue0001/decompose_icl_improvement/post_process/glue_rte.py official repository ran no licence file found · pointer only · 48fbfe608a52528c · report
is_mistral_in_space ruyue0001/decompose_icl_improvement/post_process/hs18.py official repository ran no licence file found · pointer only · 856747dbbfe12a77 · report
is_mistral_in_space ruyue0001/decompose_icl_improvement/post_process/medical_question.py official repository ran no licence file found · pointer only · 09ad6407d9101378 · report
is_non_entailment ruyue0001/decompose_icl_improvement/post_process/glue_rte.py official repository ran no licence file found · pointer only · 7b0e33bf8239b9a6 · report
is_non_equivalent ruyue0001/decompose_icl_improvement/post_process/medical_question.py official repository ran no licence file found · pointer only · 870e69d4013fee2e · report
is_non_hate ruyue0001/decompose_icl_improvement/post_process/hs18.py official repository ran no licence file found · pointer only · 851700f22f8e29c6 · report
is_sci_tech ruyue0001/decompose_icl_improvement/post_process/ag_news.py official repository ran no licence file found · pointer only · 2ba2e8163bc35f7a · report
is_sports ruyue0001/decompose_icl_improvement/post_process/ag_news.py official repository ran no licence file found · pointer only · 4bd4c4a432070b96 · report
match_original_query ruyue0001/decompose_icl_improvement/txt2jsonl.py official repository ran no licence file found · pointer only · db76713faf3d599e · report
match_original_query_ner ruyue0001/decompose_icl_improvement/txt2jsonl.py official repository ran no licence file found · pointer only · b6a80eaa186a1dd7 · report
ReadInFile ruyue0001/decompose_icl_improvement/sari.py official repository unverified no licence file found · pointer only · 35effb67911bfd9a · report
SARIsent ruyue0001/decompose_icl_improvement/sari.py official repository unverified no licence file found · pointer only · a739e4c44244f1e2 · report
create_demo_ner ruyue0001/decompose_icl_improvement/prepare_prompt.py official repository unverified no licence file found · pointer only · 70cb606f6be4b0c5 · report
loader ruyue0001/decompose_icl_improvement/generate_icl_retrieval.py official repository unverified no licence file found · pointer only · c951a5a9d203c637 · report

Tasks

DiversityIn-Context Learning

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