Inferensys

Glossary

Steering Vector

A direction in a model's activation space that, when added to the residual stream during inference, reliably modifies the model's high-level behavior, such as its sentiment or truthfulness.
Engineer reviewing vector database search results on laptop, embeddings visualization on screen, home office coding session.
ACTIVATION ENGINEERING

What is Steering Vector?

A steering vector is a direction in a model's activation space that, when added to the residual stream during inference, reliably modifies the model's high-level behavior, such as its sentiment or truthfulness.

A steering vector is a computed direction in a neural network's activation space that encodes a specific high-level concept or behavioral pattern. By adding this vector to the residual stream at a chosen layer during the forward pass, practitioners can causally intervene to alter the model's output—for example, making it more honest, refusing harmful requests, or adopting a specific persona—without modifying the original model weights.

The vector is typically derived by contrasting activations from two prompt datasets: one eliciting the desired behavior (e.g., truthful responses) and one eliciting the opposite (e.g., deceptive responses). The difference of their mean activations forms the steering direction. This technique, central to representation engineering, provides a lightweight, inference-time control mechanism distinct from fine-tuning, enabling rapid behavioral auditing and alignment adjustments.

ACTIVATION ENGINEERING

Key Characteristics of Steering Vectors

Steering vectors are high-level cognitive directions in a model's activation space. They provide a weight-free control mechanism for modifying behavior during inference by directly manipulating the residual stream.

01

Additive Intervention Mechanism

A steering vector is applied via Activation Addition: a pre-computed bias vector is simply added to the residual stream at a specific layer during the forward pass.

  • No weight modification: The original model parameters remain frozen.
  • Targeted injection: The vector is typically added at a single, carefully chosen layer to isolate a specific behavior.
  • Scalar multiplier: A coefficient controls the intensity of the intervention, allowing for fine-grained behavioral tuning.
02

Contrastive Derivation

The most common method for computing a steering vector is Contrastive Activation Addition (CAA).

  • Positive prompt: Collect residual stream activations on examples exhibiting the desired behavior (e.g., 'honest' responses).
  • Negative prompt: Collect activations on examples exhibiting the opposite behavior (e.g., 'deceptive' responses).
  • Vector subtraction: The steering vector is the difference between the mean positive and mean negative activations, isolating the behavioral direction.
03

High-Level Cognitive Control

Unlike prompt engineering, which operates on the input text, steering vectors directly manipulate the model's internal cognitive state.

  • Sentiment modulation: A vector can shift output tone from negative to positive without explicit prompting.
  • Truthfulness enhancement: Vectors derived from truthful vs. untruthful datasets can reduce hallucination rates.
  • Refusal suppression: A vector can override a model's safety-trained refusal behavior for controlled red-teaming.
04

Linear Representation Hypothesis

Steering vectors rely on the Linear Representation Hypothesis, which posits that high-level concepts are encoded as linear directions in activation space.

  • Concept as direction: A specific sentiment, topic, or behavioral mode corresponds to a single vector.
  • Algebraic composability: Multiple steering vectors can be added together to combine their effects, enabling modular behavioral control.
  • Empirical validation: The success of activation addition provides strong evidence that models organize knowledge in linearly separable subspaces.
05

Layer-Specific Sensitivity

The effectiveness of a steering vector is highly dependent on the injection layer.

  • Early layers: Intervening here affects low-level features and can have unpredictable downstream effects.
  • Middle layers: Often the most effective target for modifying high-level semantic behavior and reasoning.
  • Late layers: Intervening here primarily influences output formatting and token selection rather than deep cognitive processing.
  • Empirical tuning: The optimal layer is typically identified through a sweep across all layers, measuring the intervention's effect on a held-out behavioral metric.
06

Relation to Mechanistic Interpretability

Steering vectors are a core tool in Representation Engineering, bridging the gap between passive analysis and active control.

  • Causal validation: If adding a vector reliably causes a behavioral change, it confirms the vector's causal role in the model's computation.
  • Complement to probing: While linear probes passively read information, steering vectors actively write to the model's state.
  • Safety applications: Researchers use steering vectors to study and mitigate sycophancy, deception, and other undesirable emergent behaviors in frontier models.
INFERENCE-TIME INTERVENTION COMPARISON

Steering Vector vs. Related Control Methods

A comparison of techniques that modify model behavior during the forward pass without updating original weights.

FeatureSteering VectorActivation AdditionContrastive Decoding

Modification target

Residual stream direction

Residual stream bias

Output logit distribution

Requires paired datasets

Computational overhead

Minimal (single vector add)

Minimal (single vector add)

High (dual forward pass)

Granularity of control

High-level behavior (sentiment, truthfulness)

Specific token-level bias

Factuality and coherence

Weight modification

Typical application layer

Middle residual layers

Specific target layer

Final logit comparison

Origin technique

Contrastive Activation Addition

Activation Addition

Contrastive Decoding

STEERING VECTORS

Frequently Asked Questions

Clear, technical answers to the most common questions about activation engineering and inference-time behavioral control.

A steering vector is a specific direction in a model's activation space that, when added to the residual stream during the forward pass, reliably modifies the model's high-level behavior without retraining. It works by identifying a linear representation of a concept—such as 'refusal,' 'truthfulness,' or 'positive sentiment'—and then adding a scaled version of that direction to the model's hidden state at a specific layer. This additive intervention biases the model's subsequent computations toward the desired output. The technique is a core method in representation engineering, operating on the hypothesis that high-level cognitive features are encoded as linear directions in activation space. The vector is typically computed by taking the difference between the mean activations of two contrasting prompt datasets, a process known as contrastive activation addition.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.