Table of Contents
Fetching ...

Kd-tree Based Wasserstein Distance Approximation for High-Dimensional Data

Kanata Teshigawara, Keisho Oh, Ken Kobayashi, Kazuhide Nakata

TL;DR

This work tackles the scalability bottleneck of Wasserstein distance computations in retrieval by introducing kd-Flowtree, a kd-tree–based embedding that enables deep, dimension-robust trees for Flowtree-like transport approximations. The method preserves linear-time transport costs and adds a probabilistic, dataset-size–independent bound on nearest-neighbor search accuracy, improving performance in high-dimensional ground spaces. Empirical results on text datasets (e.g., 20NEWS, AMAZON, BBC) show kd-Flowtree achieves higher recall than prior tree-based methods and maintains competitive runtimes, highlighting the practical impact for large-scale OT-based retrieval. Overall, the kd-tree embedding demonstrates a promising direction for scalable, accurate Wasserstein-distance approximations in high dimensions, with potential broader applicability beyond retrieval.

Abstract

The Wasserstein distance is a discrepancy measure between probability distributions, defined by an optimal transport problem. It has been used for various tasks such as retrieving similar items in high-dimensional images or text data. In retrieval applications, however, the Wasserstein distance is calculated repeatedly, and its cubic time complexity with respect to input size renders it unsuitable for large-scale datasets. Recently, tree-based approximation methods have been proposed to address this bottleneck. For example, the Flowtree algorithm computes transport on a quadtree and evaluates cost using the ground metric, and clustering-tree approaches have been reported to achieve high accuracy. However, these existing trees often incur significant construction time for preprocessing, and crucially, standard quadtrees cannot grow deep enough in high-dimensional spaces, resulting in poor approximation accuracy. In this paper, we propose kd-Flowtree, a kd-tree-based Wasserstein distance approximation method that uses a kd-tree for data embedding. Since kd-trees can grow sufficiently deep and adaptively even in high-dimensional cases, kd-Flowtree is capable of maintaining good approximation accuracy for such cases. In addition, kd-trees can be constructed quickly than quadtrees, which contributes to reducing the computation time required for nearest neighbor search, including preprocessing. We provide a probabilistic upper bound on the nearest-neighbor search accuracy of kd-Flowtree, and show that this bound is independent of the dataset size. In the numerical experiments, we demonstrated that kd-Flowtree outperformed the existing Wasserstein distance approximation methods for retrieval tasks with real-world data.

Kd-tree Based Wasserstein Distance Approximation for High-Dimensional Data

TL;DR

This work tackles the scalability bottleneck of Wasserstein distance computations in retrieval by introducing kd-Flowtree, a kd-tree–based embedding that enables deep, dimension-robust trees for Flowtree-like transport approximations. The method preserves linear-time transport costs and adds a probabilistic, dataset-size–independent bound on nearest-neighbor search accuracy, improving performance in high-dimensional ground spaces. Empirical results on text datasets (e.g., 20NEWS, AMAZON, BBC) show kd-Flowtree achieves higher recall than prior tree-based methods and maintains competitive runtimes, highlighting the practical impact for large-scale OT-based retrieval. Overall, the kd-tree embedding demonstrates a promising direction for scalable, accurate Wasserstein-distance approximations in high dimensions, with potential broader applicability beyond retrieval.

Abstract

The Wasserstein distance is a discrepancy measure between probability distributions, defined by an optimal transport problem. It has been used for various tasks such as retrieving similar items in high-dimensional images or text data. In retrieval applications, however, the Wasserstein distance is calculated repeatedly, and its cubic time complexity with respect to input size renders it unsuitable for large-scale datasets. Recently, tree-based approximation methods have been proposed to address this bottleneck. For example, the Flowtree algorithm computes transport on a quadtree and evaluates cost using the ground metric, and clustering-tree approaches have been reported to achieve high accuracy. However, these existing trees often incur significant construction time for preprocessing, and crucially, standard quadtrees cannot grow deep enough in high-dimensional spaces, resulting in poor approximation accuracy. In this paper, we propose kd-Flowtree, a kd-tree-based Wasserstein distance approximation method that uses a kd-tree for data embedding. Since kd-trees can grow sufficiently deep and adaptively even in high-dimensional cases, kd-Flowtree is capable of maintaining good approximation accuracy for such cases. In addition, kd-trees can be constructed quickly than quadtrees, which contributes to reducing the computation time required for nearest neighbor search, including preprocessing. We provide a probabilistic upper bound on the nearest-neighbor search accuracy of kd-Flowtree, and show that this bound is independent of the dataset size. In the numerical experiments, we demonstrated that kd-Flowtree outperformed the existing Wasserstein distance approximation methods for retrieval tasks with real-world data.
Paper Structure (14 sections, 2 theorems, 20 equations, 5 figures, 3 tables, 1 algorithm)

This paper contains 14 sections, 2 theorems, 20 equations, 5 figures, 3 tables, 1 algorithm.

Key Result

Theorem 1

Let $s$ be an integer, and assume that the weights in each distribution’s support are integer multiples of $1/s'$ for some $s'\le s$ (i.e., $1/s',2/s',\dots$). Let $\nu$ be a query distribution, $\mu^*$ its true nearest neighbor, and $\mu'$ the neighbor returned by Flowtree. Then, with probability a

Figures (5)

  • Figure 1: Recall@$k$ for 20NEWS
  • Figure 2: Recall@$k$ for AMAZON
  • Figure 3: Recall@$k$ for BBC
  • Figure 4: Recall@$k$ change with different depth limits
  • Figure : Flowtree

Theorems & Definitions (7)

  • Definition 1: Optimal transport between point sets villani2008optimal
  • Definition 2: $p$-Wasserstein distance villani2008optimal
  • Definition 3: Tree‐based 1‐Wasserstein Distance le2019tree
  • Definition 4: Flowtreebackurs2020scalable
  • Theorem 1: Upper bound on Flowtree search accuracy under uniform weights backurs2020scalable
  • Theorem 2: Upper bound on kd-Flowtree search accuracy under uniform weightss backurs2020scalable
  • proof