Skip to content

Releases

deblais 0.2.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 15:08

Added

  • Costs |x - y|^p: the option p (Options::p in C++, p= in Python) solves the transport for any power of the Euclidean distance, p > 0, with every method (closed form on the line for p >= 1). The plan, its cost, the potentials and certify use the same exponent; Plan::p records it. The PyTorch gradients follow the exponent.
  • The default stays p = 2, and only p = 2 keeps the single precision filter of the pricing: its speed is unchanged.

Notes

  • The automatic mode is tuned for p = 2. For another exponent it is slower than the plain simplex up to a few thousand points, and the best method changes from one problem to the next: run tune once on a typical problem and reuse its options. Measurements in the documentation.
  • wasserstein2 keeps the squared distance and refuses another p.

Full changelog: v0.1.0...v0.2.0

deblais 0.1.0

Choose a tag to compare

@github-actions github-actions released this 28 Nov 13:08

First version: exact optimal transport between point clouds for the squared Euclidean cost, as a header-only C++17 library and a Python package.

Added

  • C++ library (#include <deblais/deblais.hpp>): deblais::solve returns an optimal sparse plan, its cost and the Kantorovich potentials, in dimension 1 and above. No dependency; OpenMP is used when available.
  • Four exact methods: closed form on the line, network simplex with column generation (the cost matrix is never stored), multiscale warm start, and parallel sweeps of a domain decomposition. An auction replaces the simplex on the levels of assignment problems; it gives the problem back to the simplex when it starts a price war (clustered clouds).
  • Automatic mode: the method, the arithmetic of the flows (integer or real) and the parameters are chosen from the dimension, the sizes and the masses. deblais::recipe tells what will run.
  • Tuning: deblais::tune (deblais.tune in Python) times solves of the given clouds and returns the fastest options on this machine (method, threads, coarsest level of the multiscale start, auction, sweeps).
  • Certificates: deblais::certify measures the marginals, the duality gap and the dual feasibility of a plan.
  • Python package: deblais.solve and deblais.wasserstein2 for NumPy arrays and PyTorch tensors (any device, differentiable cost), with sparse, dense, barycentric map and assignment views of the plan.
  • The Python module shares the OpenMP runtime of PyTorch when PyTorch is installed.
  • Documentation, with a page on the twin project remblais (entropic transport on GPUs).

Full changelog: https://github.com/keckj/deblais/commits/v0.1.0