Contrast Matters: Understanding Robustness of In-Context Fine-Tuning to Target-Context Relatedness
Not on the map. Why?
Abstract (arXiv)
In-context fine-tuning (IC-Train), training an LLM with labeled examples in-context, is increasingly used in place of standard fine-tuning for domain adaptation and continual absorption of labeled data. We study the robustness of the in-context learning ability that emerges from such training: does the fine-tuned model perform well across test inputs whose in-context examples range from unrelated to nearly identical? Across 32 configurations spanning four open-source LLMs and eight test sets over machine translation, Text-to-SQL, and multilingual semantic parsing, we show that robustness hinges on an overlooked design choice: how in-context examples are selected relative to the target during training. The two prevailing strategies turn out to be accurate over complementary parts of this spectrum: random contexts yield a model that gains little from related examples even when they are placed in its context, while retrieved similar contexts weaken accuracy on targets lacking close neighbors and raise the propensity to copy labels from context. Probes tracking in-weights learning, in-context learning, and copying trace these failures to distinct training dynamics, and show that introducing contrast in target-context similarity both within a context and across batches, restores robustness across the entire spectrum.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 29 of its 45 references that are in the map. First posted on arXiv 2 Apr 2026.
Builds on
29 of 45 references.
References · 29
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,414
- 2022What Can Transformers Learn In-Context? A Case Study of Simple Function Classescited by 700
- 2021MetaICL: Learning to Learn In Contextcited by 450
- 2023Trained Transformers Learn Linear Models In-Contextcited by 331
- 2022Data Distributional Properties Drive Emergent In-Context Learning in Transformerscited by 303
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 191
- 2022Diverse Demonstrations Improve In-context Compositional Generalizationcited by 136
- 2021Samanantar: The Largest Publicly Available Parallel Corpora Collection for 11 Indic Languagescited by 133
- 2024The Evolution of Statistical Induction Heads: In-Context Learning Markov Chainscited by 115
- 2024In-Context Language Learning: Architectures and Algorithmscited by 86
17 more
- 2024What needs to go right for an induction head? A mechanistic study of in-context learning circuits and their formationcited by 86
- 2017The IIT Bombay English-Hindi Parallel Corpuscited by 74
- 2024Competition Dynamics Shape Algorithmic Phases of In-Context Learningcited by 52
- 2023Steering Large Language Models for Machine Translation with Finetuning and In-Context Learningcited by 48
- 2024Why Larger Language Models Do In-context Learning Differently?cited by 44
- 2025The emergence of sparse attention: impact of data distribution and benefits of repetitioncited by 25
- 2024In-Context Example Selection via Similarity Search Improves Low-Resource Machine Translationcited by 21
- 2024Differential learning kinetics govern the transition from memorization to generalization during in-context learningcited by 19
- 2024How Much Data is Enough Data? Fine-Tuning Large Language Models for In-House Translation: Performance Evaluation Across Multiple Dataset Sizescited by 17
- 2025Strategy Coopetition Explains the Emergence and Transience of In-Context Learningcited by 17
- 2025In-Context Learning Strategies Emerge Rationallycited by 15
- 2023Exploring the Relationship between In-Context Learning and Instruction Tuningcited by 14
- 2023Breaking through the learning plateaus of in-context learning in Transformercited by 8
- 2023XSemPLR: Cross-Lingual Semantic Parsing in Multiple Natural Languages and Meaning Representationscited by 5
- 2025Unlocking In-Context Learning for Natural Datasets Beyond Language Modellingcited by 4
- 2025Diverse In-Context Example Selection After Decomposing Programs and Aligned Utterances Improves Semantic Parsingcited by 1
- 2025An evolutionary perspective on modes of learning in Transformerscited by 1
Built on by
Not cited yet.