Abstract
A common distinction in fair machine learning, in particular in fair classification, is between group fairness and individual fairness. In the context of clustering, group fairness has been studied extensively in recent years; however, individual fairness for clustering has hardly been explored. In this paper, we propose a natural notion of individual fairness for clustering. Our notion asks that every data point, on average, is closer to the points in its own cluster than to the points in any other cluster. We study several questions related to our proposed notion of individual fairness. On the negative side, we show that deciding whether a given data set allows for such an individually fair clustering in general is NP-hard. On the positive side, for the special case of a data set lying on the real line, we propose an efficient dynamic programming approach to find an individually fair clustering. For general data sets, we investigate heuristics aimed at minimizing the number of individual fairness violations and compare them to standard clustering approaches on real data sets.
Introduction
Most research into "fair" machine learning focuses on group fairness—ensuring that different demographic groups (e.g., based on race or gender) receive similar statistical outcomes. In clustering, this usually means ensuring clusters have proportional representation from different groups. However, group fairness offers no guarantees to the individual. A woman might be placed in a cluster that represents her demographic group perfectly but represents her personal data poorly.
This paper tackles individual fairness: the idea that every single data point deserves to be "well-represented" by its assigned group. The authors propose that a fair assignment is one where an individual feels they "belong" more to their own cluster than to any other, based on average similarity. This notion is closely related to "clustering stability": if a clustering is fair, no individual point has an "incentive" to move to another cluster to improve its average representation.
Methods and Complexity
The authors define an individually fair clustering as follows: for every point $x$, the average distance to other points in its own cluster must be less than or equal to the average distance to points in any other cluster.
The paper explores this notion through three lenses:
- Computational Complexity: They prove that simply deciding if an individually fair $k$-clustering exists for a given dataset is NP-hard, even for just two clusters ($k=2$) and even when the distance function is a proper metric.
- The 1D Euclidean Case: They show that for data on a real line (1D), a fair clustering with contiguous clusters always exists.
- Heuristics for General Data: Since the general problem is NP-hard, they investigate how standard algorithms ($k$-means, spectral clustering, linkage clustering) perform and propose a greedy pruning heuristic for hierarchical linkage clustering to minimize fairness violations.
The 1D Euclidean Case
On the real line, fairness and contiguity go hand-in-hand. This makes the problem tractable and suggests that individual fairness is a very natural goal for tasks like "grading on a curve" or credit scoring. The authors develop a Dynamic Programming (DP) algorithm that finds the optimal fair clustering (relative to target cluster sizes) in $O(n^3k)$ time.
Empirical Evaluation
The authors evaluated their approaches on several standard UCI Machine Learning Repository datasets, including German Credit Data, the Adult Dataset, the Drug Consumption Dataset, and the Indian Liver Patient Dataset.
Key Results
- 1D Success: The DP approach consistently found clusterings with zero fairness violations (# Unf = 0) and a Maximum Violation index (MVi) $\le 1$.
- The $k$-means++ Surprise: One of the most interesting findings is that $k$-means++—an algorithm designed solely to minimize squared distances—produces clusterings that are remarkably fair. In higher dimensions, $k$-means++ produced clusterings where typically fewer than 10% of points were "unfairly" treated, significantly outperforming $k$-center and standard linkage methods.
- Heuristic Improvement: The proposed greedy pruning for linkage clustering successfully reduced the number of unfair points (e.g., from ~400 down to ~100 in some Adult dataset tests), though this came at the cost of higher overall clustering error.
Conclusion and Future Work
While the proposed notion of individual fairness is intuitive, its general computation is NP-hard. Empirical results show that standard algorithms like $k$-means++ perform surprisingly well, though there is currently no theoretical proof explaining why. Future work should focus on "approximate individual fairness"—relaxing the requirement so that the average distance to one's own cluster only needs to be within a factor $(1+\gamma)$ of the distance to other clusters—and establishing theoretical guarantees for existing heuristics.
Summary updated