Papers
Topics
Authors
Recent
Search
2000 character limit reached

Approximate Closest Pair Algorithms

Updated 8 July 2026
  • Approximate Closest Pair (CP) is defined as finding two points whose distance is within a prescribed multiplicative factor (e.g., 1+ε or c) of the true minimum, balancing precision and efficiency.
  • Algorithmic paradigms like PM-LSH and MSPP use techniques such as dimensionality reduction, candidate filtering, and randomized hashing to accelerate computations in high-dimensional spaces.
  • Research highlights metric-dependent performance, strong conditional lower bounds, and practical system designs that trade off between recall, running time, and preprocessing complexity.

Approximate Closest Pair (CP) is the family of problems in which one seeks a pair whose distance is within a prescribed multiplicative factor of the minimum inter-point distance, rather than the exact optimum. The formulation appears in monochromatic, bichromatic, colored, query, and stochastic settings; representative versions include (1+ε)(1+\varepsilon)-approximate Bichromatic Closest Pair, cc-approximate Closest Pair queries, color distance oracles, and (1+ε)(1+\varepsilon)-approximation of the expected closest-pair distance in uncertain tree metrics (Rubinstein, 2018, Zheng et al., 2021, Horowicz et al., 6 Jul 2025, Xue et al., 2016). Approximate CP is central precisely where exact high-dimensional CP becomes expensive, yet the research landscape is uneven: some models admit fast approximate algorithms, some exhibit exact-versus-approximate separations, and others carry strong conditional lower bounds even for approximation (Gold et al., 2016, Horowicz et al., 6 Jul 2025).

1. Formal problem variants

In the classical monochromatic setting, CP asks for

minpqPd(p,q).\min_{p\neq q\in P} d(p,q).

A multiplicative approximation returns a pair (p,q)(p,q) whose distance is at most a factor 1+ε1+\varepsilon or c>1c>1 above that minimum. In the high-dimensional Euclidean formulation used by PM-LSH, if (o1,o2)(o_1^*,o_2^*) is the exact closest pair with distance rr^*, then a cc-approximate closest pair query returns a pair cc0 satisfying

cc1

(Zheng et al., 2021).

A standard offline generalization is Bichromatic Closest Pair (BCP). Given two sets cc2 of cc3 vectors, the optimum value is

cc4

and a cc5-approximation outputs cc6 with

cc7

(Rubinstein, 2018). The literature repeatedly uses BCP as the offline or batch analogue of approximate nearest-neighbor search.

A colored formulation appears in color distance oracles. For a metric space cc8, a colored point set cc9, and color classes (1+ε)(1+\varepsilon)0, the color distance between (1+ε)(1+\varepsilon)1 and (1+ε)(1+\varepsilon)2 is

(1+ε)(1+\varepsilon)3

which is exactly a bicolored closest-pair distance (Horowicz et al., 6 Jul 2025). Approximate CDO and AMCDOCH are therefore approximate colored CP data structures in the one-dimensional array metric.

A stochastic formulation replaces the fixed optimum by a random variable. In a tree metric with independent existential probabilities, the closest-pair distance of a realization (1+ε)(1+\varepsilon)4 is (1+ε)(1+\varepsilon)5, and the central approximation target becomes the expectation

(1+ε)(1+\varepsilon)6

where (1+ε)(1+\varepsilon)7 is the (1+ε)(1+\varepsilon)8-threshold probability (Xue et al., 2016). This is not an approximate pair-retrieval problem; it is an approximate computation of a closest-pair statistic under uncertainty.

These variants differ not only in output type but also in what approximation means. In monochromatic and bichromatic CP, the output is usually a pair. In colored and snippets-style problems, approximation is embedded in preprocessing–query tradeoffs. In stochastic settings, approximation concerns a scalar functional of the whole realization distribution rather than a witness pair.

2. Algorithmic paradigms

A persistent theme is that approximate CP in high dimensions is algorithmically easier than exact CP. One exact (1+ε)(1+\varepsilon)9 paper states that, if one settles for approximate solutions, many efficient algorithms are known, particularly for nearest neighbor and CP under minpqPd(p,q).\min_{p\neq q\in P} d(p,q).0 norms, and that approximate algorithms are generally “easy” in high dimensions relative to exact ones: often near-linear or minpqPd(p,q).\min_{p\neq q\in P} d(p,q).1 time for a fixed approximation factor in various models (Gold et al., 2016). The same paper explicitly positions LSH-based methods and Johnson–Lindenstrauss dimensionality reduction as contextual prior work for approximation rather than as part of its exact contribution.

PM-LSH is a representative high-dimensional Euclidean framework that makes this general picture concrete. It projects each point minpqPd(p,q).\min_{p\neq q\in P} d(p,q).2 to

minpqPd(p,q).\min_{p\neq q\in P} d(p,q).3

indexes the projected points in a PM-tree, and uses the fact that

minpqPd(p,q).\min_{p\neq q\in P} d(p,q).4

to build confidence intervals connecting projected and original distances (Zheng et al., 2021). Its closest-pair component first defines a branch-and-bound search over PM-tree node pairs using a lower bound minpqPd(p,q).\min_{p\neq q\in P} d(p,q).5, but the practical algorithm is a radius-filtering method: it derives an upper bound minpqPd(p,q).\min_{p\neq q\in P} d(p,q).6 on the current minpqPd(p,q).\min_{p\neq q\in P} d(p,q).7-th smallest original distance, sets a projected threshold minpqPd(p,q).\min_{p\neq q\in P} d(p,q).8, and explores only nodes whose radius is below

minpqPd(p,q).\min_{p\neq q\in P} d(p,q).9

The candidate cap is

(p,q)(p,q)0

and the stated complexity is (p,q)(p,q)1 with (p,q)(p,q)2 in practice (Zheng et al., 2021). The framework is explicitly tunable: larger (p,q)(p,q)3, larger (p,q)(p,q)4, or smaller (p,q)(p,q)5 improve recall at higher cost.

MSPP uses a different approximation template for Euclidean distance and Pearson correlation. Each attribute is clustered into (p,q)(p,q)6 one-dimensional clusters by (p,q)(p,q)7-means++, then one-hot encoded, so every original point becomes a binary vector in (p,q)(p,q)8. The algorithm repeatedly samples (p,q)(p,q)9 random encoded coordinates, hashes points by those sampled bits, computes full Hamming distance only for colliding pairs, and keeps the top 1+ε1+\varepsilon0 candidates in a priority queue. In a second pass it recomputes the original Euclidean distance or Pearson correlation only for those candidates and outputs the top 1+ε1+\varepsilon1 pairs (Saha et al., 2020). Its analysis uses the collision estimate

1+ε1+\varepsilon2

and shows that

1+ε1+\varepsilon3

iterations suffice to capture a pair that agrees on 1+ε1+\varepsilon4 attributes with probability at least 1+ε1+\varepsilon5 (Saha et al., 2020). MSPP therefore approximates CP by first preserving coarse local agreement under discretization and then amplifying discovery probability through repeated random hashing.

The algorithmic landscape is therefore heterogeneous. One line, represented by PM-LSH, treats approximate CP as a projected metric-search problem with explicit probabilistic calibration. Another, represented by MSPP, treats it as large-scale similar-pairs mining through data-dependent discretization and repeated hash collisions. Both lines depart from low-dimensional geometric CP algorithms and target the regimes in which exact all-pairs distance evaluation is operationally infeasible.

3. Fine-grained complexity and hardness

Approximate CP is not uniformly easy. Strong conditional lower bounds are known for several variants. For BCP in Euclidean, Manhattan, Hamming, and edit distance, the main hardness result states that, unless SETH is false, for every 1+ε1+\varepsilon6 there exists a constant 1+ε1+\varepsilon7 such that computing a 1+ε1+\varepsilon8-approximation requires 1+ε1+\varepsilon9 time; for Euclidean, Manhattan, and Hamming this holds in dimension c>1c>10, and for edit distance in c>1c>11 (Rubinstein, 2018). The same paper derives an ANN corollary: assuming SETH, for every constants c>1c>12 there exists c>1c>13 such that no algorithm can preprocess c>1c>14 vectors in c>1c>15 time and answer c>1c>16-ANN queries in c>1c>17 time (Rubinstein, 2018).

For monochromatic CP, a separate SETH-based result shows that for every c>1c>18 there exist constants c>1c>19 and (o1,o2)(o_1^*,o_2^*)0 such that no algorithm running in time (o1,o2)(o_1^*,o_2^*)1 can solve (o1,o2)(o_1^*,o_2^*)2-CP in the (o1,o2)(o_1^*,o_2^*)3-metric when the dimension satisfies

(o1,o2)(o_1^*,o_2^*)4

(S. et al., 2018). The same work also establishes exact CP hardness in dimensions (o1,o2)(o_1^*,o_2^*)5, showing that medium-dimensional approximation lower bounds and medium-dimensional exact lower bounds occupy distinct exponent regimes.

Metric dependence is sharp. For (o1,o2)(o_1^*,o_2^*)6, it is OVH-hard to obtain an (o1,o2)(o_1^*,o_2^*)7-time (o1,o2)(o_1^*,o_2^*)8-approximation for CP in (o1,o2)(o_1^*,o_2^*)9, and for rr^*0 it is OVH-hard to obtain an rr^*1-time rr^*2-approximation (David et al., 2016). By contrast, in Euclidean space the same paper stresses that its polar-pair reduction does not yield comparable hardness because biclique representations in rr^*3 require much higher dimension (David et al., 2016). This suggests that approximation hardness is substantially more metric-sensitive than the formal definitions alone might imply.

A different kind of separation arises in one-dimensional colored data structures. For exact CDO on points in an array, preprocessing rr^*4 and query time rr^*5 must satisfy

rr^*6

under the Strong-APSP hypothesis, while for rr^*7-approximate CDO the FMM-based upper bound is

rr^*8

and

rr^*9

When cc0, this becomes

cc1

which lies strictly below the exact barrier cc2 for part of the tradeoff curve (Horowicz et al., 6 Jul 2025). In that model, the exact version is strictly harder than the approximate version.

Exact-versus-approximate asymmetry also appears in reductions. A paper comparing closest, furthest, and orthogonal pairs states explicitly that its conditional lower bounds only hold for exact solutions and that the reductions from OV to closest/furthest pair no longer work if one only has cc3-approximations (Williams, 2017). This is a useful caution: approximation can evade exact fine-grained barriers, but only in some models, and not in the settings covered by the lower bounds above.

4. Colored, query, and oracle formulations

Approximate CP often appears not as a single optimization problem but as a query problem over structured families of subsets. The cleanest current example is the one-dimensional array metric, where a color distance oracle preprocesses cc4 colored points so that a query on colors cc5 returns an approximation to

cc6

This is a static approximate colored closest-pair data structure (Horowicz et al., 6 Jul 2025).

The main ACDO construction is a heavy-light decomposition. A color cc7 is heavy if cc8; otherwise it is light. For every color, the structure stores a one-dimensional nearest-neighbor data structure cc9. For heavy colors it additionally precomputes an approximate matrix cc00 of all-heavy color distances. Heavy-heavy queries become cc01 lookups in cc02, while if one queried color is light, the answer is computed exactly as

cc03

using at most cc04 nearest-neighbor probes (Horowicz et al., 6 Jul 2025). The expensive part is building cc05, which is done by partitioning the line into blocks of length cc06, building Boolean matrices cc07 and cc08 across geometric scales cc09, and multiplying them. The resulting preprocessing–query tradeoff is FMM-governed rather than purely combinatorial.

The same paper extends the construction to multi-colored points with a laminar color hierarchy, AMCDOCH, and then to the snippets problem on texts via the Kopelowitz–Krauthgamer reduction. Snippets preprocesses a text cc10 so that, for patterns cc11, one can approximate the distance between closest occurrences. The resulting query time is

cc12

after preprocessing time cc13, with the same tradeoff curve as ACDO (Horowicz et al., 6 Jul 2025). In effect, approximate CP, approximate colored CP, and approximate closest-occurrence search in strings become equivalent under linear-time reductions in this one-dimensional regime.

Problem Model Representative guarantee
ACDO 1D array, colored points cc14 or cc15 (Horowicz et al., 6 Jul 2025)
AMCDOCH 1D array, hierarchical colors Same preprocessing–query tradeoff as ACDO (Horowicz et al., 6 Jul 2025)
Snippets Text cc16, query patterns cc17 cc18-approximate closest-occurrence distance in cc19 (Horowicz et al., 6 Jul 2025)

These oracle-style formulations matter because they expose approximation as a query-complexity resource rather than only as an optimization relaxation. They also provide one of the clearest exact-versus-approximate separations presently known for CP-type tasks.

5. Metric-dependent and stochastic variants

Approximate CP behaves differently across metric classes. In tree spaces with existential uncertainty, the problem becomes probabilistic rather than purely geometric. Given a stochastic point set cc20 on a weighted tree, the threshold probability

cc21

can be computed exactly in

cc22

time for any fixed threshold cc23, where cc24 is the number of tree vertices after preprocessing (Xue et al., 2016). The same work gives an exact algorithm for cc25 in

cc26

time and a cc27-approximation in

cc28

time, using the fact that the expectation can be approximated via cc29 threshold-probability queries (Xue et al., 2016). Here approximation is over a random closest-pair distance, not over a fixed witness pair.

At the opposite end of the spectrum, in constant doubling dimension exact CP is already easy. A randomized divide-and-conquer algorithm computes the exact closest-pair distance in cc30 expected time in doubling metrics (Maheshwari et al., 2020). This suggests that, in sufficiently low-dimensional metric structure, approximation is not needed for asymptotic speed; its main value then lies in simplification, robustness, or engineering.

Range-query versions introduce another axis. In fixed-dimensional Euclidean space, exact range closest-pair data structures are known for orthogonal boxes, simplices, halfspaces, and balls. For orthogonal queries in cc31, one result gives cc32 space, cc33 preprocessing, and cc34 query time (Chan et al., 2019). The same work proves a conditional lower bound for exact orthogonal RCP in cc35, via reductions from set intersection and color uniqueness, implying that linear-space exact orthogonal RCP cannot beat cc36 query time under the stated conjecture (Chan et al., 2019). A plausible implication is that approximation is the natural route to polylogarithmic-query range CP in higher dimensions, although that paper itself develops only exact structures.

High-dimensional exact cc37 CP offers a further benchmark. One exact paper states that its contribution is not to approximation, but it emphasizes that approximate algorithms based on LSH and JL are already abundant, whereas exact high-dimensional cc38 CP remains difficult (Gold et al., 2016). Approximate CP is therefore best understood as metric-dependent: it ranges from unnecessary, to natural, to indispensable, depending on whether the ambient structure already admits near-linear exact algorithms.

6. Practical systems and empirical profiles

Practical approximate CP has developed into a systems topic as well as an algorithmic one. PM-LSH is an in-memory framework for high-dimensional approximate NN and CP search in Euclidean space. Its experimental closest-pair results are reported as cc39. On the Audio dataset it achieves

cc40

compared with NLJ at cc41s and exact ratio cc42 (Zheng et al., 2021). On MNIST it reports

cc43

while NLJ takes cc44s (Zheng et al., 2021). On larger datasets such as GIST, PM-LSH reports

cc45

again substantially below exact nested-loop time (Zheng et al., 2021). The key point is not merely speed but a tunable balance among projected candidate count, radius thresholding, and exact verification.

MSPP targets large Euclidean or Pearson-similarity datasets stored on disk. On the real gene-expression datasets D1.1–D1.6, its reported A-Rank is cc46, meaning that across the reported runs the best returned pair is the true closest pair (Saha et al., 2020). In time-series experiments with up to cc47 points of length cc48, it also reports A-Rank cc49, with Top-50 and Top-100 accuracy remaining near cc50 for smaller instances and degrading gradually as the datasets grow (Saha et al., 2020). Against motif-mining baselines, the same paper reports substantial speedups; for example, with cc51 million points and cc52 dimensions, JUMP takes cc53 minutes while MSPP takes cc54 minutes (Saha et al., 2020).

These systems expose a persistent engineering pattern. First, approximation is often implemented as candidate-generation plus exact re-ranking. Second, the practical quality metric is frequently recall or rank rather than a worst-case multiplicative bound on distance. Third, the most effective methods are highly model-specific: PM-LSH exploits projected Euclidean geometry and PM-trees, while MSPP exploits per-attribute discretization and repeated hash collisions.

Approximate CP therefore occupies two distinct but connected roles. In theory, it is a family of optimization and query problems with nuanced exact-versus-approximate separations and strong lower bounds in several regimes. In practice, it is a high-dimensional systems problem in which randomized filtering, candidate compression, and selective exact verification are the dominant design principles.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Approximate Closest Pair (CP).