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.

ClaimEvidence Needed
exact likelihoodchange-of-variables formula and tractable determinant
good samplessampling metrics, validity, diversity, qualitative failures
calibrated densityheld-out likelihood and OOD likelihood diagnostics
useful latent spaceinterpolation, downstream probe, or controllability evidence
fast inferencetiming for density evaluation and sampling separately

Discrete and Structured Data

Flows are naturally continuous. For discrete objects, the paper should state the relaxation:

Data TypeCommon HandlingRisk
image pixelsdequantizationlikelihood depends on noise model
text or SMILEScontinuous latent or token relaxationdecoded validity is separate from density
molecular graphgraph generation plus continuous relaxationinvertibility and graph validity are hard
coordinatescontinuous flow in equivariance and permutation handling matter
protein structurecoordinate or distance flowresidue 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?