Large language models encode vast linguistic, factual, and behavioral properties within their internal hidden representations. While traditional alignment and behavioral modification rely on Supervised Fine-Tuning (SFT) or Reinforcement Learning from Human Feedback (RLHF), these gradient-based techniques modify billions of parameter weights, require substantial compute, and frequently suffer from catastrophic forgetting or alignment tax.
An alternative paradigm grounded in mechanistic interpretability and cognitive neuroscience—known as Activation Addition (ActAdd) or Representation Engineering (RepE)—demonstrates that high-level concepts can be directly monitored and steered at inference time by manipulating intermediate activation vectors without updating model parameters.

The Linear Representation Hypothesis
Activation steering builds on the Linear Representation Hypothesis, which posits that high-level concepts, task semantics, and behavioral traits are represented as linear directions (one-dimensional rays or low-dimensional subspaces) within the Transformer residual stream.
For a Transformer with layers and hidden dimension , the residual stream at layer for token position is represented by the activation vector:
h_l(t) in R^dUnder the linear hypothesis, a semantic attribute or behavioral state (such as honesty, sycophancy, refusal, sentiment, or reasoning style) corresponds to a unit vector direction . The projection of a hidden state onto this direction quantifies the degree to which the model expresses concept :
score(h_l(t)) = <h_l(t), \hat{v}_l>When this linear structure holds, modifying the coordinate along directly modulates the model's downstream computational trajectory and output behavior.
Concept Direction Extraction Methodologies
Identifying the vector that causally mediates a target concept requires reading activations across controlled prompt distributions. Four primary methodologies have been established across the literature:
1. Contrastive Activation Addition (Difference-in-Means)
Introduced by Turner et al. (2023) and expanded by Rimsky et al. (2023), the Difference-in-Means method constructs pairs of contrastive prompts for . The positive prompt induces the desired attribute (e.g., "Respond truthfully and objectively: ..."), while the negative prompt induces the opposite attribute (e.g., "Respond untruthfully with hallucinations: ...").
The model executes a forward pass on each prompt. For layer , activations are collected at a designated token position (typically the final prompt token or averaged across the prompt sequence). The steering vector is computed as the empirical mean difference:
v_l = (1 / N) * sum_{i=1}^N ( h_l(x_i^+) - h_l(x_i^-) )The resulting vector is normalized to unit length:
\hat{v}_l = v_l / ||v_l||_22. Linear Artificial Tomography (LAT / PCA)
Developed by Zou et al. (2023) within the Representation Engineering framework, Linear Artificial Tomography constructs a difference matrix where each row represents the activation difference for pair :
d_i = h_l(x_i^+) - h_l(x_i^-)Principal Component Analysis (PCA) is applied to . The first principal component (the eigenvector associated with the largest eigenvalue of the covariance matrix ) captures the dominant axis of variation separating the two behavioral states:
\hat{v}_l = argmax_{||v||=1} v^T (D_l^T D_l) vThis unsupervised projection removes uncorrelated prompt-specific noise while isolating the core concept direction.
3. Contrast Consistent Search (CCS)
Burns et al. (2022) introduced Contrast Consistent Search to discover latent knowledge without relying on ground-truth supervision. For each factual statement , the method forms contrastive pairs with its logical negation .
CCS trains a linear probe to satisfy fundamental logical consistency constraints:
- Probability sum consistency:
- Informativeness (entropy maximization): The predictions must not collapse to a trivial constant value of .
The optimized probe direction defines an unsupervised direction of truthfulness within intermediate representations.
4. Refusal Subspace Isolation
Investigating safety alignment in conversational LLMs, Arditi et al. (2024) demonstrated that refusal behavior across open-weight models is mediated by a single dominant one-dimensional direction. By contrasting activations on harmful requests versus benign instruction-following datasets, the refusal vector isolates the safety gating mechanism across the residual stream.
Inference-Time Intervention Mechanics
Once the concept direction is extracted, behavioral control is applied during the inference forward pass without backpropagation or weight updates.
Direct Activation Addition
At layer , the forward pass computes intermediate activation . Activation addition intervenes by adding a scaled steering vector:
h'_l(t) = h_l(t) + \alpha * \hat{v}_lHere, is the steering coefficient:
- : Amplifies the expression of the target concept.
- : Suppresses the target concept or induces the inverse behavior.
- : Preserves baseline model execution.
The modified activation passes into subsequent Transformer sublayers (self-attention and feed-forward networks).
Directional Ablation (Abliteration)
To neutralize a specific behavior (such as refusal, specific stylistic quirks, or bias) without actively injecting a strong opposing bias, orthogonal projection removes the concept component entirely from the hidden state:
h'_l(t) = h_l(t) - <h_l(t), \hat{v}_l> * \hat{v}_lAlternatively, this ablation can be baked permanently into the static weight matrices of the model. For any projection matrix (such as down-projection in MLPs or attention output matrices ), the weight matrix is orthogonalized against :
W' = W - \hat{v}_l * (\hat{v}_l^T * W)This permanent weight modification achieves inference-time behavioral suppression without requiring custom inference runtime hooks.
Multi-Layer Scheduling and Token Masking
Steering interventions can be applied across single layers, contiguous layer ranges , or with layer-dependent coefficients .
Furthermore, intervention schedules can target specific token positions:
- Prompt-only steering: Intervening on tokens conditions the model's interpretation of the input context.
- Rollout-only steering: Intervening during autoregressive generation tokens continuously enforces the behavioral constraint across output generation.
Downstream Propagation and Logit Dynamics
To understand why linear modifications in intermediate layers alter token generation probabilities, consider the propagation mechanics through subsequent layers.
In a standard pre-norm Transformer, layer computes:
a_l = h_{l-1} + Attn(RMSNorm(h_{l-1}))
h_l = a_l + MLP(RMSNorm(a_l))Because the residual stream operates as an additive communication bus, an intervention propagates linearly through the residual connections, while non-linear transformations in subsequent attention heads and MLPs process both the baseline state and the added steering vector:
h_L = h_l + \Delta h_l + sum_{k=l+1}^L ( Attn_k(h_{k-1}) + MLP_k(a_k) )At the final layer , un-embedding produces vocabulary logits:
Logits = W_U * RMSNorm(h_L)The linear component of that survives the residual path projects directly through the un-embedding matrix :
\Delta Logits \approx \alpha * W_U * \frac{\hat{v}_l}{||h_L||_2}Tokens whose un-embedding vectors align positively with experience an increase in logit values, shifting the output softmax distribution toward concept-aligned vocabulary.
Failure Modes, Critical Thresholds, and Trade-Offs
While activation engineering enables fine-grained control, several operational constraints and failure modes govern its deployment:
1. Off-Manifold Drift and Coherence Collapse
Transformer hidden states reside on a low-dimensional manifold embedded in , constrained by LayerNorm/RMSNorm regularities. When the steering magnitude exceeds a critical threshold , the modified activation drifts off the nominal representation manifold.
This produces severe downstream degradation:
- Repetition loops and syntax breakdown.
- Perplexity spikes on benign tokens.
- Complete loss of semantic coherence.
Calibrating relative to the empirical standard deviation of residual stream activations along is essential to maintain syntactic integrity.
2. Semantic Entanglement and Collateral Degradation
Due to polysemanticity and representation compression, linear directions in deep networks are rarely purely orthogonal to all other conceptual representations. Manipulating for a single concept often exerts collateral effects on related or un-related capabilities:
- Steering for excessive honesty can induce hyper-refusal or factual pedantry that breaks conversational helpfulness.
- Suppressing refusal via ablation can inadvertently degrade reasoning on mathematical or coding tasks by disrupting shared feature subspaces.
3. Layer Selectivity Dynamics
Empirical investigations show that steering efficacy varies systematically across network depth:
- Early layers (0% to 25% depth): Features are dominated by low-level token identity, positional indexing, and local syntax. Steering here frequently corrupts parsing and token generation.
- Middle layers (40% to 75% depth): High-level semantic abstractions, world models, and behavioral policies stabilize. Interventions in these layers yield maximal causal efficacy with minimal syntactic damage.
- Late layers (80% to 100% depth): Representations specialize into vocabulary un-embedding preparation and logit calibration. Steering at these layers often acts as a crude token bias rather than semantic modification.
Operational Assessment
Activation addition and representation engineering provide a mathematically transparent, compute-efficient mechanism for analyzing and steering model behavior. By identifying emergent linear directions in activation space, practitioners can implement targeted guardrails, evaluate truthfulness, and customize behavioral styles at runtime without the computational overhead or catastrophic forgetting risks of full parameter fine-tuning.
Sources
- Steering Language Models with Activation Engineering (Turner et al., 2023)
- Representation Engineering: A Top-Down Approach to AI Transparency (Zou et al., 2023)
- The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations (Marks and Tegmark, 2023)
- Discovering Latent Knowledge in Language Models Without Supervision (Burns et al., 2022)
- Steering Llama 2 via Contrastive Activation Addition (Rimsky et al., 2023)
- Refusal in Language Models Is Mediated by a Single Direction (Arditi et al., 2024)



