Ask what should change when the equation is manipulated, then let the visualization test that expectation.
Foundation Lab
Normalizing Flows: Exact Likelihood via Invertible Transforms
Flows provide exact likelihood (unlike GANs) and exact sampling (unlike EBMs)—the "best of both worlds"
\log p_x(x) = \log p_z(f^{-1}(x)) + \log \left| \det \frac{\partial f^{-1}}{\partial x} \right|Selected Foundation Object
Keep the equation fixed; move through the evidence.
The challenge is making f invertible AND having tractable Jacobian determinant—this drives architecture choices (coupling layers, autoregressive flows)
\log p_x(x) = \log p_z(f^{-1}(x)) + \log \left| \det \frac{\partial f^{-1}}{\partial x} \right|Use the runnable panel, the key equation, and canonical papers as separate forms of evidence for the same object.
The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.
This atlas page keeps the working demo; the domain notebook carries the fuller Intuition -> Math -> Code -> Demo sequence.
Why It Matters for Modern Models
- Flows provide exact likelihood (unlike GANs) and exact sampling (unlike EBMs)—the "best of both worlds"
- The mathematical foundation for flow matching/rectified flows which are replacing traditional diffusion
- Understanding Jacobian determinants and invertibility constraints illuminates architectural design choices
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- The challenge is making f invertible AND having tractable Jacobian determinant—this drives architecture choices (coupling layers, autoregressive flows)
- Unlike VAEs, no variational bound: you get exact log p(x), but at the cost of architectural constraints
- Modern flow matching avoids the Jacobian entirely by learning velocity fields—converges to OT map
Interactive Visualization
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation and the visualization. Come back here for the full walkthrough.
Normalizing flows transform a simple base distribution through an invertible function :
The change of variables formula gives exact log-likelihood:
Composition of flows: with log-det Jacobian summing: