arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.19966cs.LGcs.AI
收藏

通过顺序熵变化检测基于优化的对抗性提示

Detecting Fluent Optimization-Based Adversarial Prompts via Sequential Entropy Changes

Department of Electronic and Electrical Engineering, University College London, London, United Kingdom(电子与电气工程系,伦敦大学学院,伦敦,英国)

Mohammed Alshaalan, Miguel R. D. Rodrigues

AI总结:

本文提出了一种基于在线变化点检测的对抗性后缀检测方法CPD,通过标准化用户令牌熵并应用单侧CUSUM统计量,提高了对优化基于对抗性提示的检测性能,同时在多个大型语言模型上实现了更高的F1分数和AUC性能。

摘要:

基于优化的对抗性后缀可以劫持对齐的大型语言模型(LLMs),同时保持流畅,这削弱了静态和窗口化困惑度基于的检测器。我们把对抗性后缀检测视为一个在线变化点检测问题,针对令牌级下一个令牌熵流。使用LLM系统提示来估计一个稳健的基线,我们标准化用户令牌熵并应用单侧CUSUM统计量。所得到的检测器CPD(在线变化点检测)是模型无关的,无需训练,可以在线运行,并能定位对抗性后缀的起始。在1,012个优化基于的后缀攻击(GCG,AutoDAN,AdvPrompter,BEAST,AutoDAN-HGA)和1,012个困惑度控制的良性提示的基准上,CPD在六个开源权重聊天模型(LLaMA-2-7B/13B,Vicuna-7B/13B,Qwen2.5-7B/14B)上均优于最强的窗口化困惑度基线。在LLaMA-2-7B的典型CUSUM设置(k=0)下,CPD达到AUC 0.88和F1 0.82。除了提示级检测外,CPD将79.6%的触发集中在对抗性后缀内,而窗口化困惑度为17-46%。最后,当用作LLaMA Guard的轻量级门控时,CPD在高流量、良性主导的部署中减少了17-22%的门控调用,同时保持了门控级别的检测质量。

英文摘要:

Optimization-based adversarial suffixes can jailbreak aligned large language models (LLMs) while remaining fluent, weakening static and windowed perplexity-based detectors. We cast adversarial suffix detection as an online change-point detection problem over the token-level next-token entropy stream. Using the LLM system prompt to estimate a robust baseline, we standardize user-token entropies and apply a one-sided CUSUM statistic. The resulting detector, CPD Online (CPD), is model-agnostic, training-free, runs online, and localizes the adversarial suffix onset. On a benchmark of 1,012 optimization-based suffix attacks (GCG, AutoDAN, AdvPrompter, BEAST, AutoDAN-HGA) and 1,012 perplexity-controlled benign prompts, CPD improves F1 over the strongest windowed-perplexity baseline on all six open-weight chat models (LLaMA-2-7B/13B, Vicuna-7B/13B, Qwen2.5-7B/14B). On LLaMA-2-7B at the canonical CUSUM setting ($k=0$), CPD reaches AUROC $0.88$ and F1 $0.82$. Beyond prompt-level detection, CPD concentrates 79.6% of its triggers inside the adversarial suffix, versus 17-46% for windowed perplexity. Finally, when used as a lightweight gate for LLaMA Guard, CPD reduces guard calls by 17-22% on a high-volume, benign-dominated deployment while preserving guard-level detection quality

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

↑