Exact Optimal Transport by Matching
Abstract
Balanced discrete optimal transport between n sources and n targets of unit mass is exactly the minimum-cost assignment problem-a bipartite perfect matching-and is therefore solvable exactly by industrial matching engines in milliseconds to seconds. We ask when the exact approach beats the standard approximate alternatives, entropic Sinkhorn and its accelerated variant Greenkhorn, and make the sparse-exact side certified by a textbook LP dual-feasibility clip. Three contributions. (i) Measurement: on dense 2-D instances, exact matching (Jonker-Volgenant) is faster and strictly more accurate than either approximate method throughout the moderate-n regime (0.01 s at n=500 to 11.5 s at n=8000); reaching a 1% quality target on the same hardware requires roughly 10-80 min for Greenkhorn (factors 4e2-6e4 over exact; plain Sinkhorn is 20-650x slower still), a rough power-law projection beyond the measured range. Greenkhorn's measured speedup over plain Sinkhorn is only 1.0-1.5x on most converged cells. (ii) A simple kNN-pool gap certificate: given a pool matching and its Blossom dual, a one-pass O(n^2) clip produces a dense-feasible lower bound; combined with the Sinkhorn dual potential (valid at every iterate, not just at convergence), the bound is valid on all 45 measured configurations and tightens monotonically with k. (iii) A multi-robot task-allocation sanity check where the discrete plan is the deliverable: per-round exact assignment costs 0.1-68 ms, while a Sinkhorn-plus-hardening pipeline costs 0.12-15.9 s and accumulates 6-27% extra travel over 15 rounds. The Sinkhorn family's large-n dense regime is acknowledged and left untouched. Code, data, and results under MIT: https://github.com/dimkadimon/OT-Blossom.
Figures & tables
| exact cost | ||
|---|---|---|
| 500 | 2064.1 | 0.01 s |
| 1000 | 3107.0 | 0.06 s |
| 2000 | 4146.4 | 0.23 s |
| 4000 | 6963.2 | 2.16 s |
| 8000 | 10873.4 | 11.48 s |
| gap % | |||
|---|---|---|---|
| 500 | 0.05 | +58.41 | 10 s |
| 500 | 0.02 | +15.02 | 34 s |
| 500 | 0.01 | +5.42 | 74 s |
| 500 | 0.005 | +2.09 | 400 s (capped) |
| 1000 | 0.05 | +91.40 | 32 s |
| 1000 | 0.02 | +24.19 | 111 s |
| 500 | 0.01 s | min | min |
|---|---|---|---|
| 1000 | 0.06 s | min | min |
| 2000 | 0.23 s | min | min |
| 4000 | 2.16 s | min | min |
| 8000 | 11.48 s | min | min |
| gap S % | s | gap G % | s | steps(G) | |||
|---|---|---|---|---|---|---|---|
| 500 | 0.05 | +58.41 | 10 | +58.41 | 10 | 260k | |
| 500 | 0.02 | +15.02 | 34 | +15.01 | 27 | 760k | |
| 500 | 0.01 | +5.42 | 74 | +5.40 | 52 | 1.48M | |
| 500 | 0.005 | +2.09 | 400 † | +2.07 | 94 | 2.82M | |
| 1000 | 0.05 | +91.40 | 32 | +91.40 | 25 | 520k | |
| 1000 | 0.02 | +24.19 | 111 | +24.17 | 77 | 1.82M |
| label | pool edges | cost | gap vs exact | |
|---|---|---|---|---|
| 4 | 19,973 | 5757.7 | +38.861% | 0.02 s |
| 8 | 35,918 | 4388.6 | +5.841% | 0.05 s |
| 16 | 67,685 | 4170.5 | +0.581% | 0.08 s |
| 32 | 130,860 | 4147.7 | +0.032% | 0.18 s |
| 64 | 255,711 | 4146.5 | +0.003% | 0.40 s |
| 256 | 962,049 | 4146.4 | +0.000% | 1.76 s |
| family (#configs) | |||
|---|---|---|---|
| uniform (5) | 2.57–6.26% | 0.07–0.70% | 0.01–0.02% |
| clustered (5) | 5.61–38.25% | 1.03–21.88% | 0.17–5.90% |
| 1-D+noise (5) | 11.94–17.35% | 1.89–3.59% | 0.24–0.79% |
| all families, true gaps | 0.52–3.84% | 0.010–2.60% | 0.000–1.85% |
| seed | travel (myopic exact) | greedy | Sinkhorn+hard | gap greedy | gap Sinkh. | |
|---|---|---|---|---|---|---|
| 50 | 7 | 10232.8 | 12353.3 | 10930.4 | +20.72% | +6.82% |
| 50 | 8 | 10531.8 | 12357.2 | 11134.9 | +17.33% | +5.73% |
| 200 | 7 | 21835.6 | 28718.1 | 24955.1 | +31.52% | +14.29% |
| 200 | 8 | 23804.5 | 30051.8 | 26802.5 | +26.24% | +12.59% |
| 800 | 7 | 47327.7 | 64986.7 | 59959.2 | +37.31% | +26.69% |
| 800 | 8 | 49050.9 | 66519.9 | 61229.6 | +35.61% | +24.83% |
| Situation | Recommended solver | Why |
|---|---|---|
| Integer plan required (MRTA, dispatch, matching per se) | Dense exact (JV) or sparse pool + certificate | Fractional plans are not physically realizable; hardening a Sinkhorn plan adds to travel cost in our application and is slower at . |
| 1-D / near-Monge (sorted-order structure) | Quantile (sort) map, Proposition 2 | time, no matrix; scales to in s. |
| Local / NN structure (e.g. Euclidean geometry, moderate dim.) | NN-pool exact (Blossom VI) + dual-repair certificate | At the certificate is tight ( ) on uniform instances; pool solve is sub-second. |
| Dense, no structure, fractional plan acceptable, | Dense exact (JV) | Exact is milliseconds to seconds at this scale; Sinkhorn pays a regularization tax and is – slower. |
| Dense, fractional plan acceptable, (past memory wall) | Well-tuned Sinkhorn/Greenkhorn (POT, GPU) | Dense matrix no longer fits; Sinkhorn runs in near-linear memory. We do not benchmark this regime. |
Optimal Transport
Optimal transport compares and transforms probability distributions by finding low-cost ways to move mass between them.
See all 287 papers