跳到正文
返回论文列表
cs.LG提交于 已译

安全头部:学习注意力门控提升提示注入鲁棒性

Heads of Security: Learned Attention Gates Improve Prompt Injection Robustness

Igor Shilov · Xiaoxue Yang · Alexander Panfilov · Evgenii Kortukov · Matthieu Meeus · Peter Romov · et al.

中文摘要

HoS 是一种提示注入防御机制,通过少量学习得到的每头注意力门控强制实现指令与数据分离。该机制学习每个注意力头如何在可信与不可信 token 间重新分配注意力,使模型能处理不可信内容而不执行注入指令。在 Llama-3.3-70B-Instruct 和 GPT-OSS-20B 上评估,HoS 相比 SecAlign++ 和 ASIDE 展现出更强的自适应攻击鲁棒性。黑盒 RL-Hammer 攻击对 GPT-OSS-20B 和 SecAlign 的 ASR 分别为 97% 和 85%,而对 HoS 仅为 10%。白盒攻击 Claudini 在 HoS 上达到相同 ASR 需 3 倍 FLOPs。HoS 在标准多选基准上保持基础模型效用,而 SecAlign 和 ASIDE 在少样本设置下性能下降。在静态攻击的代理基准上,HoS 与 SecAlign 表现相似,显著改善安全-效用权衡,而 ASIDE 工具使用效用仅 10%。

关键要点

  1. 01提出 HoS 机制,利用学习注意力门控在架构层面实现指令与数据分离,防止模型执行注入指令。
  2. 02在 Llama-3.3-70B-Instruct 和 GPT-OSS-20B 上验证,HoS 对自适应攻击的鲁棒性显著优于 SecAlign++ 和 ASIDE。
  3. 03黑盒 RL-Hammer 攻击对 HoS 的 ASR 仅 10%,远低于 GPT-OSS-20B 的 97% 和 SecAlign 的 85%。
  4. 04HoS 在标准基准上保持基础模型效用,避免了 SecAlign 和 ASIDE 在少样本设置下的性能退化。
  5. 05在代理基准静态攻击中,HoS 与 SecAlign 表现相当,显著优于基础模型,而 ASIDE 工具使用效用极低。

解读

尚无解读。

原始英文摘要

arXiv:2610.37657v1 Announce Type: cross Abstract: We introduce Heads of Security (HoS), a prompt injection defense that enforces instruction-data separation via a small set of learned per-head attention gates. HoS learns how each head should redistribute attention between trusted and untrusted tokens, enabling models to reason over untrusted content without following injected instructions. We evaluate HoS on Llama-3.3-70B-Instruct and GPT-OSS-20B. We compare it against SecAlign++, a state-of-the-art finetuning-based defense, and ASIDE, a defense that, like ours, builds instruction-data separation into the model architecture. We show that HoS offers greater robustness to adaptive attacks, better performance on standard utility benchmarks, and matches top performance on standard agentic prompt injection benchmarks. More specifically, the black-box RL-Hammer attack reaches 97% ASR against GPT-OSS-20B and 85% against SecAlign, but only 10% against HoS. Claudini, a state-of-the-art white-box attack, strengthened against HoS through autoresearch, requires 3 times more FLOPs to reach the same ASR on HoS as it does on GPT-OSS-20B or SecAlign. HoS preserves base-model utility across standard multiple-choice benchmarks and prompting setups, whereas SecAlign and ASIDE degrade in few-shot settings. On agentic benchmarks with static attacks, HoS and SecAlign perform similarly and substantially improve the security-utility trade-off over the base model. ASIDE struggles with tool use, achieving only 10% utility. These results show that prompt injection robustness can be achieved and improved through targeted attention interventions.

同方向论文 · cs.LG

查看全部 →

反向发现 · 这篇论文相关的工具与提示词

去交叉发现 →

关联提示词 · 2

编程github.com/f/awesome-chatgpt-prompts·外部收录·

Git History Leak Check Lite - Scan Diffs for Secrets

--- name: git-history-leak-check-lite description: Scan a diff or patch for accidentally committed secrets — API keys, tokens, private keys, passwords — in added lines only, values masked. Local text scan, zero network. Use before committin…

编程github.com/f/awesome-chatgpt-prompts·外部收录·

Large Language Models Security Specialist

I want you to act as a Large Language Model security specialist. Your task is to identify vulnerabilities in LLMs by analyzing how they respond to various prompts designed to test the system's safety and robustness. I will provide some spec…