# The Fairness-Quality Tradeoff in Clustering

Dynamic programming traces the full fairness-cost Pareto front for fixed cluster centers

Hakim, Rashida, Stoica, Ana-Andreea, Papadimitriou, Christos H., Yannakakis, Mihalis · Advances in Neural Information Processing Systems · 2024-12-16

- **Problem** Fair clustering methods usually return one point on the trade-off, because they fix a fairness bound before the clustering is computed. A practitioner cannot see how much cost a stricter bound adds before choosing it.
- **Method** The authors group clusterings by their attribute counts per cluster, called patterns. A dynamic program keeps the cheapest assignment for each pattern, and then a sweep keeps only the undominated ones.
- **Results** The authors prove that Algorithm 1 recovers the exact Pareto front of the assignment problem for pattern-based objectives. With the centers fixed, the output is a (2+α, 1)-approximation of the clustering Pareto set.

## Why a single constrained solution hides the trade-off

Fairness in clustering is usually treated as a constraint, so the best clustering is computed subject to a fairness bound. Even the simplest fairness objectives can make the constrained problem NP-hard, so practical methods return approximate solutions. Each of these methods returns one point on the trade-off, not the whole curve.

A practitioner has to pick the fairness bound before seeing the results. Without knowing how much cost a stricter bound adds, the practitioner cannot judge whether a small loss in quality buys a large gain in fairness. The authors therefore target the entire set of undominated clusterings, so any trade-off point can be chosen.

## Key idea: counting attribute points per cluster

The key move is to stop treating each clustering as a separate object and to look at its pattern instead. A pattern records how many points of each attribute value fall in each cluster. Many clusterings share the same pattern, so the authors only need one good assignment per pattern.

A fairness objective is pattern-based when its value depends only on these counts. Balance and the proportional violation measures both meet this condition. The authors also require mergeability, which means that merging clusters never increases the objective.

## How the table is filled and the front extracted

The algorithm starts from an empty table and adds the data points one at a time. For each new point, it looks at every cluster that holds a point with the same attribute value, removes that point from the cluster, and reads the cost of the smaller pattern from the table. It then adds the distance from the new point to that cluster's center and keeps the cheapest option.

When the last point is placed, the table holds the cheapest assignment for every full pattern. The authors sort these assignments by cost and sweep through them, keeping one only if its unfairness is lower than every cheaper candidate seen so far. Those kept candidates form the Pareto front of the assignment problem.

The invariant behind correctness is that each entry stores the lowest-cost assignment of the first j points that has its pattern. The bound \\(O(knl(k-1))\\) follows from counting patterns, because the last cluster's tuple is fixed by the others. A slower variant that generates all patterns and solves each one with min-cost flow gives the same table.

## From fixed centers to chosen centers

The clustering problem also chooses the centers, so the authors first run a vanilla clustering algorithm to get them. In the experiments that vanilla method is k-means++, and Algorithm 1 is then applied to those centers. Because the centers are fixed at this point, the result is a front for the assignment problem.

The argument routes each point of an optimal clustering to the nearest of the chosen centers. The triangle inequality bounds the new cost by a factor of 2 + α, where α is the vanilla algorithm's approximation ratio. Mergeability then makes sure the fairness value of the routed assignment is no worse than before.

The result is a \\((2+\\alpha, 1)\\)-approximation of the clustering Pareto set, where the cost factor is 2 + α and the fairness factor is 1. Non-mergeable objectives need a workaround, in which the centers of empty clusters are moved to other centers' locations. The authors show that this extension keeps the same approximation ratio and the same running time.

## Is exponential time necessary?

For BALANCE and GROUP EGALITARIAN the front is polynomial in size. Their possible values are rational numbers built from integers below n, and there are only O(n²) such values. For the sum-type objectives the front can be exponential, so front size alone does not explain the running time.

The stronger argument is that, for several cost and fairness pairs, finding the cheapest assignment under a fairness bound is NP-hard. Unless P = NP, this means no polynomial algorithm can output the full front for those pairs. That argument rules out polynomial algorithms but leaves room for some exponential ones.

## A polynomial case: sum of imbalances

For two groups, the sum of imbalances adds up the absolute difference between the two group counts over the clusters. Because this value is an integer between 1 and n, the authors can check each possible value in turn. Each check reduces to a single minimum-cost perfect matching problem.

For a fixed value j, the graph contains the data points and j dummy nodes. An edge between two points from different groups costs the cheapest joint distance to a center, and an edge from a point to a dummy node costs its cheapest distance to a center. The minimum-cost perfect matching then gives the cheapest assignment whose fairness value is j, and the same idea covers MAX IMBALANCE.

The construction doesn't carry over to every ratio, because a target of 1:3 instead of 1:1 makes the problem NP-complete.

## Datasets and settings

The experiments use the Adult dataset, the Census dataset (Census1990 version) and the BlueBike trip history dataset. For BlueBike, the features are the start and end longitude and latitude of rides in one week of May 2016. Each dataset is sampled down to 1,000 points.

The authors use k = 2 clusters and self-reported gender as the sensitive attribute. Bounds are set as a δ deviation from the true proportions, with δ in \[0.005, 0.05\]. The vanilla clustering is k-means++, which has an approximation ratio of O(log(k)).

## Pareto fronts on the real datasets

The authors run Algorithm 1 for the k-means clustering objective and five fairness objectives on each dataset. With the centers fixed, the recovered curves are exact for the assignment problem and serve as approximations of the clustering problem's front. The summed objectives always show larger proportional violations than their min-max versions, because each violation is non-negative.

The clearest benefit appears for BALANCE on all three datasets. As clustering cost rises, the gain in BALANCE becomes negligible. So a practitioner who wants some fairness can give up a little balance and gain a lot in clustering quality.

## Faster approximation with repeated FCBC

FCBC is a linear-programming method that caps the clustering cost and optimizes fairness. The authors sweep the cost upper bound U to produce a front from repeated FCBC runs. For a point on the true front, FCBC guarantees cost within (2 + α) and fairness within an additive term η.

In the experiments, repeated FCBC recovers only a few points of the front. Sometimes it returns the vanilla clustering itself, and in other cases it returns assignments that are dominated. The authors attribute this inaccuracy to the additive fairness term.

FCBC also doesn't handle sum objectives such as GROUP UTILITARIAN-SUM and GROUP EGALITARIAN-SUM.

## Limitations

Running time stays exponential in k and l. The authors show that no polynomial algorithm can output the full front for some objective pairs unless P = NP. The method is agnostic to the objective but runs slower than methods tuned to one fairness objective.

Repeated FCBC has no theoretical bound on its additive error, and it doesn't cover sum objectives. The sensitive attributes are assumed disjoint, and overlapping attributes would need a new attribute per overlap with more running time. Individual fairness definitions that fix a single objective don't yield a Pareto front, so they fall outside this framework.

## Paper info

- **Authors**: Hakim, Rashida, Stoica, Ana-Andreea, Papadimitriou, Christos H., Yannakakis, Mihalis
- **Venue**: Advances in Neural Information Processing Systems · Published
- **First published**: 2024-12-16
- **Added**: 2026-11-27
- **DOI**: 10.52202/079017-3731
- **Original paper terms**: [Check in the original ↗](https://papers.nips.cc/paper_files/paper/2024/hash/d52ae52af3e3fcf1266fb1f282fd7206-Abstract-Conference.html)
- **What we show**: Paper info and commentary

[Original paper ↗](https://papers.nips.cc/paper_files/paper/2024/hash/d52ae52af3e3fcf1266fb1f282fd7206-Abstract-Conference.html)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Hakim, Rashida, Stoica, Ana-Andreea, Papadimitriou, Christos H., Yannakakis, Mihalis (2024). The Fairness-Quality Tradeoff in Clustering. Advances in Neural Information Processing Systems. https://doi.org/10.52202/079017-3731

**BibTeX**

```
@article{rashida2024fairness,
  title = {{The Fairness-Quality Tradeoff in Clustering}},
  author = {Hakim, Rashida and Stoica, Ana-Andreea and Papadimitriou, Christos H. and Yannakakis, Mihalis},
  year = {2024},
  journal = {Advances in Neural Information Processing Systems},
  doi = {10.52202/079017-3731},
  url = {https://papers.nips.cc/paper_files/paper/2024/hash/d52ae52af3e3fcf1266fb1f282fd7206-Abstract-Conference.html}
}
```

## Other paper commentary

- [Leveraging Drift to Improve Sample Complexity of Variance Exploding Diffusion Models](https://refivu.com/en/papers/c2bce1fc-0503-4cf4-87fe-755b8941c218-leveraging-drift-to-improve-sample-complexity-of-variance.md)
- [Controlled Collaboration Geometry for Personalized Federated Learning](https://refivu.com/en/papers/d9752b2d-2ba1-4123-980c-4eadc96a18ba-controlled-collaboration-geometry-for-personalized-federated.md)
- [DFly2: Turbocharging Long-Context Speculative Decoding by Sharing the Target's Sparsity](https://refivu.com/en/papers/6a7579c7-7927-43d6-bf9f-b00862767609-dfly2-turbocharging-long-context-speculative-decoding-by.md)
- [The Look-Elsewhere Effect in Searches for New Physics: from Classical Methods to Machine Learning](https://refivu.com/en/papers/40749a33-958c-4352-8394-19db350aef80-the-look-elsewhere-effect-in-searches-for-new.md)
- [The Linguistic Knowledge Benchmark: Do Language Models Know the Foundations of Early-Grade Literacy?](https://refivu.com/en/papers/3c97fd6f-2688-4eec-b41e-f073dfacc237-the-linguistic-knowledge-benchmark-do-language-models-know.md)
- [Routeability Before Routing: Routeability Audit Protocol (RAP) and RouteabilityBench for Audited LLM Model Selection](https://refivu.com/en/papers/4c399889-41eb-4f62-be6c-f53a3bf800e1-routeability-before-routing-routeability-audit-protocol-rap.md)
- [Solve Vision with Code: Coding Agents Are Stronger Visual Reasoners Than Video Models](https://refivu.com/en/papers/de30d3b4-655d-494a-8717-b748a20781d4-solve-vision-with-code-coding-agents-are-stronger.md)
- [A recipe for scalable attention-based ML potentials: unlocking long-range accuracy with all-to-all node attention](https://refivu.com/en/papers/9f6f183a-a0d8-4a21-8805-cbc01596c5f2-a-recipe-for-scalable-attention-based-ml-potentials.md)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/41090b99-f4c5-48aa-81e9-1eb4b3d37166-the-fairness-quality-tradeoff-in-clustering)
