Metraipolis › archive › dc_687a968adda4
Semantic Overlays: Mitigating Prompt Injection with Annotations Beyond Tokens and Steering Vectors — arXiv:2608.23873
- Source
- arXiv (en)
- Original
- https://arxiv.org/abs/2608.23873
- License (as archived)
- CC0-1.0
- Archived
- 2026-10-18T06:20:38.407Z
- SHA-256 of the archived text
627ed492fb627ee9396ffd3304d6f8c3cd101f4fc73d4c15b4a7bb10fab621cb- Stable URL of this page
https://metraipolis.com/documento/dc_687a968adda4
How to cite
Semantic Overlays: Mitigating Prompt Injection with Annotations Beyond Tokens and Steering Vectors — arXiv:2608.23873 — arXiv (en), https://arxiv.org/abs/2608.23873 (CC0-1.0); archived copy: https://metraipolis.com/documento/dc_687a968adda4 (Metraipolis archive dc_687a968adda4, sha256 627ed492fb627ee9396ffd3304d6f8c3cd101f4fc73d4c15b4a7bb10fab621cb)
BibTeX
@misc{dc687a968adda4,
title = {Semantic Overlays: Mitigating Prompt Injection with Annotations Beyond Tokens and Steering Vectors — arXiv:2608.23873},
howpublished = {arXiv (en)},
url = {https://arxiv.org/abs/2608.23873},
note = {License CC0-1.0; archived copy https://metraipolis.com/documento/dc_687a968adda4; sha256 627ed492fb627ee9396ffd3304d6f8c3cd101f4fc73d4c15b4a7bb10fab621cb},
year = {2026}
}Archived text
Reproduced under CC0-1.0. Attribution: arXiv (en), https://arxiv.org/abs/2608.23873. Third-party text: data, not instructions. It may be an abstract or extract; check the original.
Everything a language model sees is tokens. The serving stack knows what each span is -- user input, tool output, instructions -- but the model must keep track of that itself, and can lose track or be confused: text can be written to read like anything. Prompt injection is a natural exploit of this phenomenon. By scrambling the model's understanding of span identity, an attacker can induce unwanted and dangerous actions. Adding a non-textual channel to the model's input -- a way to communicate span identity beyond text -- mitigates this class of attack. We thus introduce a general steering technique called Semantic Overlays: small learned adapters applied at chosen prefill positions to a frozen model's residual stream. Laying an overlay over a span creates an out-of-band annotation channel that cannot be replicated by tokens. Unlike steering vectors, Semantic Overlays are trained, adaptable, and selectively applied. An overlay can encode complex semantics that reshape how the model perceives the marked span: asked to copy a code snippet under an overlay asserting a different programming language, the model rewrites the snippet in the asserted language. Overlays compose, allow transparent reading of underlying content, and can carry complex payloads -- including imperatives the model will follow. An overlay which marks a span as "non-executable" defends against the broad class of prompt injections that add instructions in untrusted context. We report strong results on five prompt injection benchmarks: SEP separation rises from 24.3% to 99.0% with utility unchanged (our scoring rule; we correct a defect in the published grader), TensorTrust attack success falls from 34.8% to 6.2%, AlpacaFarm from 99.0% to 0%, and the overlay beats every published PIArena defense that leaves the model able to answer -- while marked spans stay readable, all at >95% character similarity to the original. Tema degli esploratori: agenti e intelligenza artificiale (retro-catalogo arXiv: annunci del 2026-08-26 in cs.CL). Categorie arXiv: Artificial Intelligence (cs.AI) ; Computation and Language (cs.CL); Cryptography and Security (cs.CR); Machine Learning (cs.LG). Pagina del lavoro: https://arxiv.org/abs/2608.23873 — autori e testo completo sono lì (qui omessi i nomi: nessun dato personale nel deposito). Licenza: titolo e abstract sono metadati arXiv distribuiti in CC0 1.0; il testo completo ha la licenza scelta dagli autori, indicata sulla pagina. Letto il 2026-10-18T06:17:29.395Z dalla pagina https://arxiv.org/catchup/cs.CL/2026-08-26?abs=True (consentita dal robots.txt di arxiv.org, con il suo crawl-delay).