Near-Linear Time Generalized Sinkhorn Algorithms for Bounded Genus Graphs

Krzysztof Marcin Choromanski, Derek Long, Ananya Parashar, Dwaipayan SahaNeurIPS 2026

TL;DR

Calculating Optimal Transport over complex networks—like routing ambulances across a city grid or mapping distributions across a 3D mesh—usually hits a hard wall of quadratic $O(n^2)$ memory and compute because you have to calculate and store distances between every pair of nodes. This paper introduces GenusSink, an algorithm that shatters that quadratic barrier down to near-linear time and memory for flat or "bounded-genus" graphs (surfaces with a limited number of holes). By exploiting clever graph decompositions and geometric shortcuts, it makes large-scale geometric Optimal Transport practically instantaneous without sacrificing numerical precision.

What Problem Does This Paper Address?

Imagine you have piles of dirt at various intersections in a city, and holes of matching total volume elsewhere. Finding the cheapest way to move the dirt to fill the holes is the Optimal Transport Problem (OTP). Solving OTP exactly takes cubic $O(n^3)$ time, which is unusable at scale.

A famous workaround is the Sinkhorn algorithm, which adds a bit of entropy (blurriness) to relax the problem into fast, iterative matrix-vector multiplications. While Sinkhorn drops the math to $O(n^2)$, it still harbors a fatal flaw for large graphs: you have to compute and store an $n \times n$ matrix of shortest-path distances between all pairs of nodes. If your graph is a detailed 3D mesh or a city road network with tens of thousands of intersections, materializing that dense matrix blows up your RAM and stalls your CPU. Existing linear-time Sinkhorn approximations work great in flat Euclidean space, where straight-line distances are easy, or they take lossy shortcuts on graphs that ruin accuracy. The authors ask: can we get near-linear speed AND exact accuracy when costs are shortest-path distances along a graph?

Methods

The authors focus on bounded-genus graphs—graphs that can be drawn on a surface with a fixed number of "handles" or holes without edges crossing. Think planar road networks (genus 0) or 3D surface meshes like coffee mugs (genus 1) and pretzels.

Examples of 3D surfaces with genus 1, 2, and 3

To avoid building the full $n \times n$ distance matrix, GenusSink combines two big ideas:

  1. Separation Graph Field Integrators (S-GFI): The authors introduce a binary-tree data structure built via divide-and-conquer. If a graph is "tree-like" (measured by a small treewidth), you can slice it into two balanced pieces ($A$ and $B$) by removing a tiny set of bridge nodes called a separator ($S$). Because every shortest path from $A$ to $B$ must pass through $S$, you only need to store distances from $A$ and $B$ to $S$. During Sinkhorn iterations, S-GFI computes matrix-vector products on the fly by sorting coordinates and recursively splitting sums—turning quadratic interactions into near-linear geometric range queries. For generalized Sinkhorn variants (beyond standard exponentials), it pairs this with Fourier analysis and low-displacement-rank matrix theory.
Figure 1: Left: Seven-vertex planar graph. Right: A pictorial description of its treewidth decomposi- tion, with the treewidth parameter upper-bounding the sizes of the clusters of nodes above (that we will refer to as bags, see: Sec. 2.1). Two graph pieces, obtained with the separator {B, C, D}, are highlighted via red dashed boxes. The treewidth decomposition provides a gateway for designing efficient algorithms for various graph problems.
  1. Lifting to Bounded Genus: Planar and bounded-genus graphs don't actually have tiny treewidth—their separators grow on the order of $O(\sqrt{n})$. Theoretically, GenusSink bypasses this using a recent graph-theory breakthrough that embeds any bounded-genus graph metric into a proxy graph with tiny $O(\text{poly}(\log \log n))$ treewidth and negligible distortion. Practically, the authors discover an even cleaner trick: find standard $O(\sqrt{n})$ separators in linear time, randomly keep just $\log \log n$ nodes in the separator, push the rest into the child subgraphs, and cap the recursion depth $h$ so tiny leaf graphs use fast, dense matrix multiplication.

Datasets

GenusSink is evaluated across three distinct domains:

  • Synthetic "Pseudo-Genus" Surfaces: Newly constructed boundaryless planar surface graphs (up to 20,000 nodes) mimicking genus orders 1, 2, and 3.
  • Thingi10K: Real-world 3D object meshes (up to 13,000 vertices) converted into Euclidean-weighted graphs.
  • NYC EMS Bronx Road Graph: A newly configured benchmark within the JEMSS emergency simulator, featuring 33,363 road nodes and real historical NYC emergency dispatch demand data.

Key Insights and Ideas

  • Exactness on Tree-like Graphs: If your $n$-vertex graph already has a tiny treewidth of $O(\log \log n)$ (for example, any tree), GenusSink isn't an approximation at all—it is numerically equivalent to brute-force geodesic Sinkhorn, while running in near-linear time.
  • Theory Guides, Heuristics Fly: While metric embeddings guarantee asymptotic near-linear bounds in theory, randomly sub-sampling $\log \log n$ nodes from standard $O(\sqrt{n})$ separators works shockingly well in practice—skipping complex embedding construction while staying orders of magnitude more accurate than competing fast Sinkhorn baselines.
  • Never Materialize the Plan: Even the final optimal transport plan is an $n \times n$ matrix, which is too big to write down. Because GenusSink represents the kernel implicitly via S-GFI, you can query how mass moves to any target region in near-linear time without ever building the full matrix.

Key Results

  • Synthetic & 3D Meshes: On synthetic surfaces (up to 20k nodes) and Thingi10K meshes (up to 13k vertices), GenusSink matches dense brute-force Sinkhorn to numerical precision (errors around $10^{-13}$ to $10^{-14}$), beating baselines like Greenkhorn, Screenkhorn, Nyström, and heat-kernel approximations by orders of magnitude in accuracy while delivering clear runtime speedups at scale.
  • NYC Ambulance Deployment: Tasked with positioning 60 ambulances across 33,363 Bronx road nodes (too large for brute-force Sinkhorn), GenusSink achieved the lowest mean response time for high-severity emergencies: 12.5 minutes, beating fast approximation baselines (13.4 to 14.5 minutes). In the critical upper tail (>95th percentile of wait times), competing methods lagged behind GenusSink by tens of minutes.

Limitations and Future Work

  • Topological Boundaries: As the authors note at the outset, for completely arbitrary, dense, or high-expander graphs (like social networks), getting sub-quadratic shortest-path Sinkhorn is "hopeless"—GenusSink fundamentally relies on the graph having bounded genus or small separators.
  • Diameter vs. Regularization Scale: In the theoretical embedding step, additive distance errors scale with graph diameter $D$, affecting the exponential kernel by a factor of $\exp(\delta / \epsilon)$. Very small entropy regularization $\epsilon$ or rescaled, exploding diameters require tighter tolerances (and thus larger proxy treewidths).
  • Future Directions: Not explicitly discussed in the main text.

Summary updated

Abstract

We present GenusSink, a new class of approximate generalized Sinkhorn algorithms with shortest-path-distance costs for bounded genus (e.g. planar) graphs, providing near-linear time: (1) pre-processing, (2) iteration step, (3) final transport plan matrix querying and near-linear memory. Graphs handled by GenusSink include in particular planar graphs and bounded-genus meshes approximating 3D objects. GenusSink addresses total quadratic time complexity of its brute-force counterpart by leveraging separator-based decomposition of graphs, computational geometry techniques, and new results on fast matrix-vector multiplications with generalized distance matrices, using in particular Fourier analysis and low displacement rank theory. It is inspired by recent breakthroughs in graph theory on approximating bounded genus metrics with small treewidth metrics minor. The graph-centric approach enables us to target optimal transport problem with the corresponding distributions defined on the manifolds approximated by weighted graphs and with cost functions given by geodesic distances. We conduct rigorous theoretical analysis of GenusSink, provide practical implementations, leveraging newly introduced in this paper separation graph field integrators (S-GFIs) data structures and present empirical verification. GenusSink provides orders of magnitude more accurate computations than other efficient Sinkhorn algorithms, while still guaranteeing significant computational improvements, as compared to the baseline. As a by-product of the developed methods, we show that GenusSink is $\textbf{numerically equivalent}$ to the brute-force geodesic Sinkhorn algorithm on n-vertex graphs with treewidth $O(\log \log (n))$ (e.g. on trees).
BibTeX
@inproceedings{choromanski2026near,
  author = {Krzysztof Marcin Choromanski and Derek Long and Ananya Parashar and Dwaipayan Saha},
  title = {{Near-Linear Time Generalized Sinkhorn Algorithms for Bounded Genus Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=5rp5KcuMO2},
}
Figure