Title: A Robust Exact Algorithm for the Euclidean Bipartite Matching Problem
Venue: NeurIPS 2023
Accepted: yes
Keywords: Euclidean bipartite matching

exact algorithms

primal dual method
Abstract: Algorithms for the minimum-cost bipartite matching can be used to estimate Wasserstein distance between two distributions.
Given two sets $A$ and $B$ of $n$ points in a $2$-dimensional Euclidean space, one can use a fast implementation of the Hungarian method to compute a minimum-cost bipartite matching of $A$ and $B$ in $\tilde{O}(n^2)$ time. Let $\Delta$ be the spread, i.e., the ratio of the distance of the farthest to the closest pair of points in $A\cup B$. In this paper, we present a new algorithm to compute a minimum-cost bipartite matching of $A$ and $B$ with a similar worst-case execution time of $\tilde{O}(n^2 \log \Delta)$. However, when $A$ and $B$ are drawn independently and identically from a fixed distribution that is not known to the algorithm, the execution time of our algorithm is, in expectation, $\tilde{O}(n^{7/4}\log \Delta)$.

To the best of our knowledge, our algorithm is the first one to achieve a sub-quadratic execution time even for stochastic point sets with real-valued coordinates.
Our algorithm extends to any dimension $d$, where it runs in $\tilde{O}(n^{2-\frac{1}{2d}}\Phi(n))$ time for stochastic point sets $A$ and $B$; here $\Phi(n)$ is the query/update time of a dynamic weighted nearest neighbor data structure. 
Our algorithm can be seen as a careful adaptation of the Hungarian method in the geometric divide-and-conquer framework.

A Robust Exact Algorithm for the Euclidean Bipartite Matching Problem

Abstract

Algorithms for the minimum-cost bipartite matching can be used to estimate Wasserstein distance between two distributions. Given two sets A and B of n points in a 2 -dimensional Euclidean space, one can use a fast implementation of the Hungarian method to compute a minimum-cost bipartite matching of A and B in ˜ O ( n 2 ) time. Let ∆ be the spread, i.e., the ratio of the distance of the farthest to the closest pair of points in A ∪ B . In this paper, we present a new algorithm to compute a minimum-cost bipartite matching of A and B with a similar worst-case execution time of ˜ O ( n 2 log ∆) . However, when A and B are drawn independently and identically from a fixed distribution that is not known to the algorithm, the execution time of our algorithm is, in expectation, ˜ O ( n 7 / 4 log ∆) .

To the best of our knowledge, our algorithm is the first one to achieve a subquadratic execution time even for stochastic point sets with real-valued coordinates. Our algorithm extends to any dimension d , where it runs in ˜ O ( n 2 -1 2 d Φ( n )) time for stochastic point sets A and B ; here Φ( n ) is the query/update time of a dynamic weighted nearest neighbor data structure. Our algorithm can be seen as a careful adaptation of the Hungarian method in the geometric divide-and-conquer framework.

1 Introduction

Given two distributions µ and ν defined on the sets S µ , S ν ⊆ R d , respectively, and an integer p ≥ 1 , the p -Wasserstein distance between µ and ν is the minimum cost required to transport mass from one to the other. More formally, let Γ( µ, ν ) be the set of all probability measures on S µ × S ν with marginal distributions µ and ν . The p -Wasserstein distance between µ and ν is defined as

where ∥ s 1 -s 2 ∥ denotes the Euclidean distance of s 1 and s 2 .

In many applications, the distribution µ (resp. ν ) may not be known, but one may have access to n i.i.d samples A (resp. B ) from µ (resp. ν ). The empirical distribution µ n (resp. ν n ) is a discrete distribution with A (resp. B ) as support, where each sample has a mass of 1 /n . The empirical p -Wasserstein distance is simply the p -Wasserstein distance between the empirical distributions µ n and ν n . As n → ∞ , the empirical p -Wasserstein distance between µ and ν converges to the real p -Wasserstein distance between them [7, 15, 16, 46] with several results showing sharp upper and lower bounds on the empirical p -Wasserstein distances [10, 17, 19, 45, 49]. See also [36]

for a survey on such results. Due to these properties, empirical p -Wasserstein distance has found applications in training generative adversarial networks [8, 9, 24, 33-35], image retrieval [39, 42], graph predictions [27, 37], clustering stability validation [18, 31], and two-sample tests [13, 14, 23, 25, 41]. The convergence of the empirical distribution to the real distribution, however, exhibits the 'curse of dimensionality'; that is, the convergence rate decreases as the dimension increases [16, 49]. The empirical p -Wasserstein distance therefore is most useful in low-dimensional settings.

Computing the empirical p -Wasserstein distance can be done by solving an instance of the minimumcost bipartite matching problem as follows. Consider the complete bipartite graph on A and B where each edge from a ∈ A to b ∈ B has a cost of ∥ a -b ∥ p . A bipartite matching (or simply a matching ) M on A ∪ B is a set of vertex-disjoint edges of G ( A,B ) . The matching M is said to be a perfect matching if | M | = n . We define the cost of a matching M , denoted by w p ( M ) , as w p ( M ) = ∑ ( a,b ) ∈ M ∥ a -b ∥ p . The p th power Euclidean bipartite matching is a perfect matching M ∗ p with the minimum-cost under w p ( · ) . The empirical p -Wasserstein distance between µ and ν is W p ( µ n , ν n ) = ( 1 n w p ( M ∗ p ) ) 1 /p .

The minimum-cost matching M ∗ p and therefore, the empirical p -Wasserstein distance can be computed in O ( n 3 ) time using the Hungarian algorithm [28]. In this paper, we adapt the Hungarian algorithm in a geometric divide-and-conquer framework. The execution time of our algorithm is similar to that of the Hungarian algorithm (Remark 3.2). However, when the input point sets A and B are samples drawn from the same distribution, the algorithm is asymptotically faster than the Hungarian algorithm.

Related Work. Computing an optimal minimum-cost bipartite matching can be done in O ( n 3 ) time using the classical Hungarian algorithm [28]. In geometric settings, the efficiency of the Hungarian algorithm can be improved to ˜ O ( n 2 Φ( n )) , where Φ( n ) is the query and update time of a dynamic weighted nearest neighbor data structure [3, 44, 48]. For two dimensions, Φ( n ) = log O (1) n and therefore, we get a ˜ O ( n 2 ) time exact algorithm. For higher dimensions, however, this leads to only slightly sub-cubic execution time.

For graphs with n vertices and m edges, there are faster algorithms that compute an optimal minimumcost matching [11, 21, 22] provided the edge costs are integers that are bounded by C 1 . However, in our setting, the coordinates of the input points are real-valued and the Euclidean distances, due to the presence of a square-root, can be irrational. As a result, these algorithms only provide an approximate solution and the Hungarian algorithm and its fast implementations remain the only known exact algorithm for the problem.

For 2 -dimensional points with integer coordinates bounded by Γ , Sharathkumar [43] presented a weakly polynomial ˜ O ( n 3 / 2 log Γ) time algorithm to compute the exact 1 -Wasserstein distance. The main idea was to use the approximation algorithm by Sharathkumar and Agarwal [44] to initially find a planar sub-graph that traps all the edges of the optimal matching. Then, they use the planar separator based algorithm by Lipton and Tarjan [32] to find a minimum-cost matching in this subgraph. This algorithm, however, is restricted only to two dimensions and for p = 1 . The design of a faster algorithm to compute the p th power Euclidean bipartite matching for d -dimensional point sets remains a major open problem. We would also note the extensive work on the design of approximation algorithms for the 1 -Wasserstein distance [2, 4-6, 12, 20, 26, 30, 38, 40] as well as the 2 -Wasserstein distance [1, 29].

Our Results. For any point set P in the Euclidean space, the spread of P is the ratio of the distance of the farthest pair to the closest pair in P . The main result of this paper is presented in Theorem 1.1.

Theorem 1.1. There exists a randomized algorithm that, given any two point sets A and B sampled independently and identically from a distribution µ inside the unit d -dimensional hypercube, where | A | = | B | = n and µ is not known to the algorithm, computes an exact Euclidean bipartite matching between A and B and has an expected running time of ˜ O ( n 2 -1 2 d Φ( n ) log ∆) ; here, ∆ is the spread of the points in A ∪ B .

When A and B are i.i.d samples from a distribution µ in the unit square ( d = 2 ) and µ is not known to the algorithm, our algorithm achieves a weakly polynomial sub-quadratic execution time of ˜ O ( n 7 / 4 log ∆) . Our algorithm easily extends to any constant p > 1 and any fixed d -dimensional

(a)

(b)

(c)

b

a

y(b):

y(a)

b

a

y(b):

y(

a

b

a

W-

7-

y(a)

y(b)

space (we present our result for any arbitrary p as well as the proof of all our claims in the Appendix). For instance, for p = 2 and d = 2 as well as for p = 1 and d = 3 , the execution time of our algorithm can be bounded by ˜ O ( n 11 / 6 Φ( n ) log ∆) . However, for simplicity in exposition of the ideas, we restrict the presentation of our algorithm to two-dimensional ( d = 2 ) and Euclidean settings ( p = 1) . To the best of our knowledge, this is the first sub-quadratic weakly polynomial exact algorithm for computing the p th power Euclidean bipartite matching for 2 -dimensional stochastic point sets. Furthermore, for many distributions, such as the uniform distribution on the unit square, one can show that, with high probability, the spread of the point set is bounded by a polynomial in n . For all such distributions, we achieve a strongly polynomial sub-quadratic exact algorithm.

Our algorithm can be seen as an elegant adaptation of the classical Hungarian algorithm in a quadtree based divide-and-conquer framework. The previous speed-ups of the Hungarian algorithm in geometric settings are based on sophisticated data structures that are hard to implement. In contrast, our geometric improvements are relatively simple, which allows us to implement and compare our algorithm with the standard implementation of the Hungarian algorithm. Experiments suggest that our algorithm outperforms the Hungarian algorithm for synthetic data samples drawn from two (possibly different) distributions µ and ν as long as the 1 -Wasserstein distance between µ and ν is small. Our algorithm also outperforms the Hungarian algorithm on data samples drawn from the New York Taxi dataset, where one sample is drawn from the set of request pick-up locations ( µ ) and the other sample is drawn from the request drop-off locations ( ν ) . Experiments also suggest that our analysis may not be tight, at least for the case where µ = ν is the uniform distribution inside the unit square. Obtaining a tighter analysis of our algorithm remains an important open question. Next, we present an overview of our divide-and-conquer algorithm.

Our Approach. The classical Hungarian algorithm is based on the primal-dual framework where, along with a matching M , for every point v ∈ A ∪ B , the algorithm maintains a non-negative dual weight y ( v ) . The matching M and dual weights y ( · ) are feasible if, for every edge ( a, b ) ∈ A × B ,

The Hungarian algorithm initializes M to be an empty matching and the dual weights of every vertex v ∈ A ∪ B to be 0 . It then incrementally builds a perfect matching M while maintaining its feasibility and returns the constructed feasible perfect matching. It is well-known that a perfect matching that is feasible is also a minimum-cost matching.

In the Euclidean setting, we interpret the dual weight y ( v ) of any point v as the radius of a disc centered around v . We refer to these discs as the dual discs . For any edge ( a, b ) , if the dual disc of a is in the interior of the dual disc of b (Figure 1(a)), then y ( b ) -y ( a ) > ∥ a -b ∥ , making the dual assignment infeasible. Therefore, for any feasible dual weight assignment, the dual disc of a cannot be completely inside the dual disc of b . The condition (2) corresponds to Figure 1(b) where the boundary of the disc of a touches the boundary of the disc of b from inside. Figure 1(c) is an example of an edge that only satisfies (1).

In order to implement the Hungarian algorithm in the geometric divide-and-conquer framework, we can use a quadtree Q with the unit square as the root node. Each node of this tree represents a square □ and if □ has more than one input point, then it has four children that are obtained by splitting □ into four equal squares. Squares with no more than one point become a leaf node in this tree.

(a)

a

?

b

日

a

口

a

(b)

Consider the following naïve implementation of the Hungarian algorithm in a quadtree based geometric divide-and-conquer framework. Given a square □ of the quadtree Q , we recursively find a feasible matching in each of the four children. Doing so, however, may lead to a dual weight assignment that violates the feasibility condition for bridge edges , i.e., edges that cross the boundary of the children squares. See Figure 2(a) that illustrates a dual feasible assignment at two children squares, which when combined causes the edge ( a ′ , b ) to violate the feasibility condition (1). Thus, implementing the conquer step becomes challenging since we cannot simply combine the feasible dual assignments at the children to achieve a feasible dual assignment at the parent.

To overcome this difficulty, we add an additional condition that restricts the dual disc of a point v inside any child square □ ′ to always stay inside □ ′ , i.e., y ( v ) ≤ d ( v, □ ′ ) , where d ( v, □ ′ ) is the Euclidean distance of v to the boundary of □ ′ . Figure 2(b) shows a restricted dual assignment at the two children squares, which remains feasible when combined at the parent. Such a restricted feasible matching inside each of the four children squares of □ trivially combine to form a feasible matching at □ . Thus, one can apply the divide-and-conquer framework to compute such a restricted feasible matching. Unfortunately, however, the restricted feasible matchings computed at the children may be of an extremely low cardinality. This is particularly true when most of the input points are close to the boundaries of the children squares. See, for instance, in Figure 3(a), the restricted feasible matching is an empty one since most of the blue points are close to the boundary. As a result, the divide step may not make any progress in computing a perfect matching and the conquer step may have to do significant amount of work to find a perfect matching, causing the execution time of the conquer step to be the same as that of the standard implementation of the Hungarian algorithm.

We observe that if the quadtree Q is constructed using a random-shift , then, in expectation, only sub-linearly many points are close to the boundary of any square of Q . By combining this with the fact that the average length of a matching edge for n points drawn from an arbitrary distribution µ inside unit square is ≈ 1 / √ n , we are able to bound the expected number of unmatched points in the restricted matchings by ˜ O ( n 3 / 4 ) , leading to an execution time of ˜ O ( n 7 / 4 ) for the conquer steps across all cells at each level of the quadtree and an overall execution time of ˜ O ( n 7 / 4 log ∆) .

2 Preliminaries

We begin by introducing the notations necessary to describe our algorithm. Given A ∪ B and any square □ , let A □ = A ∩ □ , B □ = B ∩ □ , and n □ = | A □ ∪ B □ | . Let ℓ □ denote the side-length of □ . For any point v ∈ A □ ∪ B □ inside □ , let d( v, □ ) denote the Euclidean distance of v to its closest point on the boundary of □ . We say that v is δ -close to □ if d( v, □ ) ≤ δℓ □ . Let n δ □ denote the number of points of A □ ∪ B □ that are δ -close to □ .

Randomly Shifted Quadtree. Given the input points A ∪ B inside a unit square, a randomly shifted quadtree on the input can be constructed as follows. Let ξ be a point chosen uniformly at random from the unit square [0 , 1] 2 . Define the square □ ∗ := [ -4 , 4] 2 + ξ to be the root of the quadtree Q . Recursively construct Q by decomposing any square □ with n □ > 1 into four equal squares, each of which become the children of □ . Any square with exactly one point becomes a leaf square of the quadtree. Given that the spread of the points in A ∪ B is ∆ , the height of Q is O (log ∆) .

a

口

b

(a)

(b)

(c)

For any square □ of the quadtree Q , in the next lemma, we show that due to the random shift, there are not many points that are very close to the boundary of □ .

Lemma 2.1. For any square □ of a randomly shifted quadtree and any δ ∈ (0 , 1 / 2) , E [ n δ □ ] = O ( δ E [ n □ ]) .

Constrained Matching. For any square □ , we introduce a variant of the minimum-cost matching problem, which we refer to by the minimum-cost □ -constrained matching problem. Given a square □ , consider a matching M □ of the points in A □ ∪ B □ . Any point v ∈ A □ ∪ B □ is a free point with respect to M □ if v is not matched in M □ . Let A F □ (resp. B F □ ) denote the set of free points of A □ (resp. B □ ) with respect to M □ . We define the □ -constrained cost of the matching M □ , denoted by w □ ( M □ ) , as

For any square □ , the minimum-cost □ -constrained matching ( □ -MCM ), denoted by M ∗ □ , is simply a matching with the minimum □ -constrained cost. In Lemma 2.2, we show that for the root square □ ∗ of Q , the minimum-cost □ ∗ -constrained matching is also a minimum-cost matching on A ∪ B .

For any arbitrary square □ of Q , M ∗ □ might be of a very small cardinality. See, for instance in Figure 3(a) where B is the set of blue points, Equation (3) is minimized when all blue points are free points; i.e., w □ ( M ∗ □ ) = ∑ b ∈ B d( b, □ ) and M ∗ □ is an empty matching. Nonetheless, by using the bound on the number of δ -close points to any square □ of a randomly-shifted quadtree, we can bound the expected number of free points with respect to any □ -MCM M ∗ □ . In the example of Figure 3(b), the solid lines show the boundary of the squares of a randomly-shifted quadtree, and as shown in Figure 3(c), only a few points will be free with respect to the optimal matchings constrained to the squares of the quadtree.

Lemma 2.2. For any square □ of a randomly shifted quadtree and any minimum-cost □ -constrained matching M ∗ □ , (i) the expected number of free points of B □ with respect to M ∗ □ is ˜ O ( n 3 / 4 ) in 2 -dimensions (and ˜ O ( n 1 -1 2 d ) in d dimensions), and (ii) if □ is the root square, then M ∗ □ is a minimum-cost perfect matching on A ∪ B .

For the rest of the paper, we design a primal-dual method to compute a □ ∗ -MCM, which by Lemma 2.2 is also a minimum cost matching on A ∪ B .

Constrained Feasibility. Similar to the Hungarian algorithm, we devise a primal-dual method to compute a □ -MCM. For any square □ of Q , we say that a matching M □ on A □ ∪ B □ along with a set of non-negative dual weights y ( · ) for the points in A □ ∪ B □ is □ -feasible if,

(a)

(b)

(c)

b2

b1

b2

61

b3

Note that (4) and (5) are conditions identical to the ones maintained by the Hungarian algorithm. Condition (6) ensures that the dual discs stay inside the square and condition (7) ensures that the □ -MCM is of minimum cost.

Given a □ -feasible matching M □ , y ( · ) , we say that any point b ∈ B □ is a □ -free point with respect to M □ if b is not matched in M □ and y ( b ) < d( b, □ ) . Note that a free point may not be □ -free. For instance, in Figure 4(a), the blue point b 2 is free but not a □ -free point since its dual weight is equal to its distance to □ . Let B F □ denote the set of all □ -free points in B □ . We say that a □ -feasible matching M □ , y ( · ) is □ -optimal if it does not have any □ -free points, i.e., B F □ = ∅ . The following lemma shows that any □ -optimal matching M □ , y ( · ) is a □ -MCM. Thus, we focus on computing a □ -optimal matching.

Lemma 2.3. Let M □ , y ( · ) be a □ -optimal matching on A □ ∪ B □ . Then, M □ is a minimum-cost □ -constrained matching.

Given a square □ of Q and its four children □ 1 , □ 2 , □ 3 , and □ 4 , we can obtain a □ -feasible matching at □ by simply combining the □ i -optimal matchings from each child □ i . We use this property to design our divide-and-conquer algorithm for computing □ -optimal matching.

Lemma 2.4. For any square □ , let □ i , i ∈ [1 , 4] be the set of all children of □ and let M i , y ( · ) denote a □ i -optimal matching. Then, the matching ⋃ 4 i =1 M i , y ( · ) is a □ -feasible matching.

Next, we define slack and an augmenting path with respect to a □ -feasible matching.

Slacks. For any square □ , any □ -feasible matching M □ , y ( · ) , and any pair of points ( a, b ) ∈ A □ × B □ , we define the edge slack on the feasibility conditions for edge ( a, b ) , denoted by s ( a, b ) , as s ( a, b ) = ∥ a -b ∥ -y ( b ) + y ( a ) . We say that ( a, b ) is admissible if s ( a, b ) = 0 . Furthermore, for any point b ∈ B □ , we define the vertex slack of b with respect to condition (6) to be s □ ( b ) := d( b, □ ) -y ( b ) . We refer to the edge slack (resp. vertex slack) as slack when the edge (resp. vertex) is obvious from the context.

While the definition of edge slacks are identical to what is used in the Hungarian algorithm, the definition of vertex slacks is new. Since the dual weights associated with any □ -feasible matching satisfies (4)-(7), both edge slacks and vertex slacks will be non-negative.

Admissible Augmenting Path. For any square □ , suppose M □ , y ( · ) is a □ -feasible matching on A □ ∪ B □ . An alternating path with respect to M □ is a simple path on A □ ∪ B □ whose edges alternate between those in M □ and those not in M □ . An admissible augmenting path (or simply admissible path ) is any alternating path consisting only of zero slack edges that starts at a □ -free point b ∈ B F □ and ends at either (i) a free point a ∈ A F □ or (ii) a point b ′ ∈ B □ with a slack of 0 . We can augment a □ -feasible matching M □ along an admissible path P by setting M □ ← M □ ⊕ P , i.e., we remove all matching edges of P from M □ and add all non-matching edges of P to M □ (see Figure 4). The following lemma shows that augmenting a matching along an admissible path does not violate □ -feasibility conditions and also reduces the number of □ -free points of B □ by one.

Lemma 2.5. Suppose M □ , y ( · ) is a □ -feasible matching and P is an admissible path. After augmenting M □ along P , the matching M □ , y ( · ) remains □ -feasible. Furthermore, the augmentation reduces the number of □ -free points of B □ with respect to M □ by one.

Residual Network. In order to assist in computing admissible paths with respect to a □ -feasible matching M □ , y ( · ) , we define a residual network of A □ ∪ B □ with respect to M □ as follows. The vertex set of the residual network is the set of points A □ ∪ B □ and a source vertex s . For any pair of points ( a, b ) ∈ A □ × B □ , if ( a, b ) ∈ M □ , we add an edge directed from a to b with a weight s ( a, b ) to the residual network. Otherwise, if ( a, b ) ̸∈ M □ , we add an edge directed from b to a with a weight s ( a, b ) . In addition, we add zero-weight edges from the source s to every □ -free point in B F □ . Note that any zero-weight directed path from the source vertex s to a free point a ∈ A F □ or a zero-slack point b ∈ B □ in this residual network is an admissible path.

3 Algorithm

In this section, we describe our algorithm for computing an optimal matching on a point set A ∪ B . Our algorithm builds a randomly shifted quadtree Q . For any square □ of the quadtree Q , we denote the set of children of □ in Q by C [ □ ] .

We describe our divide-and-conquer algorithm with respect to an arbitrary square □ in Q . Our algorithm computes a □ -optimal matching M □ , y ( · ) .

Base case. If □ is a leaf of Q , let v be the only point in □ . If v ∈ B , set y ( v ) ← d( v, □ ) and M □ ←∅ . If v ∈ A , set y ( v ) ← 0 and M □ ←∅ and return (see lines 1-4 of Algorithm 1).

Divide step. If □ is not a leaf of Q , for each child □ ′ ∈ C [ □ ] , recursively compute the □ ′ -optimal matching M □ ′ , y ( · ) on A □ ′ ∪ B □ ′ (see lines 6 and 7 of Algorithm 1).

Conquer step. For any child □ ′ ∈ C [ □ ] , let M □ ′ , y ( · ) denote the □ ′ -optimal matching returned by the algorithm. Set M □ := ⋃ □ ′ ∈ C [ □ ] M □ ′ as the union of all matchings computed inside the children of □ . Let B F □ denote the □ -free points of B □ with respect to M □ . To obtain a □ -optimal matching, our algorithm iteratively executes the CONSTRAINEDHUNGARIANSEARCH procedure that adjusts the dual weights to find an admissible path P with respect to M □ . Then, the AUGMENT procedure updates M □ by augmenting the matching along P . The algorithm continues to search and augment until there are no □ -free points of B □ , i.e., until M □ , y ( · ) is a □ -optimal matching. See lines 8-11 of Algorithm 1. We describe the details of the CONSTRAINEDHUNGARIANSEARCH and AUGMENT procedures below.

1CONSTRAINEDHUNGARIANSEARCH procedure: Compute the residual network with respect to M □ and execute a Dijkstra's shortest path algorithm starting from the source s . Let κ v denote the shortest path distance from s to v as computed by the Dijkstra's algorithm. Let

and let u denote the point that achieves this minimum. Note that u ∈ A F □ ∪ B □ . Let P u denote the shortest path from s to u and P denote the path obtained by removing s from P u . For any v ∈ A □ ∪ B □ , if κ v < κ , update its dual weight to y ( v ) ← y ( v ) + κ -κ v .

2AUGMENT procedure: Augment M □ along P .

Our algorithm returns the matching M □ ∗ computed at the root □ ∗ of Q as the minimum-cost matching between A and B . This completes the description of our algorithm. The pseudo-code of our divide-and-conquer algorithm is provided in Algorithm 1.

3.1 Proof of correctness

Recollect that for the root square □ ∗ of Q , from Lemma 2.2, a □ ∗ -optimal matching is a minimumcost matching of A and B . Therefore, it suffices to show that, at each square □ of Q , our algorithm computes a □ -optimal matching.

We begin by showing this for any leaf square □ , which by definition contains exactly one point. Since there are no edges inside □ , conditions (4) and (5) hold trivially. Let v be the only point inside □ .

̸

If v ∈ B □ , then y ( v ) = d( v, □ ) and therefore, condition (6) holds. Otherwise, v ∈ A □ and our algorithm sets y ( v ) = 0 ; therefore, condition (7) holds. In both cases, it is easy to see that B F □ is empty and therefore the empty matching M □ and dual weight y ( v ) is a □ -optimal matching.

For any non-leaf square □ of Q , at the beginning of the conquer step, the algorithm simply combines the constrained optimal matchings computed at its non-empty children. From Lemma 2.4, the resulting matching will be a □ -feasible matching. From Lemma 3.1 below, after the execution of the CONSTRAINEDHUNGARIANSEARCH procedure, the matching M □ , y ( · ) remains a □ -feasible matching and the path P returned by the procedure is an admissible path. From Lemma 2.5, the execution of AUGMENT procedure then reduces the number of □ -free points by one while maintaining the □ -feasibility conditions. Therefore, during the execution of the conquer step, the matching M □ , y ( · ) remains □ -feasible and the number of □ -free points reduces by one at each iteration; thus, the algorithm terminates with a □ -optimal matching, as desired.

Lemma 3.1. Given any square □ of Q and any □ -feasible matching M □ , y ( · ) , after executing the CONSTRAINEDHUNGARIANSEARCH procedure on □ , the updated dual weights remain □ -feasible. Furthermore, the returned path P is an admissible path.

3.2 Proof of Efficiency

For any square □ , let T □ denote the execution time of the conquer step of our algorithm when executed on □ . Additionally, for any i , let L ( i ) denote the set of all squares of the quadtree that are processed at depth i of recursion and let T i denote the total execution time of our algorithm across all such squares, i.e., T i = ∑ □ ∈L ( i ) T □ .

Recall that the conquer step of our algorithm consists of iterations, where in each iteration, it executes the CONSTRAINEDHUNGARIANSEARCH procedure followed by the AUGMENT procedure. For any square □ of Q , from Lemma 2.5, each iteration of the conquer step reduces the number of □ -free points of B □ by one. Therefore, the number of iterations is bounded by the number of □ -free points of B □ , which is at most the total number of free points with respect to the □ ′ -MCM computed for all children □ ′ of □ . By invoking Lemma 2.2 on all children of □ , we bound the expected number of iterations of the conquer step on □ by ˜ O ( n 3 / 4 ) for 2 dimensions (and ˜ O (2 d n 1 -1 2 d ) for d dimensions).

Using any dynamic weighted nearest neighbor data structure with an update/query time of Φ( n □ ) , one can execute the CONSTRAINEDHUNGARIANSEARCH procedure in ˜ O ( n □ Φ( n □ )) time [44, 48]. For planar point sets, Φ( n □ ) = poly(log n □ ) and therefore, each execution of the CONSTRAINEDHUNGARIANSEARCH procedure takes ˜ O ( n □ ) time. Furthermore, the AUGMENT procedure simply augments the matching along an admissible path, which can be done in O ( n □ ) time. Therefore, the conquer step of our algorithm executes ˜ O ( n 3 / 4 ) iterations for 2 dimensions (and ˜ O (2 d n 1 -1 2 d ) iterations for d dimensions), in expectation, where each iteration takes ˜ O ( n □ ) time for 2 dimensions (and ˜ O ( n □ Φ( n □ )) for d dimensions). Since ∑ □ ∈L ( i ) n □ ≤ n , E [ T i ] = ∑ □ ∈L ( i ) E [ T □ ] =

(a) Uniform vs. Uniform

(c) Pickup vs. Drop-off

400

1000

400

Time in seconds

300

Time in seconds

008

Time in seconds

300

600

200

200

400

100

100

200

1.0

1.5

2.0

Number of points in thousands

2.5

3.0

3.5

4.0

4.5

5.0

1.0

1.5

Number of points in thousands

2.5

3.0

3.5

4.0

4.5

5.0

1.0

1.5

2.0

Number of points in thousands

2.5

3.0

3.5

4.0

4.5

5.0

˜ O ( ∑ □ ∈L ( i ) n 3 / 4 n □ ) = ˜ O ( n 7 / 4 ) for 2 dimensions (and E [ T i ] = ˜ O (2 d n 2 -1 2 d Φ( n )) for d dimensions). Summing over all levels of Q , the expected execution time of our algorithm is ˜ O ( n 7 / 4 log ∆) for 2 dimensions (and ˜ O (2 d n 2 -1 2 d Φ( n ) log ∆) for d dimensions). Using a slightly sophisticated argument which is presented in the Appendix, we can remove the 2 d from the execution time for the d -dimensional settings, leading to Theorem 1.1.

Remark 3.2. When the input points A ∪ B are chosen arbitrarily, the number of iterations of the conquer step can be Θ( n □ ) , leading to an execution time of O ( n 2 □ Φ( n □ )) per square and O ( n 2 Φ( n ) log ∆) in total.

4 Experiments

In this section, we present the results of our experiments comparing the execution time of our algorithm to that of the Hungarian algorithm. Both algorithms are implemented in Java and share the same data structures 2 . For both algorithms, we use the classical implementation of Dijkstra's shortest path algorithm used in the Hungarian search procedure and do not use any weighted nearest neighbor data structures. All computations are performed using a single calculation thread on a computer with a 2.6 GHz 6-Core Intel Core i7 CPU and 16 GB of 2667 MHz DDR4 RAM.

Datasets. We test our algorithm on 2 -dimensional synthetic and real-world datasets. For the synthetic dataset, we use two distributions, namely (i) a uniform distribution defined on the unit square (Uniform), and (ii) a Gaussian distribution constrained to the unit square with a randomly chosen mean inside the unit square and a standard deviation of 0 . 25 (Gaussian). For a real-world dataset, we employ the New York Taxi dataset [47] and obtain two distributions, namely (i) the distribution of pickup locations (Pickup) and (ii) the distribution of drop-off locations (Drop-off) of passengers. We filtered the datasets by considering trips in seven dates in 2014 with (i) a trip duration of at least 3 minutes, and (ii) a trip velocity of at most 110 mph .

Tests. In each test, we conducted experiments using two sets of n i.i.d samples from distributions µ and ν within the unit square. We executed both our divide-and-conquer algorithm and the Hungarian algorithm to compute the empirical 1 -Wasserstein distance between the same set of samples and compared the execution times. In our first experiment, we used Uniform distribution for both µ and ν to compare the performance of algorithms when the distributions are the same. For the second experiment on synthetic datasets, we compared running times with different distributions µ being Uniform and ν being Gaussian, and in the third experiment, which is on the real-world datasets, µ was set to the Pickup distribution while ν was the Drop-off distribution. In our experiments on the synthetic datasets, we recorded the number of iterations our algorithm executes at each square of the quadtree to find out how tight our analysis are. The results of our experiments are shown in Figures 5 and 6.

Results. As depicted in Figure 5, experiments suggest that our algorithm outperforms the Hungarian algorithm, and the improvement is most significant when the distributions are the same (Figure 5(a)). More generally, experiments suggest that our algorithm performs significantly better than the Hungar-

iterations

Number

2000

1750

1500

1250

1000

750

500

250

0

5n~0.55

10000

20000

30000

40000

n

(a) Uniform vs. Uniform

5n~0.55

2000

Number of iterations

1500

1000

500

0

0

10000

20000

30000

40000

50000

60000

n

ian algorithm when the matching cost is low (Figures 5(a) and (c)). The reason for this improvement lies in the fact that the Hungarian algorithm performs a 'global Hungarian search' for matching each point, whereas our algorithm isolates shorter edges of the optimal matching within smaller quadtree sub-problems and execute 'local Hungarian search' for them. Therefore, while the asymptotic improvements are shown for samples from the same distribution, we expect our algorithm to perform better when the optimal matching has many edges with small cost, such as when points are drawn from two similar but not identical distributions. This is evident in our third experiment (Figure 5(c)), where we sample n pick-up locations and n drop-off locations from the New York Taxi dataset. Notably, pick-up and drop-off locations tend to follow different distributions, with pick-ups having a higher density around Manhattan.

Additionally, our algorithm handles larger point sets efficiently; for example, it computes the optimal solution for 50 000 points from the Uniform distribution in approximately 700 seconds. Finally, in Figure 6, our experiments on samples from the same synthetic dataset suggest that for a square with n points, the number of iterations of the conquer step of our algorithm might be bounded by O ( n α ) for α ≃ 0 . 55 . This perhaps suggests that our upper-bound of O ( n 3 / 4 ) may be an overestimate, at least for the uniform and Gaussian distributions.

5 Conclusion

In this paper, we adapted the classical primal-dual approaches for computing minimum-cost matching within the divide-and-conquer framework. This approach led to a sub-quadratic weakly-polynomial exact algorithm for computing minimum-cost matching on stochastic point sets. Notably, our algorithm incorporates a randomly shifted quadtree, a structure previously used only in approximation algorithms for p -Wasserstein distance. We conclude by highlighting some open problems for further investigation.

An interesting question is whether it is possible to further exploit the geometry of the dual weights and give a tighter bound for the number of iterations of our algorithm at each square; thus, improving the analysis of our algorithm.

Our analysis only requires the fact that the average length of the matching edges in large cells is small. Stochastic point sets have this property and therefore, we can achieve sub-quadratic algorithms for them. Is there a sub-quadratic exact algorithm for the case where the matching edges are long? Understanding this case may shed light into the design of sub-quadratic exact algorithm for arbitrary inputs.

Finally, our algorithm is a weakly polynomial algorithm as its running time is dependent on the spread of the point set. Can we remove the dependence on spread while maintaining the simplicity of our algorithm?

50000

References

Pankaj K Agarwal and Jeff M Phillips. On bipartite matching under the rms distance. In Proceedings of the Eighteenth Canadian Conference on Computational Geometry', Kingston, Canada , pages 143-146, 2006.

Pankaj K. Agarwal and Kasturi R. Varadarajan. A near-linear constant-factor approximation for Euclidean bipartite matching? In 20th International Symposium on Computational Geometry , pages 247-252, 2004.

Pankaj K Agarwal, Alon Efrat, and Micha Sharir. Vertical decomposition of shallow levels in 3-dimensional arrangements and its applications. In Proceedings of the eleventh annual symposium on Computational geometry , pages 39-50, 1995.

Pankaj K Agarwal, Hsien-Chih Chang, Sharath Raghvendra, and Allen Xiao. Deterministic, near-linear ε -approximation algorithm for geometric bipartite matching. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing , pages 1052-1065, 2022.

Pankaj K Agarwal, Sharath Raghvendra, Pouyan Shirzadian, and Rachita Sowle. A higher precision algorithm for computing the 1 -wasserstein distance. In The Eleventh International Conference on Learning Representations , 2022.

Pankaj K Agarwal, Sharath Raghvendra, Pouyan Shirzadian, and Rachita Sowle. An improved ε -approximation algorithm for geometric bipartite matching. In 18th Scandinavian Symposium and Workshops on Algorithm Theory (SWAT 2022) . Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2022.

Miklós Ajtai, János Komlós, and Gábor Tusnády. On optimal matchings. Combinatorica , 4: 259-264, 1984.

Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In International conference on machine learning , pages 214-223. PMLR, 2017.

Jiezhang Cao, Langyuan Mo, Yifan Zhang, Kui Jia, Chunhua Shen, and Mingkui Tan. Multimarginal wasserstein gan. Advances in Neural Information Processing Systems , 32, 2019.

Sergio Caracciolo, Carlo Lucibello, Giorgio Parisi, and Gabriele Sicuro. Scaling hypothesis for the euclidean bipartite matching problem. Physical Review E , 90(1):012118, 2014.

Li Chen, Rasmus Kyng, Yang P Liu, Richard Peng, Maximilian Probst Gutenberg, and Sushant Sachdeva. Maximum flow and minimum-cost flow in almost-linear time. In 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS) , pages 612-623. IEEE, 2022.

Marco Cuturi. Sinkhorn distances: Lightspeed computation of optimal transport. In Advances in Neural Information Processing Systems 26 , pages 2292-2300, 2013.

Nabarun Deb and Bodhisattva Sen. Multivariate rank-based distribution-free nonparametric testing using measure transportation. Journal of the American Statistical Association , 118(541): 192-207, 2023.

Nabarun Deb, Bhaswar B Bhattacharya, and Bodhisattva Sen. Efficiency lower bounds for distribution-free hotelling-type two-sample tests based on optimal transport. arXiv preprint arXiv:2104.01986 , 2021.

Eustasio Del Barrio and Jean-Michel Loubes. Central limit theorems for empirical transportation cost in general dimension. The Annals of Probability , 47(2):926 - 951, 2019.

Richard Mansfield Dudley. The speed of mean glivenko-cantelli convergence. The Annals of Mathematical Statistics , 40(1):40-50, 1969.

RMDudley. Real analysis and probability, 2002.

Nghia Duong-Trung, Minh-Hoang Nguyen, and Hanh TH Nguyen. Clustering stability via concept-based nonnegative matrix factorization. In Proceedings of the 3rd International Conference on Machine Learning and Soft Computing , pages 49-54, 2019.

Nicolas Fournier and Arnaud Guillin. On the rate of convergence in wasserstein distance of the empirical measure. Probability theory and related fields , 162(3-4):707-738, 2015.

Kyle Fox and Jiashuai Lu. A near-linear time approximation scheme for geometric transportation with arbitrary supplies and spread. In Proc. 36th Annual Symposium on Computational Geometry , pages 45:1-45:18, 2020.

H. N. Gabow and R.E. Tarjan. Faster scaling algorithms for network problems. SIAM J. Comput. , 18:1013-1036, October 1989. ISSN 0097-5397.

Harold N. Gabow and Robert Endre Tarjan. Faster scaling algorithms for general graph-matching problems. J. ACM , 38(4):815-853, 1991.

Javier González-Delgado, Alberto González-Sanz, Juan Cortés, and Pierre Neuvial. Twosample goodness-of-fit tests on the flat torus based on wasserstein distance and their relevance to structural biology. arXiv preprint arXiv:2108.00165 , 2021.

Xin Guo, Johnny Hong, Tianyi Lin, and Nan Yang. Relaxed wasserstein with applications to gans. In ICASSP 2021-2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) , pages 3325-3329. IEEE, 2021.

Masaaki Imaizumi, Hirofumi Ota, and Takuo Hamaguchi. Hypothesis test and confidence analysis with wasserstein distance on general dimension. Neural Computation , 34(6):14481487, 2022.

Andrey Boris Khesin, Aleksandar Nikolov, and Dmitry Paramonov. Preconditioning for the geometric transportation problem. arXiv preprint arXiv:1902.08384 , 2019.

Soheil Kolouri, Navid Naderializadeh, Gustavo K Rohde, and Heiko Hoffmann. Wasserstein embedding for graph learning. arXiv preprint arXiv:2006.09430 , 2020.

Harold W Kuhn. The hungarian method for the assignment problem. Naval research logistics quarterly , 2(1-2):83-97, 1955.

Nathaniel Lahn and Sharath Raghvendra. An o ( n 5 / 4 ) time ε -approximation algorithm for rms matching in a plane. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA) , pages 869-888. SIAM, 2021.

Nathaniel Lahn, Sharath Raghvendra, and Kaiyi Zhang. A push-relabel based additive approximation for optimal transport. arXiv preprint arXiv:2203.03732 , 2022.

Tilman Lange, Volker Roth, Mikio L Braun, and Joachim M Buhmann. Stability-based validation of clustering solutions. Neural computation , 16(6):1299-1323, 2004.

Richard J Lipton and Robert Endre Tarjan. Applications of a planar separator theorem. SIAM journal on computing , 9(3):615-627, 1980.

Huidong Liu, GU Xianfeng, and Dimitris Samaras. A two-step computation of the exact gan wasserstein distance. In International Conference on Machine Learning , pages 3159-3168. PMLR, 2018.

Huidong Liu, Xianfeng Gu, and Dimitris Samaras. Wasserstein gan with quadratic transport cost. In Proceedings of the IEEE/CVF international conference on computer vision , pages 4832-4841, 2019.

Youssef Mroueh, Tom Sercu, and Vaibhava Goel. Mcgan: Mean and covariance feature matching gan. In International conference on machine learning , pages 2527-2535. PMLR, 2017.

Victor M Panaretos and Yoav Zemel. Statistical aspects of wasserstein distances. Annual review of statistics and its application , 6:405-431, 2019.

Hermina Petric Maretic, Mireille El Gheche, Giovanni Chierchia, and Pascal Frossard. Got: an optimal transport framework for graph comparison. Advances in Neural Information Processing Systems , 32, 2019.

Abhijeet Phatak, Sharath Raghvendra, Chittaranjan Tripathy, and Kaiyi Zhang. Computing all optimal partial transports. In The Eleventh International Conference on Learning Representations , 2022.

Julien Rabin, Julie Delon, and Yann Gousseau. Circular earth mover's distance for the comparison of local features. In 2008 19th International Conference on Pattern Recognition , pages 1-4. IEEE, 2008.

Sharath Raghvendra and Pankaj K Agarwal. A near-linear time ε -approximation algorithm for geometric bipartite matching. Journal of the ACM (JACM) , 67(3):1-19, 2020.

Aaditya Ramdas, Nicolás García Trillos, and Marco Cuturi. On wasserstein two-sample testing and related families of nonparametric tests. Entropy , 19(2):47, 2017.

Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover's distance as a metric for image retrieval. International journal of computer vision , 40(2):99, 2000.

R. Sharathkumar. A sub-quadratic algorithm for bipartite matching of planar points with bounded integer coordinates. In 29th International Symposium on Computational Geometry , pages 9-16, 2013.

R Sharathkumar and Pankaj K Agarwal. Algorithms for the transportation problem in geometric settings. In Proceedings of the 23rd annual ACM-SIAM symposium on Discrete Algorithms , pages 306-317. SIAM, 2012.

Peter Williston Shor. Random planar matching and bin packing . PhD thesis, Massachusetts Institute of Technology, 1985.

Max Sommerfeld, Jörn Schrieber, Yoav Zemel, and Axel Munk. Optimal transport: Fast probabilistic approximation with exact solvers. J. Mach. Learn. Res. , 20(105):1-23, 2019.

NYC Taxi and Limousine Commission (TLC). Trip record data. https://www.nyc.gov/ site/tlc/about/tlc-trip-record-data.page , 2023. Accessed: 2023-03-01.

Pravin M Vaidya. Geometry helps in matching. SIAM Journal on Computing , 18(6):1201-1225, 1989.

Jonathan Weed and Francis Bach. Sharp asymptotic and finite-sample rates of convergence of empirical measures in Wasserstein distance. Bernoulli , 25(4A):2620 - 2648, 2019.

Peer reviews:
comments: SUMMARY:
The paper presents a randomized algorithm for computing a minimum-cost matching of a bipartite graph induced by two point-sets, A and B, in the Euclidean plane. The best running time for the problem under consideration is n^2polylog(n). When A and B are drawn independently and identically from a fixed probability distribution, the presented algorithm achieves a running time of n^{7/4}polylog(n+D), where D is the ratio between the distance of the farthest pair of points to that of the closest pair of points. The presented algorithm can potentially improve the quasi-quadratic bound under the probability assumption and the assumption that D is not too large. The algorithm generalizes to higher dimensions.

STRENGTHS:
The minimum-cost matching is an important combinatorial problem, even on bipartite geometric graphs.

WEAKNESSES:
* The improvement over existing bounds is only under certain probabilistic assumptions, and assumptions about the relative positions of the points in the plane. Moreover, the presented algorithm is randomized.
* I don’t believe that the results will appeal to the broad audience of NeurIPS. The paper does not motivate the problem well with respect to the scope of NeurIPS. The problem is very restricted.
* The techniques are not very novel; they are adaptations of the Hungarian method plus a clever use of data structures.

QUESTIONS:
Could you please explain the relevance of your results to NeurIPS, beyond the importance of the matching problem as a generic optimization problem?

LIMITATIONS:
N/A
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2023-06-23

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper studies the Euclidean bipartite matching problem. In the problem, there is a complete bipartite graph on parts A and B, and the cost of edge (alb) is ||a-b||^p. The goal is to compute the minimum cost perfect matching as quickly as possible. This setting is most motivated in the paper by computing the empirical p-Wasserstein distance (though I think the problem is also interesting in its own right). It is important to note that these edge costs are non-integral, in particular they can even be irrational. Many of the sub-quadratic algorithms that work when the edge costs are integral do not apply here.\n\nIt was known that the minimum cost matching in this setting can be computed with the Hungarian algorithm in time O(n^3), and in time O(n^2) in geometric settings. The main contribution of this work is showing that in geometric setting (i.e., the vertices of A,B are points in R^d), there exists an algorithm that runs in weakly polynomial sub-quadratic time. The “weakly polynomial” comes from a term in the runtime of log(Delta), where Delta gives the spread (i.e., ratio of the distance between the farthest and closest pair of points in A and B) of the point set, specifically the runtime is \\tilde{O}(n^{2-1/(2d)}*phi(n)*log(Delta)), where the phi(n) is some runtime dealing with a nearest neighbor data structure (polylog(n) in d=2). Note that when A and B are sampled from some distribution mu in the unit square, even when mu is unknown, the runtime is \\tilde{O}(n^{7/4}*log(Delta)). \n\nThe main strategy is to deploy a geometric Hungarian algorithm with a divide and conquer method using the quadtree. However, the divide portion is only helpful when points in the quad tree are not close to the boundary of their children (in some sense that I’m stating very informally). Therefore the worst-case is still just that of the Hungarian algorithm, but we get improvement when these bad boundary cases do not happen.\n\nSTRENGTHS:\n- Improved runtime on an interesting problem.\n- Interesting technical insights in using quadtrees with a geometric Hungarian algorithm.  Even after this main idea, there are a couple hurdles the authors need to overcome. \n- Techniques are relatively practical, and this is exemplified with experiments on both synthetic and real data. This is particularly interesting because a lot of the past work apparently uses complicated, hard to implement data structures.\n- I thought the paper was extremely well-presented. The technical difficulties of the paper are really well laid out.\n\nWEAKNESSES:\n- It was not totally clear what techniques from the authors are totally new and what is building off of prior work. I would recommend adding a brief discussion of the work by Sharathkumar, at least. My understanding is that the big technical idea of, and then modifying it so the divide and conquer parts actually give progress, is a new perspective. Can you comment more on this?\n\nQUESTIONS:\nOther comments to authors:\n- (see question in weaknesses)\n- Great figures through out\n- Nice discussion of high level technical overview at the end of Section 1\n- Assuming you’re given another page in your camera ready, I’d add the conclusion section from your Appendix to the main body. The future directions/ open problems you give are nice.\n\nLIMITATIONS:\nna", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2023-06-28"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes a new, exact algorithm for solving the Euclidean weighted bipartite matching problem. Here, we have data sets $A,B \\subset \\mathbb{R}^d,$ each of cardinality $n,$ and the weight of an edge $ab$ is defined to be $\\lVert a - b \\rVert^p$ for any integer $p\\ge 1.$ This formulation is motivated by its direct application to computing empirical $p$-Wasserstein distances.\n\nFor data drawn i.i.d. from the same unknown distribution on the unit hypercube, the expected runtime of the algorithm is shown to be weakly-polynomial time, asymptotically in the number of points $n$ and with respect to an additional \\emph{spread} parameter $\\Delta $, defined to be the ratio of largest and smallest distances between any two points. As $d \\to \\infty $, this expected runtime approaches that of the classical Hungarian algorithm, up to polylog factors and assuming an efficient data structure for weighted nearest neighbors.\n\nMost of the analysis and all of the experiments focus on the special case where $d=2$, where the improvements over the Hungarian algorithm are more pronounced. The runtime analysis rests on the key observation of Lemma 2.1: if we cut a randomly-shifted square containing the data into four equal pieces, an asymptotically small number of data points will lie near the boundary where these pieces meet. A maximum-weight matching may be constructed by repeated subdivision: optimal matchings in each of the four pieces can be combined to get a feasible solution, and the algorithm searches for \"admissible\" augmenting paths until the feasible solution can no longer be improved. For a bipartite graph on $2n$ vertices drawn iid unformly from the unit square, the expected runtime of this algorithm is $\\tilde O (n^{7/4} \\log \\Delta )$. For comparison, the Hungarian algorithm in this setting is $\\tilde O (n^2)$. Experiments on real and synthetic data show that the new algorithm can substantially outperform the Hungarian algorithm.\n\nPost-rebuttal edit: The authors have responded in a satisfactory manner to my queries. Their algorithm is an interesting addition to the arsenal of matching algorithms, but nevertheless has certain limitations such as dependence on the parameter $\\Delta $. For this reason I maintain my high rating of accept.\n\nSTRENGTHS:\nMatching problems are foundational to computer science and optimization. This paper proposes a solution that demonstrates both significant theoretical and empirical advantages in the particular domain of empirical $p$-Wasserstein distance where these problems have been successfully applied. In the class of work proposing improvements to the Hungarian algorithm, the authors have overcome limitations in this domain have included focus on the unweighted case, distributional assumptions, approximate vs exact algorithms, and special cases of the geometric setting studied here. \n\nThe runtime analysis is presented very clearly, and theorems are stated carefully. Although the algorithm is ultimately only weakly polynomial, the authors theoretical assertions that the algorithm outperforms the Hungarian method for a range of parameters are backed up convincingly by empirical results.\n\nAnother noteworthy feature of the algorithm is that it does not rely on sophisticated data structures like prior work. Indeed, hardly any background at all is needed to understand the proofs and implement the algorithm. This is also reflected in the simplicity of the source code which the authors have shared to aid in reproducibility.\n\nWEAKNESSES:\nMy main criticism, with a view towards the proposed application of $p$-Wasserstein distance computation, is that the case of _unequal_ distributions is treated mostly as an afterthought. Arguably, this is a more important case in practice since it involves less restrictive assumptions on the data. One finds a few comments addressing this scattered throughout the paper, eg. in the abstract and Remark 3.2. However, to justify the claim that the algorithm performs similarly to the Hungarian algorithm in such cases, it would be beneficial to give experimental results in addition to the asymptotic (as the authors have already done in the equal-distributions case.)\n\nI suggest generally that the authors be somewhat more explicit about the limitations of their algorithm. As already noted in the introduction, computing the empirical Wasserstein distance is mainly tractable in low dimensions. Nevertheless, other readers might be interested in the high-dimensional Euclidean matching problem. I find it difficult to believe that the performance of this method would be better than the purely-combinatorial Hungarian for $d$ large, particularly because of the high cost of dividing each sub-hypercube into $2^d$ pieces.\n\nQUESTIONS:\nline 46: \" The execution time of our algorithm is similar to that...\" I assume Remark 3.2 is what justifies this remark? It would be helpful to include a forward reference here.\n\nline 59: \"and their fast implementations\" Don't you mean \"its fast implementations\"?\n\nline 322: \"The dataset consists of the locations\" This means latitude and longitude, correct?\n\nline 323: \"We filtered the datasets by considering trips\" Can you comment more on the choices behind your data filtering and other aspects of experimental design? Specifically, could you report some summary statistics (min, max, median, mean) for the spread of these data sets, both with and without the filtering? It is understandable that some filtering would be needed to see a performance increase over the Hungarian algorithm, and I think the thresholds are reasonable. Still, it would be helpful to understand the effect of filtering on both the runtime and the parameters used to analyze runtime. Moreover, given the filtering step, I think that the suggested improvement $\\tilde O( n^{.55})$ is very speculative.\n\nLIMITATIONS:\nFor scientific limitations, refer to my comments under \"Weaknesses\". I do not see any potential for these results to have direct adverse effects on society.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 4, "DATE": "2023-07-02"}

comments: SUMMARY:
The paper considers matching two sets $A$ and $B$ of $n$ points in the Euclidean space so as to minimize the sum of distances of matched points, when both pointsets are drawn independently and identically from the same (unknown to the algorithm) distribution.  The authors extend the well-known Hungarian method with the shifted quad-tree decomposition technique, and improve over the best known result for the worst-case pointsets. The paper is complemented with experimental results.

STRENGTHS:
This is an interesting problem to consider and I found the extension of the Hungarian method with the shifted-quad tree technique quite interesting and -- at least to me -- novel. The paper is well written.

WEAKNESSES:
The result of the paper is novel but I am not sure if I would call a better performance for only a special class of inputs an improvement over (slightly worse) results but that hold for general inputs.

I would have preferred if the paper explicitly stated it every time a technique from the literature is used/adapted.

QUESTIONS:
- I was convinced by your motivation for studying the problem, but I was wondering if you know of any real-world matching problem where it is natural to have the points drawn by the same distribution?

LIMITATIONS:
No limitations applicable and no potential negative societal impact.
TITLE: Official Review
SOUNDNESS_CORRECTNESS: 3
DATE: 2023-07-06