flame HOT flame: An Efficient Solver for Optimal Transport Problems

Guojun Zhang,

Zhexuan Gu,

Yancheng Yuan, Defeng Sun

Contact: {guojun.zhang, zhexuan.gu}@connect.polyu.hk, {yancheng.yuan, defeng.sun}@polyu.edu.hk

Find the open-source solver at https://github.com/PolyU-IOR/HOT

Overview

HOT is designed to solve the reduced 2D optimal transport model which can be formulated as a standard linear programming problem:

\[ \begin{array}{ll} \min_{x \in \mathbb{R}^N} & \langle c, x \rangle + \delta_{\mathbb{R}_{+}^{N}}(x) \\ \text{s.t.} & Ax = b. \end{array} \]

Numerical Perfoemance of HOT Compared to Other Solvers

The HOT solver runs fast! 😊

Apart from the high computational efficiency, HOT also enjoys a significant advantage in memory usage compared to most other popular algorithms. 😄

Result graph

A User-friendly Interface

We provide an example here to demonstrate the usage of the HOT solver. For computing Kantorovich-Wasserstein distance between two images, you only have to specify the image paths and desired resolutions.

An Application of HOT in Color Transfer

We provide a notebook color_transfer.ipynb to demonstrate the usage of the HOT solver in color transfer. Some examples are shown below

Color transfer result

Citation

@article{zhang2025hot,
title={HOT: An efficient Halpern accelerating algorithm for optimal transport problems},
author={Zhang, Guojun and Gu, Zhexuan and Yuan, Yancheng and Sun, Defeng},
journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
year={2025},
publisher={IEEE}
}