Diversity Maximization: Algorithms for Distant $k$-Subsets

Hamed Abdi, Ali Ahmadi, Shayan Chashm Jahan, MohammadTaghi Hajiaghayi, Javier MarinkovićNeurIPS 2026

TL;DR

Imagine trying to pick two distinct teams of $k$ people from a crowd of $n$ such that the two closest rivals from opposite teams are as far apart as possible. This paper tackles the Distant $k$-Subsets Problem (DKSP), delivering sharp, deterministic algorithms that hit the theoretical speed and accuracy limits for general metric spaces—while unlocking even better, leaner guarantees when your data lives in standard Euclidean space. It’s a clean tour through how clever geometric slicing and distance rounding can tame an NP-hard bottleneck.

What Problem Does This Paper Address?

In clustering, data summarization, and fairness-aware machine learning, we often want to maximize diversity—usually by picking $k$ items that are all mutually far apart. Here, the authors study a two-group cousin of this setup: given $n$ points in a metric space (any collection of items where distances obey the triangle inequality), find two non-overlapping subsets $S$ and $T$, each of size $k$, that maximize the minimum distance between any point in $S$ and any point in $T$.

This problem pops up as a core subroutine when building "composable coresets"—compact summaries of massive datasets that can be merged across distributed machines—and even made a cameo at the 2024 ICPC World Finals. Prior work by Mahabadi and Narayanan found a $(4/\epsilon)$-approximation when the total pool of points is sufficiently large ($n \ge 2k^{1+\epsilon} + k$). The open questions were natural: Can we tighten that approximation ratio? What happens when $n$ isn't polynomially larger than $k$, such as $n$ being just $5k$ or even $2k$? And where does the fundamental wall of NP-hardness actually sit?

Methods

The authors deploy three distinct algorithmic toolkits depending on the arena:

  • Discretized Metric & Threshold Graphs (General Metrics): Instead of dealing with messy continuous distances, the authors round scaled distances into integer steps $1, 2, \dots, m+1$, proving this preserves the triangle inequality. They pair this with a Threshold Graph (connecting points at least $\tau$ apart) to find a distance certificate: if an optimal solution exists, at least $2k$ points must have $k$ faraway neighbors. Adapting a neighborhood-growth argument from prior work, they iteratively build set $S$ by grabbing slowly expanding "shells" of points, while quarantining only a thin boundary layer so plenty of points remain available for $T$.
  • Geometric Slicing ($d$-Dimensional Euclidean Space): When points have actual coordinates in $\mathbb{R}^d$, we don't need huge $n$. One method brackets the point cloud with $d$ pairs of parallel hyperplanes—shaving off $k$ points on each outer face—and dices the remaining central box into a $c^d$ grid, using the pigeonhole principle to find a dense sub-cube. A second method uses orthogonal hyperplanes and two concentric balls to carve out separated orthants.
  • Connectivity & Subset-Sum (Exact Small-$n$): When $n = 2k$, every single point must be drafted. For a guessed threshold distance $x$, any two points closer than $x$ cannot be on opposite teams. Connecting close points forces connected components to stay together, turning the problem into a classic dynamic programming exercise (like subset-sum) to balance component sizes to $k$.

Datasets

Not discussed in the paper. (This is a purely theoretical computer science paper proving worst-case mathematical guarantees rather than benchmarking empirically.)

Key Insights and Ideas

  • Approximation Ratios Snap to Integers: By rounding metrics into discrete integer bands and running a careful one-sided binary search, any polynomial-time $\alpha$-approximation algorithm for general metrics can be automatically upgraded into a $\lfloor \alpha \rfloor$-approximation. For example, a $2.99$-approximation immediately implies a $2$-approximation!
  • A Strange Complexity Phase Transition: When $n = 2k$, you can solve DKSP exactly in polynomial time ($O(n^2 \log n)$). Yet, allow leftover points in general metrics, and getting an approximation ratio of $1.999$ becomes NP-hard (via a reduction from the $k$-Biclique problem, since an algorithm achieving $<2$ would collapse down to $\lfloor \alpha \rfloor = 1$, an exact solver).
  • Geometry Rescues Sample Size: In general metrics, getting a constant-factor guarantee requires a massive pool of points ($n$ superlinear in $k$, like $k^2$). In Euclidean space $\mathbb{R}^d$, coordinate structure lets you get close to the optimal factor of $2$ with $n$ merely linear in $k$.

Key Results

Summary of approximation guarantees and exact runtimes across general and Euclidean metrics.

Table 1: Summary of approximation guarantees for DKSP.
  • Optimal General Metric Bound: Improved the $(4/\epsilon)$-approximation to a deterministic $(1 + \lceil 1/\epsilon \rceil)$-approximation for $n \ge 2k^{1+\epsilon} + k$. At $\epsilon = 1$ ($n \ge 2k^2 + k$), this yields a 2-approximation, matching their $(2 - \eta)$ NP-hardness lower bound.
  • Runtime vs. Dataset Size Trade-off: By seeding the general algorithm with enumerated subsets of size $c$, the size requirement drops to $n \ge \frac{2k^{1+\epsilon}}{c^\epsilon} + k$ at the cost of $O(n^{c+2}\log n)$ runtime:
Trade-off between seed size c, approximation factor, and runtime for k=100, n=1000.
  • Euclidean Wins: Achieved a $(2 + \sqrt{d}/c)$-approximation for $n \ge (2d + c^d)k$, and a parameter-free $(2 + \sqrt{2})$-approximation for $n \ge 3 \cdot 2^{d-1}k$. On a 2D plane ($d=2$), just $n \ge 5k$ points suffice for a $(2+\sqrt{2}) \approx 3.41$-approximation.
  • Exact Solvers: Solved $n = 2k$ exactly in $O(n^2 \log n)$ time, and $n = 2k + c$ in $O(n^{c+2} \log n)$ time.

Limitations and Future Work

  • General Metrics Hunger for Data: When $n$ is only a small multiple of $k$ (e.g., $n = Ck$), the general-metric algorithm degrades to a $\Theta(\log k)$-approximation for $C > 3$, and offers no guarantee at all for $C \le 3$ without paying exponential runtime in $c$.
  • Curse of Dimensionality in $\mathbb{R}^d$: While linear in $k$, the Euclidean point-set size requirements ($c^d k$ and $3 \cdot 2^{d-1} k$) grow exponentially with the dimension $d$.
  • Theory Only: There is no empirical evaluation yet to test how these worst-case combinatorial and geometric bounds behave on real-world, noisy datasets.

Summary updated

Abstract

Diversity maximization is a fundamental problem in combinatorial optimization with applications in fairness-aware machine learning, clustering, and data summarization, and has attracted significant attention in theoretical computer science. We study the Distant $k$-Subsets Problem (DKSP): given a metric space $(X,d)$ with $|X|=n$ and an integer $k$, find two disjoint subsets $S,T\subseteq X$, each of size $k$, maximizing $\min_{s\in S,\; t\in T} d(s,t)$. This problem arises as a subroutine in composable coresets for remote-pseudoforest diversity maximization. It also appears in practice: a variation was featured in the ICPC World Finals 2024. Mahabadi and Narayanan gave a $(4/\epsilon)$-approximation for this subproblem when $n \ge 2k^{1+\epsilon}+k$ and $0<\epsilon\leq1$. For any $\epsilon>0$, we present a deterministic combinatorial algorithm achieving a $\left(1+\left\lceil 1/\epsilon\right\rceil\right)$-approximation under the same size condition. In particular, for $\epsilon=1$, this yields a $2$-approximation when $n \ge 2k^2+k$; the factor $2$ is optimal for general metrics unless $P=NP$. More generally, any polynomial-time $(2-\eta)$-approximation for constant $\eta>0$ would imply a polynomial-time algorithm for the $k$-Biclique problem, even though DKSP is polynomial-time solvable when $n=2k$. For $d$-dimensional Euclidean metrics, we obtain improved guarantees: a $(2+\sqrt{2})$-approximation when $n \ge 3\cdot 2^{d-1}k$, and a $(2+\sqrt{d}/c)$-approximation when $n \ge (2d+c^d)k$. In particular, for $d=2$ and $c=1$, this gives a $(2+\sqrt{2})$-approximation when $n\ge 5k$. For fixed $d$, increasing the constant $c$ makes the ratio arbitrarily close to $2$, while the size requirement remains linear in $k$ with a constant that grows with $c$.
BibTeX
@inproceedings{abdi2026diversity,
  author = {Hamed Abdi and Ali Ahmadi and Shayan Chashm Jahan and MohammadTaghi Hajiaghayi and Javier Marinković},
  title = {{Diversity Maximization: Algorithms for Distant $k$-Subsets}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=hdftVSwe13},
}
Figure