Quantifying Fairness in LLMs Beyond Tokens: A Semantic and Statistical Perspective
Weijie Xu, Yiwen Wang, Chi Xue, Xiangkun Hu, Xi Fang, Guimin Dong, Chandan K. Reddy
TL;DR
FiSCo introduces a principled framework for evaluating fairness in long-form LLM outputs by moving beyond token-level or sentiment analysis to fine-grained claim-level semantics. It formalizes group counterfactual fairness, decomposes responses into semantic claims, and uses bidirectional entailment to compute a robust similarity metric. Inter- and intra-group similarities are statistically compared with Welch's t-test to detect significant biases while mitigating stochastic output variability. The approach is validated on a large, human-annotated long-form fairness dataset and demonstrates superior sensitivity to nuanced biases across gender, race, and age, offering a scalable tool for diagnosing and mitigating bias in real-world LLM deployments.
Abstract
Large Language Models (LLMs) often generate responses with inherent biases, undermining their reliability in real-world applications. Existing evaluation methods often overlook biases in long-form responses and the intrinsic variability of LLM outputs. To address these challenges, we propose FiSCo (Fine-grained Semantic Comparison), a novel statistical framework to evaluate group-level fairness in LLMs by detecting subtle semantic differences in long-form responses across demographic groups. Unlike prior work focusing on sentiment or token-level comparisons, FiSCo goes beyond surface-level analysis by operating at the claim level, leveraging entailment checks to assess the consistency of meaning across responses. We decompose model outputs into semantically distinct claims and apply statistical hypothesis testing to compare inter- and intra-group similarities, enabling robust detection of subtle biases. We formalize a new group counterfactual fairness definition and validate FiSCo on both synthetic and human-annotated datasets spanning gender, race, and age. Experiments show that FiSCo more reliably identifies nuanced biases while reducing the impact of stochastic LLM variability, outperforming various evaluation metrics.
