All models

OT-Flow

Continuous normalizing flow regularized with optimal transport, with an exactly computed trace.

Diffusion and generative · 2,383 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 2,383 operations (1.1 MB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
78.1K
Operations
2,383
Framework
PyTorch
Recurrent
Yes
Published
AAAI 2021
Cited by
23 (as of 27 October 2026)
Authors
Derek Onken, Samy Wu Fung, Xingjian Li, Lars Ruthotto
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m18952
Graph hash
d370011d3c01b79a39ef9429d65befa9aa7a7e35b2f2e15ae45137d8b72051fe
Skeleton hash
4ff5b5f9be69c1c8c30fc86ff88784a403b77774ebc545b95dbf753e4292cef0
Architecture hash
c1e273babe7c9c2bac001b938d8c73a456b2627493ec228350f3ab66fdf5fbc0
Diagram SHA-256
2bca14468880455e575c75a48d300788036270c7f921380886527a4016b2dde4
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

OT-Flow is a continuous normalizing flow (CNF), a mapping obtained by solving a neural ordinary differential equation. A normalizing flow links an arbitrary probability distribution to a standard normal one and can be used for density estimation and statistical inference. The paper targets two computational challenges that, in its view, limit wider use of CNFs.

First, OT-Flow uses optimal transport (OT) theory to regularize the flow and enforce straight trajectories, which are easier to integrate. Second, it computes the trace exactly, with a time complexity equal to that of the trace estimators used in existing CNFs. The network does not output the dynamics directly: it models a potential function, and the dynamics are the negative gradient of that potential. An extra term in the training problem penalizes violations of the Hamilton-Jacobi-Bellman (HJB) equations that the potential should satisfy. The paper's experiments build the potential on a simple two-layer ResNet.

On five high-dimensional density estimation and generative modeling tasks, the paper reports performance competitive with other CNFs of its time while needing on average one-fourth of the number of weights, with an 8x speedup in training time and a 24x speedup in inference.

Key idea. OT-Flow regularizes a continuous normalizing flow with optimal transport to enforce straight trajectories and computes the trace exactly at the cost of existing trace estimators.

  • OT-Flow
  • continuous normalizing flow
  • CNF
  • normalizing flow
  • optimal transport
  • neural ODE
  • density estimation
  • exact trace
  • generative modeling

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{onken2021otflowfastaccuratecontinuous,
      title={OT-Flow: Fast and Accurate Continuous Normalizing Flows via Optimal Transport}, 
      author={Derek Onken and Samy Wu Fung and Xingjian Li and Lars Ruthotto},
      year={2021},
      eprint={2006.00104},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2006.00104}, 
}