Heads of Security: Learned Attention Gates Improve Prompt Injection Robustness
TL;DR - Heads of Security uses learned per-head attention gates to separate trusted instructions from untrusted data, improving prompt-injection resistance while preserving model utility.
- HoS lets models reason over untrusted content without obeying injected instructions.
- RL-Hammer achieved only 10% attack success against HoS, versus 97% on GPT-OSS-20B and 85% on SecAlign.
- An enhanced white-box attack required 3Ă— more FLOPs to reach the same attack success rate against HoS.
- HoS retained base-model benchmark utility and matched SecAlign on static agentic attacks, while ASIDE struggled with tool use.