Skip to main content
QUICK REVIEW

[论文解读] Defenses Against Prompt Attacks Learn Surface Heuristics

Shuai Li, Chenxiao Yu|arXiv (Cornell University)|Jan 12, 2026
Adversarial Robustness in Machine LearningComputer Science被引用 0
一句话总结

论文表明,有监督微调的提示防御常通过表面线索(位置、令牌、主题)而非恶意意图来拒绝安全输入;在两个基础模型和多条防御管线上进行的受控诊断显示了显著的安全性–效用权衡和泛化差距。

ABSTRACT

Large language models (LLMs) are increasingly deployed in security-sensitive applications, where they must follow system- or developer-specified instructions that define the intended task behavior, while completing benign user requests. When adversarial instructions appear in user queries or externally retrieved content, models may override intended logic. Recent defenses rely on supervised fine-tuning with benign and malicious labels. Although these methods achieve high attack rejection rates, we find that they rely on narrow correlations in defense data rather than harmful intent, leading to systematic rejection of safe inputs. We analyze three recurring shortcut behaviors induced by defense fine-tuning. \emph{Position bias} arises when benign content placed later in a prompt is rejected at much higher rates; across reasoning benchmarks, suffix-task rejection rises from below extbf{10\%} to as high as extbf{90\%}. \emph{Token trigger bias} occurs when strings common in attack data raise rejection probability even in benign contexts; inserting a single trigger token increases false refusals by up to extbf{50\%}. \emph{Topic generalization bias} reflects poor generalization beyond the defense data distribution, with defended models suffering test-time accuracy drops of up to extbf{40\%}. These findings suggest that current prompt-injection defenses frequently respond to attack-like surface patterns rather than the underlying intent. We introduce controlled diagnostic datasets and a systematic evaluation across two base models and multiple defense pipelines, highlighting limitations of supervised fine-tuning for reliable LLM security.

研究动机与目标

  • 推动对提示注入防御的结构化评估,超越标准的攻击拒绝指标。
  • 识别并描述防御微调中学习到的捷径偏差。
  • 诊断受保护模型在不同领域和提示结构下对 benign 输入的泛化情况。
  • 在开放权重的 LLM 上评估多条防御管线,以揭示鲁棒性–效用权衡。

提出的方法

  • 将防御行为形式化为带有良性/攻击标签的提示分类问题。
  • 引入控制诊断数据集,隔离位置、令牌和主题因素(Position Stress Set、Keyword Trigger Set、Topic Generalization Set)。
  • 在两台基础 LLM(Llama-3 与 Mistral)上评估防御管线(StrucQ、SecAlign)以及外部提示保护工具(ProtectAIv2、LakeraGuard、PromptGuard2、FMOPS、Deepset)。
  • 在良性提示和表面因素操作下,测量拒绝率与效用(准确率)。
  • 分析三种捷径偏差:位置偏差、令牌触发偏差和主题泛化偏差,进行消融和触发移除测试。
Figure 1: Three shortcut behaviors learned by fine-tuned defenses: position-based rejection of later segments, token-triggered rejection caused by tokens common in attack samples, and over-rejection of benign prompts from unseen topics. These patterns indicate reliance on surface cues instead of int
Figure 1: Three shortcut behaviors learned by fine-tuned defenses: position-based rejection of later segments, token-triggered rejection caused by tokens common in attack samples, and over-rejection of benign prompts from unseen topics. These patterns indicate reliance on surface cues instead of int

实验结果

研究问题

  • RQ1防御微调的模型是否因表面线索而非恶意意图而拒绝良性提示?
  • RQ2位置、令牌、主题线索是否造成系统性偏差,降低良性输入的效用?
  • RQ3在对未见领域的良性任务分布偏移下,防御管线的性能如何?
  • RQ4外部提示保护工具是否也被防御数据中的表面特征所偏倚?
  • RQ5受控诊断能揭示监督微调在 LLM 安全性方面的局限性吗?

主要发现

  • 微调防御在拒绝攻击方面性能较高,但对良性输入造成显著损害(在 GPQA、MMLU、AIME 的准确率下降可达约 40%)。
  • 位置偏差:后缀提示的拒绝率显著更高,后缀任务的拒绝率超过 50%,有时甚至达到 90%。
  • 令牌触发偏差:在良性提示中插入触发令牌会使错误拒绝增加最多约 50%,而非触发的对照并未出现此效应。
  • 主题泛化偏差:防御对未见主题泛化差,在新领域的良性输入准确率下降。
  • 提示保护工具也表现出对表面模式的依赖,不仅是经过模型微调的防御,表明在多种防御方法中存在更广泛的安全性–效用权衡。
  • 研究提供了受控诊断数据集和跨模型评估,显示表面线索比意图更能驱动防御行为。
(a) GPQA (Expert Reasoning)
(a) GPQA (Expert Reasoning)

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。