atlas

Research map / Large language models / Language, safety and interpretability

Jailbreak Antidote: Runtime Safety-Utility Balance via Sparse Representation Adjustment in Large Language Models

ICLR 2025 · Large language models › Language, safety and interpretability · approach: Jailbreak attacks and defenses · 4 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 Jailbreak Antidote, which shifts a sparse top-5% subset of last-token hidden states along a PCA-derived safety direction at inference to trade off safety and utility without token overhead.

Problem

Jailbreak defenses for LLMs add inference overhead (extra tokens, prompts) or require costly safety fine-tuning, lack runtime flexibility, and often over-refuse benign queries, degrading utility.

Approach

Compute a safety direction as the top principal component of last-token hidden states from benign vs. harmful prompts, keep only the top-k% dimensions by magnitude, and add the scaled masked direction to hidden states at inference; the scale alpha tunes the safety-utility trade-off at runtime.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply Jailbreak Antidote instead of the undefended baselineLlama-3-8B-it · JailbreakBenchDSR: 68.9 -> 99.4Helped
Apply Jailbreak Antidote instead of the undefended baselineLlama-3-8B-it · AlpacaEvalWin Rate: 50.0 -> 53.0Helped
Use Jailbreak Antidote against adaptive jailbreak attacksLlama-2-7B-chat · GCGDSR: 46 / 83Helped
Increase the scaling factor α (ablation)Jailbreak Antidote · JailbreakBenchDSRHelped
Increase the scaling factor α (ablation)Jailbreak Antidote · AlpacaEvalWin RateHurt
Adjust all dimensions instead of the top 5% (ablation)Jailbreak Antidote · AlpacaEvalWin RateHurt
Adjust the top 5% of dimensions rather than all dimensions (ablation)Jailbreak Antidote · JailbreakBench and AlpacaEvalSafety-utility balanceHelped
Reduce adjusted dimensions to k=0.5% (ablation)Jailbreak Antidote · JailbreakBenchDSRHurt
Select top-k dimensions by safety-direction magnitude instead of randomly (ablation)Jailbreak Antidote · JailbreakBenchDSRHelped
Set the scaling factor α below zero (ablation)Jailbreak Antidote · JailbreakBenchDSRHurt

Surprising findings

Limitations

Experimental setup

Datasets: JailbreakBench Safety-Prompts dataset

Benchmarks: JailbreakBench AlpacaEval

Metrics: Defense Success Rate Win Rate Length Controlled Win Rate runtime per query

Baselines: In-Context Learning Paraphrase Perplexity Filter Self-Reminder SemanticSmoothLLM SmoothLLM Llama-3-8B-it-RR Gemma-2-9B-it-DSA

Builds on: representation engineering PAIR GCG SmoothLLM

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