跳到正文
arXiv (AI + Vision + Imaging)· Yan Qiu, Yuanyuan Li·· 7 天前AI 评分22

基于对比原型结构的大语言模型越狱检测

Jailbreak Detection on Large Language Models via Contrastive Prototype Structures

AI 导读

JDPI 利用二元安全标签构建有害与良性原型,通过相对原型距离做越狱检测,无需额外训练下游分类器。在四个基准上,对比微调使检测准确率提升 9.1-18.0 个百分点,ROC-AUC 与分类器基线差距不超过 0.017。经数据集适配后,其 ROC-AUC 在四个基准上超出 Llama Guard 3-8B 基线 0.173-0.310。

正文 · 原文

arXiv:2611.24936v1 Announce Type: new Abstract: Jailbreak attempts and harmful prompts remain a challenge for the safe deployment of large language models. We study whether contrastively learned representations can support safety detection without training an additional downstream classifier. We propose Jailbreak Detection with Prototype Inference (JDPI), which uses binary safety labels to construct harmful and benign prototypes and makes predictions from relative prototype distances. JDPI uses only binary safety labels for encoder adaptation, prototype construction, and validation. In our setup, it uses fewer labeled examples than the classifier baseline (Method A) by avoiding the separate split used to train the downstream classifier. Across four benchmarks covering different input formats, contrastive fine-tuning improves JDPI's detection accuracy by 9.1-18.0 percentage points. Using the same encoder, JDPI achieves slightly higher ROC-AUC on one benchmark and stays within 0.017 of the baseline across all four. With dataset-specific adaptation, JDPI exceeds the released Llama Guard 3-8B baseline by 0.173-0.310 in ROC-AUC across the four benchmarks. In multi-turn replay on TomGibbs, JDPI uses accumulated user history as the conversation unfolds, achieving higher conversation-level accuracy than when it uses the current turn alone. Across 12 directed transfers, JDPI outperforms the classifier by an average of 1.59 percentage points in accuracy, demonstrating stronger cross-dataset robustness.

来源:arXiv (AI + Vision + Imaging) · arxiv.org