---
title: 'ALI-CFM: Multi-Marginal Flow Matching'
url: https://www.emergentmind.com/topics/ali-cfm
type: topic
---

# ALI-CFM: Multi-Marginal Flow Matching

ALI-CFM is a multi-marginal flow matching method for learning dynamical systems from sampled observations at several time points when no ground-truth trajectories are available. Introduced in "Multi-Marginal Flow Matching with Adversarially Learnt Interpolants" [2510.01159], it addresses the setting in which one observes disconnected snapshots \(x_{t_i}\sim q_{t_i}\) and seeks a continuous-time dynamics whose marginals satisfy \(p_{t_i}=q_{t_i}\) for all observed times. Its defining construction is two-stage: an adversarial procedure learns smooth interpolant curves between source and target samples so that their intermediate-time pushforwards match observed marginals, and a conditional flow matching stage then marginalizes those interpolants into a neural vector field. The method is motivated by applications such as single-cell trajectory prediction, spatial transcriptomics, and cell tracking, where pairwise endpoint interpolation is often insufficient and direct trajectory supervision is unavailable.

## 1. Problem formulation and multi-marginal setting

ALI-CFM is formulated for an ODE in \(\mathbb{R}^n\),
\[
dx_t = v_t(x_t)\,dt,
\]
with integration map \(\psi_t:\mathbb{R}^n\to\mathbb{R}^n\) satisfying
\[
\frac{d}{dt}\psi_t(x_0) = v_t(\psi_t(x_0)), \qquad \psi_0(x_0)=x_0.
\]
If \(x_0\sim p_0\), then the induced marginal at time \(t\) is
\[
p_t = (\psi_t)_\# p_0.
\]

The essential distinction is between the bimarginal and multi-marginal regimes. In the bimarginal case, one has only \(q_0\) and \(q_1\). In the multi-marginal case, one has snapshots at multiple times,
\[
x_{t_i}\sim q_{t_i}, \qquad 0=t_1<t_2<\cdots<t_K=1,
\]
and the target is to recover dynamics matching all observed distributions:
\[
p_{t_i}=q_{t_i}, \qquad i=1,\dots,K.
\]

The method is designed for settings where only snapshots are available and where independently applying flow matching between consecutive marginals can produce non-smooth piecewise interpolations. The stated motivation is to use intermediate snapshots directly while learning smooth trajectories that match intermediate distributions in a distributional sense rather than forcing pointwise passage through sampled observations [2510.01159].

## 2. Adversarially learnt interpolants

The first stage of ALI-CFM learns a neural interpolant \(G_\phi\) between source and target samples drawn from a coupling \(\pi\) between \(q_0\) and \(q_1\). The interpolant is parameterized as
\[
G_\phi(x_0, x_1, t) = (1-t)x_0 + t x_1 + t(1-t) f_\phi(x_0, x_1, t).
\]
This construction fixes the endpoints automatically:
\[
G_\phi(x_0,x_1,0)=x_0, \qquad G_\phi(x_0,x_1,1)=x_1.
\]

The learning criterion is that, at each observed intermediate time \(t_i\), the pushed-forward interpolant distribution should match the observed marginal:
\[
(G_\phi(\cdot,\cdot,t_i))_\# \pi = q_{t_i}.
\]
To enforce this, the method uses a discriminator \(D_\gamma(x_t,t)\) that distinguishes real samples \(x_{t_i}\sim q_{t_i}\) from interpolant samples \(G_\phi(x_0,x_1,t_i)\) with \((x_0,x_1)\sim\pi\). The min-max loss at time \(t_i\) is
\[
\min_{G_\phi}\max_{D_\gamma} L_\text{GAN}(G_\phi,D_\gamma;t_i),
\]
where
\[
L_\text{GAN}(G_\phi,D_\gamma;t_i) =
\mathbb{E}_{(x_0,x_1)\sim\pi}
\left[\log\big(1-D_\gamma(G_\phi(x_0,x_1,t_i),t_i)\big)\right]
+
\mathbb{E}_{x_{t_i}\sim q_{t_i}}
\left[\log D_\gamma(x_{t_i},t_i)\right].
\]

The full ALI objective averages this over interior time points and adds regularization:
\[
L_\text{ALI}(G_\phi,D_\gamma) =
\mathbb{E}_{i\sim \mathrm{Unif}(\{2,\dots,K-1\})}
\left[
L_\text{GAN}(G_\phi,D_\gamma;t_i)
+
\lambda L_\text{reg}(G_\phi;t_i)
\right].
\]

A central conceptual feature is that ALI matches distributions at intermediate times rather than forcing each interpolant curve to pass through observed sample points. This makes the construction suited to noisy snapshots and distinguishes it from spline-style or pointwise interpolation strategies [2510.01159].

## 3. Conditional flow matching stage

Once the interpolant family \(G_\phi\) has been trained, ALI-CFM uses it as the conditional path family for conditional flow matching. The time derivative of the interpolant is
\[
\frac{d}{dt}G_\phi(x_0,x_1,t)
=
x_1-x_0
+t(1-t)\frac{d}{dt}f_\phi(x_0,x_1,t)
+(1-2t)f_\phi(x_0,x_1,t).
\]

The second-stage objective regresses a neural vector field \(u_t^\theta\) onto this conditional velocity:
\[
L_\text{CFM}
=
\mathbb{E}_{t\sim U[0,1],\,(x_0,x_1)\sim\pi}
\left\|
u_t^\theta(x_t)-v_t(x_t\mid x_0,x_1)
\right\|_2^2,
\qquad
x_t=G_\phi(x_0,x_1,t),
\]
with
\[
v_t(x_t\mid x_0,x_1)=\frac{d}{dt}G_\phi(x_0,x_1,t).
\]

Operationally, the procedure is: sample \((x_0,x_1)\sim\pi\), sample \(t\sim U[0,1]\), construct \(x_t=G_\phi(x_0,x_1,t)\), compute \(\frac{d}{dt}G_\phi(x_0,x_1,t)\), and fit \(u_t^\theta(x_t)\) to that derivative. At convergence, \(u_t^\theta\) defines a dynamical system whose marginals match those of the learned interpolants. If the ALI stage has matched all intermediate marginals successfully, the resulting flow satisfies \(p_{t_i}=q_{t_i}\) for all observed times [2510.01159].

## 4. Regularization, smoothness, and uniqueness

The paper introduces three regularizers. The first is a linear reference regularizer built around
\[
\ell(x_0,x_1,t) = (1-t)x_0 + tx_1,
\]
with penalty
\[
L_\text{reg}(G_\phi;t_i)
=
\mathbb{E}_{(x_0,x_1)\sim\pi}
\left[
\left\|G_\phi(x_0,x_1,t_i)-\ell(x_0,x_1,t_i)\right\|^2
\right].
\]

The second is a piecewise linear reference regularizer based on a Markov-chained OT coupling
\[
\pi_{t_i}=\pi(x_1\mid x_{t_i})\pi(x_{t_i}\mid x_0)q_0(x_0),
\]
and the reference path
\[
\ell(x_t\mid x_0,x_1,x_{t_i},t)=
\begin{cases}
\frac{t x_{t_i} + (t_i-t)x_0}{t_i}, & t\le t_i, \\[1ex]
\frac{t x_1 + (1-t)x_{t_i}}{1-t_i}, & t> t_i.
\end{cases}
\]
The corresponding penalty is
\[
L_\text{reg}(\phi;t_i)
=
\mathbb{E}_{t\sim U[0,1]}
\mathbb{E}_{(x_0,x_{t_i},x_1)\sim \pi_{t_i}}
\left[
\left\|G_\phi(x_0,x_1,t)-\ell(x_t\mid x_0,x_1,x_{t_i},t)\right\|^2
\right].
\]

The third is a second-derivative penalty:
\[
L_\text{reg}(\phi)
=
\mathbb{E}_{(x_0,x_1)\sim\pi}
\left[
\int_0^1
\left\|
\frac{\partial^2}{\partial t^2}G_\phi(x_0,x_1,t)
\right\|_2^2 dt
\right].
\]
In practice, the second derivative is approximated by finite differences:
\[
\frac{\partial^2}{\partial t^2}G_{\phi}(x_0, x_1, t)
\approx
\frac{
G_{\phi}(x_0, x_1, t+h)
+
G_{\phi}(x_0, x_1, t-h)
-
2G_{\phi}(x_0, x_1, t)
}{h^2}.
\]

A mathematically distinctive feature of ALI-CFM is the uniqueness result for the first two regularizers. For the linear regularizer, fixing \(t\in(0,1)\), \(q_t\), and a coupling \(\pi\) between \(q_0\) and \(q_1\) such that \(\ell(\cdot,\cdot,t)_\#\pi\) is absolutely continuous with respect to Lebesgue measure, the interpolant minimizing
\[
\mathbb{E}_{(x_0,x_1)\sim\pi}
\left\|G(x_0,x_1,t)-\ell(x_0,x_1,t)\right\|^2
\]
subject to \(G(\cdot,\cdot,t)_\#\pi=q_t\) exists and is unique on the support of \(\pi\), up to almost-everywhere equality. An analogous uniqueness statement holds for the piecewise linear regularizer under the corresponding absolute-continuity assumption. This suggests that these regularizers function not only as smoothness penalties but also as selection principles among the many interpolants compatible with the same marginals [2510.01159].

## 5. Empirical evaluation and application domains

The reported experiments cover four settings: synthetic knot data, cell tracking, single-cell trajectory prediction, and spatial transcriptomics. Across these studies, ALI-CFM is presented as versatile and scalable, outperforming existing baselines on spatial transcriptomics and cell tracking while performing on par with them on single-cell trajectory prediction [2510.01159].

In the synthetic knot experiment, the setup uses \(K=1200\) marginals along a 2D knot trajectory with 10 samples per marginal. ALI-CFM is reported as the only method that accurately captures the time-dependent geometry of the knot distribution. Piecewise linear interpolants, cubic spline interpolants, and OT-MFM with time-dependent LAND metrics become non-smooth and/or unstable as \(K\) increases.

In the cell tracking experiment, the dataset is the glioblastoma-astrocytoma U373 cell from the Cell Tracking Challenge, with 115 frames or time steps and 10 segmentation coordinates per frame subsampled for training. OT-ALI-CFM is reported to produce smooth trajectories aligned with the observed cell motion, whereas OT-CFM and OT-MFM can diverge or become unstable, and time-independent OT-MFM fails to capture time-varying geometry.

In single-cell trajectory prediction, the datasets are Embryoid body, Cite-seq, and Multiome, evaluated in PCA-reduced 5D, 50D, and 100D spaces using earth mover’s distance. In 5D, OT-ALI-CFM achieves EMD \(0.910\) on Cite-seq, \(0.742\) on EB, and \(0.925\) on Multiome. The corresponding OT-CFM results are \(1.142\), \(0.809\), and \(0.975\); OT-MFM yields \(0.793\), \(0.711\), and \(0.890\); I-MMFM yields \(2.068\), \(4.740\), and \(1.528\); and OT-MMFM yields \(1.099\), \(3.530\), and \(1.807\). In higher-dimensional settings the method remains competitive; for example, in 100D Multiome the paper reports OT-MFM at \(51.169\) and OT-ALI-CFM at \(54.554\).

In spatial transcriptomics, the dataset is a breast cancer spatial transcriptomics dataset from Mo et al. (2024), with \(K=4\) tissue sections and more than \(1{,}000\) samples per section in \(\mathbb{R}^2\). The preprocessing uses BigWarp in Fiji, thin-plate spline warping, and transformation of spot coordinates to a common coordinate system. In leave-one-out interpolation of section 2 or 3, average EMD is \(109.76\) for OT-CFM, \(109.17\) for OT-MMFM, \(183.88\) for OT-MFM, and \(98.91\) for OT-ALI-CFM.

## 6. Limitations, computational profile, and implementation details

The paper identifies several limitations. Adversarial training can be unstable, especially on multimodal data. Because ALI matches distributions rather than points, it may not always outperform methods that overfit snapshots under pointwise EMD-style metrics. Some baselines with explicit geometry or pointwise interpolation can outperform ALI in certain high-dimensional settings. The method also requires training both a generator and discriminator before the flow matching stage, which adds complexity [2510.01159].

The computational profile is discussed in comparative terms. Gradients of \(G_\phi\) with respect to \(t\) are obtained by autograd with low overhead. For the second-derivative penalty, finite differences are used rather than exact second-order differentiation. In the knot experiment, fitting 1199 time-dependent RBF nets for MFM took about 400 minutes on an RTX 3080 GPU even in 2D, underscoring the expense of time-dependent metric learning.

Several practical implementation details recur across experiments. OT coupling is preferred in most experiments because it reduces overlap and variance relative to independent coupling. For single-cell data, the interpolant is pretrained for 2,000 steps and then adversarially trained for 70,000 steps. The best single-cell results are reported with R3GAN-style adversarial training, the second-derivative regularizer, and the LAND metric in the regularizer. Time-noise injection into the generator input is used to smooth the learned dependence on \(t\). For spatial transcriptomics, ALI is trained for 70,000 epochs with piecewise linear regularization and \(\lambda=10\), along with a small Gaussian perturbation to the time input. In the main cell-tracking configuration, the CFM networks use 3 hidden layers with 256 units each and SELU activations, training runs for 50,000 iterations at learning rate \(10^{-3}\), the ALI regularization uses \(\lambda=1\) with the linear reference regularizer, and the GAN generator and discriminator are 2-layer MLPs with 256 hidden units and ELU activations.

## 7. Nomenclature and acronym ambiguity

The string “ALI-CFM” is not used uniformly across arXiv. Its most explicit use is as the name of the multi-marginal flow matching method described above [2510.01159]. In a separate line of work on \((0,4)\) supersymmetric ADHM instanton sigma models, “ALI-CFM” refers instead to the Ali–Ilahi Complementary Model, for which an off-shell harmonic superspace formalism was developed in 2025 [2507.11305]; the related note on harmonic superspace presents the same complementary model as dual to Witten’s original construction [2507.22948].

Other Ali-related papers in the data do not define the acronym. "Probing Primordial Gravitational Waves: Ali CMB Polarization Telescope" concerns AliCPT, not ALI-CFM [1710.03047]. "Calibration and Applications of the All-Sky Camera at the Ali Observatory in Tibet" explicitly notes that the paper does not use the acronym ALI-CFM anywhere in the text [2501.08358]. The acronym CFM is also independently overloaded in other fields: it denotes Competing Failure Modes in a survival-analysis study of goal-scoring consistency [2603.27502] and Casadio-Fabbri-Mazzacurati solutions in a fluid/gravity analysis of braneworld black branes [1601.03222]. A plausible implication is that, in technical writing, the term should be disambiguated by context whenever it appears outside the multi-marginal flow matching literature.

Source: https://www.emergentmind.com/topics/ali-cfm