Contrastive learning of safety prototypes can detect jailbreaks more efficiently than traditional classifiers, using fewer labeled examples and showing stronger robustness across different datasets and conversation contexts.
This paper proposes JDPI, a method for detecting jailbreak attempts on large language models using contrastively learned prototypes rather than training a separate classifier.