Bias Detection via Maximum Subgroup Discrepancy

Jiri Nemecek, Mark Kozdoba, Illia Kryvoviaz, Tomás Pevný, Jakub Marecek

Introduction

Auditing AI systems for fairness is a critical step in ensuring ethical deployment. A primary challenge in this domain is detecting intersectional bias—discrimination against individuals with overlapping protected identities (e.g., "young Black women"). As the number of protected attributes increases, the number of potential intersectional subgroups grows exponentially, leading to the "curse of dimensionality."

Traditional statistical distances, such as Total Variation (TV) or Wasserstein distance, are often used to compare distributions for bias. However, these metrics suffer from exponential sample complexity, requiring an impractically large amount of data to provide accurate estimates in high-dimensional spaces. Furthermore, these metrics often lack interpretability; a single distance score does not identify which specific group is being disadvantaged.

The Maximum Subgroup Discrepancy (MSD) Framework

To address these challenges, this work introduces Maximum Subgroup Discrepancy (MSD). MSD defines the distance between two distributions as the maximum difference in probability weight across all possible subgroups. A subgroup is defined as a logical conjunction of protected attributes (e.g., Race="Black" AND Age<25).

Theoretical Advantages

A core contribution of this research is the mathematical proof that MSD possesses linear sample complexity—$O(d)$—relative to the number of protected attributes $d$. This is a significant departure from traditional metrics that require exponentially more data as dimensions increase.

Sample complexity comparison of various distance metrics.

Optimization via Mixed-Integer Programming

Rather than exhaustively enumerating billions of potential subgroups, the authors frame the search for the maximally discrepant subgroup as a binary classification problem. By utilizing Mixed-Integer Optimization (MIO), the algorithm can efficiently navigate the combinatorial search space to find the globally optimal logical conjunction. This approach not only ensures mathematical rigor but also provides built-in interpretability: the output is a human-readable rule describing the exact subgroup facing the greatest discrepancy.

Experimental Evaluation

The authors evaluated MSD using US Census data from the folktables library, focusing on two primary scenarios:

  1. Standard Prediction Tasks: Five datasets (e.g., ACSIncome, ACSEmployment) centered on California demographics.
  2. State-vs-State Comparisons: Comparing population distributions between pairs of US states (e.g., Hawaii vs. Maine) across 14 protected attributes. This setup involves over 5.7 billion possible subgroups, serving as a rigorous stress test for computational efficiency.

Results

Convergence and Efficiency

Empirical results confirm the theoretical advantages of MSD. The metric converges to its true value with significantly fewer samples than Total Variation or Wasserstein distances. In high-dimensional settings, traditional metrics often fail to provide stable estimates, whereas MSD remains robust.

Convergence of MSD compared to traditional statistical distances across multiple datasets.

Furthermore, the MIO-based solver demonstrated massive speedups. While a naive enumeration would take weeks to process the state-comparison datasets, the MIO approach typically found the optimal subgroup within a 10-minute window. The method also outperformed common heuristic rule-learners like Ripper and BRCG, which frequently became trapped in local optima.

Actionable Insights

Beyond numerical scores, MSD identified specific, disadvantaged subgroups in real-world data. For instance, in the ACSTravelTime task, the algorithm pinpointed "White female persons" as a significantly discrepant group. Such granular, rule-based outputs allow practitioners to move beyond detecting bias to actively diagnosing and mitigating it.

Conclusion

Maximum Subgroup Discrepancy offers a scalable, rigorous, and interpretable solution for intersectional fairness auditing. By bypassing the curse of dimensionality through linear sample complexity and leveraging MIO for efficient search, MSD provides a practical tool for identifying the most disadvantaged groups in complex, high-dimensional AI datasets.

Summary updated

BibTeX
@inproceedings{nemecek2025bias,
  author = {Jiri Nemecek and Mark Kozdoba and Illia Kryvoviaz and Tomás Pevný and Jakub Marecek},
  title = {{Bias Detection via Maximum Subgroup Discrepancy}},
  booktitle = {ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  year = {2025},
}
Figure