arXiv:2610.38920cs.DSOct 2026

Manuscript Offprint

arXiv:2610.38920

Dimension Reduction and Coresets for Min-Sum kk-Clustering

Asaf Dallal, Robert Krauthgamer

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

The min-sum kk-clustering problem asks to partition an input of nn points into kk clusters so as to minimize the total pairwise distance within clusters. It is a natural alternative to center-based objectives when the data is not well captured by a small set of representative points. We study for this problem two standard sketching methods, dimension reduction and coresets, which represent the input more compactly while preserving the min-sum cost of every kk-partition up to 1±ε1 \pm \varepsilon factor.

Our first contribution addresses dimension reduction in Euclidean space. The Johnson-Lindenstrauss (JL) Lemma readily implies that a random linear map to target dimension t=O(ε−2log⁡n)t = O(\varepsilon^{-2} \log n) preserves, with high probability, the min-sum cost of all kk-partitions. We show that target dimension t=O(ε−2(ddim⋅log⁡(1/ε)+log⁡k+log⁡log⁡n))t = O(\varepsilon^{-2} (\text{ddim} \cdot \log(1/\varepsilon) + \log k + \log \log n)) suffices for Euclidean inputs of doubling dimension at most ddim\text{ddim}, and moreover this bound is nearly optimal. We also show that target dimension t=O(ε−2(log⁡(1/ε)+log⁡k+log⁡Δ))t = O(\varepsilon^{-2} (\log(1/\varepsilon) + \log k + \log \Delta)) suffices for Euclidean inputs of aspect ratio at most Δ\Delta.

Our second contribution is to design the first ε\varepsilon-coreset for metric min-sum kk-clustering. It is actually a movement-based coreset, has size (1/ε)O(ddim)klog⁡n(1/\varepsilon)^{O(\text{ddim})} k \log n for inputs of doubling dimension at most ddim\text{ddim}, and can be constructed in randomized near-linear-time. We further use these coresets to design streaming algorithms for the problem.

1 Introduction

Clustering is a fundamental task in geometry and data analysis, and it is commonly formulated as partitioning a dataset XX of points into kk groups, called clusters, so that points in the same group are similar to one another. We study min-sum kk-clustering, where the cost of each cluster is computed directly from the pairwise distances between its points, in contrast to center-based clustering, like kk-median and kk-means, where the cost of each cluster is computed using a center point. This min-sum objective can model better clusters that are coherent but not well represented by centers; in particular, it does not impose a Voronoi (nearest-neighbor) structure on the partition. For instance, min-sum kk-clustering has been used to recover a grouping of data from noisy pairwise similarity information, and to cluster large collections of protein sequences [VBR+11^{+11}, VBR+12^{+12}].

Formally, in the min-sum kk-clustering problem (also called kk-min-sum), the input is an nn-point metric space (X,dist)(X, \text{dist}) and the goal is to find a kk-partition P={P1,…,Pk}\mathcal{P} = \{P_1, \ldots, P_k\} of XX, that minimizes

*Email: asaf.dallal@weizmann.ac.il

†The Harry Weinrebe Professorial Chair of Computer Science. Work partially supported by the Israel Science Foundation grant #1336/23. Email: robert.krauthgamer@weizmann.ac.il

Figure

Figure 1: A min-sum kk-partition can differ significantly from a kk-median or kk-means partition. Here k=2k=2 in Euclidean R2\mathbb{R}^2; the outer ring has radius α>1\alpha>1 times that of the inner ring and contains 1/α1/\alpha as many points. In the min-sum optimum, each ring is assigned its own cluster, whereas the center-based optimum is induced by two centers and cuts both rings.

the objective

cost(P)=∑i=1k∑x,y∈Pidist(x,y).(1)\mathrm{cost}(\mathcal{P})=\sum_{i=1}^{k}\sum_{x,y\in P_i}\mathrm{dist}(x,y). \tag{1}

To simplify notation, we sum over all ordered pairs, which includes every pair {x,y}⊆Pi\{x,y\} \subseteq P_i twice. The input XX can actually be a subset of points from a larger metric space, such as Rd\mathbb{R}^d equipped with a distance function that is derived from an ℓp\ell_p norm or from a kernel function. A well-known example where the min-sum objective is highly effective consists of points spread evenly over two concentric rings that form two natural clusters, even though each ring has no natural center point that is close to its own points and far from the other ring, as illustrated in Figure 1. This effectiveness has led to increased interest in min-sum kk-clustering,

including algorithms in various models and metric spaces, and even in (non-metric) squared-Euclidean distance [Sch00, BCR01, CS10, BOR21, NRS24, AKP24, KLR+25].

Nevertheless, the known algorithmic tools for this objective are still lagging behind those for center-based objectives, which may explain why the min-sum objective is used much less in practice.

Notice that the total distance between all pairs of points in XX is split into inter-cluster pairs and intra-cluster pairs, thus minimizing the objective (1) is equivalent to maximizing its complement, which is the (metric) Max-kk-Cut problem and whose special case k=2k=2 is the famous Max-Cut problem. Note, however, that this equivalence does not extend to multiplicative approximation of the optimum.

A sketch is a small or simple representation of the input that approximately preserves some quantities of interest. Sketching is a fundamental technique in algorithm design, and is especially important for processing large datasets, where it can significantly improve the running time, storage, and/or communication costs, which strongly depend on the size of the input representation.

Many different sketching methods were developed, and they have found numerous applications, from geometric optimization and numerical linear algebra to streaming and distributed computation [Mut05, Woo14, Phi17]. We study sketches for min-sum kk-clustering and seek a for-all guarantee: the sketch preserves the cost of all kk-partitions simultaneously. This would follow easily from the much stronger requirement that all pairwise distances are preserved (multiplicatively). We study two common sketching approaches: dimension reduction for inputs in Euclidean Rd\mathbb{R}^d, which reduces the ambient dimension dd, and coresets for metric inputs, which reduce the dataset size nn. Both of them are defined via a map from the input metric to a more "compact" metric, in which the sketch is evaluated. Via this map, every kk-partition of XX induces a kk-partition of its image and vice versa, as follows. Let g:X→Yg: X \to Y be a map to a metric space (Y,ρ)(Y, \rho). For a set A⊆XA \subseteq X, let g(A)g(A) be the multiset {g(x)∣x∈A}\{g(x) \mid x \in A\} and for a kk-partition P={P1,…,Pk}\mathcal{P} = \{P_1, \ldots, P_k\} of XX, let

g(P)={g(P1),…,g(Pk)}.g(\mathcal{P})=\{g(P_{1}),\ldots,g(P_{k})\}.

We view this as a kk-partition of g(X)g(X), even though the multisets g(Pi)g(P_i) and g(Pj)g(P_j) for i≠ji \neq j might not be disjoint.

A useful way to measure the intrinsic geometry of a metric space XX is its doubling dimension, denoted by ddim(X)\text{ddim}(X), defined as the smallest D≥1D \geq 1 such that every metric ball can be covered by at most 2D2^D balls of half the radius [GKL03]. This notion is effective even for inputs in Euclidean Rd\mathbb{R}^d, as their doubling dimension is at most O(d)O(d) but can sometimes be significantly smaller than dd. Another important parameter is the aspect ratio of a set S⊆XS \subseteq X, defined as

Δ=diam(S)min⁡x≠y∈Sdist(x,y),\Delta=\frac{\mathrm{diam}(S)}{\min_{x\neq y\in S}\mathrm{dist}(x,y)},

where diam(S)=max⁡x,y∈Sdist(x,y)\text{diam}(S) = \max_{x,y \in S} \text{dist}(x, y). Many sketching results in the literature depend on the doubling dimension or aspect ratio of the input X, and are thus particularly effective when they are low.

Dimension reduction. A standard sketching method is oblivious dimension reduction: When the input is a high-dimensional Euclidean point set, it is useful to project it to a low-dimensional space before running downstream applications like a clustering algorithm. This is a very powerful algorithmic tool, because the efficiency of many geometric algorithms depends heavily on the ambient dimension. The Johnson-Lindenstrauss (JL) Lemma [JL84] states that every nn-point Euclidean metric can be mapped (embedded) into Rt\mathbb{R}^t, for t=O(ε−2log⁡n)t = O(\varepsilon^{-2} \log n), while preserving all pairwise distances within factor 1±ε1 \pm \varepsilon. It is known that the above bound on the dimension tt is tight in general for preserving all pairwise distances [LN15].

A standard oblivious construction, which we use below, is to apply a random linear map f:Rd→Rtf : \mathbb{R}^d \to \mathbb{R}^t, given by a matrix whose entries are independent Gaussian random variables with appropriate scaling, and this is known to succeed with high probability.

The JL guarantee on all pairwise distances clearly implies that also the min-sum cost of every partition is preserved up to the same factor. However, preserving all the pairwise distances might be an excessive requirement, and indeed dimension reduction tailored to clustering and related geometric optimization problems has been studied extensively. In particular, for center-based clustering such as k-means and k-median, it suffices to use dimension t that depends on k instead of n, namely, t=O(ε−2log⁡(k/ε))t = O(\varepsilon^{-2} \log(k/\varepsilon)) [BDZ10, CEM +^{+}15, BBC +^{+}19, MMR19].

The picture changes however when the center set is restricted: for kk-median with discrete centers (medoids), the target dimension also depends on the doubling dimension and on a log⁡log⁡n\log \log n term [JKS+^{+}26]. For min-sum kk-clustering, no analogous dimension-reduction result was previously known, and it was open to obtain any guarantee beyond the JL bound. The main obstacle is the indirect dependence of the objective on cluster sizes, as each point xx in cluster CC contributes O(∣C∣)O(|C|) terms to the objective. In particular, placing xx in a smaller cluster (that has the same average distance from xx) will decrease the contribution of xx to the min-sum objective. This is very different from center-based objectives, where each point contributes only one term to the objective, its distance to its assigned center. Thus the known center-based arguments do not apply, at least not directly.

Coresets. Another standard sketching method is a coreset, where the input XX is replaced by a smaller (but weighted) set. We propose the following definition, which guarantees correspondence between kk-partitions of the input XX and these of the coreset. Notice that it applies to a metric input (not necessarily Euclidean).

Definition 1.1 (Movement-Based Coreset). Let (X,dist)(X, \text{dist}) be a finite metric space. A weighted set (S,w)(S, w), with S⊆XS \subseteq X is a movement-based ε\varepsilon-coreset for min-sum kk-clustering on XX if there exists a map π:X→S\pi: X \to S that is consistent with the weights, namely, w(s)=∣π−1(s)∣w(s) = |\pi^{-1}(s)| for all s∈Ss \in S, such that

∀k-partition P of X,cost(π(P))∈(1±ε) cost(P).\forall k\text{-partition } \mathcal{P} \text{ of } X,\qquad \text{cost}(\pi(\mathcal{P})) \in (1 \pm \varepsilon) \text{ cost}(\mathcal{P}).

We call π\pi a movement rule; it need not be stored explicitly as part of the coreset, i.e., the size of the coreset is ∣S∣|S|. It is easy to see that a kk-partition of SS that splits the weight of a point s∈Ss \in S among multiple parts can be replaced, without increasing the min-sum cost, by a kk-partition that does not split the weight of ss (i.e., its entire weight is assigned to a single part); see Claim 5.2. Consequently, it suffices to solve the clustering problem on the small coreset (S,w)(S, w) and pull back its solution through the movement rule, to a solution for the original input XX. The drawback is that the coreset must be interpreted together with a movement rule, however, in our constructions this rule is simply the nearest-neighbor (in SS), and hence π−1(s)\pi^{-1}(s) can be computed from XX and SS, and need not be stored explicitly.

Definition 1.1 is analogous to the usual strong coreset guarantee for center-based clustering [HM04, FS05, BFL+17], where a weighted set SS represents the input XX if it preserves the cost of every possible choice of centers. The key difference is that a solution for min-sum kk-clustering is not a set of centers but rather a partition of XX, and we thus need a movement rule that specifies a correspondence between partitions of XX and partitions of the coreset. A downside of this movement-based definition is that it does not support sampling, reweighting, or similar modifications of the dataset. The same approach of a movement rule was used in previous coreset definitions, particularly for Max-Cut in [FS05] and for balanced kk-median in [BBLM14] (called a "mapping coreset"), although their accuracy requirements are different and not suitable for our min-sum objective.

Previously, Czumaj and Sohler [CS10] proposed a very different definition of a coreset for minimum kk-clustering. While it is also based on a movement rule from the input XX to the coreset SS, their coreset SS is equipped with modified distances and thus need not be a submetric of XX (for example, SS might not be Euclidean even if XX is). Moreover, they do not require that the min-sum cost of every partition is preserved, and in this sense their definition is weaker than ours. Altogether, the two definitions are incomparable.

References (41)