Abstract
Large language models (LLMs) have shown remarkable adaptability to diverse tasks, by leveraging context prompts containing instructions, or minimal input-output examples. However, recent work revealed they also exhibit label bias—an undesirable preference toward predicting certain answers over others. Still, detecting and measuring this bias reliably and at scale has remained relatively unexplored. In this study, we evaluate different approaches to quantifying label bias in a model’s predictions, conducting a comprehensive investigation across 279 classification tasks and ten LLMs. Our investigation reveals substantial label bias in models both before and after debiasing attempts, as well as highlights the importance of outcomes-based evaluation metrics, which were not previously used in this regard. We further propose a novel label bias calibration method tailored for few-shot prompting, which outperforms recent calibration approaches for both improving performance and mitigating label bias. Our results emphasize that label bias in the predictions of LLMs remains a barrier to their reliability.
Introduction
When evaluating Large Language Models (LLMs) on classification tasks, researchers typically rely on standard performance metrics like accuracy or F1-score. However, these metrics can mask a significant underlying flaw: label bias. Label bias refers to the model's inherent preference for certain labels (e.g., "Yes" over "No") regardless of the actual input content. For instance, a model might achieve high accuracy on a dataset simply because it predicts a majority class most of the time, rather than understanding the task logic.
This bias makes models unreliable when deployed in real-world scenarios where data distributions may shift. While calibration techniques exist to mitigate this, measuring the bias itself—rather than just the resulting accuracy—is crucial for developing truly robust systems. This paper investigates this phenomenon across 279 tasks and ten different LLMs, proposing new ways to measure and fix it.
Quantifying Label Bias
This study introduces two distinct metrics to measure label bias directly, moving beyond simple accuracy-based evaluation:
- BiasScore (Probabilistic): This metric quantifies how much the model's average predicted probability distribution deviates from a uniform distribution. A high BiasScore indicates that the model consistently assigns higher probabilities to specific labels across diverse inputs, regardless of their correctness.
- Relative Standard Deviation (RSD) of Class-wise Accuracy (Outcomes-based): This measures the disparity in performance across different classes. A high RSD suggests a functional bias where the model is significantly better at identifying one class than another, often because it over-predicts the former.
Mitigation: Leave-One-Out Calibration (LOOC)
Existing methods like Contextual Calibration (CC) often use "content-free" inputs (e.g., the string "N/A") to estimate bias. However, these methods struggle with modern instruction-tuned models, which may interpret "N/A" in unpredictable ways.
We propose Leave-One-Out Calibration (LOOC), a highly efficient method tailored for few-shot prompting. LOOC estimates bias by iterating through the $k$ examples provided in the prompt. For each example, the model predicts the label using the remaining $k-1$ examples as context. This provides a realistic, task-specific estimate of bias without requiring any additional held-out data or external strings. By adjusting the model's output probabilities based on this estimate, we can effectively "level the playing field" between labels.
Experimental Results
We evaluated ten LLMs (including Llama-2, Mistral, and Falcon) across 279 classification tasks from the SUPER-NATURALINSTRUCTIONS benchmark, involving over 264,000 evaluation examples.
Key Insights
- The Instruction-Tuning Paradox: While instruction tuning improves accuracy and reduces performance disparity (RSD), it surprisingly increases the probabilistic BiasScore. Models become more confident in their biased distributions even as their top-1 predictions improve.
- Semantic Labels: Using abstract labels (e.g., "A/B") instead of semantic ones (e.g., "Yes/No") reduces but does not eliminate bias. Substantial bias persists even with neutral labels.
- LOOC Superiority: LOOC consistently outperformed previous methods like CC and Domain Calibration (DC). For Llama-2 models, LOOC significantly improved Macro-F1 scores while achieving the lowest bias levels. Notably, LOOC often matched the performance of more expensive fine-tuning methods like LoRA, providing a "free" performance boost.
Conclusion
Label bias remains a significant barrier to the reliability of LLMs. By moving beyond simple performance metrics and employing task-specific calibration methods like LOOC, we can better understand and mitigate these internal preferences. Our results emphasize that measuring bias directly is essential for the development of trustworthy AI systems. Future work should explore these patterns in larger frontier models and across multilingual contexts to ensure broad applicability.
Summary updated