GradSafe: Detecting Jailbreak Prompts for Large Language Models via Safety-Critical Gradient AnalysisGradSafe: Detecting Jailbreak Prompts for LLMs via Safety-Critical Gradient Analysis
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 将安全信号分散编码抵御剪枝攻击
- 公众号 为机器立心names the paper研究者提出 NeuronGuard,把安全信号分散到大量神经元以抵御神经元剪枝攻击
推理阶段防御:困惑度过滤、SmoothLLM、GradSafe,只能对付提示词越狱;
Adversa AI 发布 10 月 GenAI 安全资源汇总
- Adversa AInames the paperAdversa AI 的 GenAI 安全资源精选(2026 年 10 月)
Running Llama Guard, JBShield and GradSafe entirely over ciphertext lets the server withhold jailbroken responses without seeing plaintext, closely matching plaintext decisions at an efficiency cost.