Bring the mental model from Maximum Likelihood; this page will reuse it instead of restarting from zero.
Generative Models
Normalizing Flows: Tractable Density via Invertible Transforms
Invertible transforms trained with change-of-variables: tractable transformed densities and sampling, with architectural constraints to make the needed Jacobian determinants tractable.

Concept Structure
Normalizing Flows: Tractable Density via Invertible Transforms
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learning map
Normalizing Flows: Tractable Density via Invertible TransformsConceptual Bridge
What should feel connected as you move through this page.
Invertible transforms trained with change-of-variables: tractable transformed densities and sampling, with architectural constraints to make the needed Jacobian determinants tractable.
The next edge should feel earned: use the demo prediction here before following Diffusion, Score-Based Models & Flow Matching.
01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
Normalizing flows are "reversible warps."
Start from a simple base distribution (like a standard Gaussian). Then apply an invertible transformation that bends and stretches space into a richer model distribution.
Because the transform is invertible, you get:
- Exact sampling: sample from the base, push forward to .
- Tractable log-likelihood under the flow model: map back to and account for how volumes change.
The price is architectural: you must design so it is invertible and the needed map direction plus Jacobian determinant are cheap to compute.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Change of variables
Let where is invertible and . Then:
so:
The determinant term is the volume correction. If the inverse map squeezes a region of data space into a smaller region of latent space, density must increase; if it expands the region, density must decrease. This is the tractable-density advantage of flows, but also the constraint: a flexible transform is useful for likelihood work only when the needed map direction and log-determinant stay tractable.
Composition of flows
If maps latent variables forward, with and , then the inverse-Jacobian log-determinants add as a negative sum of forward log-determinants:
This follows from the determinant of a product of Jacobians. Later flow architectures often engineer triangular or otherwise cheap Jacobians, which can turn a high-dimensional determinant into a sum of simpler per-dimension terms.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
import numpy as np
# A tiny 2D linear flow: x = A z + b, with z ~ N(0, I)
A = np.array([[1.2, 0.3], [0.1, 0.9]])
b = np.array([0.5, -0.2])
Ainv = np.linalg.inv(A)
def log_pz(z):
d = z.shape[0]
return -0.5 * float(z @ z) - 0.5 * d * np.log(2 * np.pi)
x = np.array([1.0, 0.0])
z = Ainv @ (x - b)
log_px = log_pz(z) + np.log(abs(np.linalg.det(Ainv)))
print("det(A):", round(float(np.linalg.det(A)), 3))
print("z:", np.round(z, 3))
print("log p_x(x):", round(float(log_px), 3))
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
The demo below asks you to predict the density effect before revealing the Jacobian correction. The key invariant is that exact likelihood comes from two terms: the base density at the inverse point and the log-volume correction from the inverse Jacobian.
Live Concept Demo
Explore Normalizing Flows: Tractable Density via Invertible Transforms
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Commit to what Normalizing Flows: Tractable Density via Invertible Transforms should make visible before reading the result.
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
Invertible transforms trained with change-of-variables: tractable transformed densities and sampling, with architectural constraints to make the needed Jacobian determinants tractable.

Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Normalizing Flows: Tractable Density via Invertible Transforms should make visible.
Visual Inquiry
Make the image answer a mathematical question
Invertible transforms trained with change-of-variables: tractable transformed densities and sampling, with architectural constraints to make the needed Jacobian determinants tractable.
Which visible object should carry the first intuition?
Pick the cue that should make Normalizing Flows: Tractable Density via Invertible Transforms easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Grounds the change-of-variables density transformation and the term normalizing flow.
Open sourceClaim Review
Invertible transforms trained with change-of-variables: tractable transformed densities and sampling, with architectural constraints to make the needed Jacobian determinants tractable.
Claims without a substantive review badge still need exact source-support review.
rezende-2015-normalizing-flows
Use equation, code, and demo objects to check whether the source support is operational.
Rezende and Mohamed define a normalizing flow as transforming a probability density through a sequence of invertible mappings, state that repeated change-of-variables moves an initial density through that sequence, and derive finite-flow density updates using Jacobian determinants. The page equations, code, and demo instantiate inverse-form base-density lookup plus log-volume correction.
Sources: Variational Inference with Normalizing FlowsRezende and Mohamed frame flows for variational approximate posteriors and density transformation; they do not by themselves justify broad claims about modern data modeling, sampling quality, stability, or universal exact-likelihood practicality.A bounded review summary is present; still check caveats and exact source scope.Rezende and Mohamed support normalizing flows as invertible-map sequences that transform a simple initial density into a richer one, derive finite change-of-variables density updates using inverse/forward Jacobian determinants, and give the composed log-density formula as base log density minus summed forward logdet terms. Local math, affine code, and demo instantiate preimage lookup plus inverse-Jacobian log-volume correction.
Reviewer: codex+oracle+codex-5.3; reviewed 2026-05-08Practice Loop
Try the idea before it explains itself
Invertible transforms trained with change-of-variables: tractable transformed densities and sampling, with architectural constraints to make the needed Jacobian determinants tractable.
Before touching the demo, predict one visible change that should happen in Normalizing Flows: Tractable Density via Invertible Transforms.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to an exact object
Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.Open the draft below to save one note and next action in this browser.
Normalizing Flows: Tractable Density via Invertible Transforms
What is the smallest example that makes Normalizing Flows: Tractable Density via Invertible Transforms click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays locally in this browser for concept:generative-models/normalizing-flows.
- Source ids to inspect: rezende-2015-normalizing-flows
- Definition, prerequisite, and contrast concept links
- The equation or code witness that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Normalizing Flows: Tractable Density via Invertible Transforms Object key: concept:generative-models/normalizing-flows Context: Generative Models Anchor id: concept/concept-notebook/generative-models/normalizing-flows Open question: What is the smallest example that makes Normalizing Flows: Tractable Density via Invertible Transforms click without losing the math? Evidence to inspect: - Source ids to inspect: rezende-2015-normalizing-flows - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/generative-models/normalizing-flows
concept:generative-models/normalizing-flows