Skip to content

GradSafe: Detecting Jailbreak Prompts for Large Language Models via Safety-Critical Gradient AnalysisGradSafe: Detecting Jailbreak Prompts for LLMs via Safety-Critical Gradient Analysis

Paper Tracker· arXiv:2402.13494· ACL 2024· Yueqi Xie, Minghong Fang, Renjie Pi, Neil Gong·Indexed by this site · 27 days ago· Originally publishedDefenses
AI summary

The researchers propose GradSafe, which detects jailbreak prompts by analyzing the gradients of large language models on safety-critical parameters, without requiring existing online moderation APIs or the extensive data collection and training needed to fine-tune models. Its core observation is that when jailbreak prompts are paired with compliant responses, the model loss exhibits similar gradient patterns on some safety-critical parameters, whereas the gradient patterns of safe prompts differ. The authors state that applying GradSafe to Llama-2 without further training outperforms Llama Guard fine-tuned on large-scale datasets in detecting jailbreak prompts, and this advantage holds in both zero-shot and adapted evaluation settings on ToxicChat and XSTest. The paper has been accepted to the ACL 2024 main conference, and the source code has been released.

Related events and news

2 events · 2 news mentions

News that mentions this paper

NeuronGuard 将安全信号分散编码抵御剪枝攻击

Adversa AI 发布 10 月 GenAI 安全资源汇总

Read originalACL 2024