Fair Bayesian Model-Based Clustering

Jihu Lee, Kunwoong Kim, Yongdai Kim · DOI

Abstract

Fair Bayesian Clustering (FBC) is a novel framework that introduces group fairness into Bayesian mixture models. Unlike traditional fair clustering methods that require pre-specifying the number of clusters ($K$) and a distance metric, FBC automatically infers the optimal $K$ and accommodates diverse data types, including categorical data. By employing a novel fair prior based on matching maps, FBC ensures demographic balance across sensitive attributes while maintaining high clustering utility.

Introduction

Clustering is a fundamental unsupervised learning tool used to uncover latent patterns in data. However, standard clustering algorithms can inadvertently perpetuate or amplify societal biases. "Fair clustering" aims to mitigate this by ensuring that the resulting clusters are balanced with respect to sensitive attributes such as race, gender, or marital status.

Most existing fair clustering techniques are extensions of the $K$-means algorithm. This approach faces two significant limitations: the requirement to pre-define the number of clusters ($K$) and a reliance on Euclidean distance, which is often unsuitable for categorical data. FBC addresses these challenges by shifting from a rigid geometric framework to a flexible probabilistic one, treating the number of clusters as a latent variable to be learned.

Methods

The core of FBC is the Fair Prior, which builds fairness directly into the model's structural assumptions. Instead of treating data point assignments as independent, FBC utilizes a joint distribution that encourages "matching."

Matching Maps and Energy-Based Priors

The framework posits that for every individual in a "privileged" group, there should be a corresponding individual in the "underprivileged" group assigned to the same cluster. To ensure that these matches are physically meaningful, FBC uses an energy function that favors matching points that are close in the feature space.

Flexible Fairness and Inference

Recognizing that perfect fairness may sometimes be overly restrictive, FBC introduces a masking parameter ($m$) to tune the trade-off between strict demographic parity and clustering utility. Inference is performed using an efficient Markov Chain Monte Carlo (MCMC) algorithm, which samples from the posterior distribution to identify the most probable fair clusterings and the optimal number of clusters.

Experimental Setup

The authors evaluated FBC on a variety of benchmarks:

  • Synthetic Dataset: A 2D Gaussian mixture designed to visualize cluster boundary shifts under fairness constraints.
  • DIABETES: Health data on Pima Indian women, with binarized age as the sensitive attribute.
  • ADULT: U.S. Census data, using gender as the sensitive attribute.
  • BANK: Marketing data, using marital status as the sensitive attribute.
  • Categorized BANK: A binarized version of the Bank dataset to test performance on purely categorical data.

Results and Discussion

A key insight from the study is that enforcing fairness can fundamentally change the "optimal" structure of the data. On synthetic data, a fairness-agnostic Mixture of Finite Mixtures (MFM) model identifies six clusters, whereas FBC consolidates these into three larger, balanced clusters.

Comparison of standard MFM and FBC on synthetic data, showing cluster consolidation for fairness.

FBC's likelihood-agnostic nature allows it to handle various data types. On the categorized BANK dataset, FBC improved the fairness balance from 0.200 (fairness-agnostic) to 0.640, demonstrating its strength in scenarios where $K$-means-based methods typically struggle.

Key Results

In comparative evaluations against state-of-the-art methods like SFC and VFC, FBC consistently demonstrated superior performance in minimizing fairness violations ($\Delta$).

Performance comparison of FBC against state-of-the-art fair clustering methods across three real-world datasets.

As shown in the table above, FBC achieves the lowest fairness violation across all three real-world datasets while maintaining competitive clustering costs. The MCMC algorithm also showed robust convergence, with posterior distributions for $K$ concentrating on sensible values (e.g., $K=3$ for the ADULT dataset).

Conclusion and Future Work

FBC provides a robust, probabilistic framework for fair clustering that overcomes the limitations of fixed-$K$ geometric methods. While highly effective, the authors note that out-of-sample inference remains a challenge, as assigning new data points while maintaining matching constraints is non-trivial. Additionally, the computational intensity of MCMC-based inference presents a scaling challenge for massive datasets. Future work will focus on developing parametric approximations for faster inference and better handling of out-of-sample data.

Summary updated

BibTeX
@misc{lee2025fair,
  author = {Jihu Lee and Kunwoong Kim and Yongdai Kim},
  title = {{Fair Bayesian Model-Based Clustering}},
  year = {2025},
  eprint = {2506.12839},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.12839},
}
Figure