arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.01473cs.CRcs.AI
收藏

SelfGrader: 基于锚定令牌级对数概率的LLM越狱检测

SelfGrader: LLM Jailbreak Detection via Anchored Token-Level Logits

Department of Computer Science and Engineering, University of Nevada, Reno(内华达大学里诺分校计算机科学与工程系);Oak Ridge National Laboratory(橡树岭国家实验室)

Zikai Zhang, Rui Hu, Olivera Kotevska, Jiahao Xu

AI总结:

提出SelfGrader方法,利用锚定令牌级对数概率将越狱检测转化为数值评分问题,实现低延迟、低误报率的鲁棒检测。

摘要:

大型语言模型(LLM)是回答用户查询的强大工具,但仍然极易受到越狱攻击。现有的护栏方法通常依赖内部特征或文本响应来检测恶意查询,这要么引入大量延迟,要么遭受文本生成的随机性。为了克服这些限制,我们提出SelfGrader,一种轻量级护栏方法,它将越狱检测表述为使用锚定令牌级对数概率的数值评分问题。具体来说,SelfGrader在一组紧凑的数值令牌(NT)(例如0-9)内评估用户查询的安全性,并将其对数概率分布解释为内部安全信号。为了将这些信号与目标安全准则对齐,SelfGrader构建了概率近似正确引导的ICL锚定示例,并引入了双视角评分规则,同时考虑查询的恶意性和良性,从而产生稳定且可解释的分数,反映危害性并同时降低误报率。跨不同越狱基准、自适应攻击、良性提示基准、多个LLM和最先进的护栏基线的广泛实验表明,SelfGrader在低误报率、内存开销和延迟下实现了强鲁棒性。

英文摘要:

Large Language Models (LLMs) are powerful tools for answering user queries, yet they remain highly vulnerable to jailbreak attacks. Existing guardrail methods typically rely on internal features or textual responses to detect malicious queries, which either introduce substantial latency or suffer from randomness in text generation. To overcome these limitations, we propose SelfGrader, a lightweight guardrail method that formulates jailbreak detection as a numerical grading problem using anchored token-level logits. Specifically, SelfGrader evaluates the safety of a user query within a compact set of numerical tokens (NTs) (e.g., 0-9) and interprets their logit distribution as an internal safety signal. To align these signals with the target safety rubric, SelfGrader constructs Probably Approximately Correct-guided ICL anchor examples and introduces a dual-perspective scoring rule that considers both the maliciousness and benignness of the query, yielding a stable and interpretable score that reflects harmfulness and reduces the false positive rate simultaneously. Extensive experiments across diverse jailbreak benchmarks, adaptive attacks, benign prompt benchmarks, multiple LLMs, and state-of-the-art guardrail baselines demonstrate that SelfGrader achieves strong robustness with low false positive rates, memory overhead, and latency.

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

↑