NeurIPS 2026

Ergodic Trajectory Design via
Conditional Flow Matching

Ehsan AghazadehMasoud MalekzadehAhmad GhasemiHossein Pishro-Nik

University of Massachusetts Amherst

Learned flow at time s = 0.00
Milano target demand density
Target: Milano demand density
s = 0.00
Animation of the learned flow transporting latent occupancy to the Milano target

Uniform occupancy on the latent annulus (s = 0) is carried by the learned velocity field onto the Milano demand map (s = 1). With the no-fly penalty, mass flows around the dashed disc. 30,000 latent samples, seed 42.

An analytic path gives ergodicity for free. One map, learned once with flow matching, bends it onto any demand density, for any number of trajectories and agents, with a coverage bound you can read off the training loss.

Abstract

Designing continuous trajectories whose time-averaged occupancy provably matches a prescribed spatial density (the ergodic coverage problem) is central to UAV-assisted data collection and sensing, robotic exploration, and mobile monitoring. For flying agents in particular, this challenge is acute: trajectories must balance coverage fidelity against tight energy budgets, no-fly zones, and acceleration limits. Existing methods either re-optimize each trajectory online (with cost growing in the horizon and re-running for every target, agent, and realization) or rely on bespoke analytical constructions that must be re-derived for each new constraint. We propose a pushforward framework that decouples ergodicity from density matching: an analytic latent trajectory provides exact uniform ergodicity on a simple annular domain, and a single map, learned offline by optimal-transport conditional flow matching, transports this latent occupancy onto the prescribed target density. The composed trajectory is then asymptotically ergodic with respect to the learned pushforward distribution, with deviation from the target controlled by the flow-matching training loss. Once trained for a given target density and constraint set, the map serves an unbounded number of trajectories and a multi-agent fleet without per-agent retraining, and many differentiable operational constraints (no-fly zones, acceleration ceilings, or fairness penalties) enter as additive soft penalties in the training loss without re-deriving the design. We prove three results (an acceleration-energy bound, an $O(1/\sqrt{K})$ ergodic convergence rate in the number of trajectory cycles $K$, and an approximation-error bound) that combine into an end-to-end coverage bound estimable from CFM training diagnostics (certified given an architectural Lipschitz bound on $v_\theta$). Experiments on synthetic targets empirically support each theoretical envelope; on a real UAV-coverage dataset, the proposed method gives the strongest observed coverage–energy and coverage–constraint tradeoffs among the evaluated time-warping, optimization, and concurrent flow-matching baselines.

Why learn the map?

A UAV serving a city should spend time where demand is high: the fraction of time it spends in any region should match that region's share of the demand. Existing planners pay for this again and again.

Spectral / OT / FM control

Re-optimize per scenario

A new target, trajectory or agent means solving a new optimization problem.

Time-warping

New math per constraint

Fast and provable, but every new constraint needs its own derivation.

Reinforcement learning

No coverage guarantee

Reusable policies, but no long-run guarantee on where time is spent.

Can the density transformation be learned once and reused?

Method: an ergodic latent path plus a learned map

Latent path $z(t)$

Radial back-and-forth sweeps on the annulus $D_\delta$, one random direction per cycle. Uniform and ergodic by construction.

Learned map $G_\theta$

Trained once, offline, with optimal-transport conditional flow matching. Shared by every trajectory and agent.

UAV path $x(t)=G_\theta(z(t))$

Follows the target demand. A new trajectory or agent costs one forward pass.

Analytic part: coverage
$$r(s)=\sqrt{\delta^2+(1-\delta^2)\,s}$$

Square-root radial speed sweeps equal area per unit time, so $z(t)$ is uniform on the annulus. Ergodicity then transfers through any map: if $z(t)$ is ergodic for $\pi_0$, then $G(z(t))$ is ergodic for $G_\#\pi_0$.

Learned part: geometry
$$\mathcal L_{\rm total}=\mathcal L_{\rm CFM}+\lambda_{\rm nfz}\mathcal R_{\rm nfz}+\lambda_{E}\mathcal R_{E}+\lambda_{\rm acc}\mathcal R_{\rm acc}$$

$\mathcal L_{\rm CFM}=\mathbb E\,\|v_\theta(s,y_s)-(x_1-z_0)\|^2$ with OT-coupled pairs, so the flow paths are nearly straight. A new constraint is one more differentiable loss term; no re-derivation.

The analytic part guarantees coverage; the learned part fits the target geometry.

Guarantees

Theorem 1 · energy
$$\sqrt{E_{\rm acc}(x)}\le L\sqrt{E_{\rm acc}(z)}+M_H\sqrt{\Phi_4(z)}$$

Acceleration energy of the UAV path is the latent energy, stretched by the map, plus the curvature the map adds.

Theorem 2 · rate
$$\Pr\big(|S_K-\mu_G|>\varepsilon\big)\le 2e^{-K\varepsilon^2/2B^2}$$

Cycles are i.i.d., so coverage error shrinks as $1/\sqrt K$ with no mixing-time analysis. Measured slope $-0.48$ vs. $-0.50$ predicted.

Theorem 3 · approximation
$$W_2\big(G_{\theta\#}\pi_0,\,f_{\rm target}\big)\le e^{L_v}\,\varepsilon_v$$

The map's error is controlled by the velocity error, i.e. the training loss. Better training gives a provably closer coverage distribution.

End-to-end coverage bound (Corollary 2)
$$\text{coverage error}\;\lesssim\;\frac{C}{\sqrt K}\;+\;\varepsilon_{\rm map}\;+\;\eta_{\rm top}$$
Finite missionShrinks with more cycles $K$.
Learned mapShrinks with better training.
Shape mismatchControlled by the latent geometry ($\delta$).

Synthetic targets: each experiment tests one mechanism

Experiment 1 · density matching. A learned map turns uniform latent coverage into a two-mode Gaussian mixture.

0.92
$\rho_{\rm iid}$, map samples vs. target
0.039
velocity error $\varepsilon_v$
Gaussian mixture target density
Target density
Achieved trajectory occupancy
Achieved occupancy, $K=300$ cycles
Learned transport map with displacement arrows
Learned transport map

Experiment 2 · demand-proportional allocation. On a binary 3:1 target, time is split 75/25 as asked.

0.2 pp
allocation error (time-warping: 2.0 pp)
10×
tighter allocation
Binary 3:1 target density
Target: 75% / 25%
Achieved density on binary target
Achieved

Experiment 3 · constraints as loss terms. Each penalty buys its constraint at a visible cost in coverage, a Pareto frontier over $(\lambda_{\rm nfz},\lambda_{\rm acc})$.

7×
fewer no-fly violations
0.93×
acceleration vs. latent path
Unconstrained map samples near the no-fly disc
No penalty$\rho$ 0.89 · NFZ 0.7% · acc 1.77×
Map samples avoiding the no-fly disc
+ no-fly penalty$\rho$ 0.76 · NFZ 0.1% · acc 1.43×
Map samples with no-fly and acceleration penalties
+ no-fly + acceleration$\rho$ 0.66 · NFZ 0.8% · acc 0.93×
Log-log RMSE versus number of cycles K
Coverage RMSE vs. cycles $K$: slope $-0.48$ (theory: $-0.50$).

The theory envelopes hold in practice

The Hoeffding prediction $\sigma/\sqrt K\approx0.085$ at $K=300$ envelopes the observed residual of about $0.05$. The Experiment 2 acceleration ratio $0.71\times$ sits inside the energy envelope, and the plug-in floor $e^{\hat L_v}\varepsilon_v$ envelopes the measured $\hat W_2$.

Real data: UAV coverage over Milano

Demand from the Milano mobile-traffic dataset, two no-fly configurations (one disc, 1D; four discs, MD), six baselines and six variants of our method that differ only in the penalty term. Mean over 3 seeds.

OT-CFM plus NFZ trajectories over the Milano demand heatmap, routing around the no-fly disc
OT-CFM +NFZ over the Milano demand map; dashed: no-fly disc.
0.865 / 0.911
highest coverage $\rho$ (1D / MD), OT-CFM +NFZ
~200× / 8×
less time in no-fly zones than unconstrained OT-CFM (0.011% / 0.189%)
2.5×
lower fleet coverage error from 1 → 20 agents, same map, no retraining
coverage $\rho$ ↑mean power $\bar P$ (W) ↓NFZ time (%) ↓
Method1DMD1DMD1DMD
TOES†0.2860.2651601601.440
Time-warp0.6900.8625325559.111.03
Static OT0.5750.5701.0·10⁴1.05·10⁴3.254.20
SAC0.3950.2282.55·10⁴1.98·10⁴5.2335.0
FMEC-Stein†−0.119−0.09416416400
FMEC-Sinkhorn†−0.080−0.06516616600
OT-CFM0.8390.9082.12·10³2.38·10³2.271.56
OT-CFM +NFZ0.8650.9112.23·10³2.24·10³0.0110.189
OT-CFM +E0.6460.7375105145.9813.2
OT-CFM +A0.4100.4301.02·10³1.04·10³5.1016.4
OT-CFM +NFZ+E0.5720.2308191.68·10³0.01111.9
OT-CFM +NEA‡0.1040.1886454570.1020.032

Bold: best per column among coverage-competitive methods ($\rho\ge0.5$). †Low power and zero NFZ time occur together with degenerate coverage ($\rho\le0.29$), so they should not be read as energy efficiency or constraint satisfaction. ‡Low violation at degraded coverage. Standard deviations and the full metric set are in the paper (Table 1 and appendix).

Coverage versus energy budget, single no-fly disc
Coverage–energy Pareto, single disc.
Coverage versus energy budget, four no-fly discs
Coverage–energy Pareto, four discs. The OT-CFM family traces the front above the baselines.

Training is paid once. Every additional trajectory or agent costs a single forward pass through $v_\theta$.

BibTeX

@inproceedings{aghazadeh2026ergodic,
  title     = {Ergodic Trajectory Design via Conditional Flow Matching},
  author    = {Aghazadeh, Ehsan and Malekzadeh, Masoud and
               Ghasemi, Ahmad and Pishro-Nik, Hossein},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026},
  eprint    = {2605.13063},
  archivePrefix = {arXiv}
}