Abstract: We present a scalable algorithm for the individually fair ($p$, $k$)-clustering problem. Given $n$ points $P$ in a metric space, let $\delta(x)$ for $x\in P$ be the radius of the smallest ball around $x$ containing at least $n / k$ points. A clustering is called individually fair if it has centers within distance $\delta(x)$ of $x$ for each $x\in P$. We design the first fast local-search algorithm, LSPP, that runs in $O(nk^2)$ time and obtains a bicriteria $(O(1), 6)$ approximation. Empirically, our algorithm is much faster than prior work and produces lower-cost solutions.
The Challenge of Individual Fairness
Standard $k$-means clustering aims to minimize the total squared distance between points and their nearest centers. While effective for global optimization, this objective can neglect individual points, leaving them far from any cluster center. To address this, the concept of individual fairness was introduced: every point $x$ must have a center within a radius $\delta(x)$, where $\delta(x)$ is the distance to its $(n/k)$-th nearest neighbor. If centers were distributed uniformly, this is the expected distance to a center; individual fairness makes this a hard constraint.
While theoretically sound, previous algorithms for individually fair clustering were computationally prohibitive, often scaling at $O(n^4)$ or worse. This restricted their use to datasets with only a few thousand points, making them impractical for large-scale real-world applications.
LSPP: A Scalable Local-Search Approach
The authors introduce LSPP (Local Search with Post-Processing), a novel algorithm that achieves near-linear scaling in the number of points $n$. The efficiency of LSPP stems from three key innovations:
- Anchor Zones: Instead of checking every point's fairness constraint during every iteration, the algorithm identifies a set of "anchor points" and their surrounding "anchor zones." By ensuring at least one center remains in each zone, the algorithm provides a theoretical guarantee that all points satisfy the fairness criteria (within a small constant factor).
- Constrained Local Search++: The algorithm utilizes $D^2$-sampling to identify candidate centers and performs swaps only if they reduce the total cost without violating the anchor zone constraints.
- Fair Lloyd’s (F-Lloyd’s): A modified Lloyd's iteration that uses binary search to update center positions while strictly maintaining fairness boundaries.
Key Results and Performance
The authors evaluated LSPP against several state-of-the-art baselines, including ICML20 and NeurIPS21, across datasets ranging from common fairness benchmarks (Adult, Bank) to large-scale location data (Gowalla, Covertype).
As shown in the scaling plots for the Adult dataset, LSPP (green squares) maintains a significantly lower execution time compared to previous fair algorithms as the sample size increases. Notably, while being faster, it also achieves a lower $k$-means cost than other fair competitors, approaching the performance of "unfair" vanilla $k$-means.
The empirical results across all datasets confirm these findings. LSPP consistently provides the lowest $k$-means cost among fair algorithms while maintaining a competitive "bound ratio" (the factor by which the fairness radius $\delta(x)$ is relaxed).
On the Gowalla dataset (over 600,000 points), previous methods failed to complete within an hour for even small subsets, whereas LSPP processed the entire dataset in under two hours. This represents an order-of-magnitude improvement in scalability.
Conclusion
LSPP represents the first truly scalable solution for individually fair $k$-means clustering. By shifting from global constraint checking to a localized "anchor zone" strategy, the authors have bridged the gap between theoretical fairness and practical engineering requirements. Future work may explore further optimizations to reach $O(dnk)$ complexity, potentially enabling even larger-scale fair data analysis.
Summary updated