Efficient Numerical Strategies for Entropy-Regularized Semi-Discrete Optimal Transport

Moaad Khamlich, Francesco Romor, Gianluigi RozzaarXiv 2025 · DOI

Abstract

Semi-discrete optimal transport (SOT) provides a robust mathematical framework for mapping continuous probability densities to discrete point sets. However, the computational overhead associated with entropic regularization in SOT often limits its applicability to large-scale problems. This paper presents a high-performance numerical framework designed to mitigate these costs through adaptive spatial truncation, R-tree indexing, and dual-hierarchy multilevel strategies. Our approach achieves up to a 175x speedup over standard solvers, enabling the processing of complex 3D geometries and high-resolution finite element meshes.

1. Introduction

Optimal Transport (OT) has emerged as a premier method for measuring distances between probability distributions, with applications spanning computer vision, fluid dynamics, and shape analysis. Semi-Discrete Optimal Transport (SOT) specifically addresses the scenario where a continuous source distribution—often represented by a density field from a physics simulation—must be mapped to a discrete target set, such as a point cloud or mesh.

While entropic regularization (RSOT) simplifies the optimization landscape by making the dual problem convex and smooth, it introduces a significant computational bottleneck. Evaluating the objective function requires interactions between every quadrature point in the source domain and every point in the target set, resulting in an $O(N_q N)$ complexity. For high-resolution scientific simulations involving millions of points, this complexity renders standard solvers impractical.

2. Methodology

To address these challenges, we propose a cohesive framework consisting of three primary numerical strategies implemented in the open-source library SemiDiscreteOT.

2.1 Enhanced Dual Computation via Spatial Truncation

The Gibbs kernel used in regularized SOT decays exponentially with distance. We exploit this property by implementing an adaptive spatial truncation strategy. By ignoring distant interactions that contribute negligibly to the final solution, we reduce the per-point computational cost from $O(N)$ to $O(\log N)$. To facilitate fast spatial queries, we utilize R-tree indexing. Furthermore, we derive a "Geometric Bound" to ensure that truncation does not compromise the accuracy of the dual potentials, maintaining a relative error near machine precision ($\approx 10^{-15}$).

2.2 Dual-Hierarchy Multilevel Processing

We introduce a multilevel strategy that operates on hierarchies for both the source finite element (FE) mesh and the target point set. The source mesh is simplified using surface simplification algorithms, while the target set is coarsened via k-means clustering.

A key finding of our work is the effectiveness of the "Target-only" multilevel strategy. By maintaining a fine source mesh while coarsening the target points, we generate high-quality initial guesses for the dual potentials. These "warm starts" are transferred to finer levels using a softmax refinement scheme, significantly reducing the number of iterations required on the most computationally expensive resolutions.

2.3 Regularization Scheduling

The stability and convergence rate of the solver are highly sensitive to the regularization parameter $\epsilon$. We employ an $\epsilon$-scaling (annealing) schedule, starting with a large $\epsilon$ to ensure a smooth optimization landscape and gradually decreasing it to the target precision. This approach maintains numerical stability throughout the multilevel transition.

3. Experimental Evaluation

The framework was evaluated on several challenging 3D scenarios:

  • PDE-Derived Densities: Mapping densities from 3D Darcy flow simulations (e.g., cube-to-ball transport).
  • Vascular Geometries: Registering complex branching structures and computing Wasserstein barycenters for blood vessel junctions.
  • Riemannian Manifolds: Performing blue noise sampling on unit spheres using geodesic distance costs rather than standard Euclidean distance.

4. Results and Performance

Our framework demonstrates substantial performance gains across all test cases. In a complex density mapping task, the multilevel strategy reduced computation time from over 18 hours to just 373 seconds—a 175x speedup.

The implementation also exhibits strong scaling on high-performance computing (HPC) clusters, achieving a 9.27x speedup when scaled from 1 to 15 compute nodes using hybrid MPI+OpenMP parallelization. Preliminary benchmarks using the Kokkos library indicate that a single NVIDIA A100 GPU can outperform 96 CPU threads, highlighting the potential for near real-time applications in scientific computing.

5. Conclusion and Future Work

The proposed numerical framework makes large-scale semi-discrete optimal transport computationally feasible for complex scientific applications. While the current implementation provides massive speedups, future work will focus on dynamic load balancing to handle non-uniform target distributions and the full integration of the multilevel pipeline into GPU-native architectures. These advancements will pave the way for real-time data assimilation in fields such as medical imaging and fluid mechanics.

Summary updated

Abstract

Semi-discrete optimal transport (SOT), which maps a continuous probability measure to a discrete one, is a fundamental problem with wide-ranging applications. Entropic regularization is often employed to solve the SOT problem, leading to a regularized (RSOT) formulation that can be solved efficiently via its convex dual. However, a significant computational challenge emerges when the continuous source measure is discretized via the finite element (FE) method to handle complex geometries or densities, such as those arising from solutions to Partial Differential Equations (PDEs). The evaluation of the dual objective function requires dense interactions between the numerous source quadrature points and all target points, creating a severe bottleneck for large-scale problems. This paper presents a cohesive framework of numerical strategies to overcome this challenge. We accelerate the dual objective and gradient evaluations by combining distance-based truncation with fast spatial queries using R-trees. For overall convergence, we integrate multilevel techniques based on hierarchies of both the FE source mesh and the discrete target measure, alongside a robust scheduling strategy for the regularization parameter. When unified, these methods drastically reduce the computational cost of RSOT, enabling its practical application to complex, large-scale scenarios. We provide an open-source C++ implementation of this framework, built upon the deal.II finite element library, available at https://github.com/SemiDiscreteOT/SemiDiscreteOT.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Performance comparison of multilevel strategies — Custom DensityTarget-only MultilevelTime (total wall-clock time)373 sCustom-density multilevel benchmark; the table also reports finest-level iteration counts.
Source quote
L580: Target-only Multilevel │ \SI{373}{\second} │ 1 │ \SI{396}{\second} │ 1
Performance comparison of multilevel strategies — Uniform DensityCombined MultilevelTime (total wall-clock time)239 sUniform-density multilevel benchmark; the table also reports finest-level iteration cou…
Source quote
L582: Combined Multilevel │ \SI{785}{\second} │ 2 │ \SI{239}{\second} │ 1
Epsilon Scaling Performance — Custom Density, ε=1e-7No scalingFinal Level L-BFGS Iterations1364 iterationssplit: test
Source quote
L636: No scaling │ 961 │ 1364 │ 398 │ 623
Epsilon Scaling Performance — Custom Density, ε=1e-72 scaling stepsFinal Level L-BFGS Iterations99 iterationssplit: test
Source quote
L638: 2 scaling steps │ 65 │ 99 │ 39 │ 143
Reported baseline / comparator measurements (1)
BenchmarkMethodMetricScoreProtocol / Evidence
Performance comparison of multilevel strategies — Custom DensityStandard Solver (Baseline) baselineTime (total wall-clock time)65369 sCustom-density multilevel benchmark; baseline row also reports finest-level iteration c…
Source quote
L583: Standard Solver (Baseline) │ \SI{65369}{\second} │ \num{1142} │ > \SI{24}{h} │ \num{1372}
BibTeX
@misc{khamlich2025efficient,
  author = {Moaad Khamlich and Francesco Romor and Gianluigi Rozza},
  title = {{Efficient Numerical Strategies for Entropy-Regularized Semi-Discrete Optimal Transport}},
  year = {2025},
  eprint = {2507.23602},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.23602},
}
Figure