atlas

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

Soft Prompt Threats: Attacking Safety Alignment and Unlearning in Open-Source LLMs through the Embedding Space

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 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 embedding space attacks that optimize continuous perturbations on input token embeddings of open-source LLMs to bypass safety alignment and extract unlearned or pretraining knowledge, comparing favorably to discrete attacks and fine-tuning.

Problem

Adversarial robustness research on LLMs focuses on discrete input attacks, leaving threat models that exploit full white-box access to open-source models (safety alignment removal, unlearning failures, data extraction) underexplored.

Approach

Attack the continuous input embeddings (signed gradient descent on an adversarial suffix embedding with a cross-entropy target loss, no norm constraint), in individual or universal form, plus a multi-layer variant that decodes intermediate hidden states via the logit lens to surface residual knowledge.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use embedding space attacks rather than discrete attacks or fine-tuningOpen-source LLMs on Harmbench · Harmbench standard behaviorsC-ASRHelped
train a universal embedding attack on half the behaviorsLlama2-7b-Chat, Mistral-7b-CB, and Llama3-8b-CB · Harmbench unseen behaviorsASR: 91.6%; 97.5%; 96.25%Helped
use a universal embedding attack instead of fine-tuningLlama2 · Harmbench unseen behaviorsASR: 88.8% -> 91.6%Helped
generate discrete jailbreaks using an embedding-attacked modelLlama2 · Harmbench unseen behaviorsASR: 0% -> 43.6%Helped
attack the unlearned model with an embedding space attackLlama2-7b-WhoIsHarryPotter · Harry Potter Q&Aaccuracy: 3.6% -> 30.9%Helped
use universal rather than individual embedding perturbationsLlama2-7b-WhoIsHarryPotter · Harry Potter Q&AC-ASR: 25.5 -> 30.9Helped
combine embedding attacks with top-k samplingLlama2-7b-WhoIsHarryPotter · Harry Potter Q&ACU: 27.8% -> 38.2%Helped
use multiple embedding attack attemptsLlama2-7b-WhoIsHarryPotter · Harry Potter Q&ACU: 27.8% -> 38.2%Helped
increase the number of attacked tokens from 1 to 20 (ablation)Embedding attacks on the unlearned Harry Potter model · Harry Potter Q&AC-ASR: 30.9 -> 25.5; 25.5 -> 20Hurt
add multi-layer decoding to the standard attack (ablation)Llama2-7b-WhoIsHarryPotter · Harry Potter Q&AC-ASRHelped
use a universal embedding attack on unlearned TOFU modelsLlama2 after gradient ascent or gradient difference unlearning · TOFU 1% forget setcumulative ROUGE-1: 0.28 -> 0.53; 0.26 -> 0.54Helped
optimize a universal embedding attack on Harry Potter book completionsLlama3-8B · Harry Potter book completion, test pairsROUGE-1 F1: 0.11 -> 0.22Helped

Surprising findings

Limitations

Experimental setup

Datasets: HarmBench TOFU Anthropic red-teaming data Harry Potter book 1 sentence pairs

Benchmarks: HarmBench Harry Potter Q&A TOFU

Metrics: attack success rate cumulative attack success rate (C-ASR) toxicity score perplexity ROUGE-1 compute time

Baselines: GCG AutoDAN PAIR Adaptive attacks Fine-tuning (QLoRA) Head-projection attack Probability delta attack Top-k sampling

Builds on: GCG Universal adversarial triggers Logit lens Circuit breakers QLoRA

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