VerifiedarXiv:2303.1685236 min
Diffusion · Optimal transport

DSBM: Diffusion Schrödinger Bridge Matching

Pair two datasets at random, fit a diffusion between the pairs, re-pair them with the fitted diffusion, and repeat: the pairing converges to entropy-regularised optimal transport.

Bridge matching learns a diffusion between two datasets from paired samples, but the pairing it starts from is arbitrary. Iterative Markovian Fitting re-pairs the samples with the learned diffusion and fits again; every round keeps both datasets exactly and moves the pairing toward the Schrödinger bridge.

Explaining the paperDiffusion Schrödinger Bridge MatchingShi, De Bortoli, Campbell, Doucet · University of Oxford · ENS Ulm · NeurIPS 2023 · arXiv:2303.16852 ↗

A regression, a simulation, and two projections that each keep something the other destroys. Each round is one bridge-matching regression on endpoint pairs, so nothing between the endpoints is ever stored.

Transport between two datasets

Take two sets of images with no correspondence between them: the paper uses 20,000 CelebA faces tagged male and old and 20,000 tagged female and young, and, at 512×512, about 5,000 AFHQ cats and 5,000 wild animals. The task is a map that turns a sample of the first distribution into a sample of the second. Generative modelling is the special case where the first distribution is Gaussian noise.

Many maps do the job, and most of them are useless for transfer: a map that sends every cat to a random wild animal has the right output distribution and preserves nothing. Optimal transport (OT) picks the map that minimises the expected squared displacement E∥x0−xT∥2\mathbb{E}\|x_0 - x_T\|^2, so each input goes to a nearby output, which for images means the pose and colours survive. Computing that map for continuous distributions in a million dimensions, from samples, has no direct algorithm. Entropy-regularised OT adds a penalty on the concentration of the pairing, which makes the discrete problem solvable by the Sinkhorn iterations of Cuturi (2013) but still needs a cost matrix between all pairs of samples.

The Schrödinger bridge (SB) is the dynamic version of entropy-regularised OT. Instead of a static pairing it asks for a stochastic process on [0,T][0, T] that starts distributed as π0\pi_0, ends distributed as πT\pi_T, and is as close as possible to a reference diffusion Q\mathbb{Q} (Brownian motion, in every experiment here). "As close as possible" is measured by the KL divergence between the two path measures, the distributions over whole trajectories:

PSB=argmin⁡P{KL(P ∣ Q)  :  P0=π0, PT=πT}\mathbb{P}^{\mathrm{SB}} = \operatorname*{argmin}_{\mathbb{P}} \big\{ \mathrm{KL}(\mathbb{P}\,|\,\mathbb{Q}) \;:\; \mathbb{P}_0 = \pi_0,\ \mathbb{P}_T = \pi_T \big\}
(1)

Three families of methods already build dynamic transports from samples, and each falls short of (1) in a specific way. A denoising diffusion model reverses a noising process, so its source must be the Gaussian that the noising process converges to, and it only converges in infinite time. Flow matching and its stochastic sibling, bridge matching, connect any two distributions by drawing an arbitrary pair, interpolating between the two points, and regressing the interpolation velocity; the transport they learn is whatever the arbitrary pairing produces, and nothing pulls it toward OT. Diffusion Schrödinger Bridge (DSB, De Bortoli et al. 2021) does target (1), through an alternating scheme called Iterative Proportional Fitting (IPF), the continuous-state form of Sinkhorn; each round learns the time reversal of the previous process, which needs the whole discretised trajectory of every chain in memory, and the errors of each round pass into the next.

The paper contributes a new alternating scheme, Iterative Markovian Fitting (IMF), whose rounds are bridge-matching regressions, and an algorithm that runs it, Diffusion Schrödinger Bridge Matching (DSBM). The rest of this page builds it from four objects: a diffusion pinned at both ends, a mixture of such bridges, the Markovian projection that turns a mixture into a process you can simulate, and the reciprocal projection that turns a process back into a mixture.

A diffusion pinned at both ends

The reference process is a diffusion

dXt=ft(Xt) dt+σt dBt,t∈[0,T]\mathrm{d}\mathbf{X}_t = f_t(\mathbf{X}_t)\,\mathrm{d}t + \sigma_t\,\mathrm{d}\mathbf{B}_t, \qquad t \in [0, T]
(2)

with drift ftf_t and noise scale σt\sigma_t. Every experiment in the paper takes ft=0f_t = 0, constant σt=σ\sigma_t = \sigma and T=1T = 1, so the reference is Brownian motion with a single scale parameter, and this page keeps that convention. Conditioning the process on both its start x0x_0 and its end xTx_T gives a diffusion bridge Q∣0,T(⋅∣x0,xT)\mathbb{Q}_{|0,T}(\cdot \mid x_0, x_T), a distribution over paths that all begin at x0x_0 and all arrive at xTx_T. A theorem of Doob (the hh-transform) writes the bridge as a diffusion again, with an extra drift that pulls toward the pinned endpoint:

dXt0,T={ft(Xt0,T)+σt2 ∇log⁡QT∣t(xT∣Xt0,T)} dt+σt dBt\mathrm{d}\mathbf{X}_t^{0,T} = \big\{ f_t(\mathbf{X}_t^{0,T}) + \sigma_t^2\, \nabla \log \mathbb{Q}_{T|t}(x_T \mid \mathbf{X}_t^{0,T}) \big\}\,\mathrm{d}t + \sigma_t\,\mathrm{d}\mathbf{B}_t
(3)

In (3), QT∣t(xT∣x)\mathbb{Q}_{T|t}(x_T \mid x) is the transition density, the probability that the free process started at xx at time tt lands at xTx_T. Its log-gradient in xx points toward states from which xTx_T is easier to reach, and the extra drift follows it. The same construction runs the image-to-image bridge models on the DBMSolver page.

For Brownian motion the bridge is explicit. With T=1T = 1, the transition density is Gaussian, its log-gradient is (xT−x)/(σ2(1−t))(x_T - x)/(\sigma^2 (1 - t)), and the pinned process can be sampled at any time without simulation:

Xt0,T=(1−t) x0+t xT+σt(1−t)  Z,dXt0,T=xT−Xt0,T1−t dt+σ dBt\mathbf{X}_t^{0,T} = (1 - t)\,x_0 + t\,x_T + \sigma \sqrt{t(1-t)}\;\mathbf{Z}, \qquad \mathrm{d}\mathbf{X}_t^{0,T} = \frac{x_T - \mathbf{X}_t^{0,T}}{1 - t}\,\mathrm{d}t + \sigma\,\mathrm{d}\mathbf{B}_tXt0,T=(1−t) x0+t xT+σt(1−t)  Z,dXt0,T=xT−Xt0,T1−t dt+σ dBt\begin{gathered} \mathbf{X}_t^{0,T} = (1 - t)\,x_0 + t\,x_T + \sigma \sqrt{t(1-t)}\;\mathbf{Z}, \\ \mathrm{d}\mathbf{X}_t^{0,T} = \frac{x_T - \mathbf{X}_t^{0,T}}{1 - t}\,\mathrm{d}t + \sigma\,\mathrm{d}\mathbf{B}_t \end{gathered}
(4)

with Z∼N(0,I)\mathbf{Z} \sim \mathcal{N}(0, I). The mean is the straight line from x0x_0 to xTx_T and the spread is a parabola that vanishes at both ends. In numbers: in two dimensions, with x0=(−1,0)x_0 = (-1, 0), xT=(1,0.5)x_T = (1, 0.5), σ=1\sigma = 1, t=0.3t = 0.3 and a noise draw Z=(0.2,−0.4)\mathbf{Z} = (0.2, -0.4), the mean is (−0.4,0.15)(-0.4, 0.15), the noise scale is 0.21=0.458\sqrt{0.21} = 0.458, and the bridge sample is X0.3=(−0.308,−0.033)\mathbf{X}_{0.3} = (-0.308, -0.033). At σ=0\sigma = 0 the bridge is the straight line, which is the interpolant flow matching regresses on.

Now fix a coupling Π0,T\Pi_{0,T}, a joint distribution over pairs (x0,xT)(x_0, x_T) whose two marginals are π0\pi_0 and πT\pi_T, draw a pair, then draw a bridge between them. The distribution over paths this produces is the mixture of bridges Π=Π0,T Q∣0,T\Pi = \Pi_{0,T}\,\mathbb{Q}_{|0,T}. The set of all such mixtures, over every coupling, is the reciprocal class of Q\mathbb{Q}, written R(Q)\mathcal{R}(\mathbb{Q}): path measures whose bridges are exactly the bridges of Q\mathbb{Q}. Inside the reciprocal class the coupling is the only freedom left. The simplest coupling is the independent one, π0⊗πT\pi_0 \otimes \pi_T, which pairs each source sample with a random target sample.

Drag σ\sigma to 0 to see the straight interpolants, then back up; move tt to see the time-tt marginal Πt\Pi_t of the whole mixture; switch the coupling and watch the crossings and the cost readout change:

Figure 1 · a mixture of bridges
0.600.50
160 source points, 160 target points, and Brownian bridges (4) between paired points, 48 of them drawn. The white dots are every drawn path at time t, a sample of the marginal Πt. The independent coupling pairs at random; the entropic-OT coupling samples pairs from a Sinkhorn plan (ε = 0.5) and lowers E‖x₀ − x₁‖², as the readout shows. σ = 0 gives the straight lines of flow matching.

A mixture of bridges is easy to sample from and impossible to run. To continue a path from time tt you need the xTx_T it was assigned at the start, which a fresh input does not come with. The process is not Markov: its future depends on more than its present state. Generation needs a process whose next step is a function of the current state alone, and the next section builds one.

The Markovian projection

Fix the mixture Π\Pi. At a point xx and time tt, many bridges pass through, each heading for its own xTx_T with the drift of (3). The Markovian projection M⋆=projM(Π)\mathbb{M}^\star = \mathrm{proj}_{\mathcal{M}}(\Pi) keeps the reference drift and noise and replaces the bridge drift by its conditional average over the bridges that pass through xx at tt:

dXt⋆={ft(Xt⋆)+vt⋆(Xt⋆)} dt+σt dBt,vt⋆(x)=σt2 EΠ[∇log⁡QT∣t(XT∣Xt) ∣ Xt=x]\mathrm{d}\mathbf{X}_t^\star = \big\{ f_t(\mathbf{X}_t^\star) + v_t^\star(\mathbf{X}_t^\star) \big\}\,\mathrm{d}t + \sigma_t\,\mathrm{d}\mathbf{B}_t, \qquad v_t^\star(x) = \sigma_t^2\, \mathbb{E}_{\Pi}\big[ \nabla \log \mathbb{Q}_{T|t}(\mathbf{X}_T \mid \mathbf{X}_t) \,\big|\, \mathbf{X}_t = x \big]dXt⋆={ft(Xt⋆)+vt⋆(Xt⋆)} dt+σt dBt,vt⋆(x)=σt2 EΠ[∇log⁡QT∣t(XT∣Xt) ∣ Xt=x]\begin{aligned} \mathrm{d}\mathbf{X}_t^\star &= \big\{ f_t(\mathbf{X}_t^\star) + v_t^\star(\mathbf{X}_t^\star) \big\}\,\mathrm{d}t + \sigma_t\,\mathrm{d}\mathbf{B}_t, \\ v_t^\star(x) &= \sigma_t^2\, \mathbb{E}_{\Pi}\big[ \nabla \log \mathbb{Q}_{T|t}(\mathbf{X}_T \mid \mathbf{X}_t) \,\big|\, \mathbf{X}_t = x \big] \end{aligned}
(5)

For the Brownian bridge the expectation is elementary:

vt⋆(x)=EΠ[XT∣Xt=x]−x1−tv_t^\star(x) = \frac{\mathbb{E}_\Pi[\mathbf{X}_T \mid \mathbf{X}_t = x] - x}{1-t}

The averaged drift points from xx toward the mean endpoint of everything currently at xx. The projected process is a Markov diffusion and can be simulated from any start. The paper's Proposition 2 gives it two properties. It is the closest Markov process to Π\Pi in the reverse KL, M⋆=argmin⁡MKL(Π∣M)\mathbb{M}^\star = \operatorname{argmin}_{\mathbb{M}} \mathrm{KL}(\Pi \mid \mathbb{M}) over Markov M\mathbb{M}, which justifies the word projection. And it has the same time marginals as Π\Pi at every tt, a result that goes back to Gyöngy (1986): averaging the velocity at each point leaves the flow of probability mass through each point unchanged. In particular MT⋆=πT\mathbb{M}^\star_T = \pi_T. Start the projected SDE from π0\pi_0, run it to TT, and the outputs are distributed as πT\pi_T.

Learning the projection is a regression. The minimiser of a squared loss is a conditional mean, so fitting a network vθ(t,x)v_\theta(t, x) to the bridge drift over samples of Π\Pi recovers v⋆v^\star exactly at the optimum:

θ⋆=argmin⁡θ∫0TEΠt,T[∥σt2∇log⁡QT∣t(XT∣Xt)−vθ(t,Xt)∥2]/σt2  dt\theta^\star = \operatorname*{argmin}_\theta \int_0^T \mathbb{E}_{\Pi_{t,T}}\Big[ \big\| \sigma_t^2 \nabla \log \mathbb{Q}_{T|t}(\mathbf{X}_T \mid \mathbf{X}_t) - v_\theta(t, \mathbf{X}_t) \big\|^2 \Big] \big/ \sigma_t^2\; \mathrm{d}tθ⋆=argmin⁡θ∫0TEΠt,T[∥σt2∇log⁡QT∣t(XT∣Xt)−vθ(t,Xt)∥2]/σt2  dt\begin{aligned} \theta^\star = \operatorname*{argmin}_\theta \int_0^T &\mathbb{E}_{\Pi_{t,T}}\Big[ \big\| \sigma_t^2 \nabla \log \mathbb{Q}_{T|t}(\mathbf{X}_T \mid \mathbf{X}_t) \\ &- v_\theta(t, \mathbf{X}_t) \big\|^2 \Big] \big/ \sigma_t^2\; \mathrm{d}t \end{aligned}
(6)

With the Brownian bridge (4) the regression target is (XT−Xt)/(1−t)(\mathbf{X}_T - \mathbf{X}_t)/(1-t), and substituting the bridge sample turns it into the pair difference plus a noise term:

X1−Xt1−t=(X1−X0)−σt1−t  Z\frac{\mathbf{X}_1 - \mathbf{X}_t}{1 - t} = (\mathbf{X}_1 - \mathbf{X}_0) - \sigma \sqrt{\tfrac{t}{1-t}}\;\mathbf{Z}
(7)

On the numbers above, the two sides agree:

X1−X0.30.7=(1.308, 0.533)0.7=(1.869, 0.762),(2, 0.5)−0.655 (0.2, −0.4)=(1.869, 0.762)\frac{\mathbf{X}_1 - \mathbf{X}_{0.3}}{0.7} = \frac{(1.308,\ 0.533)}{0.7} = (1.869,\ 0.762), \qquad (2,\ 0.5) - 0.655\,(0.2,\ -0.4) = (1.869,\ 0.762)X1−X0.30.7=(1.308, 0.533)0.7=(1.869, 0.762),(2, 0.5)−0.655 (0.2, −0.4)=(1.869, 0.762)\begin{gathered} \frac{\mathbf{X}_1 - \mathbf{X}_{0.3}}{0.7} = \frac{(1.308,\ 0.533)}{0.7} = (1.869,\ 0.762), \\ (2,\ 0.5) - 0.655\,(0.2,\ -0.4) = (1.869,\ 0.762) \end{gathered}

The second form shows what the network has to do: predict the displacement of the pair, and predict the noise that was added, from the noised point alone. Near t=1t = 1 the noise term grows like t/(1−t)\sqrt{t/(1-t)}, which is why the code scales the loss down there (the pseudocode below, and the Provenance note on how the paper and code differ on that scale). The code draws tt uniformly on [10−4,1−10−4][10^{-4}, 1 - 10^{-4}].

The figure below runs the projection in one dimension on a source with modes at ∓1\mp 1 and a target with modes at ±1\pm 1, coupled independently, so half of the bridges cross the middle and half stay on their side. Move the probe: the thin arrows are the mean velocity of each of the four kinds of path through the probe, faded by how likely that kind is at the probe; the bold arrow is their average, the drift (5). Then switch to the Markov paths and read the two crossing shares at the top, one under the mixture and one under the Markov paths:

Figure 2 · one projection, two facts
0.35-0.600.60
Time runs left to right; the heat band is the exact density Πt of the mixture of bridges. At the probe, four thin arrows (one per kind of path: stay or cross, from either mode) and their weighted average in amber, the projected drift v*(t, x). Toggle to Euler–Maruyama samples of the projected SDE started from π₀: the histogram at the probe time matches the density line (marginals preserved), while the share of paths that cross the middle drops from 0.50 under the mixture to about 0.15 (the coupling changed). σ scales the bridge noise.

Every time marginal survives the projection. The pairing does not: a projected path follows the averaged drift, which is the same whichever endpoint pair produced the path through that point, so it lands near the endpoint that most of its neighbours were heading to. The projected process is therefore no longer a mixture of Q\mathbb{Q}'s bridges; its own bridges differ from Q∣0,T\mathbb{Q}_{|0,T}, and it has left the reciprocal class. Bridge matching, as proposed by Peluchetti (2021) and Liu et al. (2022), is one projection from the independent coupling and stops here. Flow matching is the same with σ→0\sigma \to 0, where (7) loses its noise term and becomes the velocity target X1−X0\mathbf{X}_1 - \mathbf{X}_0.

The Schrödinger bridge, two ways

The dynamic problem (1) has a static twin. Restrict attention to endpoints: among couplings Π0,T\Pi_{0,T} with the right marginals, find the one closest to the reference's own endpoint law Q0,T\mathbb{Q}_{0,T}. The SB is then that coupling with the reference bridges filled in, PSB=Π0,TSB Q∣0,T\mathbb{P}^{\mathrm{SB}} = \Pi^{\mathrm{SB}}_{0,T}\,\mathbb{Q}_{|0,T}, which places the SB inside the reciprocal class. For Brownian motion the reference endpoint law is

Q0,T(x0,xT)=π0(x0) N(xT; x0, σ2TI)\mathbb{Q}_{0,T}(x_0, x_T) = \pi_0(x_0)\,\mathcal{N}(x_T;\ x_0,\ \sigma^2 T I)

and expanding the KL against it (the π0\pi_0 factor is fixed by the marginal constraint, the Gaussian contributes the squared distance, and the entropy of Π0,T\Pi_{0,T} is what remains) gives

Π0,TSB=argmin⁡Π0,T{EΠ0,T[∥X0−XT∥2]−2σ2T H(Π0,T)  :  Π0=π0, ΠT=πT}\Pi^{\mathrm{SB}}_{0,T} = \operatorname*{argmin}_{\Pi_{0,T}} \Big\{ \mathbb{E}_{\Pi_{0,T}}\big[\|\mathbf{X}_0 - \mathbf{X}_T\|^2\big] - 2\sigma^2 T\, \mathrm{H}(\Pi_{0,T}) \;:\; \Pi_0 = \pi_0,\ \Pi_T = \pi_T \Big\}Π0,TSB=argmin⁡Π0,T{EΠ0,T[∥X0−XT∥2]−2σ2T H(Π0,T)  :  Π0=π0, ΠT=πT}\begin{aligned} &\Pi^{\mathrm{SB}}_{0,T} = \operatorname*{argmin}_{\Pi_{0,T}} \Big\{ \mathbb{E}_{\Pi_{0,T}}\big[\|\mathbf{X}_0 - \mathbf{X}_T\|^2\big] \\ &\quad - 2\sigma^2 T\, \mathrm{H}(\Pi_{0,T}) \\ &\quad \;:\; \Pi_0 = \pi_0,\ \Pi_T = \pi_T \Big\} \end{aligned}
(8)

with H\mathrm{H} the entropy. This is entropy-regularised OT with regularisation ε=2σ2T\varepsilon = 2\sigma^2 T, so σ\sigma sets how far the coupling may spread: at σ=1\sigma = 1 and T=1T = 1, ε=2\varepsilon = 2 in squared data units; the CelebA runs sweep σ2\sigma^2 from 0.01 to 10. As σ→0\sigma \to 0 the penalty vanishes and (8) becomes plain OT with the squared cost.

The characterisation that IMF is built on is older than either form. Jamison (1974) and Léonard's survey (Theorem 2.12) give it as follows, and the paper restates it as Proposition 5: for a Markov reference, the SB is the unique path measure that has the marginals π0\pi_0 and πT\pi_T, is Markov, and lies in the reciprocal class of Q\mathbb{Q}. The Markovian projection of the previous section produces the second property and destroys the third. The operation for the third property is the reciprocal projection: take any path measure P\mathbb{P}, keep only its endpoint law, and put the reference bridges back,

projR(Q)(P)=P0,T Q∣0,T\mathrm{proj}_{\mathcal{R}(\mathbb{Q})}(\mathbb{P}) = \mathbb{P}_{0,T}\,\mathbb{Q}_{|0,T}
(9)

Proposition 4 shows it is again a projection, the closest member of the reciprocal class to P\mathbb{P} in KL(P∣⋅)\mathrm{KL}(\mathbb{P} \mid \cdot). Sampling it costs nothing beyond what the source process costs: draw (X0,XT)(\mathbf{X}_0, \mathbf{X}_T) from P\mathbb{P}, then a bridge from (4). It keeps both marginals, since the endpoints are untouched, and it destroys the Markov property, since a mixture of bridges is not Markov.

IPF and IMF now sit side by side. IPF alternates the two marginal constraints, projecting onto "ends at πT\pi_T" and then onto "starts at π0\pi_0", and each iterate stays Markov and stays in the reciprocal class (each one is an hh-transform of the last). IMF alternates the Markov constraint and the reciprocal constraint, and each iterate keeps both marginals. The paper's Table 1 is this table:

alternates betweenevery iterate keeps
IPF (DSB)P0=π0\mathbb{P}_0 = \pi_0 and PT=πT\mathbb{P}_T = \pi_TMarkov, in R(Q)\mathcal{R}(\mathbb{Q})
IMF (DSBM)Markov and R(Q)\mathcal{R}(\mathbb{Q})P0=π0\mathbb{P}_0 = \pi_0, PT=πT\mathbb{P}_T = \pi_T

The practical difference follows from what each scheme learns. An IPF iterate is the time reversal of the previous iterate with a new start distribution, and learning a time reversal needs samples of the whole trajectory of the previous process. An IMF iterate is a regression on endpoint pairs, because everything between the endpoints is a reference bridge that can be drawn in closed form.

Iterative Markovian Fitting

Start from any mixture of bridges with the right marginals, P0=Π0,T0 Q∣0,T\mathbb{P}^0 = \Pi^0_{0,T}\,\mathbb{Q}_{|0,T}, and alternate the two projections:

P2n+1=projM(P2n),P2n+2=projR(Q)(P2n+1)\mathbb{P}^{2n+1} = \mathrm{proj}_{\mathcal{M}}(\mathbb{P}^{2n}), \qquad \mathbb{P}^{2n+2} = \mathrm{proj}_{\mathcal{R}(\mathbb{Q})}(\mathbb{P}^{2n+1})
(10)

Both marginals are preserved at every step: the Markovian projection keeps all time marginals, and the reciprocal projection keeps the endpoints. So every iterate satisfies the first of the three properties, the odd iterates satisfy the second, the even iterates satisfy the third, and a fixed point satisfies all three and is the SB by uniqueness. The paper proves more than that a fixed point would be right. Lemma 6 is a Pythagorean identity for each projection: for any Markov M\mathbb{M} and any Π\Pi in the reciprocal class,

KL(Π∣M)=KL(Π∣projMΠ)+KL(projMΠ∣M)\mathrm{KL}(\Pi \mid \mathbb{M}) = \mathrm{KL}\big(\Pi \mid \mathrm{proj}_{\mathcal{M}}\Pi\big) + \mathrm{KL}\big(\mathrm{proj}_{\mathcal{M}}\Pi \mid \mathbb{M}\big)

and the mirror identity for the reciprocal projection. Apply it with M=PSB\mathbb{M} = \mathbb{P}^{\mathrm{SB}}, which is Markov and reciprocal at once, and Proposition 7 drops out:

KL(Pn+1∣PSB)≤KL(Pn∣PSB)\mathrm{KL}(\mathbb{P}^{n+1} \mid \mathbb{P}^{\mathrm{SB}}) \le \mathrm{KL}(\mathbb{P}^n \mid \mathbb{P}^{\mathrm{SB}})

with the gap between the two sides equal to the KL between consecutive iterates. Theorem 8 turns the monotone sequence into convergence: the iterates have a unique fixed point, the SB, and KL(Pn∣PSB)→0\mathrm{KL}(\mathbb{P}^n \mid \mathbb{P}^{\mathrm{SB}}) \to 0. Peluchetti (2023) proved the same convergence independently and concurrently for a procedure called IDBM, and describes DSBM-IMF as equivalent to it.

The whole iteration can be computed exactly when both marginals are one-dimensional Gaussians, because a Gaussian coupling is a single number, the cross-covariance cc between X0\mathbf{X}_0 and X1\mathbf{X}_1, and the projected drift is then linear in xx, so the projected SDE is linear and its endpoint law is Gaussian with a new c′c'. Take π0=N(−1,1)\pi_0 = \mathcal{N}(-1, 1), π1=N(1,0.36)\pi_1 = \mathcal{N}(1, 0.36) and σ=1\sigma = 1, so the standard deviations are s0=1s_0 = 1 and s1=0.6s_1 = 0.6. Minimising (8) over Gaussian couplings gives the SB cross-covariance in closed form:

c⋆=−σ2+σ4+4s02s122=0.2810c^\star = \frac{-\sigma^2 + \sqrt{\sigma^4 + 4 s_0^2 s_1^2}}{2} = 0.2810

From the independent coupling, c=0c = 0, the projections produce 0.2481, 0.2776, 0.2807, 0.2810, 0.2810: four projections to reach the target within 10−410^{-4}. After each projection the variance of the end state comes out as 1.0000 or 0.3600, the marginal it must have, which is Proposition 2 checked to four decimals. Computing c′c' from the backward drift instead of the forward drift gives the same numbers, a fact the next section relies on.

Figure 3 · IMF on two Gaussians, exactly
01.00
Left: the coupling of (x₀, x₁) as a 2-sd amber ellipse with sample pairs; the dashed teal ellipse is the Schrödinger-bridge coupling from (8). Right: the cross-covariance c after each projection (odd = backward, even = forward, as in the algorithm) against its target c*. Step through n and change σ: a larger σ means a smaller c* (a more spread-out coupling) and a faster approach. The readout checks that the end-state variance equals the marginal after every projection.

Two things to read off the figure. The rate is geometric and fast when projections are exact. And σ\sigma chooses the target, not only the speed: with σ=0.3\sigma = 0.3 the SB cross-covariance is 0.5567, close to the deterministic OT value s0s1=0.6s_0 s_1 = 0.6, and with σ=2\sigma = 2 it is 0.0881, close to independence. Bridge matching alone is the first number in the sequence, 0.2481 at σ=1\sigma = 1.

DSBM: the algorithm

The reciprocal projection is free: keep endpoint pairs, redraw bridges. The Markovian projection is the regression (6), and DSBM is IMF with that regression done by a neural network, with one modification that the paper arrives at by watching the plain version fail.

The plain version learns vθv_\theta from the current pairs, simulates the forward SDE from fresh samples of π0\pi_0, and stores the endpoints as the next pairs. Its target side is never a real sample of πT\pi_T again after the first round. Proposition 2 promises MT=πT\mathbb{M}_T = \pi_T for the exact projection, but a trained network and a 30-step Euler–Maruyama chain give an approximation, the next round regresses onto the approximation's outputs, and the error compounds. The paper's Figure 3 shows the compounding on a 50-dimensional Gaussian transport: the variance of the learned marginal drifts away for the two one-direction variants, IMF-b (backward only) and rectified flow (forward only), while their means stay right.

The remedy uses a symmetry of the projection. Proposition 9: the same Markov process M⋆\mathbb{M}^\star is the law of the forward SDE (5) started from Π0\Pi_0 and the law of a backward SDE started from ΠT\Pi_T whose drift, in the forward time variable, conditions on the start instead of the end:

vϕ⋆(t,x)=σt2 EΠ[∇log⁡Qt∣0(Xt∣X0) ∣ Xt=x],dYt={−fT−t(Yt)+vϕ⋆(T−t,Yt)} dt+σT−t dBt,Y0∼πTv_{\phi^\star}(t, x) = \sigma_t^2\, \mathbb{E}_\Pi\big[ \nabla \log \mathbb{Q}_{t|0}(\mathbf{X}_t \mid \mathbf{X}_0) \,\big|\, \mathbf{X}_t = x \big], \qquad \mathrm{d}\mathbf{Y}_t = \big\{ -f_{T-t}(\mathbf{Y}_t) + v_{\phi^\star}(T-t, \mathbf{Y}_t) \big\}\,\mathrm{d}t + \sigma_{T-t}\,\mathrm{d}\mathbf{B}_t, \quad \mathbf{Y}_0 \sim \pi_Tvϕ⋆(t,x)=σt2 EΠ[∇log⁡Qt∣0(Xt∣X0) ∣ Xt=x],dYt={−fT−t(Yt)+vϕ⋆(T−t,Yt)} dt+σT−t dBt,Y0∼πT\begin{aligned} &v_{\phi^\star}(t, x) = \sigma_t^2\, \mathbb{E}_\Pi\big[ \nabla \log \mathbb{Q}_{t|0}(\mathbf{X}_t \mid \mathbf{X}_0) \,\big|\, \mathbf{X}_t = x \big], \\ &\mathrm{d}\mathbf{Y}_t = \big\{ -f_{T-t}(\mathbf{Y}_t) + v_{\phi^\star}(T-t, \mathbf{Y}_t) \big\}\,\mathrm{d}t \\ &\quad + \sigma_{T-t}\,\mathrm{d}\mathbf{B}_t, \quad \mathbf{Y}_0 \sim \pi_T \end{aligned}
(11)

This is the time reversal of (5), and it is learned by the mirror of (6): regress σt2∇log⁡Qt∣0(Xt∣X0)\sigma_t^2 \nabla \log \mathbb{Q}_{t|0}(\mathbf{X}_t \mid \mathbf{X}_0), which for the Brownian bridge is

X0−Xtt=−(X1−X0)−σ1−tt  Z\frac{\mathbf{X}_0 - \mathbf{X}_t}{t} = -(\mathbf{X}_1 - \mathbf{X}_0) - \sigma\sqrt{\tfrac{1-t}{t}}\;\mathbf{Z}

On the running example, (X0−X0.3)/0.3=(−2.307,0.111)(\mathbf{X}_0 - \mathbf{X}_{0.3})/0.3 = (-2.307, 0.111). Since the backward chain starts from real πT\pi_T samples and the forward chain from real π0\pi_0 samples, alternating the two directions re-anchors each end on data every other projection. Algorithm 1 is exactly that alternation, backward fit first:

# DSBM outer loop (Algorithm 1; official trainer_dbdsb.py order: 'b' then 'f')
pairs = init_coupling()          # independent (IMF) or x1 = x0 + sigma*z (IPF)
for n in range(N):               # N = 20 (2D), 50 (MNIST), 12 (fluids)
    train(v['b'], pairs)         # backward projection from the current pairs
    x1 = fresh_samples(pi_1)     # 10,000 real target samples
    x0 = simulate(v['b'], start=x1, steps=30, direction='b')   # Euler-Maruyama
    pairs = (x0, x1)             # cache: endpoints only, bridges re-drawn in train()
    train(v['f'], pairs)         # forward projection
    x0 = fresh_samples(pi_0)
    x1 = simulate(v['f'], start=x0, steps=30, direction='f')
    pairs = (x0, x1)

And one gradient step inside either fit, with the shapes of the MNIST run:

# one regression step of a Markovian projection (Brownian bridge, T = 1)
# cache: endpoint pairs (x0, x1) of shape [B, d]; fb in {'f', 'b'}
x0, x1 = next(cache)                       # [128, 1, 28, 28] on MNIST
t  = rand(B) * (1 - 2*eps) + eps           # eps = 1e-4
z  = randn_like(x0)
xt = (1 - t) * x0 + t * x1 + sigma * sqrt(t * (1 - t)) * z   # bridge sample
if fb == 'f':                              # forward projection, Eq. (7)
    target = (x1 - xt) / (1 - t)           # = (x1 - x0) - sigma*sqrt(t/(1-t))*z
    w      = sigma * sqrt(1 - t)           # loss scale (code); see Provenance
else:                                      # backward projection, Eq. (11)
    target = (x0 - xt) / t                 # = -(x1 - x0) - sigma*sqrt((1-t)/t)*z
    w      = sigma * sqrt(t)
loss = mse(w * v[fb](t, xt), w * target)   # gradient reaches v[fb] only
loss.backward(); opt[fb].step()

On MNIST the two networks are U-Nets of about 6.6 million parameters each, the batch is 128, each outer iteration trains for 5,000 steps, and the cache of 10,000 pairs is refreshed every 1,000 steps by simulating 30 Euler–Maruyama steps at σ=1\sigma = 1; the reference-coupling variant, DSBM-IPF (defined below), runs 50 outer iterations. The cache holds two endpoint tensors and nothing else, which the paper contrasts with DSB's storage of every intermediate state of every chain plus a second drift evaluation on each; on this task DSBM runs about 30% faster than DSB. The losses can also be evaluated at any tt rather than on a fixed grid, since the bridge sample (4) exists for every tt.

The figure below runs Algorithm 1 on a 2D toy with the regression replaced by the exact projection of the cached pairs (a Gaussian kernel of width 0.2 stands in for the network's finite resolution). Press Step repeatedly and watch the pair lines untangle and the cost readout fall from the independent value toward the entropic-OT value computed by Sinkhorn at ε=2σ2\varepsilon = 2\sigma^2. Then try a small σ\sigma: almost nothing moves, because with little noise each simulated chain stays near its own bridge and the projection has almost nothing to average, which is the numerical difficulty at small σ\sigma the paper lists among its limitations.

Figure 4 · DSBM, one projection per press
0.80
200 source and 200 target points; faint lines are the current pairs. Step runs one projection: it simulates the projected SDE (30 Euler–Maruyama steps) from fresh samples of one marginal, draws 48 of the chains, and replaces the pairs with the chain endpoints (hollow circles). Directions alternate backward, forward, as in Algorithm 1; the toggle makes every projection forward. Init switches between the independent coupling (DSBM-IMF) and the reference coupling x₁ = x₀ + σZ (DSBM-IPF). The readouts are the current transport cost, the independent-coupling cost, the Sinkhorn entropic-OT cost at ε = 2σ², and the variance of the simulated end cloud relative to the real marginal.

The forward-only toggle reproduces the failure that motivated the alternation. Each projection distorts the simulated marginal a little (the smoothing and the 30-step discretisation both bias it); when the target side is regenerated from the previous target side, the distortion accumulates in one direction instead of averaging out. The chart below runs both variants for ten outer iterations from the same starting pairs:

Figure 5 · why the directions alternate
0 / 10
Variance of the simulated target-side cloud divided by the true variance of π₁, after each outer iteration, for the alternating loop of Algorithm 1 and a forward-only loop, both from the same independent coupling on the toy of Figure 4. Forward-only drifts away from 1 and keeps drifting (down to about half at σ = 1, up to about 1.25 at σ = 0.5); alternating stays within about 0.25 of 1 because every other projection restarts from real target samples. Same exact-projection engine, 240 pairs; computed in your browser.

The same accumulation is what the paper measures on the Gaussian test: the variance estimates of IMF-b and rectified flow become inaccurate, DSB's covariance estimate drifts as iterations continue, and DSBM's stay accurate over 20 outer iterations.

One recipe, many special cases

Algorithm 1 has two free choices, the initial coupling and the reference bridge, and most of the transport methods from the last few years are settings of them (the paper's Appendix A.2).

Initial coupling. The independent coupling π0⊗πT\pi_0 \otimes \pi_T gives DSBM-IMF: its first fit is bridge matching, and every iterate has both marginals. The reference coupling Q0,T\mathbb{Q}_{0,T}, obtained by running the reference process from source samples, so for Brownian motion XT=X0+σT Z\mathbf{X}_T = \mathbf{X}_0 + \sigma\sqrt{T}\,\mathbf{Z}, gives DSBM-IPF: Proposition 10 shows its iterates coincide with the IPF iterates that DSB approximates, and its first backward fit is denoising score matching for the reference diffusion, an ordinary score-based diffusion model. The training is still different from DSB: only endpoints are cached, and each projection re-imposes the reference bridge, which the paper argues counters the "forgetting" of the reference that Fernandes et al. (2021) observed in IPF-based solvers. A third option, DSBM-IMF+, initialises with a minibatch Sinkhorn coupling at regularisation 2σ22\sigma^2, which already has the right marginals and starts closer to the answer; the 2D runs then use 4 outer iterations instead of 20.

Limits. One projection from the independent coupling is bridge matching; the same at σ→0\sigma \to 0 is flow matching (and conditional flow matching, which the paper shows coincide when the source is Gaussian). Repeating forward projections at σ→0\sigma \to 0 is rectified flow, which the paper reads as the deterministic limit of DSBM-IMF, and the limit loses two guarantees: Proposition 5 needs σ>0\sigma > 0, so the deterministic iteration has no uniqueness guarantee and no guarantee of reaching OT (Liu (2022) gives a counterexample), and forward-only fits accumulate the marginal bias of Figure 5, so rectified flow's first iterate is its most accurate and later ones trade accuracy for straightness. Initialising with a minibatch OT coupling and stopping after one projection is OT-CFM; initialising with the true SB coupling converges in one projection, which is the setting of Somnath et al. (2023) for aligned biological data.

Reference bridge. Appendix B works out the three samplers any linear reference needs (the closed-form draw at time tt, the forward SDE, and the backward SDE) for Brownian motion with a time schedule and for an Ornstein–Uhlenbeck reference, where the coefficients become hyperbolic functions of the remaining time. The code ships both (DBDSB_VE and DBDSB_VP with α=0.5\alpha = 0.5); every reported experiment uses the Brownian one.

A deterministic sampler. At the fixed point the forward network and the backward network describe one process from both ends, so their drifts are tied by the time-reversal identity vϕ=−vθ+σ2∇log⁡Pt⋆v_\phi = -v_\theta + \sigma^2 \nabla \log \mathbb{P}^\star_t. Subtracting the two isolates the score, and the probability flow ODE follows:

dZt⋆={ft(Zt⋆)+12[vθ⋆(t,Zt⋆)−vϕ⋆(t,Zt⋆)]} dt,Z0⋆∼π0\mathrm{d}\mathbf{Z}^\star_t = \Big\{ f_t(\mathbf{Z}^\star_t) + \tfrac{1}{2}\big[ v_{\theta^\star}(t, \mathbf{Z}^\star_t) - v_{\phi^\star}(t, \mathbf{Z}^\star_t) \big] \Big\}\,\mathrm{d}t, \qquad \mathbf{Z}^\star_0 \sim \pi_0
(12)

It has the same time marginals as the SB, so it samples πT\pi_T and gives a likelihood by the change-of-variables formula, and the 2D benchmarks below are computed with it. Its endpoint pairing is not the entropic-OT plan; only the stochastic sampler has that property. Appendix G adds a joint-training variant that fits both networks on the same pairs and penalises departures from the identity above, with a consistency weight λ\lambda; the main results do not use it.

What it achieves

2D benchmarks. On the moons, scurve, 8gaussians and moons-to-8gaussians tasks of Tong et al. (2023), sampled with 20 Euler steps of the ODE and scored by the 2-Wasserstein distance to 10,000 test points, DSBM beats DSB on every task (0.140 against 0.190 on moons; 0.812 against 0.987 on moons-8gaussians), beats conditional flow matching on every task and flow matching on the three tasks where it is reported (flow matching needs a Gaussian source, so Table 2 has no entry for it on moons-8gaussians; on moons, flow matching scores 0.212 and conditional flow matching 0.215), and trails OT-CFM (0.111), which uses an OT solver on each minibatch. DSBM-IMF+ reaches 0.123 on moons and 0.802 on moons-8gaussians, beating SB-CFM (conditional flow matching on a minibatch Sinkhorn coupling) on three of the four tasks and with lower path energy on all four. Rectified flow scores 0.129 on moons but 1.522 on moons-8gaussians, the task where a poor first iterate cannot be repaired; DSBM-IPF's 0.812 there trails only OT-CFM and DSBM-IMF+. The entropic solution shows most clearly in the path energy, the integrated squared velocity of the ODE: 42.2 for DSBM-IPF on moons-8gaussians against 116.5 for conditional flow matching.

The noise scale. Table 4 of the appendix sweeps σ\sigma for DSBM-IMF. On a three-Gaussian transfer the 2-Wasserstein error is 0.646 at σ=0\sigma = 0, 0.724 at 0.1, 0.546 at 0.3, 0.439 at 1.0 and 0.543 at 3.0; on moons-8gaussians, whose points are further apart, the best value is 0.818 at σ=4\sigma = 4, with 1.459 at 0 and 0.989 at 8. Too little noise makes the entropic problem hard to solve numerically (the small-σ\sigma stall of Figure 4) and too much makes the paths curved and the coupling diffuse; the useful σ\sigma scales with the spatial scale of the data.

Gaussians in 50 dimensions. Between N(−0.1⋅1,I)\mathcal{N}(-0.1\cdot\mathbf{1}, I) and N(0.1⋅1,I)\mathcal{N}(0.1\cdot\mathbf{1}, I), the SB is known in closed form (Bunne et al. 2023), so the KL between the learned marginals and the true ones can be averaged over 21 time points. In d=50d = 50 it is 8.75×10−38.75 \times 10^{-3} for DSBM-IPF and 9.76×10−39.76 \times 10^{-3} for DSBM-IMF, against 32.8×10−332.8 \times 10^{-3} for DSB and 49.4×10−349.4 \times 10^{-3} for SB-CFM, whose minibatch Sinkhorn coupling degrades with dimension. In d=5d = 5 the four are within a factor of three of each other (1.23, 1.34, 3.26 and 1.45). Each run uses a two-hidden-layer MLP of 256 units and one CPU, and the d = 50 runs take about 200 minutes.

MNIST and EMNIST. Transferring EMNIST letters (A to E, both cases, ten classes) to MNIST digits with DSB's U-Net, the FID of the outputs is 17.14 for one round of bridge matching, 15.27 for DSBM-IPF and 10.59 for DSBM-IMF, and the mean squared distance between an input letter and its output digit is 0.579, 0.354 and 0.375: the iterated methods produce digits that look like the letters they came from, which bridge matching does not. DSB's samples degrade after 30 rounds and rectified flow's degrade with rectification; DSBM's keep improving to round 50. OT-CFM's minibatch couplings give visibly worse digits at this dimension.

Faces, animals, fluids. On CelebA at 64×64, FID improves as σ2\sigma^2 rises from 0.01 until it is too large, while LPIPS between input and output worsens monotonically: more noise, better images, less faithful transfer. At σ=1\sigma = 1 the 128×128 outputs are better aligned with their inputs than the 64×64 ones, which the paper links to Chen (2023) and Hoogeboom et al. (2023): the noise schedule in diffusion models should scale with the resolution. On AFHQ at 512×512 (σ2=5\sigma^2 = 5, batch 4, 100 sampling steps, 20 rounds of 25,000 steps after 100,000 steps of bridge-matching pretraining) the cat-to-wild transfers keep the pose of the input. On the unpaired fluid-dynamics downscaling of Bischoff and Deck (2023), from 64×64 to 512×512 fields with σ2=0.3\sigma^2 = 0.3 and 30 sampling steps, both DSBM variants give lower ℓ2\ell_2 distance to the low-resolution source at every wavenumber than the two-diffusion baseline, and DSBM-IMF also matches the unconditional statistics that DSBM-IPF misses.

Where it does not help much. For plain generative modelling on CIFAR-10 (a 39.6-million parameter U-Net, 100 Euler steps), one or two DSBM-IMF rounds after bridge-matching pretraining lower the FID from 5.427 to 4.511 at σ2=0.2\sigma^2 = 0.2, from 8.274 to 6.896 at 0.5, and from 12.749 to 9.881 at 1; flow matching reaches 4.931 with the same 100 steps and 4.055 with an adaptive solver at 148 steps, and rectified flow worsens flow matching to 6.010 after one rectification. Both DSBM-IMF and rectified flow lose far less than flow matching when sampled with very few steps. The paper's own summary is that DSBM is most effective for transport between two general distributions, still requires simulating the learned process to refresh the cache, and gets numerically harder as σ\sigma shrinks.

Provenance Verified against primary literatureHow we verify
DSBM (Shi, De Bortoli, Campbell, Doucet, NeurIPS 2023)arXiv:2303.16852: the reference SDE and bridge (Eqs. 2, 3, 5), the bridge-matching loss (4, 6), the Schrödinger bridge and its static form (7, 8), the Markovian projection (Def. 1, Prop. 2, Eqs. 11–13), the reciprocal projection (Def. 3, Prop. 4), the uniqueness characterisation (Prop. 5), IMF (Eq. 14), the Pythagorean lemma and monotone convergence (Lemma 6, Prop. 7, Thm. 8), the two-direction representation (Prop. 9, Eqs. 20–23), Algorithm 1, the IPF equivalence (Prop. 10), the probability flow ODE (24), the special cases (App. A.2, A.3), the Brownian and Ornstein–Uhlenbeck bridge formulas (App. B.2), loss scaling (App. H), and every experimental number quoted (Sec. 6, App. I, Table 1, Table 2, Table 5 (CIFAR-10)).
Official code (yuyang-shi/dsbm-pytorch)bridge/sde/diffusion_bridge.py: get_train_tuple (lines 160–183) samples t uniformly on [ε, 1−ε] with ε = 1e-4, builds X_t = t x1 + (1−t) x0 + σ√(t(1−t)) z and regresses the bridge drift A·x + M·endpoint with A_f = −1/(1−t), M_f = 1/(1−t), A_b = −1/t, M_b = 1/t (lines 186–196); the reference coupling is x1 = x0 + σ z (lines 141–143); generate_new_dataset keeps only the last state of the simulated chain (line 107); the probability flow ODE drift is (v_f − v_b)/2 (line 133). bridge/trainer_dbdsb.py: σ = √(Σ γ_k) (line 73), each outer iteration runs the backward pass then the forward pass (lines 331–332), and the loss is mse(std·pred, std·target) with std = σ√(1−t) for the forward network and σ√t for the backward one (lines 644–648, 694). The README’s MNIST command uses γ = 0.034 over 30 steps, so σ² = 1.02, the paper’s “σ = 1”.
Léonard (2014), A survey of the Schrödinger problemarXiv:1308.0215: the dynamic problem (Def. 2.1) and the static problem (Def. 2.2), the reciprocal-class definition, and Theorem 2.12 (for a Markov reference the unique solution is Markov and an h-transform of the reference), with the historical note that Jamison (1974) first showed the solution is both reciprocal and Markov.
Peluchetti (2023), Diffusion Bridge Mixture TransportsJMLR 24, arXiv:2304.00917: the concurrent IDBM procedure, Theorem 2 (iterates converge in law to the Schrödinger bridge and the KL to it is non-increasing), and the statement that DSBM-IMF “is equivalent to the IDBM procedure”.
Liu, Wu, Ye, Liu (2022), Let us Build BridgesarXiv:2208.14699: Proposition 2.1, the Markovization of a bridge mixture as the reverse-KL projection onto Markov processes, matching all time marginals; the regression that computes it.
De Bortoli, Thornton, Heng, Doucet (2021), Diffusion Schrödinger BridgearXiv:2106.01357: IPF as alternating KL projections with one end fixed (Eq. 11), each iterate learned as the time reversal of the previous one (Prop. 6), the first iteration recovering score-based generative modelling, and the Gaussian test with means ±0.1·1 in d = 5 and d = 50 that DSBM reuses.
Tong et al. (2023), Improving and generalizing flow-based generative models with minibatch OTarXiv:2302.00482: CFM with an independent coupling, OT-CFM with a minibatch exact-OT coupling, SB-CFM with a minibatch Sinkhorn coupling (regularisation 2σ²) and a Brownian-bridge path of variance σ²t(1−t); the moons / 8gaussians / scurve datasets and the 2-Wasserstein metric of the 2D table.
Liu, Gong, Liu (2023), Rectified Flow; Albergo, Boffi, Vanden-Eijnden (2023), Stochastic InterpolantsarXiv:2209.03003: the reflow procedure (simulate the learned ODE from π0 samples, pair with the endpoints, refit), deterministic paths, non-increasing transport cost. arXiv:2303.08797: x_t = α x0 + β x1 + γ z, Theorem 2.6 (the probability-flow velocity as a conditional expectation and the score −E[z | x_t]/γ), and the iterative refinement of Sec. 3.5.
correctionThree points where the page departs from the paper, and one caveat. (1) Appendix B prints the backward Ornstein–Uhlenbeck bridge sampler (Eqs. 77–78) with x_T where x_0 belongs: the derivation it closes, Eqs. 72, 75 and 76, pins the time-reversed process at x_0, the Brownian limit (Eq. 57) has x_0, and the code’s backward drift multiplies M_b by the initial point. Eqs. 68–69 also print the x_T coefficient’s denominator as exp[−a] − exp[−a], which is identically zero; Eq. 70 resolves it to the correct α β csch. (2) Appendix H downweights the forward loss by (1 + σ² t/(1−t))⁻¹, but the released trainer multiplies both prediction and target by σ√(1−t) (so the loss is scaled by σ²(1−t)) and by σ√t for the backward loss. The two weightings coincide up to a constant only at σ = 1; at the AFHQ setting σ² = 5 they differ by a factor 1 + 4t across the interval. Every reported experiment used the code’s weighting. (3) Section 6 says Rectified Flow beats DSBM on every 2D task but moons-8gaussians; in Table 2 DSBM-IMF+ beats Rectified Flow on moons as well (0.123 against 0.129), within one standard deviation. Caveat: Theorem 8 is a statement about exact projections. DSBM’s alternation of backward and forward fits (Prop. 9) is a remedy for the regression and discretisation error of a learned projection; the theory does not need it, and the practical algorithm has no convergence guarantee of its own.

Questions you might still have

?

Is DSBM just rectified flow with noise added?
The loop is the same shape: fit, simulate, re-pair, fit again. Two things differ. Rectified flow runs a deterministic ODE and only ever re-pairs by simulating forward, so a bias in the learned target marginal is never corrected and the paper measures it growing with each round. DSBM runs a diffusion with σ > 0, which is what makes the Schrödinger bridge the unique process that is Markov, has the reference bridges, and has the right marginals, and it alternates backward fits started from real target samples with forward fits started from real source samples. In the σ → 0 limit with forward-only fits, Algorithm 1 becomes rectified flow, and rectified flow has no guarantee of reaching the optimal transport (Liu 2022 gives a counterexample).

?

Why does the Markovian projection keep the marginals but not the bridges?
The projected drift at (t, x) is the average bridge velocity over every path passing through x at time t. Averaging the velocity at each point preserves how much probability mass flows through each point (the Fokker–Planck equation depends only on the averaged drift), so every time marginal is unchanged. But the averaged drift at (t, x) is the same whichever endpoint pair produced the path through x, so a path of the projected process ends up with an endpoint pairing that differs from the pairing it was built from. The figure with the two-mode source and target shows both at once: the histogram matches the mixture density, and the share of crossing paths drops from one half to about 0.15.

?

Why not solve the entropic OT with Sinkhorn and skip the iterations?
Sinkhorn needs the full cost matrix between the two datasets, which is quadratic in the number of samples and only defines a coupling between the samples it saw. Minibatch Sinkhorn (SB-CFM) fits in memory but couples each minibatch on its own, and the paper measures that bias growing with dimension: on the Gaussian test in d = 50 its marginal KL is 49.4 × 10⁻³ against 8.75 × 10⁻³ for DSBM-IPF. DSBM never forms a cost matrix; the coupling comes from simulating a learned SDE, which generalises to new samples.

?

What exactly is cached between iterations, and how large is it?
Only endpoint pairs. After each projection the code simulates the learned SDE from fresh samples of one marginal (10,000 of them on MNIST, refreshed every 1,000 gradient steps) and stores the start and end of each chain; the intermediate states are discarded because a bridge sample at any t can be drawn in closed form from the two endpoints. DSB, by contrast, stored every intermediate state of every chain and evaluated a second drift on all of them.

?

Should I start from the independent coupling or the reference coupling?
With the reference coupling (x_T = x_0 + σ√T z) the iterates are the IPF iterates, and the first backward fit is an ordinary diffusion model; the paper calls this DSBM-IPF and reports it more accurate on the Gaussian test and on the fluid downscaling ℓ2 error. With the independent coupling (DSBM-IMF) the first fit is bridge matching, and every iterate has both marginals exactly; it gives the best FID on the MNIST transfer (10.59 against 15.27) and better unconditional statistics on the fluids. The paper lists the difference between the two as future work.

?

Does the probability flow ODE give me the optimal transport map?
No. At convergence the ODE with drift ½(v_θ − v_φ) has the same time marginals as the Schrödinger bridge, so it is a valid deterministic sampler and gives likelihoods. But its endpoint pairing is not the entropic OT plan; the paper states this explicitly. The stochastic sampler is the one whose (X_0, X_T) is the entropic coupling, which is why the transfer experiments report it.

?

How many outer iterations does it take?
On the exact Gaussian case in this page, four projections bring the cross-covariance within 10⁻⁴ of its target. Trained models need more because each projection is approximate: 20 outer iterations for the 2D and Gaussian experiments, 50 for MNIST, 12 for the fluids, and only 1 or 2 on CIFAR-10 after a bridge-matching pretraining, where further rounds lowered sample quality.

Footnotes & further reading

  1. The paper: Shi, De Bortoli, Campbell, Doucet, Diffusion Schrödinger Bridge Matching (NeurIPS 2023). Code.
  2. The concurrent, equivalent procedure: Peluchetti, Diffusion Bridge Mixture Transports, Schrödinger Bridge Problems and Generative Modeling (JMLR 2023), whose Theorem 2 is the convergence result.
  3. The Schrödinger problem, reciprocal classes, and the Markov characterisation: Léonard, A survey of the Schrödinger problem and some of its connections with optimal transport (2014). The static-dynamic equivalence and entropic OT: Cuturi, Sinkhorn Distances (2013).
  4. Bridge matching and the Markovian projection in machine learning: Peluchetti, Non-Denoising Forward-Time Diffusions (2021), and Liu, Wu, Ye, Liu, Let us Build Bridges (2022). The marginal-matching result itself: Gyöngy, Mimicking the one-dimensional marginal distributions of processes having an Itô differential, Probability Theory and Related Fields 71 (1986).
  5. The IPF predecessor: De Bortoli, Thornton, Heng, Doucet, Diffusion Schrödinger Bridge with Applications to Score-Based Generative Modeling (2021); the forgetting of the reference: Fernandes, Vargas, Ek, Campbell, Shooting Schrödinger's Cat (2021).
  6. The deterministic relatives: Lipman et al., Flow Matching for Generative Modeling; Liu, Gong, Liu, Flow Straight and Fast (rectified flow); Tong et al., Improving and generalizing flow-based generative models with minibatch optimal transport (OT-CFM, SB-CFM, and the 2D benchmarks); Albergo, Boffi, Vanden-Eijnden, Stochastic Interpolants.
  7. Time reversal and the probability flow ODE: Anderson (1982) and Song et al. (2021). The closed-form Gaussian Schrödinger bridge used for the 50-dimensional test: Bunne, Hsieh, Cuturi, Krause, The Schrödinger Bridge between Gaussian Measures has a Closed Form (2023).