Contact Geometry for Generative Models: An Unbalanced Optimal Transport Formulation

Andrea Testa, Søren Hauberg, Andras Gabor Kupcsik, Tamim Asfour, Leonel Rozo

TL;DR

When generative models bridge unpaired, real-world datasets—like single-cell snapshots or mismatched image collections—standard transport methods either spill data across unrelated categories or get magnetically pulled toward dense clusters, causing mode collapse. By borrowing contact geometry from the physics of non-conservative systems, Contact unbalanced Optimal Transport (CuOT) decouples where samples move from how much their population grows. The result is a fast, stable generative solver that naturally takes smaller, careful steps in crowded data regions and outperforms existing methods across biology, image translation, and video generation.

What Problem Does This Paper Address?

Suppose you want to model how stem cells mature over time. Because measuring a cell destroys it, you never observe the exact same cell twice—you only get unpaired snapshots of cell populations at different times.

Optimal Transport (OT) connects such distributions via the shortest, most direct paths. However, standard OT assumes total mass is conserved: every source point must go somewhere. If one cell type proliferates rapidly while another dies off, standard OT forces "cross-mode leakage," routing dying cells into booming, unrelated lineages just to balance the books.

Unbalanced Optimal Transport (uOT) fixes this by letting sample weights grow or shrink along the journey. Yet, current uOT methods rely on Wasserstein–Fisher–Rao (WFR) geometry, which hides a subtle trap: mathematically, it locks the transport velocity directly to the gradient of mass growth ($v^t = \nabla z^t$). Practically, this acts like a gravitational pull toward regions of rapid population growth, starving smaller modes (triggering soft mode collapse) and making trajectories jittery whenever growth gradients are noisy.

Comparison of diffusion, OT, WFR, and CuOT trajectories

Methods

To break the rigid link between movement and growth, the authors turn to classical physics. Standard OT and WFR live in symplectic geometry—an even-dimensional phase space designed for conservative systems where energy and volume are preserved.

CuOT moves the problem into contact geometry, an odd-dimensional framework built for non-conservative, path-dependent systems (like mechanics with friction or heat exchange):

  • Decoupled Dynamics: CuOT augments phase space with an independent scalar action variable $z^t$ representing local mass growth. Two separate neural networks learn the velocity field $v_\theta$ and growth rate $z_\theta$, freeing transport direction from growth gradients.
  • Adaptive Step Sizing via Conformal Scaling: CuOT reformulates optimization as finding minimum-length paths (geodesics) under a contact Wasserstein metric, which scales the standard distance by local kinetic energy. In high-growth, high-density regions, this metric inflates, penalizing large jumps and automatically forcing the network to take finer, high-resolution steps so it doesn't overshoot intricate data structures.
  • Stable, Near-Linear Solver: Instead of directly solving notoriously unstable Hamilton–Jacobi–Bellman (HJB) PDEs, CuOT discretizes trajectories into weighted particle ensembles and minimizes path arc-length alongside Sinkhorn distributional matching, achieving $\mathcal{O}(MDN \log N)$ training complexity.

Datasets

No new datasets are introduced, though the authors design a 2D multi-mode synthetic benchmark (mapping three Gaussians to a Swiss roll, concentric rings, and a decaying pinwheel) specifically to test misaligned growth and transport directions. They also evaluate on:

  • Single-Cell Trajectory Benchmarks (5 datasets): Simulated 3-gene dynamics (2D), Mouse Hematopoiesis (2D), EMT cancer transition (10D), Pancreatic $\beta$-cell maturation (30D), and Zebrafish Embryogenesis (50D).
  • Flickr-Faces-HQ (FFHQ): Unpaired Adult (45K) $\leftrightarrow$ Child (15K) face translation in 512D (ALAE) and 9216D (e4e) latent spaces.
  • UCF101: Image-to-video trajectory reconstruction across $M=60$ frame marginals (BreastStroke, BlowingCandles, CuttingInKitchen) in 2048D (DC-AE) and $128 \times 32$ (TiTok) latent spaces.

Key Insights and Ideas

  • Real biology violates WFR assumptions: Analyzing real single-cell benchmarks revealed that the distance populations travel between snapshots is not proportional to spatial growth gradients ($\nabla_x z^t$). WFR's core mathematical coupling is structurally mismatched with real biological processes.
  • Density-aware pacing comes for free: Crowded data regions usually harbor complex local variations. Contact geometry naturally acts like an automatic gearbox—downshifting step sizes in dense, growing regions to prevent overshooting without manual step-size schedules.
  • Unifying OT geometries: Contact geometry isn't a heuristic patch; as growth weighting $w_z \to 0$, CuOT smoothly recovers classical entropy-regularized symplectic OT as a special limiting case.
Single-cell trajectory and growth rate reconstruction

Key Results

CuOT consistently beats balanced OT (OTCFM) and WFR-based uOT baselines (TIGON, DeepRUOT, VarRUOT):

  • Synthetic Ablation: CuOT cuts cross-mode leakage to 0.2% (versus 17.7% for OTCFM and 10.4% for WFR geometry) with the lowest $\mathcal{W}_2$ error (0.10). Removing the contact metric's adaptive step degrades $\mathcal{W}_2$ to 0.13.
  • Single-Cell Dynamics: On 50D Zebrafish Embryogenesis, CuOT achieves a $\mathcal{W}_2$ distance of 3.04 and mass error of 0.024, substantially outperforming VarRUOT ($\mathcal{W}_2$: 4.80, Mass: 0.42) and OTCFM ($\mathcal{W}_2$: 5.09, Mass: 0.84).
  • High-Dimensional Images & Video: On 9216D FFHQ translation, WFR methods hit severe scalability bottlenecks (FIDs of 39.7–54.6), whereas CuOT achieves an FID of 8.40. On 60-step UCF101 video generation, where WFR trajectories freeze or distort (FIDs >138), CuOT maintains crisp temporal dynamics with an FID of 18.38.

Limitations and Future Work

  • Backbone Validation: While CuOT is theoretically architecture-agnostic, experiments rely on MLP-style velocity/growth networks in latent spaces; validating it directly on structured spatial or sequential data using Transformer backbones remains open.
  • Bridging to Diffusion: Establishing formal mathematical links between contact-geometric uOT and diffusion models that match distributions via Fisher–Rao geometry in noise space is left for future exploration.

Summary updated

Abstract

Real-world generative problems in biology, medical imaging, or robotics, rarely come with perfectly paired source and target distributions. While unbalanced Optimal Transport (uOT) provides a robust framework to bridge unpaired datasets via minimum-length paths in probability space, existing formulations based on the Wasserstein–Fisher–Rao (WFR) geometry introduce a structural bias toward high density regions, often triggering mode collapse. We introduce Contact unbalanced Optimal Transport (CuOT), a novel uOT formulation grounded in contact geometry that decouples density transport from mass growth to eliminate structural bias. This allows CuOT to adapt sampling steps to the local data structure, naturally reducing step sizes in high-density regions to prevent overshooting and ensuring stable convergence. The result is a stable, scalable path-length minimization solver that consistently outperforms WFR-based methods on biological dynamics reconstruction, unpaired image-to-image translation, and video generation.
BibTeX
@inproceedings{testa2026contact,
  author = {Andrea Testa and Søren Hauberg and Andras Gabor Kupcsik and Tamim Asfour and Leonel Rozo},
  title = {{Contact Geometry for Generative Models: An Unbalanced Optimal Transport Formulation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=E75sBSUY4i},
}
Figure