通过放大模型内部特征差异,实现无需预训练攻击模板的零样本越狱检测。
ALERT: Zero-shot LLM Jailbreak Detection via Internal Discrepancy Amplification
- 逐层逐模块逐词放大良性与越狱输入的内部特征差异
- 在三个基准上平均准确率和F1均领先第二名10%以上,最高达40%
- 适合关注大模型安全防护的研究者与工程师
尽管已有丰富的安全对齐策略,大型语言模型仍极易受到越狱攻击,破坏安全护栏并带来严重安全风险。现有检测方法主要依赖训练数据中已有的越狱模板,但很少研究更真实且更具挑战性的零样本越狱检测场景——训练时无任何越狱模板可用。该场景更贴近现实,因新攻击持续涌现且不断演变。为此,我们提出一种分层、模块级和词粒度的差异放大框架,逐步放大良性与越狱提示之间的内部特征差异。我们识别出与安全相关的层,定位蕴含零样本判别信号的具体模块,并找出具有安全信息的关键词。基于这些发现,我们构建了ALERT(基于放大的越狱检测器),在放大表示上引入两个独立且互补的分类器。在三个安全基准上的大量实验表明,ALERT在零样本检测中表现稳定且出色:(i) 在所有数据集和攻击策略下,其性能始终位列前二;(ii) 平均准确率和F1得分优于第二名至少10%,部分情况下高达40%。
原文摘要 · Abstract (English)
Despite rich safety alignment strategies, large language models (LLMs) remain highly susceptible to jailbreak attacks, which compromise safety guardrails and pose serious security risks. Existing detection methods mainly detect jailbreak status relying on jailbreak templates present in the training data. However, few studies address the more realistic and challenging zero-shot jailbreak detection setting, where no jailbreak templates are available during training. This setting better reflects real-world scenarios where new attacks continually emerge and evolve. To address this challenge, we propose a layer-wise, module-wise, and token-wise amplification framework that progressively magnifies internal feature discrepancies between benign and jailbreak prompts. We uncover safety-relevant layers, identify specific modules that inherently encode zero-shot discriminative signals, and localize informative safety tokens. Building upon these insights, we introduce ALERT (Amplification-based Jailbreak Detector), an efficient and effective zero-shot jailbreak detector that introduces two independent yet complementary classifiers on amplified representations. Extensive experiments on three safety benchmarks demonstrate that ALERT achieves consistently strong zero-shot detection performance. Specifically, (i) across all datasets and attack strategies, ALERT reliably ranks among the top two methods, and (ii) it outperforms the second-best baseline by at least 10% in average Accuracy and F1-score, and sometimes by up to 40%.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。