Manuscript Offprint
arXiv:2611.09600Coresets for Capacitated Clustering via Dual Concentration
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
We study coresets for clustering problems, focusing on the classical -median and -means objectives. A coreset is a small weighted summary of the input data that approximately preserves the clustering cost for every choice of centers. Such summaries are a central tool for scaling clustering algorithms to large datasets.
In this work, we consider the capacitated setting, where the clustering is subject not only to choosing centers but also to respecting prescribed cluster-size constraints. This model is a natural generalization of standard clustering and has been widely studied, but its coreset complexity is less well understood. For finite metric spaces, we obtain optimal-size coresets; surprisingly, these match the best-known bounds for unconstrained clustering. We also give improved coreset bounds in Euclidean space, notably the first coresets with near-linear dependence in while being independent of the dimension and input size.
The main new technical ingredients are concentration bounds for the dual solutions of min-cost flow problems, which allow for both significantly simpler and tighter analyses of the underlying sampling distribution used in the coreset construction.
Statement on AI Use. The perspective of using the dual for concentration, rather than the primal, was pointed out by ChatGPT-5.5 Pro. In addition, the authors used AI to help polish the writing, review the proofs, and check the manuscript for possible errors, in multiple rounds of prompting. All content was carefully examined by the authors, who take full responsibility for the content of the manuscript.
1 Introduction
Coresets are a staple of big data algorithms. Given a loss function, a point set , and a set of candidate solutions , a coreset is a significantly smaller weighted set such that, for all ,
For a fixed accuracy parameter , the quality of a coreset algorithm is measured by the number of distinct points in , which we call its size.
In this paper, we study coresets for center-based clustering where we are typically interested in objectives of the form , where is the distance function of the underlying metric and is the center to which is assigned from a set of at most centers. The most important special cases, and , are known as -median and -means, respectively. For the unconstrained variants, where , the coreset problem is now well understood. Specifically, for finite -point metrics, coresets of size are known [FL11, CSS21]; in Euclidean spaces, coresets of size are known [CLS22, HLW24]. These bounds are optimal up to logarithmic factors [CLSS22, HLW24]. A more detailed review of coreset bounds for different metric spaces appears in Section A.
The situation is markedly different for constrained variants of these problems. A central example is cardinality-constrained clustering. In this paper we use the standard fractional transportation formulation: given a demand vector , the objective is to minimize the -median or -means cost over assignments such that each point is assigned total mass , and each center receives total mass . For unweighted point sets and integral demands, this coincides with the usual requirement that exactly points are assigned to .
Our coreset guarantee preserves this objective simultaneously for every choice of centers and every demand vector . Consequently, it also preserves the optimum over any feasible family of demand vectors. Via known reductions, see Proposition C.1, this yields coresets for widely studied constrained clustering problems, including upper- and lower-capacitated clustering, fair clustering, and clustering with anonymity constraints.
Having established that the same coreset framework applies to these constrained variants, we next ask how large such coresets must be. More precisely, we are interested in the dependence of the coreset size on the main problem parameters, such as , the accuracy parameter , and the dimension or metric size. This dependence is difficult to summarize succinctly. The most important barrier is that all known constructions have at least quadratic dependence on [BFS21, BCJ22, CL19, HLLW25], in addition to non-optimal dependencies on other parameters. Such a quadratic dependence has historically been a major barrier even for unconstrained clustering; for cardinality-constrained clustering, it has so far proven formidable. At the same time, there is no evidence that cardinality constraints should force larger coresets than in the unconstrained setting. Thus, the guiding question of this paper is:
Do cardinality constraints fundamentally change coreset sizes for clustering?
Theorem 1.1. There exists a coreset for k-median and k-means with cardinality constraints in finite N-point metrics of size .
This bound matches the best-known lower bounds for unconstrained k-median and k-means in finite metrics [CLSS22], and is therefore optimal up to constant factors. Combining our finite-metric coreset with previous techniques for cardinality-constrained coreset construction already gives improved Euclidean bounds over prior work [BCJ⁺22, HLLW25]; see Section 3. However, this black-box route still has quadratic dependence on . Our second main result breaks the quadratic barrier in , with no dependence on the dimension or the input size .
Theorem 1.2. There exists a coreset for k-median () and k-means () with cardinality constraints in d-dimensional Euclidean spaces of size .
This does not match the known lower bounds for Euclidean clustering [HLW24]. Nevertheless, to the best of our knowledge, it is the first cardinality-constrained coreset construction to combine near-linear dependence on with competitive -dependence. The algorithms are efficient with the bottleneck being the computation of a constant-factor approximation.
| Reference | Coreset Size (k-median, k-means) |
|---|---|
| Cohen-Addad, Li [CL19] | |
| Schmidt, Schwiegelshohn, Sohler [SSS19] | |
| Huang, Jiang, Vishnoi [HJV19] | |
| Braverman, Cohen-Addad, Jiang, Krauthgamer, Schwiegelshohn, Toftrup, Wu [BCJ⁺22] | |
| Huang, Li, Lu, Wu [HLLW25] | |
| This paper |
Table 1: Coreset size bounds for cardinality-constrained clustering in -dimensional Euclidean space. For each reference, the first bound is for k-median and the second is for k-means.
2 Preliminaries and Definitions
Notation. We use to denote for some absolute constant . For an integer , write . Let denote the k-dimensional unit simplex.
The k-median Objective with Cardinality Constraints. Let be a metric space. We first define the objective for a generic weighted instance of total weight . We write for the weight of and to denote the total weight of the instance.
Fix an ordered center tuple and a demand vector . The coordinate is the demand of center . For this demand vector , the cardinality-constrained assignment cost, denoted by , is the cost of the cheapest fractional assignment of points in to the centers in that respects the demands . Formally, it is the value of the following LP.
| Primal assignment LP |
|---|
| s.t. |
| Dual assignment LP |
|---|
| s.t. |
The dual of the above LP, written alongside, will be important in the analysis later in the paper. The key reason for this is that it can be expressed succinctly. In particular, we can eliminate the auxiliary variables . For a fixed , the optimal choice of is
Thus the reduced dual objective is
We now note the following consequence of strong duality.
Claim 2.1 (Strong duality). For every weighted instance of total weight , every center tuple , and every demand vector ,
The same notation applies to -means, with each assignment cost replaced by . The two ambient metric spaces we consider are finite metric spaces, where is finite and , and Euclidean spaces, where and . Thus, in the Euclidean sections, the -median and -means assignment costs are and , respectively.
Coresets. The input is an unweighted finite set , and we write .
Definition 2.2 (-coreset). For , a weighted set of total weight is an -coreset for if, for every center tuple and every demand vector ,
The size of is the number of distinct points in its support.
For convenience of exposition, we assume throughout that the input support has size at least . Otherwise, storing the entire input support is already within the claimed coreset size bounds. In the finite-metric setting, this assumption implies , and hence . Thus, in the finite-metric bounds, factors of are absorbed into .
3 Technical Overview
In this section, we outline the key ideas underlying our analysis. We begin with the problem that admits the simplest analysis: capacitated -median in finite metrics. Both capacitated -means in finite metrics as well as the Euclidean space constructions follow the same basic outline, but require significant extensions.
3.1 Finite-Metric Capacitated k-median
Roughly speaking, the best coreset constructions have their technical origins in Chen's seminal ring-sampling algorithm [Che09], which we also use and proceeds by: (i) finding a distribution supported on the input points such that for any (fixed) set of candidate centers , a small re-weighted sample from the distribution provides an accurate estimate for the cost of clustering with ; then, (ii) taking enough samples from the distribution so as to union-bound over all candidate centers . The re-weighted set of samples drawn becomes the coreset.
Perhaps implicit, one conceptual core of Chen's framework is that, for any fixed candidate set of centers , the (unconstrained) clustering cost of with is a sum of "local" quantities, where each point of contributes its distance to the closest center in , and estimating large sums via random sampling is, at least by now, a well-established algorithmic technique. In capacitated clustering, this decomposition of cost via "local" summands breaks down.
Main Challenge of Capacitated Clustering. In capacitated clustering, the optimal clustering cost of with respect to a fixed set of centers is not a sum of individual costs over dataset points; rather, it is the result of a linear program whose point-to-center assignments must satisfy global constraints (the capacities of each center).
This nonlocality is a central obstacle in capacitated clustering coresets [CL19, BCJ22, HLLW25], and is already visible in the following simple example. Suppose consists of two far-away clusters of points and that consists of two centers, and , one for each cluster with capacity . If a coreset underrepresents one of the two clusters, then any feasible assignment for must send some weight across the large inter-cluster distance. Thus, a small error in the mass represented inside one cluster can create a large error in the capacitated clustering cost.
In the Euclidean setting, previous capacitated coresets handle this problem by breaking the input into rings around a reference solution. They sample points uniformly inside each ring and give the sampled points weights so that each ring has the correct total weight. This makes the sampling step easier to analyze. However, the capacity constraints are still global: a feasible assignment must send the right amount of mass to every center. Prior analyses handle this by controlling the assignment error separately inside the local pieces.
This local control is costly. Up to lower-order factors, Cohen-Addad and Li [CL19] obtained a bound with quadratic dependence on and polylogarithmic dependence on for k-median. Braverman et al. [BCJ22] removed the input-size dependence, but their bound has a larger -type dependence. Huang et al. [HLLW25] used a global sampling distribution together with the preprocessing of [BCJ22], and obtained a -type bound. Still, the coreset size remains quadratic in . We remove this quadratic dependence by preserving the dual of the constrained assignment problem directly.
3.2 The Product Ring Sampling Algorithm
Our algorithm for k-median in finite metrics also uses Chen's ring-decomposition, and blends it with a global sampling distribution. The algorithm follows the following steps:
-
Compute an approximate k-median clustering with center set .
-
Partition each cluster into rings after which any two points in the same ring will have up to constant factors the same cost in .
-
For a sampling budget , sample points from ring and weigh each sampled point by .
In other words, as in Chen’s algorithm, the sampling distribution is a product of uniform distributions over the rings. The difference is that the sample size of a ring is chosen according to its importance, namely its contribution to cost. Because of the ceilings, the total number of sampled points is at most . Importantly, the algorithm does not require the sample from each ring to be a coreset for that ring by itself; such a ring-by-ring guarantee would reintroduce the factor- overhead from [CL19]. Instead, our analysis treats the samples from all rings together, in one shot. A similar algorithm was proposed by Huang et al. [HLLW25], using the more involved preprocessing of [BCJ22] in place of Chen’s decomposition.
3.3 Assignment Cost Preservation via Dual Concentration
Consider the dual program given in Equation 1. First note that . Thus, if we show that the value of every dual solution concentrates around its expectation, then strong duality implies that concentrates around .
At a high level, for a fixed solution and a reference solution , we replace the pointwise dual contribution by its anchored version for . The anchor contribution is preserved exactly by weight preservation within each region , so concentration is only needed for the lower-variance anchored terms.
Therefore, it suffices to prove concentration for . The main benefit of anchoring is that . This can be thought of a dual analogue to the variance reduction trick, initially introduced by [CSS21] and subsequently used in most coreset analyses. Since we can tolerate an error of the order , the anchoring technique effectively reduces the variance to a constant. Therefore, the modified anchored dual is preserved for any candidate by setting . What remains to be shown is that we can efficiently enumerate over the function space of anchored dual solutions, which, while non-trivial, is completely dominated by candidate solutions. Thus, setting yields a coreset for capacitated -median.
3.4 Capacitated -means in Finite Metrics
For the -means objective, we initially follow the same outline as -median, that is, the algorithm is, save for the differences in computing an initial solution, identical. The biggest difference is that the -means objective requires significantly more effort to use the anchoring technique. To highlight the difference, notice that for any assigned to . Setting aside the values, we have , which is in general not of the order . Indeed, without further modifications, it is difficult to provide any concentration. We overcome this issue in two steps. First, we truncate the solution space, showing that we can reduce to the case . Second, we show that a weak concentration applying only to dual solutions that are near-optimal is sufficient and that achieving this weak concentration only requires many samples.
Solution Truncation. A commonly seen argument in coreset analyses for unconstrained clustering is that if one point of a ring is served at distance , then all points in the same ring must be served at similar distance, and in fact, have nearly indistinguishable cost. While this exact property does not hold for capacitated clustering, one can nevertheless mimic features of this argument. Suppose that for some given solution and demand vector , some fraction of points from a ring will be served at distance at least . In this case, we can consider the modified instance assigning the center instead of , as the difference in cost is negligible. For the points where the distance depends on , we thereafter have . Using
Hoeffding's inequality shows that is sufficient to prove concentration for any fixed . Thus, a reduction to truncated solutions already yields a coreset for .
Weak Dual Convergence. For -median, we simply preserved the cost of all dual solutions up to an additive error of . This turns out to be overkill. In order to conclude that the primal assignment cost is preserved under the coreset, we require only (i) that the cost of every near-optimal feasible dual solution is preserved and (ii) that the cost of that are far from optimal are not significantly overestimated. Similar ideas are sometimes used in the analysis of weak coresets, where preserving the cost of near-optimal solutions (provably) requires fewer samples than preserving the cost of all solutions [PSS26a].
For a given set of centers and demand vector , let be an optimal dual solution on , and consider any other dual solution . If, for a sufficiently small absolute constant , the estimation error for Dual is at most , then cannot attain a larger dual value than on . In other words, the larger the gap between the dual cost of and is, the coarser we can afford to be in our estimation of Dual.
3.5 Euclidean Spaces
A natural first attempt is to use the product-ring-sampling algorithm in Euclidean space. The characterization of the solution space of candidate centers and dual vectors does not pose a significant bottleneck, with essentially a union bound over solutions being sufficient. Following a suitable dimension reduction, this may be further improved to many solutions. The problem with this approach is that we are guaranteed to sample at least one point from every ring, thus the overall coreset will have size for both -median and -means. Using the ring-compression ideas from [BCJ22] (see Theorem 3.2 of that reference), we can obtain a coreset of size in an almost black-box manner, where for -median and for -means. Combining these algorithms will not avoid either the or terms, so to improve further, we require a new algorithm.
Mass-Preserving Sensitivity Sampling. Sensitivity sampling [FL11, BCP24], which samples points according to their importance, is arguably the most widely used algorithmic framework in coreset construction. A popular implementation first computes a constant factor approximate solution of with denoting the cluster induced by center . Next, each point is sampled with probability proportional to and weighted appropriately. Notably, sensitivity sampling bypasses any need for ring construction, thus avoiding the overhead in coreset size arising from the number of rings.
However, standard sensitivity sampling does not preserve mass exactly, which is necessary for capacitated coresets. Previous works therefore relied on uniform sampling, a natural choice when exact mass preservation is required. Our approach instead starts with sensitivity sampling and then performs a cluster-wise weight correction. Let be the reference cluster induced by anchor , and let be the multiset of samples drawn from . Each sampled occurrence first receives its usual inverse-probability weight . We then multiply all weights inside by the same factor , and set . Thus the final weights satisfy exactly for every reference cluster . This lets us retain the advantages of sensitivity-based sampling while restoring the mass preservation needed in the capacitated setting.
We do not need the full strength of the theorem. We only use the preprocessing step to reduce the number of rings passed to the product-ring sampler. See also [HLLW25].
Analysis. As a first observation, one might be tempted to reason that since, with very high probability and are very similar for all , this modification does not significantly affect concentration properties. This intuition is incomplete. Before rescaling, the weighted sample need not preserve the cluster masses exactly. Hence capacity constraints that are feasible for , and for with final weights , need not be feasible for with initial weights . Small changes in mass can therefore have a large effect on feasibility, and consequently on cost.
The dual viewpoint is again useful here. Given centers and a load vector , our goal is to control the dual sampling error uniformly over all dual vectors . Following the analysis of the product ring sampling algorithm, we first use the fact that the term cancels when comparing and . We then apply the anchoring trick and reduce the analysis of to two estimates. We do this by showing that, for all ,
and
The second estimate is a raw sensitivity-sampling concentration bound; it does not use the final mass-preserving rescaling. The first estimate controls the additional error caused by rescaling, using that is small and that .
One might ask where in this analysis we bypass the issue that some demand vectors may be feasible for after weight manipulation, but not for the initially weighted sample. The crucial trick is that, after weight manipulation, the anchor terms cancel: . In contrast, in general, and the lack of anchor cancellation can lead to a large difference between the true dual cost and the estimated dual cost with initial weights . In summary, in addition to reducing the variance, the anchoring trick isolates exactly where the weight manipulation affects the Euclidean analysis. However, the trick is only useful after the sample satisfies cluster-wise mass preservation. Without mass preservation, convergence for does not imply convergence for .
As a final remark, we observe that the analysis for -median is now effectively identical to that of finite metrics, with the only difference being in the enumeration over candidate solutions in Euclidean spaces. The underlying ideas for enumeration are largely a combination of enumerating solutions for unconstrained -median clustering in Euclidean spaces, combined with dual concentration for all demand vectors analogously to the finite metric case. For -means, combining mass-preserving sensitivity sampling with the weak-dual-convergence argument from the finite-metric analysis appears more delicate. We believe this is the main remaining step toward the optimal Euclidean -means bound.
4 Finite-Metric Capacitated -median
We first prove the coreset theorem for capacitated -median in finite metrics.
Theorem 4.1 (Finite-metric fractional capacitated -median). For every , there is a randomized algorithm which outputs a weighted subset of size
such that, with probability at least , is an -coreset for finite-metric capacitated -median.
We begin by giving the algorithm. As mentioned earlier, our algorithm is similar to the one proposed by [HLLW25]. It first computes an unconstrained reference -median solution. It then partitions the points into rings around the reference centers. Finally, it samples points independently and uniformly from each ring, with the number of samples from a ring proportional to its contribution to the reference cost.
Coreset Construction. Let be a constant-factor approximate unconstrained -median solution for . The points of are called anchors. Assign each point to its nearest anchor, breaking ties arbitrarily. For an anchor , let be its assigned cluster, and
Then , where OPT is the optimum unconstrained -median cost of .
We assume without loss of generality that no cluster has zero reference cost. Indeed, if , then all points in the cluster coincide with the anchor, so we store a single point with the appropriate weight. This represents the cluster exactly and increases the coreset size by at most .
Ring Partitioning. For each anchor , set , and define the innermost ring by
and for , define
Empty rings are discarded. Let denote the collection of all nonempty rings. We call these the sampled rings. For a sampled ring , with anchor , write
Thus,
The quantity is an upper bound, up to constants, on the total anchor cost scale of ring . We use these quantities as the sampling priorities of the rings. We normalize these scales by setting
The algorithm will allocate samples to each ring proportionally to .
Each anchor contributes at most nonempty rings. Indeed, if the -th ring around is nonempty, then some point in the ring has cost larger than . Since the total cost of the cluster is , we have , and hence . Therefore .
Algorithm 1 Product Ring Sampling for Finite-Metric Capacitated k-median
1: Construct the ring partition. 2: Set . 3: For every ring , sample points independently and uniformly from , where 4: Give each sampled point from weight . 5: Output: the resulting weighted multiset .
The total number of sampled points is , because
The following claim shows that the normalization constant is controlled by the reference cost, and hence by OPT.
Claim 4.2. .
Proof. Fix an anchor . The innermost ring has scale , so its contribution is at most . For every outer ring , each point satisfies . Therefore . Summing first over the rings of , and then over all anchors yields the claim.
4.1 Analysis
We now begin by recalling some of the notation introduced earlier. Fix an ordered center tuple . For , recall
And for a demand vector ,
We will use Claim 2.1 (strong duality) throughout to pass between primal costs and the corresponding dual objectives.
For fixed and , the difference between the two dual objectives does not depend on the demand vector, because the terms cancel. The dual sampling error is given by
Equivalently, for every ,
To prove Theorem 4.1, we use three lemmas.
First, for a fixed center tuple, it suffices to preserve the dual objective uniformly over all dual vectors.
Lemma 4.3 (Dual preservation implies load preservation). Fix . If
then
Second, for any fixed dual vector, the sampling error satisfies a standard concentration bound. After fixing and , the coreset contribution is an unbiased estimator of the corresponding contribution of . The ring decomposition then provides uniform bounds on the magnitude of each summand, as well as the aggregate variance proxy needed for concentration.
Lemma 4.4 (Concentration for one dual vector). Fix and . If is produced by Algorithm 1 with the sample size parameter defined therein, then
with probability at least
Third, the fixed- concentration bound can be made uniform over all dual vectors. Although ranges over the infinite set , the resulting cost vectors have finite combinatorial complexity, so the uniform guarantee reduces to a union bound over finitely many concentration events.
Lemma 4.5 (Uniform dual preservation for fixed centers). Fix . If
then, with probability at least ,
Proof of Theorem 4.1. Applying Lemma 4.5 to a fixed center tuple , with failure probability , we obtain a high-probability event on which the dual error is small uniformly over all dual vectors . More precisely, for this fixed choice of , the lemma gives
There are at most possible center tuples . Therefore, taking a union bound over all such tuples, we get that with probability at least ,
The sampling parameter required for this event is
Indeed, the only additional cost of making the guarantee simultaneous over all is the union bound over at most choices of centers, which contributes an additive term.
We now condition on the above event. Since the dual error is controlled for every and every , Lemma 4.3 implies that the corresponding assignment costs are preserved additively. Thus, for every center tuple and every demand vector ,
This gives the stated -coreset guarantee.
The rest of this section proves Lemma 4.3, Lemma 4.4, and Lemma 4.5.
4.2 Dual Cost Preservation: Proof of Lemma 4.3
The following lemma shows that preserving the dual objective implies the coreset guarantee.
Lemma 4.3 (Dual preservation implies load preservation). Fix . If
then
Proof. By Claim 2.1,
For every ,
because the term is identical in the two dual objectives. By assumption, for every . Therefore,
Taking suprema over gives
The same argument with P and Q interchanged gives
Combining the two inequalities yields
The important benefit when analyzing is that we no longer consider demand vectors. Once we prove a uniform bound on over all dual vectors , the same event simultaneously preserves the optimum for every and no union bound over demand vectors is needed.
4.3 Concentration for a fixed dual vector: Proof of Lemma 4.4
Lemma 4.4 (Concentration for one dual vector). Fix and . If is produced by Algorithm 1 with the sample size parameter defined therein, then
with probability at least
Proof. The function is the minimum of 1-Lipschitz functions, so it is 1-Lipschitz. Thus, for every ring and every point ,
Fix a ring . Let be the independent uniform samples from . Set
The contribution of R to the sampling error is
The summands are independent and mean zero. Each has magnitude at most . Hoeffding's inequality (see B.1) gives, for every s > 0,
The sampling rule implies
By Claim 4.2, . Taking proves the lemma.
4.4 Uniform Preservation over Dual Vectors: Proof of Lemma 4.5
It remains to make the fixed- concentration statement uniform over all dual vectors. Fix a center tuple . Our goal in this subsection is to prove that, with high probability,
The difficulty is that ranges over an infinite set. We overcome this by showing that the sampling error depends on only through a residual vector, and that the set of all such residual vectors admits a small discretization.
For a ring and a point , define the normalized residual
Since is 1-Lipschitz and , we have . Thus,
The following observation provides the deterministic link between approximation in the residual space and approximation of the dual sampling error. First, after centering at the anchor of each ring, the anchor terms cancel exactly. Indeed, the sampled total weight from R is exactly , so the contribution of the constant value is the same from the sampled copy of R in Q and from the original ring R. Therefore
Thus is controlled entirely by the normalized residual vector .
Second, this dependence is Lipschitz in the norm. Suppose satisfy
Then, for every realization of the sample,
(6)
Consequently, if every is within in distance of some representative , then concentration for the representatives extends to all dual vectors with an additional loss of at most . Since OPT, choosing to be a sufficiently small constant multiple of makes this loss OPT. It remains to show that the residual vectors induced by dual solutions admit a small such net.
Lemma 4.6 (Net for residual vectors). For every , there is a set with
such that for every , there exists satisfying
Proof. We first bound the number of possible minimizer patterns. Since every input point and every anchor lie in , it suffices to consider the values of on points of . For every and every pair , consider the hyperplane
in . There are such hyperplanes.
The induced arrangement decomposes into faces on which all comparisons
are fixed, allowing equality. After applying a fixed tie-breaking rule, each face therefore determines a single minimizer pattern
The number of faces in an arrangement of hyperplanes in is . Hence the number of possible minimizer patterns is at most
Fix one such pattern . For every inducing ,
Thus, for every ,
Therefore, once is fixed, the residual vector is an affine function of . The set of residual vectors inducing this pattern lies in an affine subspace of dimension at most , equipped with the norm inherited from , and also lies in the cube .
By the standard volumetric covering argument [Ver26, Proposition 4.2.10], applied inside the -dimensional affine hull with the induced norm, any subset of a -dimensional affine subspace with -diameter at most 2 has a -net of size at most
where is a universal constant. Applying this bound to the residual vectors inducing the fixed pattern gives such a net. Moreover, by taking a maximal -separated subset of the induced residual vectors, the net points may be chosen to be induced by actual dual vectors.
Taking the union over all minimizer patterns gives a net of size at most
Choosing one dual vector representative for each net point gives .
We now use the residual net to generalize the fixed- concentration bound to a statement that holds simultaneously for every dual vector.
Lemma 4.5 (Uniform dual preservation for fixed centers). Fix . If
then, with probability at least ,
Proof. Let , where is a sufficiently small constant. Apply Lemma 4.4 to every , and take a union bound using Lemma 4.6. With probability at least ,
provided that
Now fix an arbitrary , and choose with
By (6), we have
Using , and choosing sufficiently small, this is at most . Therefore,
Since was arbitrary, the bound holds uniformly over .
5 Finite-Metric Capacitated k-means
We next prove the coreset theorem for capacitated k-means in finite metrics.
Theorem 5.1 (Finite-metric fractional capacitated k-means). For every , there is a randomized algorithm which outputs a weighted subset of size
such that, with probability at least , Q is an -coreset for finite-metric capacitated k-means.
Coreset Construction. The construction is the same as in the k-median section, with squared distances replacing distances.
Let be a constant-factor approximate unconstrained -means solution for . The points of are called anchors. Assign each point to its nearest anchor, breaking ties arbitrarily. For an anchor , let be its assigned cluster, and set . Then , where OPT is the optimum unconstrained -means cost of .
We assume without loss of generality that no cluster has zero reference cost. Indeed, if , then all points in the cluster coincide with the anchor, so we store a single point with the appropriate weight. This represents the cluster exactly and increases the coreset size by at most k.
Ring Partitioning. For each anchor , set . We partition by squared distance from its anchor. Define the innermost ring by
and for , define
Empty rings are discarded.
Let denote the collection of all nonempty rings. We call these the sampled rings. For a sampled ring , write
Thus,
The quantity is an upper bound, up to constants, on the total anchor cost scale of ring R. We use these quantities as the sampling priorities of the rings. We normalize these scales by setting
The algorithm will allocate samples to each ring proportionally to .
Each anchor contributes at most sampled rings. Indeed, if is nonempty for some , then some point in the ring has squared distance larger than from . Since the total squared cost of the cluster is , we have
and hence . Therefore,
Sampling. For each ring , sample points independently and uniformly from , and give each sampled point weight . Here . The total number of points sampled in the coreset is .
Claim 5.2. The squared ring scales satisfy .
The proof of the above claim is identical to Claim 4.2 with squared distances replacing distances.
5.1 Analysis
The proof follows the same duality template as the k-median analysis, but squared distances introduce an additional difficulty. After centering at a ring anchor, the difference
is not controlled only by the squared ring scale ; it also contains a cross term depending on the distance from the anchor to the candidate center c. This prevents a direct application of Hoeffding's inequality to ensure concentration.
First, we introduce a truncated ring-labelled objective. For centers that are far from a ring, we replace the point-center squared distance by the corresponding anchor-center squared distance. This changes every feasible assignment cost by only a factor, while restoring bounded variation within a ring. This is in fact enough to show that coresets of size suffice.
Second, we use a weak dual convergence argument. Unlike in the k-median proof, we do not approximate every dual vector to the same additive accuracy. Dual vectors that are close to optimal are preserved accurately while dual vectors far from optimal may be approximated more coarsely, because their dual value is already too small to affect the maximum. This is the step that recovers the sample dependence.
We now make these two ingredients formal. The proof is organized around three lemmas. First, we define the truncated objective formally and show that it is a good approximation for the original k-means objective.
Truncation. The truncation step separates the case where a candidate center is much farther from the anchor than the scale of the ring. In this case, replacing the point-center cost by the corresponding anchor-center cost changes the cost only by a factor. This restores bounded within-ring variation for the truncated objective.
Definition 5.3 (Truncated costs). For a point , define the truncated cost of assigning to center as follows. If belongs to a sampled ring , set
If belongs to a cluster that is represented exactly, set . When evaluating the centered anchor term for a sampled ring , we set .
For a weighted instance supported on and a demand vector , let denote the optimum value of the fractional assignment LP on with demand vector , where assigning to has cost .
Lemma 5.4 (Truncation comparison). For every weighted ring-labelled instance , every center tuple , and every demand vector ,
We next formulate the weak dual convergence condition. For the rest of the k-means analysis, all dual quantities are defined with respect to the truncated costs .
Dual formulation. We use the same dual formulation as in the -median section, with the original costs being replaced by the truncated costs . Thus the truncated objective can be written as the supremum of a reduced dual objective over . As before, when comparing and , the load term cancels. Therefore the sampling error depends only on and , not on the demand vector .
Weak dual convergence. The weak dual convergence argument uses a nonuniform notion of dual preservation. A dual vector that is nearly optimal for the instance must be preserved accurately, while a dual vector whose population dual value is far below the optimum may be preserved more coarsely.
Definition 5.5 (Dual gap and allowed error). Fix , , and . The truncated dual gap of with respect to is
By strong duality, .
For fixed C and , define the allowed error
The next lemma explains why this is the right notion of dual control. It says that controlling the sampling error only up to the allowed error is already enough to preserve the truncated exact-load objective.
Lemma 5.6 (Allowed-error dual preservation). Fix . Suppose that
Then, for every demand vector ,
It remains to prove that the sampled instance satisfies the allowed-error condition. This is the main sampling statement for -means. It is the step that improves the sample dependence from the naive bound obtained from uniform Hoeffding's inequality to the desired bound.
Lemma 5.7 (Uniform weak dual convergence for fixed centers). Fix . If
then, with probability at least ,
Proof of Theorem 5.1. Apply Lemma 5.7 to each fixed with failure probability . Since there are at most center tuples, a union bound gives, with probability at least ,
On this event, Lemma 5.6 gives
It remains to pass from truncated costs to the original costs. By Lemma 5.4, applied to both and ,
Combining these, we have
simultaneously for every and every . Rescaling by a sufficiently small constant gives the claimed -coreset guarantee.
The rest of the section proves Lemma 5.4, Lemma 5.6, and Lemma 5.7.
5.2 Truncated Costs Approximate True Costs: Proof of Lemma 5.4
We now show that the truncated objective is equivalent to the original squared-distance objective. The reason is simple: if a point-center cost is truncated, the center is far enough from the ring that every point in the ring has nearly the same squared distance to it as the anchor does.
Lemma 5.4 (Truncation comparison). For every weighted ring-labelled instance , every center tuple , and every demand vector ,
Proof. Fix a weighted instance supported on , a center tuple , and a demand vector . We first show that, for every point and center ,
If the cost of assigning to is not truncated, then and there is nothing to prove. If it is truncated, then and . Since , we have . Hence, by the triangle inequality, , and therefore
This proves (7) after adjusting the implicit constant.
Now take any feasible fractional assignment for with load vector . Since , summing (7) over all assigned pairs gives
Applying this once to an optimal assignment for and once to an optimal assignment for gives
5.3 From Dual Error to Cost Preservation: Proof of Lemma 5.6
We prove that controlling the dual sampling error by the allowed error is enough to preserve the truncated assignment cost for every demand vector.
Lemma 5.6 (Allowed-error dual preservation). Fix . Suppose that
Then, for every demand vector ,
Proof. Fix . For the upper bound, for every ,
By the definition of ,
Therefore,
where the last inequality uses .
Taking the supremum over gives
For the lower bound, let be an optimal dual solution for . Then , and hence
Thus
□
5.4 Weak Dual Convergence: Proof of Lemma 5.7
The proof of weak dual convergence is the technical core of the -means analysis. We prove the statement for a fixed center tuple , uniformly over all dual vectors . The extension to all is then obtained by a union bound in the proof of Theorem 5.1.
The proof has two internal ingredients. First, a localized concentration bound shows that, for one fixed dual vector, the sampling error is controlled at the allowed-error scale. Second, a discretization argument reduces the infinite family of dual vectors to a finite representative set. The point of the localized argument is that near-optimal dual vectors are controlled accurately, while dual vectors with large dual gap may be controlled more coarsely.
The first ingredient gives the desired allowed-error bound for one fixed dual vector.
Lemma 5.8 (Pointwise concentration). Fix , and . If
then
with probability at least .
The second ingredient upgrades control on finitely many representative dual vectors to control over all .
Lemma 5.9 (Dual-vector discretization). Fix . There is a set of size
such that the following implication holds. If
then
With the two lemmas in hand, we can state and prove the uniform convergence for all dual vectors. We return to the proofs of the lemmas after that.
Lemma 5.7 (Uniform weak dual convergence for fixed centers). Fix . If
then, with probability at least ,
Proof. Fix , and let be the representative set from Lemma 5.9. Apply Lemma 5.8 to every , using failure probability
By a union bound over , with probability at least ,
provided
On this event, Lemma 5.9 gives
This proves Lemma 5.7.
5.4.1 Pointwise concentration
We prove Lemma 5.8. Throughout this subsection, fix a center tuple and a dual vector .
For a ring , define
The truncation step gives the centered range bound
We also use the following variance-gap estimate, proved in the next subsection.
Lemma 5.10 (Variance-gap estimate). Fix , , and . Then
This estimate says that large within-ring variance can occur only for dual vectors with large dual gap. Such vectors have a larger allowed error in , which is exactly what Bernstein concentration exploits.
Proof of Lemma 5.8. Let attain the infimum in the definition of , and write
Thus
For each ring , let be the independent uniform samples from . Since the sampled points from have total weight exactly , the anchor contribution cancels. Hence
Equivalently,
The variables are independent and mean zero.
We now record the two quantities needed for Bernstein's inequality. First, using the sampling rule
we have
By Lemma 5.10, applied with , and since ,
Second, by (8),
Using the sampling rule again and , we get
Using Bernstein's inequality (see Lemma B.2) applied to the independent mean-zero variables ,
with probability at least , where
Substituting (10) and (11), we obtain
If , then the second term is at most , with an arbitrarily small implicit constant after increasing the constant in the lower bound on . The same assumption gives
again with an arbitrarily small implicit constant after increasing the constant in the lower bound on . Therefore,
This proves the claim.
5.4.2 Proof of the variance-gap estimate
We now prove the variance bound in Lemma 5.10. This lemma provides the variance term needed for Bernstein’s inequality: although the worst-case within-ring variation of the truncated dual function can be as large as , its aggregate variance is much smaller, namely controlled by
Consequently, when the duality gap is small, Bernstein concentration occurs at the scale of the clustering cost rather than at the scale suggested by the worst-case range bound alone.
Fix . The function
chooses, for each point , the best -shifted center. This minimizing center may change from point to point, so we compare it to the optimal primal assignment for the fixed demand vector . Let be an optimal assignment attaining .
For and , define the slack
Thus measures how far center is from being a minimizer in the definition of . Since , we have for every and .
The point of this definition is that the duality gap is exactly the total slack incurred by the optimal primal assignment :
Indeed, using the optimality of for and the definition of the dual objective,
which proves (13).
The last step follows from the fact that we have,
For a ring R, let
Thus
We now bound the variance inside a ring R. Since subtracting the anchor value does not change variance,
Thus it is enough to control the squared fluctuation of on pairs of points in . The purpose of the next estimate is to express this fluctuation as the sum of two terms: a truncated-cost variation term, which will be charged to , and a slack term, which will be charged to .
Fix , and write
First suppose that . Then, using , for every ,
Also, by the centered range bound,
Combining these inequalities, we get, for every ,
Indeed, apply the elementary implication
with
Averaging this inequality over with weights , and using
gives
The case is symmetric. In that case, the same argument gives
Combining the two cases, and upper bounding by the sum of the two bounds, we obtain
First, we focus on the first term and bound the variation of the truncated squared costs. We claim that, for every and every ,
If the truncated cost is constant on , then , and there is nothing to prove. Otherwise, using the triangle inequality, we get
where the last step uses . Squaring gives
as claimed.
We now average the pairwise bound over independent uniform points . Using the truncated-cost variation bound, the cost-variation part is at most
Second, using the definition of , the second term contributes
Therefore,
Multiplying by and summing over rings gives
as required.
5.4.3 Proof of the dual-vector discretization lemma
We prove Lemma 5.9. Fix , and let be the set of points lying in rings. Choose a constant such that the centered range bound gives
For , where is the ring containing , define the normalized residual directly by
Thus .
We use the following residual-net bound.
Lemma 5.11 (Residual net for fixed centers). Fix . For every , the class
has a -net in of size at most
The lemma follows by an almost identical argument as in the proof of Lemma 4.6. Instead of working with , we have truncated costs . For fixed , the minimizer pattern is still determined by an arrangement of hyperplanes in -space, and on each cell the residual vector is affine in . Since the centered-range bound gives , the same volumetric covering argument gives the claimed net size.
The discretization argument also uses two deterministic bounds due to the ring decomposition. First, the allowed error is never smaller than . Second, the total sampling error is always bounded by the maximum centered range on the rings.
The next lemma records two deterministic bounds that set the relevant scale for the discretization: the allowed error is always at least the ring scale, and the sampling error is always at most the total centered range over the rings.
Lemma 5.12 (Deterministic bound). For every ,
and
Proof. For every feasible demand vector , the ring construction and the truncation comparison imply
Since dual gaps are nonnegative,
For the error bound, we write the sampling error in centered form. Since the sampled points from ring have total weight exactly , the anchor value cancels, and
By the centered range bound, every term inside the averages for ring has magnitude at most . Hence the two averages differ by at most , and therefore
Proof of Lemma 5.9. By Lemma 5.12, every dual vector satisfies and . It remains to consider the range
Indeed, if is larger than a sufficiently large constant multiple of , then the bound already implies .
Let
and define the shells
Only shells can intersect the relevant range above.
For each nonempty shell , take a net for in the metric at resolution
where is a sufficiently small universal constant. By Lemma 5.11, each shell has a net of size at most
Taking the union over all relevant shells gives a representative set satisfying
Conditioning on the event that every representative satisfies , we show that the same type of bound holds for every in the relevant range. Fix such a , and let be such that . Choose such that
Since , we have
and therefore
It remains to compare the errors of and . Using the centered form of the sampling error, the anchor terms cancel ring by ring. By the definition of ,
By the lower bound on the allowed error, . Since , this also means . Choosing sufficiently small, we get
Combining the two estimates,
This proves Lemma 5.9.
6 Euclidean Capacitated k-median
We next prove the Euclidean coreset theorem for capacitated k-median. Note that, in this section, we reuse the variable d to denote the dimension of the Euclidean space the points lie in.
Theorem 6.1 (Euclidean capacitated k-median). Let be a set of points. For every , there is an algorithm which outputs a weighted subset of size
such that, with probability at least , Q is an -coreset for Euclidean capacitated k-median.
We will in fact show the following dimension-dependent coreset bound.
Lemma 6.2 (Dimension-dependent coreset). There is an algorithm which, with probability at least , outputs an -coreset for Euclidean capacitated k-median of size
Once Lemma 6.2 is proved, Theorem 6.1 follows via the ideas of terminal embeddings and the existence of poly -size coresets for Euclidean k-median. This reduction is standard, so we defer the details to Section C.2.
6.1 Mass-Preserving Sensitivity Sampling
We set up some basic notation required to state the algorithm.
Let be a constant-factor approximate unconstrained -median solution for . For , let be the set of points in whose nearest anchor in is with ties being broken arbitrarily. For each , define and let
where OPT denotes the optimum unconstrained Euclidean k-median cost of P.
Algorithm. For each cluster , the algorithm samples points from it where is chosen proportional to the cost of the cluster. Within , the samples are drawn i.i.d. from a distribution which is a mixture of the uniform distribution and the distribution proportional to . Sampling uniformly ensures that the mass of the distribution is preserved up to a factor and sampling high-cost points with larger probability ensures that the variance of the estimator is low. After sampling, the weights of points within the cluster are rescaled so that the total weight of the samples from cluster is exactly .
Throughout we assume that each cluster has cost . This is without loss of generality: if a cluster has a cost 0, then it can be represented by a single point with weight equal to the size of the cluster. This increases the coreset size by at most .
Algorithm 2 Mass-preserving sensitivity sampling for Euclidean capacitated k-median
1: Compute the -approximate solution and the clusters induced by . 2: Let and . 3: for each cluster do 4: Set . Sample a multiset of points i.i.d. from the distribution . 5: Assign each occurrence the initial weight . 6: Let . 7: Rescale the weights, setting for every , so that . 8: end for 9: Output: the resulting weighted multiset .
We note some simple properties of the algorithm that will be used in the analysis.
Claim 6.3 (Cluster Mass Preservation). The following properties hold.
(i) (Initial Weights) With probability at least , for all , we have .
(ii) (Final Weights) With probability 1, for all , we have .
(iii) If the event in (i) occurs, then for all we have .
Proof. (i) Fix , and write . Each sampled occurrence has expected initial weight , so . Moreover, since , every initial weight is at most . Hence Hoeffding's inequality (see B.1) gives
where we used . A union bound over proves (i).
(ii) This follows immediately from the rescaling step of the algorithm.
(iii) It follows from (i), (ii) that the rescaling factor , which implies (iii).
6.2 Analysis
Our main goal is to prove Lemma 6.2. We follow the same dual-based approach used in Section 4 for finite-metric k-median. The quantities , , and are used with the same meaning as before, with Euclidean distance replacing the finite metric.
The following lemma is the same dual-to-primal step proved in the finite-metric section.
Lemma 6.4 (Dual preservation implies load preservation). For every fixed , if
We next center the dual functions at the anchors. For each point p that is in cluster
Since is 1-Lipschitz for k-median,
Furthermore, we can express the dual error in terms of . Here we crucially use that the algorithm preserves the mass of each cluster.
Claim 6.5. For every and , .
Proof. Fix . Since for a point ,
The last term is zero by property (ii) of Claim 6.3. Summing over proves the claim.
Due to the rescaling of weights that the algorithm does, the right-hand side of the identity in Claim 6.5, which involves the final weights , is not a sum of independent random variables. In order to be able to apply concentration inequalities, we decompose the error into terms as follows and bound each of them separately.
Lemma 6.6 (Error before rescaling). With probability at least ,
Lemma 6.7 (Rescaling error). With probability at least ,
We now show that the above lemmas complete the proof of the coreset bound.
Proof of Lemma 6.2. By Lemma 6.6, Lemma 6.7, and (17), with probability at least ,
Thus, by Lemma 6.4, for every and ,
The bound on the coreset size follows from the choice of :
The rest of this section is devoted to proving Lemma 6.6 and Lemma 6.7.
6.3 Bounding the Error Before Rescaling Via Pseudo-Dimension: Proof of Lemma 6.6
We prove Lemma 6.6 using the pseudo-dimension tools collected in Section B.1. The argument is to normalize the sampled summands, bound the pseudo-dimension of the resulting function class, and then apply uniform convergence.
For each set of centers C and dual vector , define
In the above equation, for a point in cluster we use . This is the initial weight assigned if is sampled by Algorithm 2. The point of defining is that we can express the error before weight rescaling in terms of :
The normalization factor in (18) is chosen so that is bounded by 1, as shown below.
Claim 6.8. For every , and every , .
Proof. Let . If , then , so the claim is immediate. Otherwise, , , and . Hence
We now bound the pseudo-dimension of the following function class:
Lemma 6.9. .
Proof. Fix points and thresholds . We bound the number of possible sign patterns of as and vary.
For , set
Then is equivalent to
Recall that . Thus each threshold sign is determined by the minimizers defining and , together with one comparison between the corresponding chosen values.
All relevant comparisons that arise have the form
where are fixed. Writing , , and , the comparison in (22) is . Its truth value is determined by the signs of
Indeed, the only point to be careful about is that one cannot square an inequality unless the relevant side is known to be nonnegative. The signs of and handle these case distinctions. Once the valid squaring step is determined, the signs of and decide the remaining comparison.
These polynomials have degree at most 4 in . There are real variables. For each point , the sign of is determined by the signs of constant-degree polynomials: these account for the possible minimizers at and at its anchor, and for the comparison between the two chosen values.
Thus, over all points, the threshold signs are determined by constant-degree polynomials. Warren's theorem implies that the number of possible threshold patterns is at most
If the points are pseudo-shattered, then this number is at least . Since , this gives .
Lemma 6.6 (Error before rescaling). With probability at least ,
Proof. Let be the total number of points sampled by the algorithm and let . By Lemma B.4, applied to , together with Lemma 6.9 and Claim 6.8, with probability at least ,
Using Equation (19), this gives
Since , , and , the RHS is at most .
6.4 Bounding Rescaling Error: Proof of Lemma 6.7
Lemma 6.7 (Rescaling error). With probability at least ,
Proof. Fix . By the triangle inequality,
The last inequality uses property (iii) of Claim 6.3 and the bound from Equation (16). For every sampled point ,
because . Therefore
Summing (23) over all and using (24) yields,
which completes the proof.
7 Euclidean Capacitated k-means
We next prove the Euclidean coreset theorem for capacitated k-means.
Theorem 7.1 (Euclidean capacitated k-means). Let be a set of points. For every , there is an algorithm which outputs a weighted subset of size
such that, with probability at least , is an -coreset for Euclidean capacitated k-means.
As in the Euclidean k-median section, it is enough to prove a dimension-dependent coreset bound. The reduction from the dimension-dependent bound to Theorem 7.1 is in Section C.2.
Lemma 7.2 (Dimension-dependent coreset). There is an algorithm, which with probability at least outputs an -coreset for Euclidean capacitated k-means of size
7.1 Mass-Preserving Sensitivity Sampling
We use the same reference clusters as in the Euclidean k-median section, but with a squared reference scale. Let be an -approximate unconstrained Euclidean k-means solution for . For , let be the set of points in whose nearest anchor in is , with ties broken arbitrarily. For each , define , and let
where OPT denotes the optimum unconstrained Euclidean k-means cost of .
The sampler is the same as in Algorithm 2, with replacing . Thus, for every cluster with , we sample a multiset of points independently from
where and .
Each sampled occurrence receives initial weight . The weights inside each cluster are then rescaled so that the final total weight of the samples from is exactly . We use to denote the weight of the point after rescaling.
We note the analogue of Claim 6.3, with essentially the same proof. The initial weights preserve each cluster size up to a factor, which will be important when bounding the rescaling error. This stronger concentration follows from the choice , which ensures that sufficiently many samples are drawn from each cluster.
Claim 7.3 (Cluster Mass Preservation for k-means). The following properties hold.
(i) (Initial Weights) With probability at least , for all .
(ii) (Final Weights) With probability , for all .
(iii) If the event in (i) occurs, then for all , .
7.2 Analysis
Our goal is to prove Lemma 7.2. The argument is the same as for Euclidean k-median, except that we first truncate far point-center costs.
Truncation. For , define the truncated squared cost of assigning to center by
For a weighted instance supported on , let denote the cost using the truncated costs . By the same pointwise argument as in Lemma 5.4, for every such , every , and every ,
Centered truncated dual error. For the rest of the analysis, the dual quantities , Dual , and are interpreted with respect to the truncated edge costs . When evaluating at an anchor , the edge cost to is .
For , define
The centered-range bound from the finite-metric k-means analysis gives
By the same dual-to-primal implication as Lemma 6.4, applied to the truncated costs, it is enough to prove
Indeed, this gives
using , and then (25) transfers the guarantee from cost to cost. As in the Euclidean -median analysis (see Claim 6.5), cluster-wise mass preservation (Claim 7.3) implies
Combining this identity with the same initial/final weight decomposition as in Equation (17), it is enough to prove the following two estimates.
Lemma 7.4 (Error before rescaling). With probability at least ,
Lemma 7.5 (Rescaling error). With probability at least ,
Together, the two estimates imply (27) with probability at least . By the reduction above, this gives the coreset guarantee of Lemma 7.2 for Euclidean k-means. Thus it remains only to prove Lemma 7.4 and Lemma 7.5.
7.3 Bounding the Error Before Rescaling: Proof of Lemma 7.4
For each set of centers C and dual vector , define the function
where is a sufficiently large universal constant. In the above equation, for a point in cluster we use . This is the initial weight assigned if is sampled. The point of defining is that we can express the error before weight rescaling in terms of :
The normalization factor in (29) is chosen so that is bounded by 1.
Claim 7.6. For every , and every , .
Indeed, this follows from the proof of Claim 6.8, using Equation (26), , and , with chosen sufficiently large.
We now bound the pseudo-dimension of the following function class:
Lemma 7.7. .
Proof. This is the same Warren-theorem argument as in Lemma 6.9. The pointwise factor in (29) is fixed once p is fixed, so it does not affect the sign-pattern argument.
The only difference is that the threshold comparisons now involve truncated squared costs. These comparisons are determined by squared-cost inequalities
and near/far predicates
All of these are constant-degree polynomial inequalities in . Thus, for fixed points and thresholds, all threshold signs are determined by constant-degree polynomials in variables. Warren's theorem gives .
Lemma 7.4 (Error before rescaling). With probability at least ,
Proof. Let be the total number of points sampled by the algorithm and let . By Lemma B.4, applied to , together with Claim 7.6, Lemma 7.7, and Equation (30), with probability at least ,
as , , and .
7.4 Bounding Rescaling Error: Proof of Lemma 7.5
Lemma 7.5 (Rescaling error). With probability at least ,
Proof. This is the same argument as in the Euclidean -median rescaling proof. By Claim 7.3, with probability at least , we have for every . Together with Equation (26), this gives, for every ,
Moreover, since , we have for every , and hence . Summing over gives
8 Acknowledgements
Milind Prabhu was supported by the NSF grant CCF-2327011. Chris Schwiegelshohn and Sudarshan Shyam were supported in part by a Google Research Award. Erik Waingarten was supported by the NSF grant CCF-2337993.
References
[AB99] Martin Anthony and Peter L. Bartlett. Neural Network Learning: Theoretical Foundations. Cambridge University Press, 1999.
[AS24] Peyman Afshani and Chris Schwiegelshohn. Optimal coresets for low-dimensional geometric median. In Ruslan Salakhutdinov, Zico Kolter, Katherine A. Heller, Adrian Weller, Nuria Oliver, Jonathan Scarlett, and Felix Berkenkamp, editors, Forty-first International Conference on Machine Learning, ICML 2024, Vienna, Austria, July 21-27, 2024, volume 235 of Proceedings of Machine Learning Research, pages 262–270. PMLR / OpenReview.net, 2024.
[BBC 19] Luca Becchetti, Marc Bury, Vincent Cohen-Addad, Fabrizio Grandoni, and Chris Schwiegelshohn. Oblivious dimension reduction for k-means: beyond subspaces and the johnson-lindenstrauss lemma. In Symposium on Theory of Computing, STOC, pages 1039–1050, 2019.
[BBH 20] Daniel N. Baker, Vladimir Braverman, Lingxiao Huang, Shaofeng H.-C. Jiang, Robert Krauthgamer, and Xuan Wu. Coresets for clustering in graphs of bounded treewidth. In International Conference on Machine Learning, ICML, pages 569–579, 2020.
[BCJ 22] Vladimir Braverman, Vincent Cohen-Addad, Shaofeng H.-C. Jiang, Robert Krauthgamer, Chris Schwiegelshohn, Mads Bech Tofrup, and Xuan Wu. The power of uniform sampling for coresets. In Symposium on Foundations of Computer Science, FOCS, pages 462–473, 2022.
[BCP 24] Nikhil Bansal, Vincent Cohen-Addad, Milind Prabhu, David Saulpic, and Chris Schwiegelshohn. Sensitivity sampling for k-means: Worst case and stability optimal coreset bounds. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, Chicago, IL, USA, October 27-30, 2024, pages 1707–1723. IEEE, 2024.
[BFS21] Sayan Bandyapadhyay, Fedor V. Fomin, and Kirill Simonov. On coresets for fair clustering in metric and euclidean spaces and their applications. In Intl. Colloquium on Automata, Languages, and Programming, ICALP, pages 23:1–23:15, 2021.
[BJKW21] Vladimir Braverman, Shaofeng H.-C. Jiang, Robert Krauthgamer, and Xuan Wu. Coresets for clustering in excluded-minor graphs and beyond. In Symposium on Discrete Algorithms, SODA 2021, pages 2679–2696, 2021.
[CDR 25] Vincent Cohen-Addad, Andrew Draganov, Matteo Russo, David Saulpic, and Chris Schwiegelshohn. A tight vc-dimension analysis of clustering coresets with applications. In Yossi Azar and Debmalya Panigrahi, editors, Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025, pages 4783–4808. SIAM, 2025.
[Che09] Ke Chen. On coresets for k-median and k-means clustering in metric and Euclidean spaces and their applications. SIAM J. Comput., 39(3):923–947, 2009.
[CKPR24] Jacobus Conradi, Benedikt Kolbe, Ioannis Psarros, and Dennis Rohde. Fast approximations and coresets for (k,l)-median under dynamic time warping. In Wolfgang Mulzer and Jeff M. Phillips, editors, 40th International Symposium on Computational Geometry, SoCG 2024, Athens, Greece, June 11-14, 2024, volume 293 of LIPIcs, pages 42:1–42:17. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2024.
[CL19] Vincent Cohen-Addad and Jason Li. On the fixed-parameter tractability of capacitated clustering. In International Colloquium on Automata, Languages, and Programming, ICALP, pages 41:1–41:14, 2019.
[CLS 22] Vincent Cohen-Addad, Kasper Green Larsen, David Saulpic, Chris Schwiegelshohn, and Omar Ali Sheikh-Omar. Improved coresets for euclidean k-means. In NeurIPS, 2022.
[CLSS22] Vincent Cohen-Addad, Kasper Green Larsen, David Saulpic, and Chris Schwiegelshohn. Towards optimal lower bounds for k-median and k-means coresets. In Symposium on Theory of Computing, STOC, pages 1038–1051, 2022.
[CSS21] Vincent Cohen-Addad, David Saulpic, and Chris Schwiegelshohn. A new coreset framework for clustering. In Symposium on Theory of Computing, STOC, pages 169–182, 2021.
[CW25] Moses Charikar and Erik Waingarten. The johnson-lindenstrauss lemma for clustering and subspace approximation: From coresets to dimension reduction. In Yossi Azar and Debmalya Panigrahi, editors, Proceedings of the 2025 Annual ACM-SIAM
Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025, pages 3172–3209. SIAM, 2025.
[CWWZ25] Vincent Cohen-Addad, Liudeng Wang, David P. Woodruff, and Samson Zhou. Fast, space-optimal streaming algorithms for clustering and subspace embeddings. CoRR, abs/2504.16229, 2025.
[DSS24] Andrew Draganov, David Saulpic, and Chris Schwiegelshohn. Settling time vs. accuracy tradeoffs for clustering big data. Proc. ACM Manag. Data, 2(3):173, 2024.
[FKW21] Zhili Feng, Praneeth Kacham, and David P. Woodruff. Dimensionality reduction for the sum-of-distances metric. In International Conference on Machine Learning, ICML, pages 3220–3229, 2021.
[FL11] Dan Feldman and Michael Langberg. A unified framework for approximating and clustering data. In Symposium on Theory of Computing, STOC, pages 569–578, 2011.
[FS05] Gereon Frahling and Christian Sohler. Coresets in dynamic geometric data streams. In Proceedings of the 37th Annual ACM Symposium on Theory of Computing (STOC), pages 209–217, 2005.
[FSS20] Dan Feldman, Melanie Schmidt, and Christian Sohler. Turning big data into tiny data: Constant-size coresets for k-means, pca, and projective clustering. SIAM J. Comput., 49(3):601–657, 2020.
[HHHW23] Lingxiao Huang, Ruiyuan Huang, Zengfeng Huang, and Xuan Wu. On coresets for clustering in small dimensional euclidean spaces. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett, editors, International Conference on Machine Learning, ICML 2023, 23-29 July 2023, Honolulu, Hawaii, USA, volume 202 of Proceedings of Machine Learning Research, pages 13891–13915. PMLR, 2023.
[HJLW18] Lingxiao Huang, Shaofeng H.-C. Jiang, Jian Li, and Xuan Wu. Epsilon-coresets for clustering (with outliers) in doubling metrics. In Symposium on Foundations of Computer Science, FOCS, pages 814–825, 2018.
[HJV19] Lingxiao Huang, Shaofeng H.-C. Jiang, and Nisheeth K. Vishnoi. Coresets for clustering with fairness constraints. In Neural Information Processing Systems, NeurIPS, pages 7587–7598, 2019.
[HK07] Sariel Har-Peled and Akash Kushal. Smaller coresets for k-median and k-means clustering. Discrete & Computational Geometry, 37(1):3–19, 2007.
[HK20] Monika Henzinger and Sagar Kale. Fully-dynamic coresets. In Fabrizio Grandoni, Grzegorz Herman, and Peter Sanders, editors, 28th Annual European Symposium on Algorithms, ESA 2020, Pisa, Italy (Virtual Conference), September 7-9, 2020, volume 173 of LIPIcs, pages 57:1–57:21. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2020.
[HLLW25] Lingxiao Huang, Jian Li, Pinyan Lu, and Xuan Wu. Coresets for constrained clustering: General assignment constraints and improved size bounds. In Yossi Azar and Debmalya Panigrahi, editors, Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2025, New Orleans, LA, USA, January 12-15, 2025, pages 4732–4782. SIAM, 2025.
[HLW24] Lingxiao Huang, Jian Li, and Xuan Wu. On optimal coreset construction for euclidean (k, z)-clustering. In Bojan Mohar, Igor Shinkar, and Ryan O'Donnell, editors, Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC 2024, Vancouver, BC, Canada, June 24-28, 2024, pages 1594–1604. ACM, 2024.
[HM04] Sariel Har-Peled and Soham Mazumdar. On coresets for k-means and k-median clustering. In Symposium on Theory of Computing, STOC, pages 291–300, 2004.
[HSV21] Lingxiao Huang, K. Sudhir, and Nisheeth K. Vishnoi. Coresets for time series clustering. In Neural Information Processing Systems, NeurIPS, pages 22849–22862, 2021.
[LS10] Michael Langberg and Leonard J. Schulman. Universal -approximators for integrals. In Symposium on Discrete Algorithms, SODA, pages 598–607, 2010.
[MMR19] Konstantin Makarychev, Yury Makarychev, and Ilya P. Razenshteyn. Performance of johnson-lindenstrauss transform for k-means and k-medians clustering. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, STOC, pages 1027–1038, 2019.
[MRSS26] Alexander Munteanu, Matteo Russo, David Saulpic, and Chris Schwiegelshohn. Terminal dimension reduction for time series with applications. In Forty-third International Conference on Machine Learning, 2026.
[NN19] Shyam Narayanan and Jelani Nelson. Optimal terminal dimensionality reduction in euclidean space. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, pages 1064–1069, 2019.
[PSS26a] Milind Prabhu, Chris Schwiegelshohn, and Sudarshan Shyam. Approximation preserving coresets. In Forty-third International Conference on Machine Learning, 2026.
[PSS26b] Milind Prabhu, Chris Schwiegelshohn, and Sudarshan Shyam. Fault tolerant coresets. In The Fortieth Annual Conference on Neural Information Processing Systems, 2026.
[SS22] Chris Schwiegelshohn and Omar Ali Sheikh-Omar. An empirical evaluation of k-means coresets. In European Symposium on Algorithms, ESA, volume 244 of LIPIcs, pages 84:1–84:17, 2022.
[SSS19] Melanie Schmidt, Chris Schwiegelshohn, and Christian Sohler. Fair coresets and streaming algorithms for fair k-means. In Approximation and Online Algorithms, WAOA, pages 232–251, 2019.
[SW18] Christian Sohler and David P. Woodruff. Strong coresets for k-median and subspace approximation: Goodbye dimension. In Symposium on Foundations of Computer Science, FOCS, pages 802–813, 2018.
[vdVW96] Aad W. van der Vaart and Jon A. Wellner. Weak Convergence and Empirical Processes: With Applications to Statistics. Springer Series in Statistics. Springer, 1996.
[Ver26] Roman Vershynin. High-Dimensional Probability: An Introduction with Applications in Data Science. Cambridge University Press, 2 edition, 2026.
[War68] H. E. Warren. Lower bounds for approximation by nonlinear manifolds. Transactions of the American Mathematical Society, 133:167–178, 1968.
A Related Work
The first coreset definition as it is nowadays understood for clustering problems was given by Har-Peled and Mazumdar [HM04]. Initially, the techniques were mainly focused on low-dimensional Euclidean spaces [FS05, HK07], and are still an active area of research today [AS24, HHHW23]. Chen’s seminal paper [Che09] brought sampling and learning theory to coresets, initially mostly via uniform sampling. Feldman, Langberg, and Schulman [FL11, LS10] then introduced the sensitivity sampling distribution, arguably the definitive algorithm in this line of work. Thereafter, for almost a decade, most coreset papers either focused on dimension reduction techniques for high dimensional Euclidean spaces [BBC⁺¹⁹, CW25, FSS20, MMR19, SW18, FKW21], or by applying the sensitivity sampling framework to other metrics such as doubling metrics [HJLW18], graph metrics [BJKW21, BBH⁺²⁰], or metrics on time series [CKPR24, HSV21, MRSS26]. Cohen-Addad, Saulpic, and Schwiegelshohn [CSS21] proposed the group sampling algorithm, which ultimately yielded optimal coreset bounds for most of these problems [CDR⁺²⁵, CLSS22, CLS⁺²², HLW24]. It later turned out that sensitivity sampling is likewise optimal [BCP⁺²⁴, PSS26a], empirically preferable [SS22], fault tolerant [PSS26b], and can be implemented extremely efficiently [CWWZ25, HK20, DSS24] in various settings.
B Concentration Inequalities
We first state two standard concentration inequalities.
Lemma B.1 (Hoeffding’s inequality [Ver26, Theorem 2.2.6]). Let be independent mean-zero random variables. Suppose that there exists a constant such that almost surely for all . Then, for every , with probability at least ,
Lemma B.2 (Bernstein’s inequality [Ver26, Theorem 2.9.5]). Let be independent mean-zero random variables. Suppose there exists a constant such that almost surely for all , and define
Then, for every , with probability at least ,
B.1 Concentration via Pseudo-dimension
In the Euclidean sections, we need uniform concentration for families of normalized sampled summands indexed by the centers and dual variables. We use a standard two-step approach: first bound the pseudo-dimension of the relevant function class, and then apply a uniform convergence bound for bounded real-valued functions. The pseudo-dimension bounds are obtained by showing that each threshold comparison is determined by the signs of a bounded number of low-degree polynomials, and then applying Warren’s theorem. This appendix collects the common tools used in both the Euclidean k-median and Euclidean k-means analyses.
Definition B.3 (Pseudo-dimension). Let be a class of real-valued functions on a domain . A set is pseudo-shattered by if there are thresholds such that, for every , there is satisfying
The pseudo-dimension of , denoted , is the largest size of a set pseudo-shattered by .
The following lemma is a uniform convergence bound for bounded real-valued classes of finite pseudo-dimension; see, for ex., [AB99, Chapter 11] and [vdVW96, Chapter 2.6].
Lemma B.4 (Uniform convergence). Let be a class of real-valued functions with . Let be independent random variables, not necessarily identically distributed. Suppose that every satisfies for every . Then, with probability at least ,
Bounding the pseudo-dimension of a function class directly is sometimes challenging. We will use Warren's theorem as a standard tool for this purpose. It applies when the relevant threshold comparisons can be described by low-degree polynomial inequalities. For a real number , let if and otherwise.
Lemma B.5 (Warren's theorem [War68]). Let be real polynomials in variables, each of degree at most . If , then the number of sign patterns , over all , is at most .
C Omitted Proofs
C.1 Reduction to Upper Capacities
We also briefly outline how coresets for clustering with exact demands implies coresets for upper bounded capacitated clustering. Similar reductions apply to cardinality lower bounds and fair clustering. These reductions are folklore, but we include the argument for completeness and future reference.
Proposition C.1 (Reduction from exact demands to upper capacities). Let be a point set, and let be an upper-capacity vector. Suppose that is an -coreset for with respect to exact demand vectors , meaning that for every set of centers and every feasible demand vector ,
Then is an -coreset for with respect to the upper-capacity constraints
Proof. Fix a set of centers . The capacitated cost on can be written as a minimization over exact demand vectors:
Similarly,
Let be an exact demand vector attaining the minimum for , and let be one attaining the minimum for . Then
For the other direction,
where the last inequality uses the fact that is feasible for the upper-capacitated problem on . Therefore,
as desired.
C.2 Dimension-Independent Coreset Bounds
In Lemma 6.2 and Lemma 7.2, we proved dimension-dependent coreset bounds for Euclidean capacitated k-median and k-means. We now explain how to remove the dependence on the ambient dimension. The reduction has two standard ingredients. First, we use an existing Euclidean coreset construction to reduce the support size to . Second, once the support is small, we use a terminal embedding to reduce the dimension to .
We use the small sized coresets as a black box.
Theorem C.2 (Polynomial-size Euclidean coresets [BCJ 22, HLLW25]). For Euclidean capacitated k-median and k-means, every instance admits an -coreset of size .
We first replace the input points by , reducing the support size to . Since coresets compose, it is enough to construct an -coreset for .
Here S is a weighted instance. Although the Euclidean dimension-dependent bounds were stated for unweighted inputs to avoid extra notation, the proofs extend verbatim to weighted inputs: replace cardinalities by total weights, replace sums by weighted sums, and perform the same cluster-wise rescaling with respect to the total weight of each reference cluster.
We next recall terminal embeddings. Unlike the Johnson–Lindenstrauss lemma, which preserves pairwise distances inside a finite point set, terminal embeddings preserve distances from a fixed finite terminal set to all query points in the ambient space.
Definition C.3 (Terminal embedding). Let be a finite terminal set. A map is a terminal embedding for with distortion if, for every terminal and every query point ,
We use the following optimal terminal-embedding bound of Narayanan and Nelson [NN19].
Theorem C.4. Let be a finite set of terminals. For every , there is a terminal embedding for with distortion , where
This is exactly the type of dimension reduction needed for clustering: the data points are the terminals, while the centers are arbitrary query points.
Lemma C.5. Let be a weighted instance, and let be a terminal embedding for the support of with distortion . Then, for every center tuple and every demand vector ,
and
Proof. For -median, every point-center distance is preserved up to a factor. Hence the cost of every feasible exact-load assignment is preserved up to the same factor, and taking the minimum over assignments preserves the guarantee.
For -means, the same distance preservation gives squared-distance preservation up to a factor, after adjusting constants. The same assignment-wise argument applies.
Applying the reduction. For -median, first replace by the preliminary -coreset of size . Apply Theorem C.4 to the support of with , obtaining dimension
By Lemma C.5, a coreset for the embedded instance can be pulled back to a coreset for . Composing with the preliminary coreset then gives a coreset for . Applying Lemma 6.2 in dimension therefore gives size
as claimed in Theorem 6.1. The three approximation losses are each set to a sufficiently small constant multiple of , so they compose to .
The proof for -means is identical, using Lemma 7.2 instead; this gives size
as claimed in Theorem 7.1.