Reproduce “Semantic Overlays: Mitigating Prompt Injection with Annotations Beyond Tokens and Steering Vectors” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Joshua Penman

Semantic Overlays introduce an out-of-band channel to integrate metadata directly into large language models, allowing for unforgeable, span-specific instructions. This approach effectively mitigates prompt injection by marking untrusted input as non-executable, achieving 99.0% instruction separation on the SEP benchmark and reducing attack success rates on TensorTrust from 34.8% to 6.2% while maintaining content readability.

Key insights

  • A non-textual, out-of-band channel can reliably transmit and compose multiple semantic qualities within LLMs, overcoming the inherent fragility of in-band textual signals.
  • Semantic Overlays can fundamentally reshape the model's understanding of marked content (e.g., asserting a programming language for a code snippet) and enforce localized, implicit commands without affecting unmarked parts of the prompt.
  • Operating on a frozen base model provides deployment flexibility, allowing dynamic, inference-time application and deactivation of behaviors without costly fine-tuning or modifying the original model integrity.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.