发现大模型生成过程中的安全判别力会逐渐消失,导致越狱攻击频发。
Bleeding Pathways: Vanishing Discriminability in LLM Hidden States Fuels Jailbreak Attacks
- 在生成中段通过对比引导隐藏状态,增强有害与安全输出的区分度。
- 对9种越狱攻击成功率降至接近零,同时减少误拒正常请求3.5%。
- 适合关注模型安全性与可用性平衡的研究者和工程师使用。
大型语言模型仍易受越狱攻击影响,攻击者通过对抗性提示绕过安全机制。现有安全微调方法存在两大缺陷:一是难以兼顾安全性与实用性,强化防护常导致正常请求被过度拒绝;二是无法识别看似无害任务中隐藏的恶意意图,使模型暴露于风险之中。本文揭示根本原因:在生成过程中,模型区分有害与安全输出的能力持续下降。实验表明,安全与有害响应的隐藏状态可分性随生成推进而减弱,迫使模型提前做出合规判断,限制了对潜在恶意意图的识别能力。为此,提出DEEPALIGN框架,在生成中段施加对比式隐藏状态调控,显著增强有害与良性状态间的分离度,实现全程内在毒性检测与干预。在多种架构与规模的LLM上,该方法将九类越狱攻击成功率降至近零或极低水平,同时降低挑战性正常查询的误拒率达3.5%,任务性能下降不足1%,显著优化了安全-效用权衡边界。
原文摘要 · Abstract (English)
LLMs remain vulnerable to jailbreak attacks that exploit adversarial prompts to circumvent safety measures. Current safety fine-tuning approaches face two critical limitations. First, they often fail to strike a balance between security and utility, where stronger safety measures tend to over-reject harmless user requests. Second, they frequently miss malicious intent concealed within seemingly benign tasks, leaving models exposed to exploitation. Our work identifies a fundamental cause of these issues: during response generation, an LLM's capacity to differentiate harmful from safe outputs deteriorates. Experimental evidence confirms this, revealing that the separability between hidden states for safe and harmful responses diminishes as generation progresses. This weakening discrimination forces models to make compliance judgments earlier in the generation process, restricting their ability to recognize developing harmful intent and contributing to both aforementioned failures. To mitigate this vulnerability, we introduce DEEPALIGN - an inherent defense framework that enhances the safety of LLMs. By applying contrastive hidden-state steering at the midpoint of response generation, DEEPALIGN amplifies the separation between harmful and benign hidden states, enabling continuous intrinsic toxicity detection and intervention throughout the generation process. Across diverse LLMs spanning varying architectures and scales, it reduced attack success rates of nine distinct jailbreak attacks to near-zero or minimal. Crucially, it preserved model capability while reducing over-refusal. Models equipped with DEEPALIGN exhibited up to 3.5% lower error rates in rejecting challenging benign queries and maintained standard task performance with less than 1% decline. This marks a substantial advance in the safety-utility Pareto frontier.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。