Rémi Emonet
remiemonet.bsky.social
Rémi Emonet
@remiemonet.bsky.social
December 31, 2024 at 10:56 PM
Daily animation.
December 10, 2024 at 5:24 PM
To better grasp what this CFM mapping/corresp. contains, let's move points linearly and at a regular speed (from source cat location to target donut loc.).

We get a different probability path that looks much more like OT. This idea is used in the rectified flow approach github.com/gnobitab/Rec...
December 9, 2024 at 5:23 PM
Now, we look at the mapping/correspondance that is induced by CFM, a mapping between cat points and donut points.
To get a clearer view, let's map a stripped cat to a donut.
Color encodes the initial position of the points on the cat.
December 9, 2024 at 5:20 PM
About Conditional Flow Matching (CFM) with **linear interpolation**. (1/3)

In Optimal Transport (OT) terms, this CFM induces a probability path that corresponds to the (much non-optimal) independent coupling. That means every cat point is split and sent to every donut point.
December 9, 2024 at 5:18 PM
CFM Playground
Showing 3 z samples, with a deterministic equivalent of diffusion,
i.e., z = x1 and with sin/cos weighting
i.e., p(x,t|z) = 𝓝[cos(2πt) · x0 + sin(2πt) · x1, ε](x)
December 4, 2024 at 4:15 PM
CFM Playground
Showing 3 z samples, with trajectories from diffusion,
i.e., z = x1 and having a noisy diffusion process towards 𝓝[0,1] (fixed)
December 4, 2024 at 4:14 PM
CFM Playground
Better conditional flows, like minibatch-OT can help straighten the resulting flow.
Here we use mini-batches of 10 points on each side.
At the extreme (full batch OT) we recover optimal transport.
December 4, 2024 at 4:14 PM
CFM Playground
CFM untangles even bad initial conditional flows.
December 4, 2024 at 4:13 PM
CFM Playground
Showing the field u(x,t)
by flowing random points.
December 4, 2024 at 4:12 PM
CFM Playground
Flowing from the mouse position (forward and backward)
i.e., Euler integration using u(x,t)
December 4, 2024 at 4:11 PM
CFM Playground
The key of CFM, the "inversion"
The velocity u(x,t) at any location x,t is the average of all conditional fields *passing at this location* (here we sample a few to compute the average)
i.e., more formally u(x,t) = 𝔼_{z|x,t} [u(x,t|z)]
December 4, 2024 at 4:10 PM
CFM Playground
Showing 3 z samples, with conical Gaussian path,
i.e., z = x1 and going from a Dirac at x1 to the 𝓝[0,1] (fixed)
i.e., p(x,t|z) = 𝓝[t · x1, 1-t](x)
December 4, 2024 at 4:09 PM
CFM Playground
Showing 3 z samples, with linear interpolation,
i.e., z = (x0, x1) and a spiked Gaussian around (1-t) · x0 + t · x1
i.e., p(x,t|z) = 𝓝[(1-t) · x0 + t · x1, ε](x)
December 4, 2024 at 4:09 PM
This caption is a lie! 😉
We actually have a 4th visual in the blog post.

Take a hot beverage ☕,
play some 🎵 www.youtube.com/watch?v=3jfI...

Welcome to the playground!
The Conditional Flow Matching playground!
December 4, 2024 at 4:07 PM
Here it is. Flow matching the cat/donut pair (quickly hacked so the target distribution is not perfectly matched) (using "example 1" conditional coupling dl.heeere.com/conditional-... )
December 2, 2024 at 4:38 PM