Mean Difference (MD) vector extraction
Steering Llama 2 via Contrastive Activation Addition — inherited; Persona Vectors: Monitoring and Controlling Character Traits in Language Models — inherited
A technique for extracting a direction in activation space by averaging the difference in activations between two sets of contrasting examples. CAA uses it, notes it produces results similar to PCA-based extraction, and notes it was previously employed in Zou et al. (2023) and Li et al. (2023).
Averaging the difference between two sets of contrasting examples is about as simple as an activation-space technique gets, and simplicity is exactly its appeal: no optimization, no probes to train, just a subtraction and a mean, taken at whichever layer you choose.
As a general-purpose technique, Mean Difference predates CAA by some margin, already put to work elsewhere extracting directions for concepts like honesty and truthfulness; CAA's own particular way of applying it, over multiple-choice contrast pairs at the answer-letter token, is a separate, more specific idea covered under its own name.
A supervised shortcut for finding a concept's direction
Mean Difference is one of the simplest ways to find a direction in a model's activation space that corresponds to some concept or behavior: collect two sets of example activations, one where the concept is present, one where it is absent or opposite, and take the difference of their means. No optimization, no gradient descent, no probe to train — just an average, which is why computing it needs only forward passes rather than backward ones. What the method assumes, implicitly, is that the concept is represented approximately linearly: that examples with and without it are offset by roughly the same vector wherever they occur in activation space, so a single averaged difference is a stable estimate of that offset rather than an artifact of which examples happened to be sampled.
Already in circulation before CAA touched it
The technique predates this paper. Representation Engineering (Zou et al. 2023) had already tested it, alongside other extraction methods, for concepts like honesty and emotion, and Inference-Time Intervention (ITI) uses it to build the true/false direction it shifts a sparse set of attention heads along, "employing the same Mean Difference vector extraction approach as CAA" (contrastive-activation-addition, §"2 Related work", p. 2). CAA steering vector construction (Mean Difference over multiple-choice contrast pairs), the instantiation used by Contrastive Activation Addition (CAA), feeds this shared method a dataset of Multiple-choice contrast-pair format pairs, a chosen layer, and the answer-letter token position, plugging them into Equation 1 (contrastive-activation-addition, §"3 Method", p. 3) — the method supplies the difference-of-means arithmetic wholesale; everything distinct about CAA's use of it is a choice of inputs.
Cross-checked against an unsupervised method
Tigges et al. (2023), cited as Linear representations of sentiment, had already shown that Mean Difference vectors for sentiment closely resemble the directions found by Principal Component Analysis (PCA), an unsupervised technique that needs no labels at all and instead finds whatever direction explains the most variance in an unlabeled cloud of activations: this method "has been shown to produce steering vectors similar to other techniques like PCA" (contrastive-activation-addition, §"3 Method", p. 3). Two procedures with different information requirements — one supervised and contrastive, one unsupervised and variance-seeking — converging on the same direction is evidence that direction reflects something the model actually represents, not an artifact of averaging. That prior, sentiment-specific validation is part of why CAA can adopt bare Mean Difference for seven different behaviors without first re-deriving the extraction method.