atlas

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

Token Highlighter: Inspecting and Mitigating Jailbreak Prompts for Large Language Models

AAAI 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 Token Highlighter, a training-free jailbreak defense that uses the gradient norm of an Affirmation Loss to find jailbreak-critical query tokens and shrinks their embeddings (Soft Removal) before generation.

Problem

Aligned LLMs remain vulnerable to jailbreak prompts (token-level and prompt-level), while existing defenses either fail on fluent prompts, have high false positive rates, or require multiple LLM queries at high cost.

Approach

Define an Affirmation Loss (negative log-likelihood of a pre-set affirmative reply like "Sure, I'd like to help you with this.") and use per-token gradient norms of it to select the top-alpha fraction of query tokens; then multiply their embeddings by beta in (0,1) ("Soft Removal") instead of deleting them.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add gradient-based Critical Set selection rather than selecting soft-removal tokens randomly (ablation)Token Highlighter · Vicuna-7B-V1.5, jailbreak attacksaverage ASR: 0.550 -> 0.142Helped
add gradient-based Critical Set selection rather than selecting soft-removal tokens randomly (ablation)Token Highlighter · Vicuna-7B-V1.5, AlpacaEvalWin Rate: 0.743 -> 0.698No clear effect
add gradient-based Critical Set selection rather than selecting soft-removal tokens randomly (ablation)Token Highlighter · LLaMA-2-7B-Chat, jailbreak attacksaverage ASR: 0.030 -> 0.018Mixed
increase β from 0.3 to 0.5 at α=0.25 (ablation)Token Highlighter on Vicuna-7B-V1.5 · jailbreak attacksaverage ASR: 0.142 -> 0.597Hurt
increase β from 0.3 to 0.5 at α=0.25 (ablation)Token Highlighter on Vicuna-7B-V1.5 · AlpacaEvalWin Rate: 0.698 -> 0.772Helped
increase α from 0.25 to 0.5 at β=0.3 (ablation)Token Highlighter on Vicuna-7B-V1.5 · jailbreak attacksaverage ASR: 0.142 -> 0.080Helped
increase α from 0.25 to 0.5 at β=0.3 (ablation)Token Highlighter on Vicuna-7B-V1.5 · AlpacaEvalWin Rate: 0.698 -> 0.588Hurt
use a different affirmative sentence, “Sure, here is the what I've got for you.” (ablation)Token Highlighter on Vicuna-7B-V1.5 · jailbreak attacksASR: 0.142 -> 0.143No clear effect
use a different affirmative sentence, “Here is” (ablation)Token Highlighter on Vicuna-7B-V1.5 · jailbreak attacksASR: 0.142 -> 0.145No clear effect
combine Token Highlighter with Self Reminder using β=0.5 (ablation)Self Reminder on Vicuna-7B-V1.5 · jailbreak attacksASR: 0.427 -> 0.362Helped
combine Token Highlighter with Self Reminder using β=0.3 (ablation)Self Reminder on Vicuna-7B-V1.5 · jailbreak attacksASR: 0.427 -> 0.023Helped
combine Token Highlighter with Self Reminder using β=0.3 (ablation)Self Reminder on Vicuna-7B-V1.5 · AlpacaEvalWin Rate: 0.684 -> 0.536Hurt

Surprising findings

Limitations

Experimental setup

Datasets: AdvBench AlpacaEval

Benchmarks: AdvBench AlpacaEval

Metrics: Attack Success Rate (ASR) Win Rate

Baselines: PPL Erase Check Gradient Cuff SmoothLLM Semantic Smoothing Self Reminder Random Soft Removal

Builds on: GCG Self Reminder SmoothLLM Gradient Cuff 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