提出响应时间探测新方法,有效防御语言模型的预填充攻击
Closing the Activation-Cone Blind Spot: Response-Time Probing and Unified Defense

- 在生成首个词时探测隐藏状态,突破原有防御对预填充攻击的盲区
- 结合停止机制,将预填充攻击成功率降至0/40,且无误报
- 适合关注推理阶段安全、需对抗隐蔽攻击的研究者与开发者
大规模语言模型推理阶段的安全方法层出不穷,但缺乏系统性对比。我们评估了五种防御范式(无防御、静态引导、CAST、AlphaSteer、探测门控)在七种指令微调模型(7-31B)和五类攻击(GCG、AutoDAN、DeepInception、预填充、意图伪装)下的表现。核心发现:提示阶段激活防御对预填充攻击存在结构性盲区。AlphaSteer在GCG、AutoDAN和意图伪装攻击下成功率降为0%,但在预填充攻击下仍达50%。我们证明:任何基于单层激活与良性参考(锥形、子空间或零空间)对齐来触发干预的防御,都会被构造出落在该参考内的激活所绕过,无论检查发生在提示阶段还是逐标记阶段。作为反例,我们提出响应时间探测:在首个生成词时对隐藏状态进行线性探测,各模型AUROC达0.97–1.00。结合停止机制后,所有模型预填充攻击成功率为0/40,且无良性误报,优于Llama Guard 3。跨模板泛化依赖探测深度,故限定于标准预填充模板族。将响应停止与AlphaSteer的零空间引导结合,实现正交分流(停止捕获预填充,AlphaSteer捕获语义攻击),在Mistral上防御成功率0.983,在Llama上达0.994,全面超越单一组件。进一步表明MMLU无法捕捉引导的真实效用成本,实际表现为行为权衡而非事实损失;多样化负样本训练集使探测误报率从80–100%降至接近零。代码、攻击样本、逐样本结果及评测提示均已公开。
原文摘要 · Abstract (English)
Inference-time safety methods for large language models have proliferated, yet no systematic comparison exists. We evaluate five defense paradigms (no defense, static steering, CAST, AlphaSteer, probe-gated) across seven instruction-tuned models (7-31B) and five attack types (GCG, AutoDAN, DeepInception, prefilling, intent laundering). Our central finding: prompt-time activation defenses are structurally blind to prefilling attacks. AlphaSteer achieves 0% attack success on GCG, AutoDAN, and intent laundering but 50% on prefilling. We prove a corollary: any defense that gates intervention on a single layer's activation alignment with a benign reference (cone, subspace, or null-space) is blind to attacks that craft activations to lie inside that reference, whether checked at prompt time or per token. As its constructive contrapositive we introduce response-time probing: a linear probe on the model's hidden state at the first generated tokens, with AUROC 0.97-1.00 across all seven models. Combined with a halt, it cuts prefilling attack success to 0/40 on every model with 0% benign false positives, outperforming Llama Guard 3. Cross-template generalisation depends on probe depth, so we scope the claim to the canonical prefilling-template family. Composing the response-halt with AlphaSteer's null-space steering gives an orthogonal split (the halt catches prefilling, AlphaSteer catches semantic attacks), reaching defense success 0.983 on Mistral and 0.994 on Llama and dominating both components. We further show MMLU fails to capture steering's true utility cost, which appears as behavioral hedging rather than factual loss, and that diverse negative training sets cut probe false positives from 80-100% to near zero. Code, attacks, per-sample results, and the judge prompt are released.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。