Research map / Large language models / Language, safety and interpretability
In-Context Learning Learns Label Relationships but Is Not Conventional Learning
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Probes how in-context learning uses in-context label information via probabilistic metrics and full context-size training curves, finding ICL does use labels and can learn novel tasks but cannot fully overcome pre-training label preferences and does not weight all in-context information equally.
Problem
There is no consensus on how in-context learning (ICL) uses label information in LLMs; prior work disagrees on whether ICL learns input-label relationships, so the paper tests whether ICL behaves like a conventional learner.
Approach
Formulates three null hypotheses about how an idealized conventional learner should use labels, evaluates ICL across all context sizes with probabilistic metrics (log likelihood, entropy), and introduces a single-forward-pass method to compute ICL training dynamics at every number of in-context examples.
Key results
- Randomizing in-context labels lowers average log likelihood for LLaMa-2-70B on all tasks, e.g. a 0.51 difference on SST-2 and 0.80 on AG News, so the null hypothesis that ICL ignores label distribution is rejected.
- ICL learns a novel author identification task built from private messages, with LLaMa-2 accuracy above random guessing and improving with model size.
- With flipped labels, predictive entropy plateaus at a gap from the default labels even at maximum context size (e.g. -0.52 entropy difference for LLaMa-2 7B on SST-2 and -1.00 for LLaMa-2 70B on AG News), so ICL does not fully overcome pre-training preference.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Randomize the in-context labels | Few-shot ICL · SST-2 | log likelihood: 0.51 | Hurt |
| Randomize the in-context labels | Few-shot ICL · AG News | log likelihood: 0.90 | Hurt |
| Use flipped labels instead of default labels | Few-shot ICL · SST-2 | entropy: -0.17 | Hurt |
| Use flipped labels instead of default labels | Few-shot ICL · AG News | entropy: -1.00 | Hurt |
| Provide in-context examples for a novel author-identification label relationship | Few-shot ICL · Novel author identification | accuracy | Helped |
| Add prompts explaining the flipped label relationship | Prompted few-shot ICL · SST-2 | performance | Mixed |
| Present default labels before flipped labels rather than flipped labels before default labels | Few-shot ICL with changing label relationships · Tasks with dynamic label flipping | predictions | Mixed |
| Calibrate predicted probabilities by dividing by a prior and renormalizing | Few-shot ICL · Tasks with randomized labels | performance | No clear effect |
| Use 8-bit quantization instead of full 32-bit precision | LLaMa-2-7B · Subjectivity | performance | No clear effect |
Surprising findings
- Larger models react more strongly to label randomization, so the importance of labels may grow with model capability.
- ICL does not weight all in-context label information equally; it prefers label relations closer to the query when the relation changes mid-context.
Limitations
- Only few-shot evaluation via logits, not free-form generation.
- Does not cover RLHF-finetuned LLMs.
- Authorship dataset is private and not released, limiting reproducibility.
Experimental setup
Datasets: SST-2 Subjectivity Financial Phrasebank Hate Speech AG News MQP MRPC RTE WNLI authorship identification (private Slack messages)
Benchmarks: SST-2 Subjectivity Financial Phrasebank Hate Speech AG News MQP MRPC RTE WNLI
Metrics: accuracy log likelihood entropy
Baselines: guessing baseline based on class frequencies
Builds on: Min et al. 2022 rethinking the role of demonstrations Xie et al. 2022 implicit Bayesian inference in ICL Akyürek et al. 2022 ICL as gradient descent
Closest papers by meaning
- Dual Operating Modes of In-Context Learning (ICML 2024 · similarity 0.92)
- Revisiting In-context Learning Inference Circuit in Large Language Models (ICLR 2025 · similarity 0.91)
- In-Context Language Learning: Architectures and Algorithms (ICML 2024 · similarity 0.90)
- Towards Auto-Regressive Next-Token Prediction: In-context Learning Emerges from Generalization (ICLR 2025 · similarity 0.90)
- In-Context Learning through the Bayesian Prism (ICLR 2024 · similarity 0.89)
- From Unstructured Data to In-Context Learning: Exploring What Tasks Can Be Learned and When (NeurIPS 2024 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
