atlas

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

Spectral Editing of Activations for Large Language Model Alignment

NeurIPS 2024 · Large language models › Language, safety and interpretability · approach: Pruning and circuits in LLMs · 1 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 SEA, a training-free inference-time activation editing method that uses SVD of cross-covariance between neutral and positive/negative demonstration activations (with optional invertible feature functions for non-linear editing) to improve truthfulness and reduce bias in LLMs.

Problem

LLMs generate untruthful or biased content; existing activation-editing methods typically need expensive iterative optimisation to learn the intervention target module.

Approach

Edit last-token MLP activations by projecting them onto principal directions that maximally covary with positive-demonstration activations and minimally covary with negative-demonstration activations, obtained in closed form via SVD of cross-covariance matrices; extend to non-linear editing through invertible feature functions (squared-exponential, tanh, ELU) with pseudo-inverses.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
apply SEA (N=2000, K=99.8%, L=21) instead of ICLLLaMA-2-Chat-7B · TruthfulQAMC1: 36.96 -> 39.41Helped
apply SEA instead of ICLLLaMA-2-Chat-7B · TruthfulQAMC2: 54.68 -> 57.15Helped
use Φ-SEA instead of ICLLLaMA-2-Chat-7B · BBQaccuracy: 43.0 -> 56.2Helped
use positive editing only rather than combined positive and negative editing (ablation)SEA on LLaMA-2-Chat-7B · TruthfulQAMC1: 39.41 -> 26.56Hurt
use negative editing only rather than combined positive and negative editing (ablation)SEA on LLaMA-2-Chat-7B · TruthfulQAMC1: 39.41 -> 34.88Hurt
replace feature normalisation with averaging the edited activations (ablation)SEA on LLaMA-2-Chat-7B · TruthfulQAMC1: 39.41 -> 35.86Hurt
edit bottom 3 layers instead of top 3 layers (ablation)SEA on LLaMA-2-Chat-7B · TruthfulQAMC1: 38.43 -> 36.23Hurt
reverse positive and negative editing projections (ablation)SEA on LLaMA-2-Chat-7B · TruthfulQAMC1: 39.41 -> 35.13Hurt
use mean pooling instead of last-position token activations (ablation)Linear SEA on LLaMA-2-Chat-7B · TruthfulQAMC1: 39.41 -> 36.96Hurt
use a randomly selected token instead of last-position activations (ablation)Linear SEA on LLaMA-2-Chat-7B · TruthfulQAMC1: 39.41 -> 36.96Hurt
apply Linear SEALLaMA-2-13B · TruthfulQAMC2: 55.7 -> 55.6Mixed
apply Linear SEAGemma-it-7B · BBQaccuracy: 44.4 -> 44.2Hurt

Surprising findings

Limitations

Experimental setup

Datasets: HaluEval BBQ

Benchmarks: TruthfulQA BBQ CrowS-Pairs MMLU HellaSwag Natural Questions GSM8K MathQA ToxiGen

Metrics: MC1 MC2 GPT-Truth GPT-Info Info*Truth accuracy unknown-answer rate stereotypical response rate bias score exact match

Baselines: In-context learning LoRA fine-tuning Inference-time Intervention (ITI) DoLa Contrastive Decoding (CD) Induce-then-Contrast Decoding (ICD)

Builds on: inference-time intervention (ITI) LoRA contrastive decoding

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