Abstract
The question-answering (QA) capabilities of foundation models are highly sensitive to prompt variations, rendering their performance susceptible to superficial, non-meaning-altering changes. This vulnerability often stems from the model's preference or bias towards specific input characteristics, such as option position or superficial image features in multi-modal settings. We propose to rectify this bias directly in the model's internal representation. Our approach, SteerFair, finds the bias direction in the model's representation space and steers activation values away from it during inference. Specifically, we exploit the observation that bias often adheres to simple association rules, such as the spurious association between the first option and correctness likelihood. Next, we construct demonstrations of these rules from unlabeled samples and use them to identify the bias directions. We empirically show that SteerFair significantly reduces instruction-tuned model performance variance across prompt modifications on three benchmark tasks. Remarkably, our approach surpasses a supervised baseline with 100 labels by an average of 10.86% accuracy points and 12.95 score points and matches the performance with 500 labels.
Introduction
Foundation models, including Large Language Models (LLMs) and Vision-Language Models (VLMs), have demonstrated remarkable capabilities across diverse tasks. However, these models are notoriously "fickle." Their outputs can change drastically based on superficial modifications to a prompt, such as swapping the order of multiple-choice options or changing a "yes/no" prompt to "no/yes."
This instability usually stems from spurious associations learned during training. For example, a model might develop a "positional bias" where it is statistically more likely to predict that the first option is correct, regardless of the actual content. Existing solutions often require expensive human-labeled data to fine-tune the bias out or involve complex calibration steps that increase computational overhead. This paper introduces STEERFAIR, a method to mitigate these biases directly within the model's internal latent space without requiring any ground-truth labels.
The STEERFAIR Framework
STEERFAIR is an unsupervised inference-time intervention that identifies and removes bias signals from a model's activations. The process follows a five-step pipeline:
- Rule Enumeration: Researchers define simple, imitable rules that represent potential biases (e.g., "Always choose the first option" or "Always answer 'Yes'").
- Demonstration Construction: Using unlabeled samples, the system creates "pseudo-demonstrations" that mimic these biased behaviors. For instance, if the rule is "choose the first option," the model is fed a prompt that forces it to treat the first option as the target answer.
- Activation Collection: These demonstrations are processed by the model, and internal activations at the attention heads are recorded.
- Identifying Bias Directions: Principal Component Analysis (PCA) is applied to these activations. The first principal component (PC1) typically captures the direction in the high-dimensional space where the bias signal is strongest.
- Activation Steering: During actual inference, the identified bias direction is subtracted from the model's internal activations. By "nudging" the model's internal state away from its biased tendencies, the model is forced to rely more on the actual task content.
To handle multiple biases simultaneously (e.g., bias toward option A vs. option B), the method uses QR decomposition to aggregate directions into an orthonormal basis, ensuring the steering remains efficient and non-disruptive to the model's core reasoning functions.
Experimental Evaluation
The researchers evaluated STEERFAIR on three major benchmarks involving different question types:
- ScienceQA: A multiple-choice question (MCQ) dataset covering diverse scientific topics.
- MME Benchmark: A comprehensive evaluation for multimodal models using "yes/no" questions.
- Visual Genome Relation (VGR): A dataset focused on identifying relationships between objects in images, tested with "yes/no" and "no/yes" prompt variations.
Key Insights
The Simplicity of Bias
A striking finding of this research is that bias often adheres to simple rules that are easily captured in the model's latent space. The bias signal is frequently distinct enough from the task-related signal that it can be isolated using PCA. This suggests that the model's "knowledge" and its "prejudices" occupy different dimensions of the same representation space.
Unsupervised Superiority
Remarkably, STEERFAIR (which uses zero labels) outperformed a supervised baseline—Inference-Time Intervention (ITI)—that used 100 human labels. It matched the performance of ITI even when the latter was provided with 500 labels. This indicates that the model's own internal representations are a richer, more accessible source for debiasing than small, manually labeled datasets.
Generalizability and Orthogonality
Bias directions identified on one dataset (e.g., VGR) can often be transferred to improve performance on a different dataset (e.g., MME), provided the task type is similar. This implies that positional bias is a fundamental characteristic of the model's architecture or pre-training. Furthermore, directions for different biases (like "yes" vs. "no") are nearly orthogonal in latent space, allowing them to be addressed independently without interference.
Results and Impact
STEERFAIR significantly reduced performance variance across prompt modifications by an average of 10.86% accuracy points. Beyond consistency, the method also improved absolute accuracy. For example, on ScienceQA using the LLaVA (13B) model, STEERFAIR improved average accuracy from 64.28% to 65.46% while simultaneously reducing standard deviation. The method is also highly efficient, requiring as few as 300–1000 unlabeled samples to accurately identify a bias direction.
Conclusion and Future Work
While STEERFAIR is highly effective for enumerable biases like position or label preference, it currently requires researchers to pre-define the bias rules. Future work may focus on automatically discovering complex, non-enumerable biases, such as those related to social stereotypes or misinformation. Nonetheless, STEERFAIR demonstrates that internal latent space steering is a powerful, label-free tool for making foundation models more robust and reliable.
Summary updated