Normalizing Flow
A normalizing flow transforms a simple base distribution into a complex one through a sequence of invertible, differentiable maps, giving exact likelihoods via the change-of-variables formula.
The change-of-variables formula is:
The transform must be invertible and have a tractable Jacobian determinant.
For a sequence of invertible maps :
and the log density is:
where .
Design Constraint
The architecture must balance expressiveness and tractable determinants. Coupling layers, autoregressive flows, invertible convolutions, and continuous-time flows make different tradeoffs between parallel sampling, parallel density evaluation, and transform flexibility.
Likelihood Contract
Training usually maximizes exact log likelihood:
This is a density claim. It does not automatically prove sample usefulness, representation quality, or downstream decision quality.
| Claim | Evidence Needed |
|---|---|
| exact likelihood | change-of-variables formula and tractable determinant |
| good samples | sampling metrics, validity, diversity, qualitative failures |
| calibrated density | held-out likelihood and OOD likelihood diagnostics |
| useful latent space | interpolation, downstream probe, or controllability evidence |
| fast inference | timing for density evaluation and sampling separately |
Discrete and Structured Data
Flows are naturally continuous. For discrete objects, the paper should state the relaxation:
| Data Type | Common Handling | Risk |
|---|---|---|
| image pixels | dequantization | likelihood depends on noise model |
| text or SMILES | continuous latent or token relaxation | decoded validity is separate from density |
| molecular graph | graph generation plus continuous relaxation | invertibility and graph validity are hard |
| coordinates | continuous flow in | equivariance and permutation handling matter |
| protein structure | coordinate or distance flow | residue mapping and constraints matter |
For coordinate data, a plain flow over flattened coordinates can learn frame artifacts unless the symmetry contract is explicit.
Flow vs ODE Models
Discrete normalizing flows use a finite composition of invertible maps:
Continuous normalizing flows define:
and adjust density with:
This connects normalizing flows to probability-flow ODEs and flow matching, but the training objective and computational cost can differ.
Why It Matters
- Exact density evaluation and sampling in one model.
- Useful where calibrated likelihoods matter.
- Invertibility constraints limit architecture choices.
Failure Modes
- High likelihood can still produce poor perceptual or task-level samples.
- Invertibility can force the latent and data dimensions to match or require dequantization.
- Tractable Jacobians can restrict interaction between dimensions.
- Out-of-distribution data can receive misleading likelihoods.
Checks
- Is the Jacobian determinant tractable for the chosen transforms?
- Is model expressiveness limited by the invertibility constraint?
- Does exact likelihood translate into good sample quality?
- Are likelihood and downstream utility evaluated separately?
- Does the model need discrete dequantization or a continuous relaxation?
- For coordinates, does the flow respect translation, rotation, and permutation symmetries?
- For molecules or proteins, are invalid decoded samples included in evaluation?