Adding the difference between two single-prompt residual streams at inference time cuts OPT-6.7B toxicity by 17% on RealToxicityPrompts without touching a single model weight or running gradient descent. Alexander Matt Turner and colleagues call this technique Activation Addition (ActAdd), positioning it as an optimization-free way to bridge the “elicitation overhang” between what pretrained language models can compute and what ordinary prompts coax out of them.
- One prompt pair, zero training: Subtracting the layer
lactivations of a contrastive pair such as"Love"minus"Hate"produces a reusable steering vector from two forward passes in seconds. - 17% lower toxicity on OPT-6.7B: On 1,000 RealToxicityPrompts continuations (5 seeds),
ActAdddrops Perspective API toxicity from0.134to0.112, beating PREADD-D (0.122) with less than one-quarter of the disfluency (13.8vs.56.6), and cuts LLaMA-3-8B toxicity by 5% (0.114to0.108). - 66.9% negative-to-positive sentiment flip on LLaMA-3-8B: On 1,000 IMDb reviews,
ActAddlifts positive reversal from41.7%unsteered to66.9%, outperforming OPT prompting (36.5%), FUDGE (55.1%), and PREADD-S-OPT (62.4%). - Over 90% topic steering with intact general knowledge: Injecting a
"weddings"minus whitespace vector at layer 6 of GPT-2-XL raises wedding-word mentions from roughly2%to over90%while leaving top-K factual accuracy on 29,774 ConceptNet prompts nearly identical.
How It Works
Instead of optimizing soft prompts or updating weights via gradient descent, ActAdd exploits the hypothesis that linear directions in the residual stream encode high-level concepts. Given a target prompt p+ and an opposing or neutral prompt p- (padded with whitespace to match token length), the method runs both prompts through the frozen Transformer up to layer l and records their difference h_l^A = h_l^+ - h_l^-.
During a user forward pass on prompt p*, ActAdd adds c * h_l^A to the residual stream at layer l starting at token position a = 1 (front alignment), then lets the remaining blocks finish normally. Two design details matter in practice. First, contrasting p+ against p- is essential: adding "Love" alone without subtracting "Hate" or whitespace fails to steer reliably. Second, ActAdd is not equivalent to prepending a token. Transplanting layer-0 embeddings of "Anger" - "Calm" directly into layer 20 (0 -> 20) barely changes output anger compared to extracting at layer 20 (20 -> 20), showing that early Transformer blocks perform real feature computation. Similarly, prepending "weddings" to prompts raises perplexity on unrelated OpenWebText sentences by 13.2% (ratio 1.132), whereas ActAdd keeps unrelated perplexity at 0.994 while dropping wedding-sentence perplexity to 0.875.
Key Findings
- Targeted token shifts without random collapse: On 300k OpenWebText documents in GPT-2-XL, adding the
weddingsvector lowers perplexity monotonically as wedding-word density rises, raising the probability of" bride"by 500% while lowering" Image"by 30%. Injecting norm-matched Gaussian noise causes larger KL-divergence shifts than the"Anger" - "Calm"vector yet produces less behavioral change. - Layer depth tracks abstraction: Concrete properties like sentiment (
"Love" - "Hate") and weddings peak around layer 6 of GPT-2-XL (48 layers total), whereas higher-level concepts like"Bush did 9/11 because"or"The Eiffel Tower is in Rome"work best around layers 23 to 24. Intervening on the final token position before generation tends to break syntax. - Strong negative-to-positive sentiment, weaker reverse: On IMDb (
n = 1,000),ActAddreaches0.669on LLaMA-3-8B and0.564on OPT-6.7B for negative-to-positive steering. For positive-to-negative steering,ActAdd-OPT(0.432) trails FUDGE (0.532) and PREADD-S-OPT (0.631), though PREADD incurs nearly triple the disfluency (68.4vs.24.2). - Generalization across architectures: Topic and log-probability shifts replicate on GPT-J-6B and partially on Llama-1-13B, though three qualitative prompts (Eiffel Tower in Rome, anger, and harm) fail to replicate on Llama-1-13B.
Caveats & Builder Takeaway
ActAdd requires white-box access to hook and overwrite residual stream activations during inference, ruling out standard closed model APIs. Even with model weights in hand, steering is sensitive to hyperparameters (l, c) and prompt wording: adding a +10 vector can reach roughly 10x the residual stream norm at layer 20, and pushing c too high (such as +100 on weddings) produces incoherent text. The authors also note that qualitative examples report best-of-3 completions from seed 0 (omitting 1 of 12 candidate vectors) and leave multi-step reasoning benchmarks untested.
For engineers running open-weight models, ActAdd is a fast prototyping tool for runtime tone or safety nudges when prompt engineering fails or adds too much noise. For production reliability on alignment traits, follow-up work on Contrastive Activation Addition and Representation Engineering shows that averaging or running PCA over dozens to hundreds of prompt pairs yields far more stable steering directions than a single prompt pair.


