Training In-Context and In-Weights Mixtures Via Contrastive Context Sampling
arXiv cs.LG / 4/3/2026
💬 OpinionSignals & Early TrendsIdeas & Deep AnalysisModels & Research
Key Points
- The paper studies training methods that jointly develop in-context learning (ICL) and in-weights learning (IWL), aiming to switch between them depending on how relevant the provided context is.
- It argues that standard fine-tuning can erode ICL, and that prior work shows emergence of ICL after IC-Train depends on factors like task diversity and training duration.
- The authors find that context selection is critical: random contexts weaken both ICL and IWL, while using only highly similar examples can cause ICL to collapse into label-copying that ignores relevance.
- They propose “Contrastive-Context” sampling, which mixes similar and random examples within a context and varies similarity grades across contexts to learn stable ICL–IWL mixtures.
- Extensive experiments on four LLMs across multiple tasks, supported by diagnostic probing and a theoretical minimal-model analysis, show the contrastive setup avoids collapse into purely ICL, purely IWL, or copying behavior.
Related Articles

Black Hat Asia
AI Business

Mistral raises $830M, 9fin hits unicorn status, and new Tech.eu Summit speakers unveiled
Tech.eu

ChatGPT costs $20/month. I built an alternative for $2.99.
Dev.to

OpenAI shifts to usage-based pricing for Codex in ChatGPT business plans
THE DECODER

Why I built an AI assistant that doesn't know who you are
Dev.to