← Lab /AI/ML

Learned attention gates cut prompt injection success to 10% while preserving utility

AI/ML Defense · Prototype · arXiv

The claim

Heads of Security reduces prompt injection attack success rate to 10% compared to much higher rates for existing defenses

Igor Shilov, Xiaoxue Yang, Alexander Panfilov, Evgenii Kortukov, Matthieu Meeus, Peter Romov, Wojciech Samek, Jonas Geiping, Yves-Alexandre de Montjoye · arXiv Paper PDF

Published as: “Heads of Security: Learned Attention Gates Improve Prompt Injection Robustness”

So what

HoS offers a practical way to harden open-weight LLM agents against prompt injection while keeping their general-purpose performance, making it attractive for deployments that need both security and utility.

The five-minute version

Heads of Security (HoS) reduces prompt-injection attack success to 10% (RL-Hammer) and 3× more FLOPs needed for 50% success (Claudini) compared with 97%/85% on undefended and SecAlign models, while keeping utility on standard benchmarks close to the base models. The paper evaluates HoS on Llama-3.3-70B-Instruct and GPT-OSS-20B against adaptive black-box and white-box attacks and shows it preserves few-shot and multi-turn performance better than SecAlign and ASIDE. Evidence comes from multiple benchmark tables and attack-success curves, but the paper notes that HoS only matches SecAlign on static agentic benchmarks and that detection rates drop when all gates are enabled.

What they found 1

What undercuts it the paper’s own results

Stated limits 3

What’s new here 4

Artifacts & methods 8

Topics

prompt injectionattention gatinginstruction-data separationadaptive black-box attackswhite-box optimization attacksfew-shot evaluationmulti-turn dialogueagentic benchmark security
← Previous XSS via Cloudflare /cdn-cgi/image/ by stripping CSP with Cache-Control no-cache