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 +7 more
10/13/2025
cs.CL

No confident code implementation found for this paper.

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. 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 context-following increases it. These findings establish ICL as a previously underappreciated vector for emergent misalignment that operates without parameter modification and resists simple scaling-based solutions.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{afonin2025emergent,
  title  = {Emergent Misalignment via In-Context Learning: Narrow in-context examples can produce broadly misaligned LLMs},
  author = {Nikita Afonin and Nikita Andriyanov and Vahagn Hovhannisyan and Nikhil Bageshpura and Kyle Liu and Kevin Zhu and Sunishchal Dev and Ashwinee Panda and Oleg Rogov and Elena Tutubalina and Alexander Panchenko and Mikhail Seleznyov},
  year   = {2025},
  eprint = {2510.11288},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.11288v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.11288.svg)](https://codeofpaper.com/paper/2510.11288)

Discussion