[Paper Review] Scalable Nearest Neighbor Search for Optimal Transport
This paper introduces Flowtree, a novel algorithm for scalable approximate nearest neighbor search under the Wasserstein-1 (W1) distance, leveraging tree-structured embeddings and flow-based estimation to accelerate similarity search. It achieves up to 7.4× faster running time than state-of-the-art methods on real-world datasets while maintaining high accuracy.
The Optimal Transport (a.k.a. Wasserstein) distance is an increasingly popular similarity measure for rich data domains, such as images or text documents. This raises the necessity for fast nearest neighbor search algorithms according to this distance, which poses a substantial computational bottleneck on massive datasets. In this work we introduce Flowtree, a fast and accurate approximation algorithm for the Wasserstein-$1$ distance. We formally analyze its approximation factor and running time. We perform extensive experimental evaluation of nearest neighbor search algorithms in the $W_1$ distance on real-world dataset. Our results show that compared to previous state of the art, Flowtree achieves up to $7.4$ times faster running time.
Motivation & Objective
- To address the computational bottleneck of exact nearest neighbor search under the Wasserstein-1 distance in large-scale datasets.
- To design a fast, accurate, and scalable approximation algorithm for W1 distance computation suitable for k-NN classification pipelines.
- To overcome the incompatibility of W1 with standard Euclidean geometry and the inefficiency of exact flow computation in high dimensions.
- To evaluate and compare the performance of Flowtree against existing approximation methods in real-world applications such as text and image similarity.
- To optimize end-to-end pipelines combining multiple estimators (e.g., Quadtree, R-WMD, Sinkhorn) with Flowtree for improved speed-accuracy trade-offs.
Proposed method
- Flowtree constructs a hierarchical tree decomposition of the underlying metric space (R^d) to enable efficient flow estimation.
- It uses a bottom-up tree traversal to compute approximate optimal transport plans, reducing the complexity of W1 computation.
- The algorithm estimates W1 distances by solving flow problems on tree-embedded metrics, which can be computed in linear time.
- Flowtree is integrated into multi-stage pipelines, either as an intermediate filter or as a replacement for existing estimators like R-WMD or Sinkhorn.
- The method is formally analyzed for approximation factor and running time, with theoretical guarantees on accuracy and efficiency.
- Pipelines are tuned using a validation set to optimize candidate pruning thresholds (c_i) for each stage, minimizing runtime while achieving target recall.
Experimental results
Research questions
- RQ1Can a tree-based flow approximation method achieve both high accuracy and significant speedup in W1 nearest neighbor search?
- RQ2How does Flowtree compare to existing estimators like R-WMD, Mean, and Sinkhorn in terms of runtime and recall performance?
- RQ3What is the optimal pipeline configuration when integrating Flowtree as a filter or replacement in multi-stage W1 search?
- RQ4To what extent does Flowtree reduce the computational bottleneck of exact W1 computation in k-NN pipelines?
- RQ5Does Flowtree’s tree-embedding approach maintain compatibility with the geometric structure of high-dimensional data, such as word embeddings?
Key findings
- Flowtree reduces median running time by up to 7.4× compared to the best baseline pipeline for recall@5 ≥ 0.9 on the 20news dataset.
- For recall@1 ≥ 0.9, Flowtree improves runtime by a factor of 3.7 compared to the best baseline pipeline.
- When used as a replacement for the second stage in a pipeline, Flowtree reduces runtime by 7.4× to 8× in recall@5 experiments.
- The primary performance bottleneck in Flowtree-integrated pipelines shifts to exact W1 computation, indicating that Flowtree effectively offloads most of the cost.
- Pipelines using Flowtree as an intermediate filter achieve speedups of 1.64× to 6.75×, depending on the downstream estimator.
- Sinkhorn-3, though slower than Sinkhorn-1, allows fewer candidates to be passed from Quadtree due to higher accuracy, resulting in faster overall runtime when combined with Flowtree.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.