Activation Steering: Steering Vectors and Representation Engineering › Visualizing the Steering Effect

Michael BrenndoerferJanuary 29, 20265 min read
Language AI HandbookAll chapters
Part 59 of 67Interpretability
Chapter 456Activation Steering: Steering Vectors and Representation Engineering › Visualizing the Steering Effect
Reading section 8 of 13 · Visualizing the Steering Effect · 5 minSection 8 of 13 · 5 min

Book contents

Section 8 of 13 · 5 min read

Activation Steering: Steering Vectors and Representation Engineering › Visualizing the Steering EffectOne section · Sections in this chapter8 / 13 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

To build intuition for what steering does geometrically, we can visualize how activations change as we vary the steering coefficient. We project the high-dimensional activations onto the steering direction and examine how the alignment changes with α\alpha.

Out[12]:
Visualization
Line plot showing cosine similarity vs alpha coefficient for activation steering.
Cosine similarity between the steered activation and the positive steering direction across different alpha values. As alpha increases from negative to positive, the activation progressively aligns with the steering vector. The orange dashed line marks the baseline (unsteered) similarity. This monotonic relationship confirms that the steering vector moves activations in a consistent, predictable direction rather than producing chaotic perturbations.
Out[13]:
Visualization
Bar chart showing steering vector L2 norm at each layer of GPT-2.
Magnitude of the steering vector (unnormalized L2 norm) at each layer of GPT-2. The norm reflects how strongly the concept is differentiated at each layer. The highlighted bar marks the target layer used for injection. Higher norms indicate layers where the positive and negative concept examples are most separated in activation space, making those layers more informative targets for steering.

The two plots tell a useful story together. The cosine similarity plot shows how the steered activation aligns progressively with the steering direction as α\alpha increases, confirming that the intervention is moving activations in the expected geometric direction. The norm-by-layer plot reveals where in the network the concept "confident vs. uncertain" has the largest footprint, guiding layer selection in practice.

A third diagnostic checks whether different steering vectors are entangled. If two concepts share a large portion of their representation space, steering one will unavoidably steer the other as well. The heatmap below shows pairwise cosine similarities across several concept vectors, revealing which concepts are independent and which share geometric structure.

Out[14]:
Visualization
Heatmap of cosine similarity between four concept steering vectors.
Pairwise cosine similarity matrix between four steering vectors computed at layer 8 of GPT-2. Values near 1.0 (dark blue) indicate the two concept directions are highly aligned in activation space; values near 0 (pale blue) indicate independent directions. Diagonal entries are 1.0 by definition. Low off-diagonal similarity shows the concepts occupy largely orthogonal subspaces, meaning each can be steered independently without strongly affecting the others.

The heatmap reveals the structure of the model's semantic geometry at layer 8. Pairs with low off-diagonal similarity (near 0) are good candidates for independent simultaneous steering: you could apply both a "confident" vector and a "formal" vector at the same time with minimal interaction. Pairs with high similarity are entangled and require care: the intervention will affect both concepts whether you intend it to or not.