Table of Contents
Fetching ...

Relative Bias: A Comparative Framework for Quantifying Bias in LLMs

Alireza Arbabi, Florian Kerschbaum

TL;DR

Bias in LLMs is hard to quantify due to context dependence and rapid model development. The authors propose Relative Bias, a comparative framework that measures a target model's deviation from baselines within a domain using Embedding Transformation and LLM-as-a-Judge. They formalize equivalence testing via Two One-Sided Tests (TOST) to decide practical significance and validate on case studies including DeepSeek R1 and Meta/Llama 4, showing alignment between methods and deployment-induced biases. The framework enables scalable, black-box bias auditing and can inform bias mitigation during model deployment.

Abstract

The growing deployment of large language models (LLMs) has amplified concerns regarding their inherent biases, raising critical questions about their fairness, safety, and societal impact. However, quantifying LLM bias remains a fundamental challenge, complicated by the ambiguity of what "bias" entails. This challenge grows as new models emerge rapidly and gain widespread use, while introducing potential biases that have not been systematically assessed. In this paper, we propose the Relative Bias framework, a method designed to assess how an LLM's behavior deviates from other LLMs within a specified target domain. We introduce two complementary methodologies: (1) Embedding Transformation analysis, which captures relative bias patterns through sentence representations over the embedding space, and (2) LLM-as-a-Judge, which employs a language model to evaluate outputs comparatively. Applying our framework to several case studies on bias and alignment scenarios following by statistical tests for validation, we find strong alignment between the two scoring methods, offering a systematic, scalable, and statistically grounded approach for comparative bias analysis in LLMs.

Relative Bias: A Comparative Framework for Quantifying Bias in LLMs

TL;DR

Bias in LLMs is hard to quantify due to context dependence and rapid model development. The authors propose Relative Bias, a comparative framework that measures a target model's deviation from baselines within a domain using Embedding Transformation and LLM-as-a-Judge. They formalize equivalence testing via Two One-Sided Tests (TOST) to decide practical significance and validate on case studies including DeepSeek R1 and Meta/Llama 4, showing alignment between methods and deployment-induced biases. The framework enables scalable, black-box bias auditing and can inform bias mitigation during model deployment.

Abstract

The growing deployment of large language models (LLMs) has amplified concerns regarding their inherent biases, raising critical questions about their fairness, safety, and societal impact. However, quantifying LLM bias remains a fundamental challenge, complicated by the ambiguity of what "bias" entails. This challenge grows as new models emerge rapidly and gain widespread use, while introducing potential biases that have not been systematically assessed. In this paper, we propose the Relative Bias framework, a method designed to assess how an LLM's behavior deviates from other LLMs within a specified target domain. We introduce two complementary methodologies: (1) Embedding Transformation analysis, which captures relative bias patterns through sentence representations over the embedding space, and (2) LLM-as-a-Judge, which employs a language model to evaluate outputs comparatively. Applying our framework to several case studies on bias and alignment scenarios following by statistical tests for validation, we find strong alignment between the two scoring methods, offering a systematic, scalable, and statistically grounded approach for comparative bias analysis in LLMs.

Paper Structure

This paper contains 32 sections, 5 equations, 21 figures, 1 table.

Figures (21)

  • Figure 1: Mean embedding-based bias scores (cosine distance) for each model across five selected sensitive categories in three different domains related to: (a) China, (b) United States, and (c) Meta. Higher scores indicate greater deviation from the baseline model consensus, suggesting increased alignment, avoidance, or biased behavior of the model.
  • Figure 2: Mean bias scores as judged by Gemini 2.0 Flash for each model’s responses across five selected sensitive categories in three different domains related to: (a) China, (b) United States, and (c) Meta. Scores range from 1 (neutral or direct) to 10 (strongly biased, evasive, or censored). The judging results of the GPT-4o as the judger were almost the same, depicted in Figure \ref{['fig:GPT_bias_scores_mean_category']} in Appendix.
  • Figure 3: Mean bias scores as judged by GPT-4o for each model’s response across five selected sensitive categories on the Figure \ref{['fig:embedding_bias_scores']} and \ref{['fig:llm_bias_scores']} in three different domains related to: (a) China, (b) United States, and (c) Meta. Scores range from 1 (neutral or direct) to 10 (strongly biased, evasive, or censored). The conclusions on relative bias of target models in all embedding-based results (Figure \ref{['fig:embedding_bias_scores']}) and LLM-as-a-judge ones with Gemini (Figure \ref{['fig:llm_bias_scores']}) and GPT-4o are the same.
  • Figure 4: Box and violin plots of the embedding-based scores for Case Study 1: China-sensitive topics.
  • Figure 5: Box and violin plots of the LLM-as-a-Judge scores by Gemini 2.0 Flash for Case Study 1: China-sensitive topics.
  • ...and 16 more figures

Theorems & Definitions (2)

  • Definition 1
  • Definition 2