atlas

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

Representation Surgery: Theory and Practice of Affine Steering

ICML 2024 · Large language models › Language, safety and interpretability · approach: Task vectors and steering · 0 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.

Derives least-squares-optimal affine steering functions (mean matching and mean+covariance matching, the latter linked to optimal transport between Gaussians) and applies them to reduce gender/dialect bias in classification and toxicity in GPT-2 generation.

Problem

Steering language model representations to suppress undesirable behavior (gender bias, dialect bias, toxicity) while changing representations minimally; prior steering vectors and concept erasure lacked formal justification for steering.

Approach

Shows via affine guardedness and least-squares optimality that steering only requires matching concept-conditional means (justifying steering vectors), and derives a mean+covariance matching affine map (MiMiC) that also matches second moments, is optimal in the OT/Gaussian sense, and provably eliminates expected bias by neighbors.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Apply mean and covariance matchingBERT-base profession classifier · BiosTPR RMS: 0.155 -> 0.093Helped
Apply mean and covariance matchingGPT-2 profession classifier · BiosTPR RMS: 0.168 -> 0.070Helped
Apply mean and covariance matchingLlama2-7b profession classifier · BiosTPR RMS: 0.143 -> 0.085Helped
Apply mean and covariance matchingBERT-base profession classifier · BiosAccuracy: 0.799 -> 0.785Hurt
Apply mean and covariance matching rather than mean matching aloneGPT-2 profession classifier · BiosTPR RMS: 0.094 -> 0.070Helped
Apply mean matchingGPT-2 (large) generation · Real Toxicity PromptsExpected maximum toxicity: 0.39 -> 0.33Helped
Apply mean and covariance matchingGPT-2 (large) generation · Real Toxicity PromptsExpected maximum toxicity: 0.39 -> 0.29Helped
Apply mean and covariance matching rather than mean matching aloneGPT-2 (large) generation · Real Toxicity PromptsExpected maximum toxicity: 0.33 -> 0.29Helped
Apply mean and covariance matchingLlama2-7b sentiment classifier · Dialect bias (AAE 0.950)TPR gap: 0.193 -> 0.086Helped
Apply mean and covariance matching to all vectors instead of selectively (ablation)GPT-2 (large) generation · Real Toxicity PromptsExpected maximum toxicity: 0.29 -> 0.17Helped
Apply mean and covariance matching to all vectors instead of selectively (ablation)GPT-2 (large) representations · WikiText-2Perplexity: 24.2 -> 54.0Hurt
Apply mean matching to all vectors instead of selectively (ablation)GPT-2 (large) generation · Real Toxicity PromptsExpected maximum toxicity: 0.33 -> 0.28Helped

Surprising findings

Limitations

Experimental setup

Datasets: Bios Twitter AAE/SAE dialect dataset Jigsaw Toxic Comments Classification Challenge RealToxicityPrompts WikiText-2

Benchmarks: Bios RealToxicityPrompts WikiText-2

Metrics: RMS TPR gap accuracy expected maximum toxicity toxicity probability fluency (GPT-2 XL perplexity) distinct n-gram ratio WikiText-2 perplexity bias by neighbors (k-NN gender agreement)

Baselines: LEACE Postprocessing (Wang et al.) DAPT GeDI PPLM UDDIA DExperts GOODTRIEVER

Builds on: LEACE steering vectors affine guardedness bias by neighbors

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