STShield: A Single-Token Sentinel for Real-Time Jailbreak Detection in Large Language ModelsSTShield: Single-Token Sentinel for Real-Time Jailbreak Detection in Large Language Models
AI summary
STShield proposes a single-token sentinel mechanism that appends a binary safety indicator to the model's response sequence, enabling real-time jailbreak detection for large language models. The method combines supervised fine-tuning on normal prompts with adversarial training using embedding-space perturbations, improving detection robustness while maintaining model utility. Experiments show that STShield can resist multiple jailbreak attacks and achieves defense performance superior to existing methods at extremely low computational cost.