Emergent Misalignment via In-Context Learning: Narrow in-context examples can produce broadly misaligned LLMs
Nikita Afonin, Nikita Andriyanov, Vahagn Hovhannisyan, Nikhil Bageshpura, Kyle Liu, Kevin Zhu, Sunishchal Dev, Ashwinee Panda, Oleg Rogov, Elena Tutubalina, Alexander Panchenko, Mikhail Seleznyov
Abstract
Recent work has shown that narrow finetuning can produce broadly misaligned LLMs, a phenomenon termed emergent misalignment (EM). While concerning, these findings were limited to finetuning and activation steering, leaving out in-context learning (ICL). We therefore ask: does EM emerge in ICL? We find that it does: across four model families (Gemini, Kimi-K2, Grok, and Qwen), narrow in-context examples cause models to produce misaligned responses to benign, unrelated queries. With 16 in-context examples, EM rates range from 1% to 24% depending on model and domain, appearing with as few as 2 examples. Neither larger model scale nor explicit reasoning provides reliable protection, and larger models are typically even more susceptible. Next, we formulate and test a hypothesis, which explains in-context EM as conflict between safety objectives and context-following behavior. Consistent with this, instructing models to prioritize safety reduces EM while prioritizing contextfollowing increases it. These findings establish ICL as a previously underappreciated vector for emergent misalignment that resists simple scaling-based solutions. Warning: This paper contains potentially harmful content generated by LLMs.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 468daa52-a6a6-4efb-9439-db6e6716ba9aCited by top-tier papers1
Ask how each one uses itBuilds on6
- TruthfulQA: Measuring How Models Mimic Human FalsehoodsStephanie Lin, Jacob Hilton, Owain EvansACL 2022 · 3,228 citations
- A Survey on In-context LearningQingxiu Dong, Lei Li, Damai Dai, Ce Zheng et al.EMNLP 2024 · 479 citations
- "Do Anything Now": Characterizing and Evaluating In-The-Wild Jailbreak Prompts on Large Language ModelsXinyue Shen, Zeyuan Chen, Michael Backes, Yun Shen et al.CCS 2024 · 132 citations
- Emergent Misalignment is Easy, Narrow Misalignment is HardAnna Soligo, Edward Turner, Senthooran Rajamanoharan, Neel NandaICLR 2026 · 25 citations
- Is LLM-as-a-Judge Robust? Investigating Universal Adversarial Attacks on Zero-shot LLM AssessmentVyas Raina, Adian Liusie, Mark J. F. GalesEMNLP 2024 · 24 citations
Related papers
- Emergent Misalignment: Narrow finetuning can produce broadly misaligned LLMsJan Betley, Daniel Chee Hian Tan, Niels Warncke, Anna Sztyber-Betley et al.ICML 2025
- In-Training Defenses Against Emergent Misalignment in Language ModelsDavid Kaczér, Magnus Jørgenvåg, Clemens Vetter, Esha Afzal et al.ICML 2026 · 13 citations
- Understanding Emergent Misalignment via Feature Superposition GeometryGouki Minegishi, Hiroki Furuta, Takeshi Kojima, Yusuke Iwasawa et al.ACL 2026 · 3 citations
- Safety Subspaces are Not Linearly Distinct: A Fine-Tuning Case StudyKaustubh Ponkshe, Shaan Shah, Raghav Singhal, Praneeth VepakommaICLR 2026 · 9 citations
- SAFT: Safety-Preserving Adaptation via Fine-Tuning Transfer for Large Language ModelsZhiwen Ruan, Yan Yang, Zhuocheng Liang, Yun Chen et al.KDD 2026
