Skip to content

In-context representation hijacking attackIn-Context Representation Hijacking

arXiv· arXiv:2512.03771· ACL 2026· Itay Yona, Amir Sarid, Michael Karasik, Yossi GandelsmanMentaleap; UC BerkeleyIndexed by this site · 2026-10-15· Originally publishedSelected AttacksSelectedAttention41

Translation in progress — untranslated text is omitted.

Quick read

Attacks

Based on the paper PDF (generated by Gemini); refer to the original

AI summaryThe researchers propose the Doublespeak attack, which systematically replaces harmful keywords with benign words in in-context examples, causing the model's internal representations of benign words to gradually converge toward harmful semantics, thereby bypassing safety alignment. The attack requires no optimization and transfers across models, achieving a 74% attack success rate on Llama-3.3-70B-Instruct with only a single-sentence context overwrite, and a 92% bypass rate against the dedicated guardrail LLaMA-Guard-3-8B. Using logit lens and Patchscopes, the authors trace that benign semantics appear in early layers while harmful semantics gradually form in later layers; in Llama-3-8B-Instruct, the layer where the refusal direction resides, layer 12, is still in the benign region. They therefore argue that current alignment methods relying on input-layer inspection are insufficient, and safety mechanisms need continuous monitoring at the representation level.

Questions
Investigate the mechanism by which internal representations of large language models are dynamically remapped during in-context learning, and evaluate the vulnerability of current safety alignment strategies based on input-layer keyword detection and shallow refusal directions under representation-level manipulation.
Methods
Propose the optimization-free Doublespeak attack, which prepends context examples that systematically replace sensitive words with benign words before harmful requests, prompting the model to redirect the internal representation of benign words to harmful semantics layer by layer during forward propagation, bypassing shallow safety alignment mechanisms.
Experiments and results
On AdvBench, achieved 88% ASR for Llama-3-8B-Instruct, 75% ASR for Llama-3.3-70B-Instruct with a single context example, and a 92% bypass rate for the guardrail LLaMA-Guard-3-8B.
Limitations and future work
Experiments were only completed on a single benchmark, AdvBench. The main experiments fixed the single replacement word "potato" and simplified prompts to a single concept. The paper did not evaluate specific defense strategies, and some production models only showed qualitative results without reporting quantitative ASR.
Why it was selectedThe paper uses logit lens and Patchscopes to trace how benign word representations are layer-by-layer overridden by harmful semantics, pointing out that alignment strategies that only inspect the input layer have blind spots.

The paper uses logit lens and Patchscopes to trace how benign word representations are layer-by-layer overridden by harmful semantics, pointing out that alignment strategies that only inspect the input layer have blind spots.

Related papers

Show 3 more papers
Read originalACL 2026