Fair Correlation Clustering in Forests

Katrin Casel, Tobias Friedrich, Martin Schirneck, Simon Wietheger

TL;DR

While standard correlation clustering is computationally trivial on forests, imposing disparate-impact fairness constraints transforms it into a problem with a surprisingly rich complexity landscape. The authors demonstrate that the hardness of Fair Correlation Clustering is driven by the distribution of the sensitive attribute rather than the strictness of the fairness constraint, pinpointing exact algorithmic boundaries and NP-hardness thresholds across tree topologies and color ratios.

What Problem Does This Paper Address?

In algorithmic fairness, a standard requirement for clustering is that sensitive attributes (e.g., race, gender) should be proportionally distributed across every cluster, mirroring their prevalence in the overall dataset. While this notion has been well-studied for centroid-based clustering (such as $k$-means and $k$-median), its application to Correlation Clustering—where the objective is to partition a graph to minimize disagreements between pairwise similarities and cluster co-membership—remains poorly understood.

Existing approximation algorithms for Fair Correlation Clustering either yield poor approximation guarantees or severely restrict the sensitive attribute’s distribution (often assuming only two groups in a strict $1:1$ ratio). To isolate what makes fairness so computationally difficult, the authors study graph classes where standard correlation clustering is trivially solvable in linear time: forests and trees.

Methods

The paper combines structural graph theory, dynamic programming, and complexity reductions:

  • Structural Equivalence to Edge-Cut Minimization: The authors prove that in forests (and more generally, bipartite graphs), optimal fair clusterings naturally break down into minimal fair cluster sizes $d = \sum_{i=1}^k c_i$. When all clusters have equal size, minimizing correlation clustering cost is mathematically equivalent to minimizing the number of inter-cluster cut edges.
  • Dynamic Programming (DP):
  • Small cluster sizes: For constant cluster sizes $d$ (e.g., color ratios like $1:2$), the authors develop a multi-phase DP that splits the tree into small components and merges them into fair clusters.
  • Small number of clusters: For skewed ratios where one group is a tiny minority (e.g., $1 : c$ where $c = \Omega(n)$, yielding a constant number of clusters $p$), they develop an algorithm that cuts the tree around the minority vertices and rearranges excess vertices.
  • Maximum Bipartite Matching: For $1:1$ color ratios on bipartite graphs, the problem reduces to maximum bipartite matching, solvable in almost-linear time using recent Laplacian/min-cost flow solvers.
  • Hardness Reductions: NP-hardness proofs are built via reductions from 3-Partition (constructing trees of bounded diameter or bounded maximum degree) and the Paint Shop Problem for Words (for paths).

Datasets

Not discussed in the paper. The work is purely theoretical and does not conduct experiments on synthetic or empirical benchmark datasets.

Key Insights and Ideas

  • Hardness comes from attribute distributions, not fairness strictness: A common intuition is that enforcing an exact demographic match in every cluster causes NP-hardness. The authors disprove this: relaxing the constraint to an interval $[p_i, q_i]$ around the target ratio does not remove NP-hardness. The true computational bottleneck is the underlying demographic ratio.
  • Tractability at the extremes: For trees, Fair Correlation Clustering is solvable in polynomial time when the target cluster size is constant ($c = O(1)$) and when the minority group is extremely small ($c = \Omega(n)$, meaning a constant number of clusters). Intractability lies in the intermediate zone.
  • Sharp topological phase transitions:
  • Diameter: Trees of diameter 2 and 3 can be solved in $O(n)$ time for arbitrary ratios, but diameter $\ge 4$ is NP-hard.
  • Degree: Forest of paths (degree 2) and trees with maximum degree $\ge 5$ with ratio $1:c$ are NP-hard.
  • A natural PTAS on forests: Because any valid clustering on a forest incurs limited intra-cluster penalties as cluster size $d$ grows, pairing trivial assignments for large $d$ with dynamic programming for small $d$ yields a Polynomial-Time Approximation Scheme (PTAS).

Key Results

  • Color Ratio $1:1$: Solvable in $O(n)$ time on forests and $O(m^{1+o(1)})$ time on bipartite graphs via maximum bipartite matching.
  • Small Cluster Size: An exact dynamic program runs in $O(n^{g(c_1,\dots,c_k)})$ time (specifically $O(n^6)$ for a $1:2$ ratio), yielding polynomial-time tractability when $\sum c_i = O(1)$.
  • Skewed Color Ratio ($1 : n/p - 1$): Solvable in $O(n^{f(p)})$ time, which is polynomial when the number of clusters $p$ is constant.
  • Dichotomy for Trees:
  • Diameter $\le 3$: Exactly solvable in $O(n)$ time for any color distribution.
  • Diameter $\ge 4$: Strongly NP-hard for color ratio $1:c$.
  • Path Graphs: NP-hard on a single path if there are $n/2$ colors with 2 vertices each.

Limitations and Future Work

  • Graph Class Restrictions: The positive algorithmic results are restricted to forests and bipartite graphs; extending exact or approximation techniques to general graphs remains open.
  • Open Complexity for Single Paths: While a single path with $n/2$ colors is NP-hard, the complexity of a single path with two colors in ratio $1:c$ remains an open problem (closely connected to the Necklace Splitting problem).
  • Parameterized Complexity (FPT vs. XP): The current algorithms parameterized by cluster size $d$ or cluster count $p$ are $\text{XP}$ algorithms ($O(n^{f(k)})$). It remains unknown whether Fair Correlation Clustering is Fixed-Parameter Tractable ($\text{FPT}$, running in $f(k) \cdot \text{poly}(n)$).

Summary updated

Abstract

The study of algorithmic fairness received growing attention recently. This stems from the awareness that bias in the input data for machine learning systems may result in discriminatory outputs. For clustering tasks, one of the most central notions of fairness is the formalization by Chierichetti, Kumar, Lattanzi, and Vassilvitskii [NeurIPS 2017]. A clustering is said to be fair, if each cluster has the same distribution of manifestations of a sensitive attribute as the whole input set. This is motivated by various applications where the objects to be clustered have sensitive attributes that should not be over- or underrepresented. Most research on this version of fair clustering has focused on centriod-based objectives. In contrast, we discuss the applicability of this fairness notion to Correlation Clustering. The existing literature on the resulting Fair Correlation Clustering problem either presents approximation algorithms with poor approximation guarantees or severely limits the possible distributions of the sensitive attribute (often only two manifestations with a 1:1 ratio are considered). Our goal is to understand if there is hope for better results in between these two extremes. To this end, we consider restricted graph classes which allow us to characterize the distributions of sensitive attributes for which this form of fairness is tractable from a complexity point of view. While existing work on Fair Correlation Clustering gives approximation algorithms, we focus on exact solutions and investigate whether there are efficiently solvable instances. The unfair version of Correlation Clustering is trivial on forests, but adding fairness creates a surprisingly rich picture of complexities. We give an overview of the distributions and types of forests where Fair Correlation Clustering turns from tractable to intractable. As the most surprising insight, we consider the fact that the cause of the hardness of Fair Correlation Clustering is not the strictness of the fairness condition. We lift most of our results to also hold for the relaxed version of the fairness condition. Instead, the source of hardness seems to be the distribution of the sensitive attribute. On the positive side, we identify some reasonable distributions that are indeed tractable. While this tractability is only shown for forests, it may open an avenue to design reasonable approximations for larger graph classes.
BibTeX
@inproceedings{casel2023fair,
  author = {Katrin Casel and Tobias Friedrich and Martin Schirneck and Simon Wietheger},
  title = {{Fair Correlation Clustering in Forests}},
  booktitle = {FORC},
  year = {2023},
  url = {https://openreview.net/forum?id=iGwpMGugFf},
}

Loading related content...

Figure