Tutorial
Beckmann maps, from the ground up
From straight lines between noise and data to a generator that lands on the data in a single network call. Five pictures you can poke, and the equations behind each.
Beckmann maps and autonomous flows were introduced in Beckmann Transport Models (Lee et al., 2026), work by one of our authors; Scalable Beckmann Maps takes the map to ImageNet and text-to-image. This page is the pitch for the whole idea; guidance, what the new paper adds, comes last.
0 · The goal
Learn the endpoint
Flow and diffusion models make an image by integrating a differential equation: a network is called tens or hundreds of times, and each call moves the sample a little closer to the data. A Beckmann map is trained to output the endpoint of that journey directly, so a sample is one network call. This page builds the idea up on a toy in the plane where everything can be drawn. The toy has five data points with weights that sum to one; think of each as one image and of its weight as how often it appears. A perfect generator sends exactly that fraction of all noise onto that point, and nothing anywhere else.
Scroll to explore
1 · Noise to data
Straight lines between noise and data
Noise is cheap: a draw \(x_0 \sim \mu_0 = \mathcal N(0, I)\). Data \(x_1 \sim \mu_1\) is what we have examples of. A generator is a map \(T\) that turns one into the other,
read “push noise through \(T\) and you get data, with the right frequencies”. Every method on this page starts from the same trick: pair each noise draw with an independent data draw and join them by a straight line,
At \(t = 0\) the population of points \(I_t\) is the noise cloud; at \(t = 1\) it is the data. Write \(\rho_t\) for its density. The pairing itself is random and will never be learned. What every method reproduces, each in its own way, is the population sliding along these lines.
2 · Flow matching
A velocity that changes with time
Flow matching learns the average slope of the lines passing through each point at each time,
a regression with a network that takes the position and the time. The population is carried exactly by the ODE \(\dot X_t = b_t(X_t)\), so a sample is made by drawing \(X_0 \sim \mu_0\) and integrating from \(t = 0\) to \(1\), calling the network at every step. In the toy the regression has a closed form: given \(I_t = x\), the partner was \(z_j\) with posterior weight \(\propto p_j \exp\!\big(-|x - t z_j|^2/2(1-t)^2\big)\), and
The velocity points from \(x\) toward the current best guess of the endpoint, a denoiser \(\hat z_t(x)\), with a speed that grows as time runs out. Early on the guess is vague and the field points to the middle; late on it has decided. Drag the slider and hover the field.
That last fact is the whole problem with few steps. One Euler step from \(t = 0\) is \(x_0 + b_0(x_0) = \hat z_0\), the data mean, for every \(x_0\): every sample lands on the same point, the famous blurry “average image”. Flow matching needs many steps because its field keeps changing as \(t\) runs, and the early steps commit to nothing. Section 5 shows this side by side with the map.
3 · Autonomous flows
The Beckmann current
Beckmann Transport Models replace the time-dependent velocity by one field that does not depend on time. Average the flow-matching velocity over time, weighted by how much of the population is at \(x\) at each time:
\(J\) is the current, the net flux of interpolants through \(x\); \(\nu\) is the occupation measure, \(\nu(x)\,dx\) being the expected time an interpolant spends in \(dx\); their ratio \(b\) is the average velocity of whatever passes through \(x\), whenever it passes. And \(b\) is the same regression as before with the time input removed:
Integrating the continuity equation \(\partial_t\rho_t + \nabla\cdot(\rho_t b_t) = 0\) over \(t\) kills the time derivative except at the two ends, \(\rho_1 - \rho_0 = \mu_1 - \mu_0\), and leaves the flux constraint of Beckmann’s 1952 transportation problem:
Noise is a source of current, data a sink. Now the part that matters. The ODE \(\dot X = b(X)\) is autonomous: through each point passes exactly one flow line, and flow lines never cross or bend back as \(t\) runs, because there is no \(t\). Every noise point has a single destination, and the plane splits into basins, one per data point. The flux constraint fixes their size: \(J\) is tangent to a basin’s boundary, so no current crosses it, the integral of \(\nabla\cdot J\) over the basin vanishes, and
Each basin carries exactly the mass of its data point. That is the push-forward condition, drawn.
4 · The Beckmann map
Learn the endpoint, never integrate
Define \(T(x)\) as the data point at the end of the flow line through \(x\). By construction \(T\) is constant along flow lines, and it fixes the data:
This is the conservation equation of BTM: \(J\cdot\nabla T\) is the derivative of \(T\) in the direction of the current, and it must vanish. The key move is to train a network on these two conditions directly, without ever integrating the flow or computing \(J\). A transport term enforces conservation through a stop-gradient \(\operatorname{sg}\); a boundary term pins the data:
Read the transport term as a rule: look a little way downstream along the line you are on, and move your prediction toward the prediction there. Its gradient is \(-2\,(\dot I_t\cdot\nabla T)\,\partial_\theta T\), so the update stops exactly when the directional derivative \(\dot I_t\cdot\nabla T(I_t)\) averages to zero at every point. Averaging \(\dot I_t\) over all pairs passing through \(x\) at all times is what produced the current in the first place:
So the stopped update on random straight lines enforces \(J\cdot\nabla T = 0\), and nobody ever computes \(J\). The ODE never appears, in training or in sampling: a sample is \(T(x_0)\), one call. Hover or tap the map.
for each training step:
draw x0 ~ N(0, I), x1 ~ data, t ~ U(0, 1)
I = (1 - t) x0 + t x1; v = x1 - x0
L_tr = | T(I) - sg[ T(I) + DT(I) v ] |^2 # DT(I) v: a forward-mode
L_bd = | T(x1) - x1 |^2 # Jacobian-vector product
θ ← θ - η ∇θ ( L_tr + λ L_bd )
sample: x = T(x0) # one network call
5 · One call versus many
The same noise, two generators
Left: flow matching, Euler’s method with \(N\) equal steps from the same 300 noise draws, each step one network call. Right: the Beckmann map, one call. Pick \(N\) and press generate. With one step, flow matching puts every sample on the data mean; with a few, between data points; the map lands on them.
The map here is the exact endpoint map of the toy’s autonomous flow. The notebook trains one with the algorithm above, on a CPU, in about a minute, and checks that its basins match these.
6 · Going further: what SBM adds
Guidance, built into training
Real models are conditional: the map takes a class label or a text prompt \(c\), and through condition dropout the same network also learns a null branch \(T_\emptyset\) that ignores it. Multistep models owe much of their quality to classifier-free guidance, which pushes a sample away from the null prediction and toward the conditional one with a strength \(\omega \ge 1\). A map has no velocity or score to guide, only endpoint predictions. The observation behind Scalable Beckmann Maps is that the current is a denoising field,
with \(\bar z_c\) a weighted posterior mean of the data, so classifier-free guidance applies to the current as it does to a velocity. Substituting the map’s own conditional and null predictions for the two denoisers gives the guided transport direction, used in place of \(\dot I_t\) in the transport loss, with the matching correction on the boundary target:
No second network, and sampling is still one call. Where the conditional and null predictions disagree, the current is bent toward the mode the condition favours and the basin boundaries move: the condition’s typical modes gain mass, the ambiguous ones lose it. At \(\omega = 1\) everything reduces to the plain Beckmann map. The two-atom picture below is Figure 1 of the paper, live; drag \(\omega\).
The paper proves that the guided stopped update is consistent with a guided conservation equation under the assumptions of its Theorem 2, characterizes the bias of substituting map predictions for denoisers, and shows that the implicit correction keeps the variance of the unguided target where an explicit guided target multiplies it by \(\omega^2\).
7 · Keep going
From the toy to ImageNet
The recipe that trains maps with hundreds of millions of parameters keeps exactly the two losses above and adds engineering around the stop-gradient: a frozen copy of the network for the stopped targets, a per-row normalization of the transport term, an adaptive balance between the transport and boundary gradients, a mixture of interpolation times, and a boundary level that lets the boundary term see slightly noisy data. With those, a Beckmann map trained from scratch in the latent space of a representation autoencoder reaches a one-step FID of 1.6 on ImageNet 256, a GenEval score of 0.86 in text-to-image generation, and beats DriftWorld on two robot world-modelling benchmarks, with one network evaluation per sample and no teacher.
Notebook.
The same five steps in code: train flow matching and a Beckmann map on this toy, compare them at one call, and fine-tune a conditional map with guidance. CPU only, a few minutes. Open in Colab or read it on GitHub.
Project page.
Headline numbers, samples, the animations, the full tables, and a live text-to-image demo of a map trained at scale. Scalable Beckmann Maps improve one-step generation.
Names.
BTM, Beckmann Transport Models, is the framework: the autonomous current, the conservation law, and both ways to use them. The Beckmann map is the endpoint map \(T\) trained directly through the losses above, sampled in one call. SBM scales that map.