arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.07335cs.CR
收藏

通过流形轨迹动力学防御大语言模型的越狱攻击

Defending Jailbreak Attacks on Large Language Models via Manifold Trajectory Kinetics

Huazhong University of Science and Technology(华中科技大学);Changsha University of Science and Technology(长沙理工大学);Xiangtan University(湘潭大学);City University of Macau(澳门城市大学);Griffith University(格里菲斯大学)

Hangtao Zhang, Yucheng Zhao, Sishun Liu, Ziqi Zhou, Zeyu Ye, Wei Wan, Minghui Li, Shengshan Hu, Yanjun Zhang, Yi Liu, Leo Yu Zhang

AI总结:

提出流形轨迹动力学(MTK)方法,通过分析提示词在模型层间的邻域结构演化来检测越狱攻击,在伪恶意提示和自适应攻击下均表现鲁棒。

摘要:

越狱提示可以绕过大型语言模型(LLM)中的对齐护栏并引发不安全输出,使得可靠的部署时检测至关重要。先前的检测方法主要依赖于固定的度量空间,例如原始输入、梯度或隐藏特征,其中良性提示和越狱提示是线性可分的。我们证明这一假设在以下情况下失效:(i)伪恶意提示,其意图良性但包含安全相关关键词,以及(ii)明确针对部署检测器进行优化的自适应攻击。为克服这一限制,我们将关注点从识别通用度量空间转向分析底层数据流形更鲁棒的邻域结构。我们提出流形轨迹动力学(MTK),将LLM视为一个将输入转换为输出的动力学系统,并通过跟踪提示的邻域结构在层间的演化来检测越狱。良性提示在整个推理过程中保持接近良性邻域,而越狱提示则表现出特征轨迹:从接近恶意种子开始,随后策略性地向良性邻域移动以逃避检测。在四个LLM和十种越狱攻击下,MTK对两种失败模式均表现出强鲁棒性:在伪恶意提示上,它在良性提示上达到5%的假阳性率,在伪恶意提示上达到2%的假阳性率,同时越狱真阳性率为95%;在自适应攻击下,它保持85%的真阳性率。我们进一步展示了MTK在视觉语言模型中进行越狱检测的优越性能。我们的代码可在以下网址获取:https://this https URL。

英文摘要:

Jailbreak prompts can bypass alignment guardrails in large language models (LLMs) and elicit unsafe outputs, making reliable deployment-time detection critical. Prior detection approaches largely rely on a fixed metric space, e.g., raw inputs, gradients, or hidden features, in which benign and jailbreak prompts are linearly separable. We show this assumption breaks under (i) pseudo-malicious prompts that are benign by intent but contain safety-related keywords, and (ii) adaptive attacks that explicitly optimize against the deployed detector. To overcome this limitation, we shift our focus from identifying a universal metric space to analyzing the more robust neighborhood structure of the underlying data manifold. We present Manifold Trajectory Kinetics (MTK), which treats an LLM as a kinetic system transforming inputs into outputs and detects jailbreaks by tracking how a prompt's neighborhood structure evolves across layers. Benign prompts remain close to benign neighborhoods throughout inference, whereas jailbreak prompts exhibit a characteristic trajectory that begins near malicious seeds and later strategically shifts toward benign neighborhoods to evade refusal.Across four LLMs and ten jailbreak attacks, MTK achieves strong robustness to both failure modes: on pseudo-malicious prompts, it attains a jailbreak true positive rate of 95% at a false positive rate of 5% on benign prompts and 2% on pseudo-malicious prompts, and under adaptive attacks, it maintains a true positive rate of 85%. We further demonstrate the superior performance of MTK for jailbreak detection in vision-language models. Our code is available at https://github.com/Rookie143/mtk.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑