Section 11.4
Flow Models
Many generative models attempt to learn complicated high-dimensional probability distributions such as distributions over images, audio, or text. As we have seen variational auto-encoders approximate these distributions indirectly using latent-variable models, but they only optimize a lower bound on the data likelihood.
Normalizing flows [79] take a different approach. Instead of approximating the data distribution indirectly, they learn an explicit and invertible transformation between a simple base distribution (e.g., Gaussian) and the complicated data distribution. This allows exact likelihood evaluation and efficient sampling.
Suppose we begin with a sample random variable \(z \sim q(z)\) where \(q\) is often taken to be a standard Gaussian \(\cN(0, I)\). A normalizing flow learns an invertible function \(x = f(z)\) which transforms these samples into samples from the target distribution. The inverse mapping \(z = f^{-1}(x)\) is important for learning.
Since we are transforming variables we need to make sure that probability densities remain normalized. This is handled by the change of variable formula
where the determinant measures how probability mass (volume) expands or contracts under the transformation.
The main challenge with normalizing flows is that they require invertible transformations and the Jacobian \(\frac{\partial f}{\partial z}\) required for training may be expensive to compute due to the high dimensionality of the latent space.1
- 1. Note that for invertible \(f\) we must have \(\dim{x} = \dim{z}\).