arXiv:2608.22488cs.DSAug 2026

Manuscript Offprint

arXiv:2608.22488

Fast Metric Decompositions in High Dimension

Robert Krauthgamer, Asaf Petruschka, Nir Petruschka

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

Abstract

Metric decompositions are a fundamental tool in the design of algorithms involving distances. We study fast algorithms for sampling from probabilistic metric decompositions of nn-point sets in ℓ∞\ell_\infty and ℓ2\ell_2 spaces of high dimension dd. For ℓ∞\ell_\infty, we design a padded-decomposition algorithm that runs in time O~(nd2)\tilde{O}(nd^2), which is near-linear in nn, and achieves padding parameter O~(log⁡n)\tilde{O}(\log n). Our algorithm constructs a new sparse neighborhood cover that is based on geometric properties of ℓ∞\ell_\infty [Indyk, JCSS'01], and utilizes recent reductions between covers and decompositions [Conroy and Filtser, STOC'25]. For ℓ2\ell_2, we design a separating-decomposition algorithm that achieves near optimal separation O~(log⁡n)\tilde{O}(\sqrt{\log n}) in almost-linear time n1+o(1)n^{1+o(1)}. Our bounds improve over known algorithms with similar running time by a factor Ω(log⁡n)\Omega(\sqrt{\log n}), and the techniques have additional applications to spanners and nearest-neighbor search.

1 Introduction

Metric decompositions are fundamental algorithmic primitives when dealing with data that involves distances. Informally, a decomposition refers to a probabilistic partition of the points into low-diameter clusters, such that close-by points “tend” to be clustered together. Decompositions are a very useful tool in divide-and-conquer algorithms, which first handle each low-diameter cluster separately, and then combine the solutions into a global one. These decompositions have numerous applications, including metric embeddings [Bar96, Rao99, GKL03, KLMN05, LN05, FL21], approximation algorithms for cut problems [LLR95, GVY96, FHL08], vertex sparsification [CLLM10, EGK +^{+}14, MM16, KKN15, Fil19b], spanners, distance oracles and routing [AGGM06, MN07, ENW16, HIS13, FN22, HMO21], parallel algorithms for linear algebra [BGK +^{+}14, MPX13], fast algorithms for single-source shortest paths [BNW25, LMR26], and spectral graph theory [KLPT09, BLR10].

Modern applications are scaling rapidly, and current datasets are often massive and high-dimensional. As exceeding linear time significantly is simply prohibitive, this creates a strong demand for fast algorithms. Prior work on fast algorithms for metric decompositions has addressed graph metrics, whereas we study the geometric setting of points in RdR^{d}. This line of work aims to match the optimal quality bounds but using algorithms whose running time is close to linear (in the input size).

∗^{*}This paper will appear in the Proceedings of ESA 2026. This version includes an additional note before Section 2.

†^{\dagger}The Harry Weinrebe Professorial Chair of Computer Science. This research was supported by the Israel Science Foundation grant #1336/23. Email: robert.krauthgamer@weizmann.ac.il

†^{†}Email: asaf.petruschka@weizmann.ac.il

§^{§}Email: nir.petruschka@weizmann.ac.il

We consider two classical notions of probabilistic metric decompositions: separating decompositions (also known as Lipschitz decompositions) and padded decompositions, defined as follows. Let (X,dX)(X, d_X) be a metric space. For a partition P\mathcal{P} of XX, we call each element of P\mathcal{P} (which is a subset of XX) a cluster, and we denote by P(x)\mathcal{P}(x) the cluster containing point x∈Xx \in X. The partition P\mathcal{P} is called Δ\Delta-bounded if every cluster in it has diameter at most Δ>0\Delta > 0, i.e., the distance between every two points in the same cluster is at most Δ\Delta.

Definition 1.1 (Separating Decomposition [Bar96]). A distribution D over Δ\Delta-bounded partitions of X is called an (α,Δ)(\alpha, \Delta)-separating decomposition if

∀x,y∈X,Pr⁡P∼D[P(x)≠P(y)]≤α⋅dX(x,y)Δ.\forall x,y\in X,\qquad\operatorname*{P r}_{\mathcal{P}\sim\mathcal{D}}[\mathcal{P}(x)\neq\mathcal{P}(y)]\leq\alpha\cdot\frac{d_{X}(x,y)}{\Delta}.

Definition 1.2 (Padded Decomposition [Rao99, KL07, Fil19a]). A distribution D over Δ\Delta-bounded partitions of X is called a (β,δ,Δ)(\beta, \delta, \Delta)-padded decomposition if

∀x∈X,γ∈[0,δ],Pr⁡P∼D[B(x,γΔ)⊆P(x)]≥e−βγ,\forall x\in X,\gamma\in[0,\delta],\qquad\operatorname*{P r}_{\mathcal{P}\sim\mathcal{D}}[B(x,\gamma\Delta)\subseteq\mathcal{P}(x)]\geq e^{-\beta\gamma},

where B(x,r):={y∈X∣dX(x,y)≤r}B(x, r) := \{y \in X \mid d_X(x, y) \leq r\} is the closed ball of radius r≥0r \geq 0 around xx.

We note that some literature uses variants of these definitions; for example, it is common to define padded decomposition using only the case γ=ln⁡2β\gamma = \frac{\ln 2}{\beta}, and then δ\delta is not needed. Under our definitions above, every (β,δ,Δ)(\beta, \delta, \Delta)-padded decomposition is also a (max⁡{β,δ−1},Δ)(\max\{\beta, \delta^{-1}\}, \Delta)-separating decomposition. To see this, consider x,y∈Xx, y \in X; if dX(x,y)≥δΔd_X(x, y) \geq \delta \Delta then Pr⁡[P(x)≠P(y)]≤1≤dX(x,y)δΔ\Pr[\mathcal{P}(x) \neq \mathcal{P}(y)] \leq 1 \leq \frac{d_X(x, y)}{\delta \Delta}; otherwise, Pr⁡[P(x)≠P(y)]≤Pr⁡[B(x,dX(x,y))⊈P(x)]≤1−e−βdX(x,y)Δ≤βdX(x,y)Δ\Pr[\mathcal{P}(x) \neq \mathcal{P}(y)] \leq \Pr[B(x, d_X(x, y)) \not\subseteq \mathcal{P}(x)] \leq 1 - e^{-\beta \frac{d_X(x, y)}{\Delta}} \leq \beta \frac{d_X(x, y)}{\Delta}. An earlier connection established in [LN04b, Theorem 2.2] shows that even a (β,δ,Δ)(\beta, \delta, \Delta)-padded decomposition only for the case γ=ln⁡2β\gamma = \frac{\ln 2}{\beta} implies a (4β,2Δ)(4\beta, 2\Delta)-separating decomposition for the same metric.

We study finite datasets XX of size n=∣X∣n = |X| that lie in Rd\mathbb{R}^d equipped with the ℓ∞\ell_\infty or ℓ2\ell_2 norm (which we denote by ℓ∞d\ell_\infty^d and ℓ2d\ell_2^d). We focus on the high-dimensional regime, namely d≥ω(log⁡n)d \geq \omega(\log n), in which case running time that is exponential in dd is prohibitive, as it is super-polynomial in nn. For ease of presentation, we use the following terminology. A padded-decomposition algorithm of quality q≥1q \geq 1 is an algorithm that, given a metric space (X,dX)(X, d_X) and a diameter bound Δ>0\Delta > 0, outputs a partition sampled from a (β,δ,Δ)(\beta, \delta, \Delta)-padded decomposition with max⁡{β,δ−1}≤q\max\{\beta, \delta^{-1}\} \leq q. The analogous definition regarding (α,Δ)(\alpha, \Delta)-separating decomposition requires α≤q\alpha \leq q. Throughout, the notation O~(f)\tilde{O}(f) hides a polylogarithmic factor in ff. The term near-linear in ff refers to O~(f)\tilde{O}(f), whereas almost-linear refers to f1+o(1)f^{1+o(1)}; they usually refer to running time, in our case mostly with respect to nn, with polynomial dependence on dd.

The spanner approach. Fast algorithms for metric decompositions have already been devised for graphs. Specifically, for input graphs G with m weighted edges, there are O~(m)\tilde{O}(m)-time algorithms for padded (and separating) decomposition of optimal quality O(log⁡n)O(\log n) [MS09, ABCP98, MPX13, CF25]. Thus, a natural approach is to approximate (X,dX)(X, d_X) by a spanner GXG_X, which is a sparse graph on the vertex set X, and find a decomposition of this graph GXG_X. State-of-the-art constructions of geometric spanners [HIS13, FN22, AZ23, KP25, KPS25, NR26] yield surprisingly strong results. While this approach serves as a good baseline, it has some limitations. First, the intermediate step (constructing a spanner) may be overly restrictive and thus preclude achieving a tight quality bound. Specifically, one factor going into the overall quality of the decomposition is the spanner's stretch, which is often log⁡cn\log^c n for some fixed c>0c > 0. Second, by passing to a graph

MetricDecompositionTimeQualityReference
generalpaddedpolynomialO(log⁡n)O(\log n)[Bar96]
graphpaddednear-linearO(log⁡n)O(\log n)[MS09]
ℓ∞d\ell_{\infty}^dpaddedpolynomialO(log⁡n)O(\log n)[Bar96]
paddedalmost-linearO(log⁡n⋅log⁡4d)O(\log n \cdot \log^4 d)via spanners [KPS25] + [MS09]
paddednear-linearO(log⁡3/2n⋅log⁡4d)O(\log^{3/2} n \cdot \log^4 d)via spanners [KPS25] + [MS09]
paddednear-linearO(log⁡n⋅log⁡log⁡d)O(\log n \cdot \log \log d)Theorem 1.3
ℓ2d\ell_2^dseparatingpolynomialO(log⁡n)O(\sqrt{\log n})[CCG+98]\left[\mathrm{CCG}^{+98}\right]
separatingalmost-linearO~(log⁡n)\tilde{O}(\sqrt{\log n})Theorem 1.4
separatingnear-linearO(log⁡n)O(\log n)via randomly shifted grid

Table 1: Comparison of metric decompositions for nn-point metrics, focusing on the quality achieved in time that is polynomial vs. almost-linear vs. near-linear in nn (ignoring the dependence on dd which is polynomial).

representation, we effectively “forget” the geometric properties of (X,dX)(X, d_X) and instead treat it as an arbitrary nn-point metric, for which the optimal quality is O(log⁡n)O(\log n) even for sparse graphs [Bar96], and this factor propagates into the overall quality of the decomposition. To illustrate this issue, observe that for X⊆ℓ2dX \subseteq \ell_2^d, the spanner approach can achieve at best quality O(log⁡n)O(\log n), even though a separating decomposition of quality O(log⁡n)O(\sqrt{\log n}) is known to exist [CCG+^+98]. We seek to circumvent these limitations by leveraging the dataset’s geometry directly.

The shifted-grid approach. Another standard approach for fast construction of separating decompositions in ℓpd\ell_p^d spaces is to partition the dataset using a randomly shifted grid. This approach can be implemented in O(dn)O(dn) time and yields a decomposition of quality O(d)O(d), which is suboptimal for the high-dimensional regime d=ω(log⁡n)d = \omega(\log n). This approach can nevertheless be used in ℓ2d\ell_2^d, even when d=ω(log⁡n)d = \omega(\log n), because the dimension can be reduced to O(log⁡n)O(\log n) by the JL lemma [JL84]. A technical issue that arises is that the JL map has a small failure probability, which might affect the correctness of the procedure (e.g., for very close-by points). We resolve it by verifying in near-linear-time that the decomposition has succeeded; see the proof of theorem 1.4 for details. Perhaps a lesser-known fact is that the shifted-grid approach can be used in ℓ1d\ell_1^d even when d=ω(log⁡n)d = \omega(\log n), despite the impossibility of dimension reduction in this space [BC05, LN04a]. To construct an (O(log⁡n),Δ)(O(\log n), \Delta)-separating decomposition, set the grid sidelength to Δ3log⁡n\frac{\Delta}{3\log n}. For every pair of data points x,yx, y, the probability they are separated by the grid is at most O(log⁡n)∥x−y∥1ΔO(\log n)\frac{\|x-y\|_1}{\Delta}, and the probability they are clustered together is at most n−3∥x−y∥1Δn^{-\frac{3\|x-y\|_1}{\Delta}}. The crux is that even though the ℓ1\ell_1-diameter of a grid cell is larger than Δ\Delta, the diameter of a cluster is actually determined by the data points it contains; each pair of data points whose distance exceeds Δ\Delta is clustered together with probability at most 1n3\frac{1}{n^3}, and thus by a union bound over all pairs, with high probability, no such pair is clustered together.

We proceed to describe our results, which are also summarized in Table 1 in comparison to known or baseline bounds.

ℓ∞\ell_{\infty} metrics. Our main result is a near-linear-time padded-decomposition algorithm for ℓ∞\ell_{\infty} with near-optimal quality O~(log⁡n)\tilde{O}(\log n). We prove the following in Section 2.

Theorem 1.3. There is a padded-decomposition algorithm for n-point metrics in ℓ∞d\ell_\infty^d, that achieves quality O(log⁡n⋅log⁡log⁡d)O(\log n \cdot \log \log d) in running time O~(nd2)\tilde{O}(nd^2).

Note that by a classical result of Matousek [Mat96], every nn-point metric embeds into ℓ∞nϵ\ell_\infty^{n\epsilon} with distortion O(1/ϵ)O(1/\epsilon),1^1 and this implies, by a result of [Bar96], that some nn-point metrics in ℓ∞nϵ\ell_\infty^{n\epsilon} require quality Ω(ϵlog⁡n)\Omega(\epsilon\log n). For fixed ϵ>0\epsilon > 0, our Theorem 1.3 nearly matches this lower bound (with running time O~(n1+2ϵ)\tilde{O}(n^{1+2\epsilon})). For comparison with the baseline, current o(n2)o(n^2)-time spanner constructions [KPS25]2^2 have stretch roughly O(log⁡4d)=O(log⁡4n)O(\log^4 d) = O(\log^4 n), and thus a baseline padded-decomposition algorithm only achieves a far worse quality O(log⁡5n)O(\log^5 n).

The algorithm of Theorem 1.3 goes through the closely-related notion of sparse neighborhood cover [AP90, ABCP98] (for formal definition see Definition 2.1), which was recently shown to yield a padded decomposition [CF25], and is also of independent interest. Indeed, we provide in Section 2.4 an application of our sparse neighborhood cover to fast spanner construction (with near-optimal stretch-size tradeoff) in ℓ∞d\ell_{\infty}^{d} for d=nϵd = n^{\epsilon}.

ℓ2\ell_2 metrics. Our result for ℓ2\ell_2 is an almost-linear-time algorithm that achieves near-optimal quality, namely O~(log⁡n)\tilde{O}(\sqrt{\log n}). When the algorithm's parameters are tuned to run in near-linear time, the algorithm essentially amounts to applying the folklore shifted-grid approach.

Theorem 1.4. Fix 0<ρ<10 < \rho < 1. There is a separating decomposition algorithm for n-point metrics in ℓ2d\ell_2^d with quality O(ρ−1log⁡nlog⁡log⁡n)O(\sqrt{\rho^{-1} \log n \log \log n}) and running time O~(n1+ρ+d2n)\tilde{O}(n^{1+\rho} + d^2 n). The algorithm is Las Vegas, meaning that with high probability it reports a partition sampled from a separating decomposition, and with the remaining probability it reports “Fail”.

An optimal quality bound O(log⁡n)O(\sqrt{\log n}) was established in [CCG +^{+}98] without an explicit analysis of its algorithmic efficiency. A naive algorithmic implementation of their proof runs in time O~(n3+dn)\tilde{O}(n^{3}+dn), which can be improved to O~(n2+dn)\tilde{O}(n^{2}+dn) using standard methods, as explained in [Ste25, Section 2]. However, their more sophisticated improvement of the running time to O~(n1.51+dn)\tilde{O}(n^{1.51}+dn) using Locality Sensitive Hashing (LSH), claimed in [Ste25, Section 3], is unfortunately flawed.

We remark that Theorem 1.4 implies also a fast separating-decomposition algorithm for ℓp\ell_p metrics, p∈(2,∞]p \in (2, \infty], by just applying known results of [KP25, KPS25, NR26]. These results employ a sequence of mappings that essentially reduce the problem of constructing a separating decomposition in ℓp\ell_p to the same problem in ℓ2\ell_2. We can simply replace the algorithm of [CCG +^{+}98] for ℓ2\ell_2 with ours, and thereby speed up the overall running time.

The proof of theorem 1.4 is a surprisingly simple reduction to the low-dimensional setting for ℓ2d\ell_2^d, for which we use a separating-decomposition algorithm of Andoni and Indyk [AI06]. In a nutshell, the reduction divides the coordinates into blocks of a carefully chosen length and works on each block separately. We additionally show in Section 3.1 that the same simple idea can be applied also to the nearest-neighbor search problem (NNS), yielding new deterministic and space-efficient data structures.

Additional note. After completing the current version of the paper (to appear in ESA 2026), we obtained, with assistance from GPT-5.6-sol Ultra, an improvement to Theorem 1.4, namely, an algorithm that computes a separating decomposition in ℓ2\ell_2 with near-optimal quality O~(log⁡n)\tilde{O}(\sqrt{\log n}) in near-linear time. In comparison, Theorem 1.4 can achieve such O~(log⁡n)\tilde{O}(\sqrt{\log n}) quality but in almost-linear time. We will include this improved result in a forthcoming revision of the paper.

1^{1}A metric space (X,dX)(X, d_X) embeds into a metric space (Y,dY)(Y, d_Y) with distortion k≥1k \geq 1 if there exist a function f:X→Yf: X \to Y and s>0s > 0 such that for all x,y∈Xx, y \in X, sk⋅dX(x,y)≤dY(f(x),f(y))≤s⋅dX(x,y)\frac{s}{k} \cdot d_X(x, y) \leq d_Y(f(x), f(y)) \leq s \cdot d_X(x, y).

2^{2}We note that [NR26] show the existence of spanners in ℓ∞\ell_\infty with size O~(n)\tilde{O}(n) and stretch O(log⁡nlog⁡2d)O(\sqrt{\log n}\log^2 d), but their running time is not analyzed.

References (46)