AI Glossary / Probabilistic machine learning / Intermediate

Continuous-time normalizing flow

Definition

A continuous-time normalizing flow is a generative density model that transforms a simple probability distribution through an ordinary differential equation. As sample locations move continuously, an accompanying equation tracks how their probability density changes. It is also called a continuous normalizing flow, or CNF.

What it means

A conventional normalizing flow applies a sequence of invertible transformations. A CNF instead describes an instantaneous velocity field: where each point should move at each moment of an artificial time variable.
This time usually indexes a transformation, rather than calendar time. Samples from a simple starting distribution move along trajectories toward a more complex distribution. Under suitable regularity and existence conditions, the transformation can be reversed. Density changes must be tracked because stretching a region spreads its probability mass over more space, while compression concentrates it.

How it works

Choose a base distribution with a known density and a vector field f_theta(z, t), often parameterized by a neural network. Solve dz/dt = f_theta(z, t) over a specified interval to transform a base sample.
Along its trajectory, the log density changes according to d log p_t(z(t))/dt = −trace(partial f_theta / partial z). The trace sums the diagonal entries of the vector field's Jacobian; it measures local expansion or contraction.
For density evaluation, connect an observed point to its base location and account for the integrated density change. Training can use likelihood or other suitable objectives. Numerical solvers approximate the continuous equations, so tolerances, computational cost, and stability remain practical considerations.

Three practical examples

  • Density estimation: learn a flexible distribution over continuous measurements and evaluate held-out density, checking whether the model also captures useful structure.
  • Synthetic examples: transform base samples into candidate continuous observations for simulation or testing, validating their properties against the intended use.
  • Conditional modeling: supply context to the vector field to describe different output distributions under different conditions, while assessing conditional quality separately.

Think of it this way

Think of dots painted on a flexible sheet as the sheet stretches and bends. The dots move, and their local concentration changes even though none are added or removed. The analogy is bounded: a valid CNF follows a specified differential equation with suitable mathematical conditions. It cannot simply fold different starting points into one final point while retaining the usual invertible density interpretation.

Worked example

Consider an original one-dimensional flow dz/dt = a z from t = 0 to t = 1, with a = log(2). Its exact solution is z(1) = exp(a) z(0) = 2 z(0). Let the base distribution be a standard normal.
The derivative of the vector field with respect to z is a. Integrating the log-density equation gives log p1(z(1)) = log p0(z(0)) − log(2). Equivalently, p1(x) = p0(x / 2) / 2.
Thus the final distribution is normal with mean zero and standard deviation 2. At x = 2, the base point is 1. Since the standard normal density at 1 is approximately 0.24197, the final density at 2 is approximately 0.120985.
The density halves because the transformation doubles distances. Total probability remains one: widening the distribution compensates for the lower density. This solvable example illustrates the continuous change-of-variables rule without numerical integration error.

Illustrative case study

Fictional case: Birch Simulation models two continuous operating measurements jointly. Its team starts with a simple distribution and trains a CNF, then checks generated samples and held-out density estimates.
When a tighter solver tolerance changes reported likelihood values, the analysts investigate numerical error before comparing models. They also examine whether generated combinations satisfy known operating constraints. A flexible mathematical density does not automatically respect those constraints. Birch records solver settings with the model so the evaluation can be reproduced; this is an illustrative process, not a reported company result.

Common misconceptions and mistakes

Continuous-time does not mean continuous retraining or streaming operation. It refers to the transformation's mathematical parameterization. A neural ODE is not automatically a density model; a CNF must also specify a base density and account for density change.
The transformation can be deterministic while its output is random because the initial sample is random. Mathematical invertibility does not imply numerical reversal is error-free. Likewise, replacing a determinant with a trace does not make high-dimensional density evaluation free: derivatives, integration, and any trace approximation still have costs.

Business use

CNFs are relevant when a project needs both flexible continuous sampling and a principled density calculation. They introduce a tradeoff between expressiveness, numerical precision, and runtime.
Ask how many vector-field evaluations are needed, how sensitive results are to solver settings, and whether evaluation uses exact or estimated traces. Compare with simpler models under the same validation protocol. A density score is not automatically an anomaly decision or business risk probability; those interpretations require their own validation and decision rules.

People also ask

Does the flow need to represent a real physical process?

No. Its time and velocity field can be purely mathematical tools for transforming distributions.

Is it the same as a stochastic diffusion?

No. A basic CNF follows an ordinary differential equation with deterministic trajectories given the initial state. Relationships to diffusion models do not make the definitions identical.

Can every vector field define a usable flow?

No. Existence, uniqueness, regularity, and numerical behavior must be appropriate over the intended interval.

Check your understanding

In the worked example, what happens if a = −log(2) instead?

Answer: The final value is half the base value, giving standard deviation 0.5. The log density increases by log(2) along a trajectory because space contracts, consistent with p1(x) = 2 p0(2x).

Related terms

  • Flow matching
  • Normalizing flow
  • neural ordinary differential equation
  • change of variables
  • Jacobian trace
  • probability density
  • vector field
  • numerical solver

Learn next

Study change of variables for a one-dimensional scaling transformation, then derive the worked example's differential equation and density update. Next, compare exact and numerical solutions. Move to multidimensional Jacobians only after the relationship between expansion and density is clear.

More in Probabilistic machine learning

  • Conditional diffusion model - A conditional diffusion model is a generative model that uses a diffusion-style noise-removal process to produce outputs in response to supplied information.
  • Conformalized quantile regression - Conformalized quantile regression, or CQR, combines estimated lower and upper conditional quantiles with a conformal calibration step to produce prediction...
  • Consistent estimator - A consistent estimator is an estimation rule whose output converges in probability to the quantity being estimated as the sample size grows, under stated...
  • Contractive autoencoder - A contractive autoencoder is an autoencoder trained to reconstruct its inputs while discouraging its encoded representation from changing sharply under...
  • Contrastive divergence - Contrastive divergence, often abbreviated CD, is an approximate learning method for certain probabilistic models, especially energy-based models such as...
  • Control as inference - Control as inference is a framework that expresses action selection as probabilistic inference in a model linking states, actions, dynamics, and preferences.

Sources

Chen, Rubanova, Bettencourt, and Duvenaud, “Neural Ordinary Differential Equations,” original paper, continuous normalizing flows and instantaneous change of variables: https://arxiv.org/pdf/1806.07366 Independent source review: Neural ODE Theorem 1 and continuous-flow discussion were read; its spatial-Jacobian trace governs the density update.

Previous: Continuous random variable Next: Continuous Uniform Distribution

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer