LLM jailbreak detection based on contrastive prototype structure
Jailbreak Detection on Large Language Models via Contrastive Prototype Structures
AI summary
Proposes an LLM jailbreak detection method, JDPI: it builds harmful and benign prototypes using only binary safety labels and predicts by relative distance to the prototypes, without training an additional downstream classifier. On four benchmarks, compared with fine-tuning, it improves detection accuracy by 9.1-18.0 percentage points, and after dataset adaptation its ROC-AUC exceeds the Llama Guard 3-8B baseline by 0.173-0.310. Across 12 targeted transfers, accuracy is on average 1.59 percentage points higher than the classifier.