Prépublication · 2026
Jailbreak Detection on Large Language Models via Contrastive Prototype Structures
Yan Qiu, Yuanyuan Li — Monde
Source : arXiv
Résumé
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 clas…