atlas

Research map / Large language models / Alignment and preferences

Gradient Cuff: Detecting Jailbreak Attacks on Large Language Models by Exploring Refusal Loss Landscapes

NeurIPS 2024 · Large language models › Alignment and preferences · approach: LLM-as-judge and feedback data · 5 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Gradient Cuff, a training-free two-step jailbreak detector that thresholds a sampling-based refusal loss and its zeroth-order estimated gradient norm on the protected LLM.

Problem

Jailbreak attacks bypass LLM safety alignment, and existing unsupervised defenses either miss many attack types or heavily reject benign queries.

Approach

Defines a refusal loss (probability of non-refusal estimated by sampling responses and keyword matching) and observes that malicious queries have lower loss values and steeper landscapes; detection thresholds the loss and then the zeroth-order gradient norm of the loss in embedding space.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Gradient Cuff instead of SmoothLLMLLaMA2-7B-Chat · Malicious jailbreak queries, average across 6 attacksTPR: 0.763±0.017 -> 0.883±0.013Helped
Use Gradient Cuff instead of SmoothLLMVicuna-7B-V1.5 · Malicious jailbreak queries, average across 6 attacksTPR: 0.413±0.020 -> 0.743±0.018Helped
Add Gradient Cuff to Self-Reminder (ablation)LLaMA2-7B-Chat · Malicious jailbreak queries, average across 6 attacksTPR: 0.820±0.016 -> 0.920±0.011Helped
Add Gradient Cuff to Self-Reminder (ablation)Vicuna-7B-V1.5 · Malicious jailbreak queries, average across 6 attacksTPR: 0.472±0.020 -> 0.637±0.020Helped
Add the gradient-norm rejection stage (ablation)Gradient Cuff on LLaMA2-7B-Chat · Malicious jailbreak queries, average across 6 attacksTPR: 0.698±0.019 -> 0.797±0.016Helped
Add the gradient-norm rejection stage (ablation)Gradient Cuff on Vicuna-7B-V1.5 · Malicious jailbreak queries, average across 6 attacksTPR: 0.296±0.019 -> 0.536±0.020Helped
Add the gradient-norm rejection stage (ablation)Gradient Cuff on LLaMA2-7B-Chat · Benign user queriesFPR: 0.012±0.011 -> 0.012±0.011No clear effect
Add the gradient-norm rejection stage (ablation)Gradient Cuff on Vicuna-7B-V1.5 · Benign user queriesFPR: 0.008±0.009 -> 0.010±0.010No clear effect
Increase the second-stage threshold setting from σ=1% to σ=5% (ablation)Gradient Cuff on LLaMA2-7B-Chat · Malicious jailbreak queries, average across 6 attacksTPR: 0.797±0.016 -> 0.883±0.013Helped
Increase the second-stage threshold setting from σ=1% to σ=5% (ablation)Gradient Cuff on Vicuna-7B-V1.5 · Malicious jailbreak queries, average across 6 attacksTPR: 0.536±0.020 -> 0.743±0.018Helped
Increase query budget using fixed-N rather than fixed-P (ablation)Gradient Cuff · Average refusal rate across 6 jailbreak datasetsTPR improvement: 0.137 v.s. 0.026Helped

Surprising findings

Limitations

Experimental setup

Datasets: AdvBench LMSYS Chatbot Arena conversations

Benchmarks: MMLU GCG AutoDAN PAIR TAP Base64 LRL

Metrics: TPR (refusal rate on malicious queries) FPR (refusal rate on benign queries) attack success rate MMLU accuracy

Baselines: PPL SmoothLLM Erase-Check Self-Reminder LLaMA-Guard Safe-Decoding

Builds on: SmoothLLM GCG Self-Reminder PAIR Erase-Check

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy