TL;DR
Comparing two massive clouds of high-dimensional data—whether 3D LiDAR scans or LLM token embeddings—usually forces a painful choice between exactness and computational survival. This paper introduces ultra-fast algorithms to approximate the Chamfer distance across Euclidean ($\ell_2$) and intermediate ($\ell_p$) geometries, matching the theoretical speed records previously held only by Manhattan ($\ell_1$) distance. Even better, their approach slashes memory usage by 15x, effortlessly unlocking real-time streaming and faster LLM document retrieval.
What Problem Does This Paper Address?
Imagine trying to measure how similar two 3D shapes are, or how well a search query matches a document, when both are represented as unordered sets of $n$ points in $d$-dimensional space. The gold-standard metric, Earth-Mover Distance (which finds the optimal 1-to-1 matching between points), is computationally brutal. Instead, engineers rely on the Chamfer distance: for every point in set $A$, find the distance to its single closest neighbor in set $B$, and sum those distances up.
Naively checking every pair takes $\mathcal{O}(n^2 d)$ time, which grinds to a halt when $n$ and $d$ are large. Recently, researchers broke the speed barrier for $\ell_1$ (Manhattan) distance, getting the runtime down to a blazingly fast $\mathcal{O}(nd \log \log n)$. However, extending that speed to the ubiquitous $\ell_2$ (Euclidean) norm—needed for physical 3D space and normalized ML embeddings—remained an open problem, stuck at a slower $\mathcal{O}(nd \log n)$. Meanwhile, intermediate $\ell_p$ norms ($1 < p < 2$), which offer a sweet spot between $\ell_1$'s outlier-robustness and $\ell_2$'s rotational invariance, had no near-linear algorithms at all.
Methods
The authors bridge this gap by compressing the dimensions before hunting for nearest neighbors, tailoring their mathematical squishing to the specific geometry:
- For Euclidean Space ($p=2$): Instead of using a standard Fast Johnson-Lindenstrauss Transform (FJLT) to project $d$ dimensions down to $m$, they use a Toeplitz-matrix-based FJLT. Standard FFT projections take $\mathcal{O}(d \log d)$ time, which ruins the target runtime, whereas Toeplitz matrices run in $\mathcal{O}(d \log m)$ time. Rather than treating the existing fast $\ell_1$ solver (from Feng & Indyk, 2025) as a black box, they open it up and re-analyze its internal QuadTree step directly in the reduced $\ell_2$ space.
- For Intermediate Norms ($1 < p < 2$): Standard two-sided distance-preserving projections don't exist here. Instead, the authors use "lopsided" embeddings to map $\ell_p$ into $\ell_1$. Because these projection matrices are dense and slow to multiply naively, they deploy Fast Matrix Multiplication (FMM) techniques to apply the sketch in near-linear time, then feed the result into an $\ell_1$ Chamfer solver.
- Extensions: Using basic geometry on the unit sphere, they adapt their $\ell_2$ solver to approximate ColBERT’s MaxSim (an inner-product metric used in LLM passage retrieval). Furthermore, because their projections are linear, they naturally work in dynamic turnstile streams, where point coordinates are continuously updated on the fly.
Datasets
No new public benchmarks are introduced, as the focus is algorithmic scaling and accuracy validation. The authors evaluate their work on:
- Synthetic Point Clouds (64D): 450 pairs per seed generated from Gaussians with synthetic corruptions (dense shifts, hub collapses, sparse spikes) to test how well different $\ell_p$ norms mimic exact Earth-Mover Distance.
- High-Dimensional Synthetic Data (2048D): Point sets up to $n = 20,000$ to stress-test GPU wall-clock time and memory limits.
- GloVe Word Embeddings (300D): Real-world NLP embeddings used to validate approximation accuracy and the lopsided $\ell_{1.5}$ embedding.
Key Insights and Ideas
- "Weak" Embeddings Are Strong Enough for Chamfer: Usually, dimensionality reduction requires strict two-sided bounds—distances can neither shrink nor stretch too much. Lopsided embeddings only guarantee non-contraction (distances don't shrink) and bound the average stretch, meaning individual distances might blow up wildly. The authors have a neat "aha" realization: because Chamfer distance takes the minimum distance for each point, you only need to ensure the true nearest neighbor doesn't stretch on average, while non-contraction prevents distant points from falsely sneaking in as the new minimum!
- Crude Sketches Suffice for QuadTrees: In the $\ell_2$ algorithm, the Toeplitz FJLT isn't used to preserve the whole dataset to $(1+\varepsilon)$ perfection. It is only used to get a constant-factor approximation inside the QuadTree routing phase, absorbing the rough projection error into an already-crude estimation step.
- Intermediate Norms Deserve More Love: Empirically, $\ell_{1.5}$ Chamfer distance correlates better with exact Euclidean Earth-Mover Distance than either $\ell_1$ or $\ell_2$ across diverse geometric corruptions, validating the push for $1 < p < 2$ algorithms.
Key Results
- Theoretical Speedups: Achieves $\mathcal{O}(nd(\log \log n + \log(1/\varepsilon))/\varepsilon^2)$ time for $\ell_2$ and ColBERT MaxSim (matching the $\ell_1$ state-of-the-art), and $\mathcal{O}(nd \cdot \text{poly}(\log \log n, \log(1/\varepsilon))/\varepsilon^2)$ for $1 < p < 2$.
- Streaming Optimality: Reduces dynamic streaming memory from $\mathcal{O}(nd)$ to $\tilde{\mathcal{O}}(n)$ space, accompanied by a mathematical proof that $\Omega(n)$ bits is the absolute theoretical floor for any constant-pass algorithm.
- 10x Faster, 15x Leaner on GPU: For $n = 20,000$ points in $d = 2048$ dimensions on a T4 GPU, the naive exact method crashes out of memory. An unsketched near-linear baseline takes 51 ms and 649 MB of VRAM. The authors' sketched method finishes in 5 ms using just 41 MB of VRAM.
- High Precision: Despite aggressive sketching down to 64 dimensions, mean relative error stays well below 1% (peaking at 0.622%). On GloVe $\ell_{1.5}$ tasks, error drops to 0.24% with 500 importance samples.
Limitations and Future Work
- The Final Theoretical Gap: In the standard static setting, a tiny $\log \log n$ factor still separates their upper bound from the trivial $\Omega(nd)$ time required just to read the input. Closing this gap—or proving it impossible—remains an open theoretical puzzle.
- Implementation Pragmatism: In their GPU experiments, the authors paired their novel projections with an older 2023 solver rather than the theoretically fastest 2025 solver, noting that the 2025 algorithm relies on tricky bit-level operations that are difficult to optimize in practice.
- Scale of Evaluation: Empirical tests were confined to a single T4 GPU using synthetic clouds and GloVe; testing on massive, real-world 3D LiDAR datasets or billion-scale LLM retrieval pipelines is a natural next step.
Summary updated