Abstract
Large Language Models (LLMs) frequently internalize and amplify societal biases present in their training data. This paper presents an unsupervised framework for activation steering that utilizes a Weighted Mean Difference (WMD) approach to extract internal concept vectors, such as gender or race. By identifying these representations within the model's latent space, the researchers demonstrate the ability to precisely mitigate stereotypical associations at inference time. The method effectively reduces bias across multiple benchmarks while preserving the model's core reasoning and instruction-following capabilities.
Introduction
The tendency of LLMs to pick up and amplify human biases is a significant hurdle for safe deployment. Traditional mitigation strategies, such as prompt engineering or fine-tuning, often act as "black-box" solutions that do not address the underlying internal representations of concepts like gender. Activation steering—nudging a model's internal mathematical states—offers a more direct approach but typically requires expensive human-labeled datasets and exhaustive searches for optimal intervention points. This research introduces a more efficient, unsupervised method to extract and apply "concept vectors" to control bias across diverse tasks.
Methodology
The proposed framework for activation steering is built upon three primary innovations:
- Weighted Mean Difference (WMD): Rather than relying on binary labels, this method uses the model’s own output probabilities to calculate a "disparity score." This score weights internal activations, prioritizing inputs where the model exhibits strong conceptual associations.
- Neutral Offsetting: To isolate specific concept vectors (e.g., gender), the authors calculate the average activation of "neutral" prompts as a baseline. Subtracting this "neutral origin" allows for more accurate identification of the concept's direction in high-dimensional space.
- Projection-Based Intervention: Instead of simple vector addition, the method employs a projection technique to "zero out" or steer components of the model's state. Using a steering coefficient ($\lambda$), the internal state can be nudged toward neutral representations.
Key Insights: Layer-wise Emergence and WMD Superiority
A critical finding of this research is that abstract concepts like gender are represented linearly within LLMs, allowing them to be treated as specific directions in the latent space. Furthermore, these representations are not uniform across the model; they typically emerge and become most steerable in the middle-to-late layers of the transformer blocks.
As shown in the layer-wise analysis, the WMD method consistently produces steering vectors that correlate more highly with actual model behavior than traditional Difference-in-Means (MD) methods. This suggests that using the model's internal disparity is a more effective way to capture the nuances of biased representations.
Results and Bias Mitigation
The application of the steering vector resulted in significant bias reduction across several models, including Qwen, Llama-3, and Mistral. For instance, in the Mistral-Nemo-12B model, the bias score (RMS of disparity) was reduced from 0.65 to 0.02.
By adjusting the steering coefficient $\lambda$, the researchers achieved precise control over model outputs. As illustrated above, at $\lambda = 0$, the model predicted "he," "she," and "they" with nearly equal probability in the Winogenerated task, effectively neutralizing pronoun bias. Importantly, the "gender vector" appears to be orthogonal to general knowledge, meaning bias can be mitigated without affecting performance on unrelated tasks like mathematics or formatting.
Conclusion and Future Work
While the WMD approach offers a powerful tool for bias control, it currently treats concepts like gender and race as one-dimensional spectrums, which oversimplifies their complex and intersectional nature. Future research will focus on developing "condition vectors" that can distinguish between scenarios where steering is appropriate and those where factual gender information is necessary for accuracy. Despite these limitations, the ability to perform unsupervised, precise, and non-destructive bias mitigation represents a significant step forward in LLM alignment.
Summary updated