TL;DR
This paper introduces Sparse Activation Steering (SAS), a novel method for controlling LLM behavior by manipulating activations in sparse latent spaces. SAS offers comparable steering performance to existing dense-space methods but with significantly improved interpretability and modularity, paving the way for more precise AI alignment.
What Problem Does This Paper Address?
Large Language Models (LLMs) are powerful but notoriously difficult to control. While methods like fine-tuning and prompt engineering exist, they often lack flexibility and fine-grained control. Activation steering, which modifies internal model activations during inference, offers a more promising avenue. However, existing techniques operate in dense activation spaces, where features are entangled due to "superposition." This entanglement makes it hard to isolate specific behaviors, hindering interpretability and precise control. The paper addresses this by proposing to leverage sparse representations, which are hypothesized to be more interpretable and disentangled, for more effective and understandable behavior steering.
Methods
The core contribution is Sparse Activation Steering (SAS). The method involves:
- Contrastive Prompt Pairing: Creating pairs of prompts where one completion elicits a desired behavior (positive) and the other its opposite (negative).
- Sparse Representation Extraction: Using a pre-trained Sparse Autoencoder (SAE) to encode the activations of these prompt completions into a sparse latent space.
- Feature Isolation: Filtering out inactive features and then removing shared features between the positive and negative representations. This step is crucial for isolating dimensions that are specifically related to the target behavior.
- SAS Vector Generation: Computing the mean activation vectors for positive and negative completions and then subtracting the negative from the positive vector to create the final SAS steering vector. This vector can then be used to amplify or suppress the target behavior.
The paper also discusses the application of these SAS vectors during inference, where they are added to the model's sparse activations, with a correction term to mitigate SAE reconstruction loss.
Datasets
The experiments were conducted using Gemma 2 models (2B and 9B), specifically the instruction-tuned versions. The paper leverages pre-trained JumpReLU Sparse Autoencoders (SAEs) from the Gemma Scope. For evaluating behaviors, the authors used datasets from prior work (e.g., Panickssery et al., 2023) which consist of multiple-choice questions designed to elicit specific behaviors.
Key Insights and Ideas
- Sparse Spaces for Interpretability: The paper strongly advocates for sparse representations as a more interpretable alternative to dense spaces for behavior steering. The disentangled nature of features in sparse spaces allows for easier identification and manipulation of behavior-specific dimensions.
- Compositionality in Sparse Spaces: SAS vectors enable modular control, meaning different behaviors can be steered simultaneously by combining SAS vectors. This is a significant advantage over dense methods where feature entanglement makes such composition difficult.
- Scaling for Monosemanticity: Increasing the size (width) of SAEs leads to sparser SAS vectors, moving towards ideal "monosemanticity" (where each feature corresponds to a single concept). This suggests that larger, more expressive sparse representations are key to achieving precise control.
- SAS vs. Dense Steering: SAS demonstrates comparable steering performance to dense methods like CAA, but with better interpretability and modularity.
Key Results
- Comparable Performance: SAS vectors enable steering on par with dense counterparts (e.g., CAA) across various behaviors.
- Improved Interpretability: SAS vectors offer advantages in understanding and composing features, facilitating more precise control.
- Enhanced Compositionality: The paper demonstrates that SAS allows for the modular combination of steering vectors for different behaviors, enabling complex interventions.
- Scaling Benefits: Increasing SAE width leads to sparser SAS vectors, indicating a trend towards monosemanticity and improved steering precision.
- Standard Benchmark Performance: SAS steering does not degrade standard benchmark performance and can even improve factual accuracy on tasks like TruthfulQA.
Limitations and Future Work
- SAE Dependence: The effectiveness of SAS is dependent on the quality of the pre-trained SAEs. While the paper uses readily available Gemma Scope SAEs, the performance might vary with different SAEs or models.
- Compositionality Benchmark: The paper acknowledges the need for a systematic benchmark to evaluate feature compositionality more broadly.
- Unsupervised vs. Supervised Feature Identification: While the paper demonstrates scaling with supervised data, further research is needed to systematically compare supervised and unsupervised approaches for feature identification in sparse representations.
- Broader Model Support: The current work focuses on Gemma and Llama models. Extending SAS to a wider range of models and architectures would be valuable.
- Transcoder Exploration: The paper briefly explores transcoders as an alternative to SAEs, suggesting this as a promising direction for future work.
Summary updated