atlas

Research map / Large language models / Alignment and preferences

A Mechanistic Understanding of Alignment Algorithms: A Case Study on DPO and Toxicity

ICML 2024 · Large language models › Alignment and preferences · approach: DPO design choices · 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.

Mechanistically studies how DPO reduces toxicity in GPT2-medium, finding that DPO bypasses rather than removes toxic MLP value vectors via a distributed residual-stream offset, and that scaling toxic key vectors reverts the model to toxic behavior.

Problem

Alignment algorithms like DPO suppress toxic behavior, but the mechanisms by which models become aligned are not understood, which makes jailbreaks and un-alignment hard to explain.

Approach

Locate toxicity-promoting MLP value vectors in GPT2 via a linear probe, apply DPO on PPLM-generated toxic/non-toxic pairs, and show that DPO leaves all weights nearly unchanged but learns a distributed residual-stream offset that moves activations out of toxic key-vector regions; re-amplifying those key vectors un-aligns the model.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply DPO using toxic/nontoxic preference pairsGPT2-medium · RealToxicityPrompts challengetoxicity: 0.453 -> 0.208Helped
Subtract the toxicity probe vector from the last-layer residual streamGPT2-medium · RealToxicityPrompts challengetoxicity: 0.453 -> 0.245Helped
Subtract MLP.v770 at layer 19 from the last-layer residual streamGPT2-medium · RealToxicityPrompts challengetoxicity: 0.453 -> 0.305Helped
Subtract toxic SVD vector 0 from the last-layer residual streamGPT2-medium · RealToxicityPrompts challengetoxicity: 0.453 -> 0.268Helped
Apply DPO using toxic/nontoxic preference pairsGPT2-medium · Wikipedia sentencesF1: 0.193 -> 0.195No clear effect
Scale 7 toxic key vectors by 10xGPT2 DPO · RealToxicityPrompts challengetoxicity: 0.208 -> 0.458Hurt
Scale 7 toxic key vectors by 10xGPT2 DPO · Wikitext-2perplexity: 23.34 -> 23.30No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: Jigsaw toxic comment classification Wikitext-2 RealToxicityPrompts

Benchmarks: RealToxicityPrompts challenge subset Wikitext-2 perplexity Wikipedia continuation F1

Metrics: toxicity (Perspective API) perplexity F1

Baselines: GPT2 (no op) subtracting toxic probe vector subtracting MLP.v770^19 subtracting SVD toxic vector 0

Builds on: DPO PPLM logit lens Geva et al. value vector interpretation

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