A General Anchor-Based Framework for Scalable Fair Clustering

Shengfei Wei, Suyuan Liu, Jun Wang, Ke Liang, Miaomiao Li, Lei LuoarXiv 2025 · DOI

Introduction

Clustering is a cornerstone of unsupervised learning, yet it frequently inherits or exacerbates demographic biases present in raw data. "Fair clustering" aims to mitigate this by ensuring each cluster maintains a proportional representation of sensitive groups (e.g., gender or race). However, state-of-the-art fair clustering algorithms often suffer from quadratic ($O(n^2)$) or cubic ($O(n^3)$) computational complexity, creating a "scalability wall" that prevents their application to modern, million-scale datasets.

This paper introduces the Anchor-based Fair Clustering Framework (AFCF), a plug-and-play solution that reduces the complexity of any fair clustering algorithm to linear time ($O(n)$) without sacrificing demographic parity.

The AFCF Framework

The core philosophy of AFCF is to offload the heavy computational burden of fair clustering to a small, representative subset of the data called "fair anchors." The framework operates in four distinct stages:

  1. Fair Anchor Generation (FDAS): Using a novel "Fair Directly Alternate Sampling" method, the framework selects anchors that are both spatially representative and demographically balanced.
  2. Anchor Fair Clustering: A chosen fair clustering algorithm is applied to the small set of anchors ($m$). Since $m \ll n$, even computationally expensive algorithms run almost instantaneously.
  3. Fair Anchor Graph Construction: The authors formulate an optimization problem to link all $n$ points to the $m$ anchors. A unique group-label joint constraint is introduced to ensure that the fairness properties of the anchors are mathematically preserved when propagated to the full dataset.
  4. Label Propagation: Labels are diffused from anchors to the rest of the dataset via efficient matrix multiplication.
Figure 1: Overview of the AFCF framework, illustrating the four stages from anchor generation to label propagation.

The optimization in the third stage is solved using the Alternating Direction Method of Multipliers (ADMM), ensuring the entire process remains efficient and scalable.

Experimental Evaluation

The framework was tested on five benchmarks, including the massive Census II dataset (2.4M samples). Key findings include:

  • Linear Scalability: AFCF allows algorithms like Fair Spectral Clustering (SpFC) to process 2.4 million points in roughly 731 seconds, whereas the original algorithm fails to complete within 30 minutes.
  • Fairness Preservation: The "Balance" metric—measuring demographic proportions—remained high across all datasets, often matching the performance of much slower standalone algorithms.
  • Robustness: Ablation studies confirmed that the specific fair anchor selection (FDAS) is critical; using random anchors leads to a significant drop in clustering quality (NMI).

Hyperparameter Sensitivity

While AFCF provides massive speedups, it introduces new hyperparameters, most notably the number of anchors ($m$). As shown in the sensitivity analysis, the choice of $m$ can influence both the Normalized Mutual Information (NMI) and the Balance of the final clusters.

Figure 4: Sensitivity analysis of NMI and Balance across different numbers of anchors (m) for the Law School and Bank datasets.

On datasets like Law School, NMI and Balance show fluctuations as $m$ increases, suggesting that while the framework is robust, the anchor volume must be tuned to capture the underlying data distribution effectively.

Conclusion

AFCF provides a practical path for deploying fair clustering at scale. By shifting the computational bottleneck from the clustering algorithm to a linear-time graph construction process, it makes algorithmic fairness feasible for big data applications. Future work may extend this anchor-based logic to multi-view and deep learning contexts.

Summary updated

BibTeX
@misc{wei2025general,
  author = {Shengfei Wei and Suyuan Liu and Jun Wang and Ke Liang and Miaomiao Li and Lei Luo},
  title = {{A General Anchor-Based Framework for Scalable Fair Clustering}},
  year = {2025},
  eprint = {2511.09889},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.09889},
}
Figure