Jailbreak Detection on Large Language Models via Contrastive Prototype Structures
JDPI detects harmful prompts without a separate classifier, using fewer labeled examples while staying close to the classifier baseline.
The method compares a prompt’s learned representation with harmful and benign prototypes built from binary safety labels. Across four benchmarks, contrastive fine-tuning improved its detection accuracy by 9.1–18.0 percentage points. With the same encoder, its ROC-AUC stayed within 0.017 of the classifier baseline on all four benchmarks. It also beat the classifier by an average of 1.59 percentage points in accuracy across 12 directed cross-dataset transfers.
ArXiv · AI/CL/LG's note
The method compares a prompt’s learned representation with harmful and benign prototypes built from binary safety labels. Across four benchmarks, contrastive fine-tuning improved its detection accuracy by 9.1–18.0 percentage points. With the same encoder, its ROC-AUC stayed within 0.017 of the classifier baseline on all four benchmarks. It also beat the classifier by an average of 1.59 percentage points in accuracy across 12 directed cross-dataset transfers.
ArXiv · AI/CL/LG's note
score 4