Table of Contents
Fetching ...

Improving Steering Vectors by Targeting Sparse Autoencoder Features

Sviatoslav Chalnev, Matthew Siu, Arthur Conmy

TL;DR

Addresses unpredictability in steering LLMs by grounding interventions in Sparse Autoencoder (SAE) features. Introduces SAE-Targeted Steering (SAE-TS), which learns a linear map from steering vectors to SAE effects to create targeted, low-off-target steering vectors. Trains a 50k-vector effect approximator to predict SAE feature changes and optimizes per-vector scaling to stay in a workable regime. Empirically, SAE-TS outperforms Contrastive Activation Addition (CAA) and direct SAE feature steering on most tasks across Gemma models, aided by an interactive EffectVis tool; limitations and future directions include safety-relevant steering and broader SAE architectures.

Abstract

To control the behavior of language models, steering methods attempt to ensure that outputs of the model satisfy specific pre-defined properties. Adding steering vectors to the model is a promising method of model control that is easier than finetuning, and may be more robust than prompting. However, it can be difficult to anticipate the effects of steering vectors produced by methods such as CAA [Panickssery et al., 2024] or the direct use of SAE latents [Templeton et al., 2024]. In our work, we address this issue by using SAEs to measure the effects of steering vectors, giving us a method that can be used to understand the causal effect of any steering vector intervention. We use this method for measuring causal effects to develop an improved steering method, SAE-Targeted Steering (SAE-TS), which finds steering vectors to target specific SAE features while minimizing unintended side effects. We show that overall, SAE-TS balances steering effects with coherence better than CAA and SAE feature steering, when evaluated on a range of tasks.

Improving Steering Vectors by Targeting Sparse Autoencoder Features

TL;DR

Addresses unpredictability in steering LLMs by grounding interventions in Sparse Autoencoder (SAE) features. Introduces SAE-Targeted Steering (SAE-TS), which learns a linear map from steering vectors to SAE effects to create targeted, low-off-target steering vectors. Trains a 50k-vector effect approximator to predict SAE feature changes and optimizes per-vector scaling to stay in a workable regime. Empirically, SAE-TS outperforms Contrastive Activation Addition (CAA) and direct SAE feature steering on most tasks across Gemma models, aided by an interactive EffectVis tool; limitations and future directions include safety-relevant steering and broader SAE architectures.

Abstract

To control the behavior of language models, steering methods attempt to ensure that outputs of the model satisfy specific pre-defined properties. Adding steering vectors to the model is a promising method of model control that is easier than finetuning, and may be more robust than prompting. However, it can be difficult to anticipate the effects of steering vectors produced by methods such as CAA [Panickssery et al., 2024] or the direct use of SAE latents [Templeton et al., 2024]. In our work, we address this issue by using SAEs to measure the effects of steering vectors, giving us a method that can be used to understand the causal effect of any steering vector intervention. We use this method for measuring causal effects to develop an improved steering method, SAE-Targeted Steering (SAE-TS), which finds steering vectors to target specific SAE features while minimizing unintended side effects. We show that overall, SAE-TS balances steering effects with coherence better than CAA and SAE feature steering, when evaluated on a range of tasks.

Paper Structure

This paper contains 28 sections, 2 equations, 8 figures, 9 tables.

Figures (8)

  • Figure 1: Diagram showing the feature effects measurement method. We sample a steering vector (depicted here as to emphasise that it represents a mixture of concepts), and steer the model by adding it to the residual stream activations at layer 12. We use this steered model to generate text completions starting from a prompt (e.g. "<BOS>Last night"). These completions are then fed back through the model up to layer 12, where the activations are passed through a Sparse Autoencoder (SAE) and averaged to measure feature effects. The linear approximator is trained on pairs of steering vectors and their measured feature effects to predict effects for new steering vectors.
  • Figure 2: Plots showing Behavioral, Coherence, and Behavioral*Coherence scores for the London and Wedding tasks at varying steering scales.
  • Figure 3: Plots showing Behavioral*Coherence score for the CAA, SAE, and SAE-TS steering methods on all 9 tasks. We see that SAE-TS is superior to the other two methods on 7 of the 9 tasks across a wide range of steering scales.
  • Figure 4: Interface overview for EffectVis. Available at https://effectvis.vercel.app/
  • Figure 5: Coherence score when steering with the bias component of SAE-TS, compared to steering with random vectors. Steering with random vectors behaves as expected: Coherence score stays flat at first, then goes down gradually. However, when we steer with the bias term ($-\bm{Mb}$), Coherence score rises, peaking at 0.72 at scale 60, then drops off rapidly.
  • ...and 3 more figures