Skip to content

BLOG · UPDATED 2026-06-28

Optimal Transport Maps: Flow, Cost and Balance

2026-06-28 · 8 min read

Optimal transport asks a simple visual question: if one pile of mass must become another pile of mass, how should the material move? The answer is useful in logistics, allocation, color transfer, machine learning, design systems and teaching.

The Optimal Transport Flow Map Lab makes that movement inspectable. It generates source and target masses, solves a balanced Sinkhorn transport plan, draws the dominant flow ribbons and exports the plan as CSV and JSON.

The Core Idea

A transport plan is a matrix. Each cell says how much mass should move from one source to one target. A useful visualizer should show both the route ribbons and the matrix behind them.

Why Sinkhorn Iterations Help

Exact optimal transport can be expensive. Sinkhorn regularization adds a smoothness term controlled by epsilon, then repeatedly rescales the matrix so row totals match source mass and column totals match target mass.

What To Read First

Transport cost tells how expensive the plan is. Marginal residual tells whether the plan actually balances the source and target totals. Active routes show how many lanes matter. Top-flow share tells whether the plan is concentrated or diffuse.

How To Use The Lab

  1. Open the Optimal Transport Flow Map Lab.
  2. Run the route sample first.
  3. Change source and target counts.
  4. Lower epsilon for sharper routes or raise it for smoother plans.
  5. Export route CSV and cost CSV when you need to inspect the proof.

What This Does Not Prove

This is deterministic browser math for planning, teaching and design. It is not logistics certification, safety-critical routing, legal advice, financial advice, traffic proof, ranking proof, revenue proof or AdSense approval proof.