TL;DR
This paper introduces "steering vectors" as a computationally efficient and interpretable method to mitigate social biases in Large Language Models (LLMs). By identifying specific directions in the model's internal representations that correlate with biases, these vectors can be applied during inference to steer the model towards fairer outputs, achieving significant bias reduction with minimal impact on overall performance.
What Problem Does This Paper Address?
Large Language Models (LLMs) have become increasingly prevalent, but they often exhibit social biases, leading to harmful stereotypes and reinforcing societal inequalities. While various methods exist to combat these biases, they can be computationally expensive (like fine-tuning or RLHF), lack reliability (like prompt engineering), or are difficult to interpret. This paper addresses the need for a method that is effective, robust, interpretable, and computationally efficient for bias mitigation in LLMs.
Methods
The core of the proposed method is activation engineering, specifically using steering vectors. The authors adapt the Linear Artificial Tomography (LAT) approach. For each social bias axis (e.g., gender, race), they construct a dataset of contrastive prompts. For instance, one prompt might reinforce a stereotype, while its counterpart actively counters it. By analyzing the differences in the model's internal activations (hidden states) between these contrastive prompts, they identify a direction in the activation space that represents the bias. The steering vector is then derived as the first principal component of these activation differences.
To apply this, the computed steering vector is added to the model's hidden state at a specific layer during inference. The authors systematically investigate which layer is most effective for intervention and determine the optimal "coefficient" (scalar multiplier) for the steering vector to balance bias mitigation with overall model performance.
Datasets
The primary dataset used for training and validation of the steering vectors is the Bias Benchmark for QA (BBQ). This dataset is chosen for its diverse coverage of nine bias axes and its large scale. For evaluation, the authors use:
- BBQ test set: To assess performance on the same bias axes used for training.
- StereoSet: A dataset measuring stereotypical bias through sentence completion and likelihood tasks, focusing on race, religion, and gender.
- CLEAR-Bias: A dataset designed to measure adversarial robustness against bias using jailbreak prompts, covering six social axes.
- MMLU (Massive Multitask Language Understanding): Used as a proxy to measure general model performance and assess the collateral impact of bias mitigation methods.
Key Insights and Ideas
- Steering vectors offer a "plug-and-play" solution: They can be applied at inference time without modifying the model's weights, making them highly practical and computationally efficient.
- Layer matters: The effectiveness of steering vectors is highly dependent on the specific layer within the LLM where the intervention is applied. The authors found that layers 13 and 14 were particularly effective for linear separability of bias concepts.
- Coefficient tuning is crucial: Simply applying a steering vector isn't enough; the strength (coefficient) needs to be carefully tuned to maximize bias reduction without significantly degrading the model's general capabilities.
- Generalizability: Steering vectors trained on one dataset (BBQ) show promising results on other bias datasets (CLEAR-Bias, StereoSet), suggesting their robustness and practicality beyond the training conditions.
Key Results
The steering vectors, when optimized on the BBQ dataset, achieved:
- Average improvements of 12.8% on BBQ, 8.3% on CLEAR-Bias, and 1% on StereoSet compared to the baseline.
- They consistently outperformed prompting and Self-Debias across most evaluations.
- They showed improvements over fine-tuning in 12 out of 17 evaluations.
- Steering vectors had the lowest impact on MMLU scores among the tested bias mitigation methods, indicating minimal degradation of general model performance. Specifically, they reduced MMLU performance by only 3.9%, compared to fine-tuning's 23.4% drop.
Limitations and Future Work
Limitations: * The experiments were conducted on a 7B parameter model (Mistral 7B Instruct). The authors acknowledge that larger models might exhibit emergent abilities related to bias that were not captured. * MMLU might not fully capture all aspects of language understanding and reasoning, suggesting the need for additional benchmarks.
Future Work: * Contrastive Datasets: Exploring alternative contrastive prompt setups could yield different findings. * Multi-dimensional Steering: Investigating the combination or orthogonalization of bias vectors across multiple social dimensions (e.g., gender and race) to uncover subtler bias interactions. * Adaptive Coefficient Selection: Developing automated strategies to dynamically adjust steering strength per input for real-time optimization of the bias vs. performance trade-off. * Broader Safety Applications: Applying steering vectors to other harmful behaviors like toxicity or misinformation and assessing their real-world impact.
Summary updated