Flow-based generative model explained
A flow-based generative model is a generative model used in machine learning that explicitly models a probability distribution by leveraging normalizing flow,[1] [2] [3] which is a statistical method using the change-of-variable law of probabilities to transform a simple distribution into a complex one.
The direct modeling of likelihood provides many advantages. For example, the negative log-likelihood can be directly computed and minimized as the loss function. Additionally, novel samples can be generated by sampling from the initial distribution, and applying the flow transformation.
In contrast, many alternative generative modeling methods, such as variational autoencoders (VAEs), generative adversarial networks (GANs), or diffusion models, do not explicitly represent the likelihood function.
Method
Let
be a (possibly multivariate)
random variable with distribution
.
For
, let
be a sequence of random variables transformed from
. The functions
should be invertible, i.e. the
inverse function
exists. The final output
models the target distribution.
The log likelihood of
is (see derivation):
logpK(zK)=logp0(z0)-
log\left|\det
\right|
Learning probability distributions by differentiating such log Jacobians originated in the Infomax (maximum likelihood) approach to ICA,[4] which forms a single-layer (K=1) flow-based model. Relatedly, the single layer precursor of conditional generative flows appeared in.[5]
To efficiently compute the log likelihood, the functions
should be easily invertible, and the determinants of their Jacobians should be simple to compute. In practice, the functions
are modeled using
deep neural networks, and are trained to minimize the negative log-likelihood of data samples from the target distribution. These architectures are usually designed such that only the forward pass of the neural network is required in both the inverse and the Jacobian determinant calculations. Examples of such architectures include NICE,
[6] RealNVP,
[7] and Glow.
[8] Derivation of log likelihood
Consider
and
. Note that
.
By the change of variable formula, the distribution of
is:
p1(z1)=p0(z0)\left|\det
\right|
Where
is the
determinant of the
Jacobian matrix of
.
By the inverse function theorem:
p1(z1)=p0(z0)\left|\det\left(
\right)-1\right|
By the identity
(where
is an
invertible matrix), we have:
p1(z1)=p0(z0)\left|\det
\right|-1
The log likelihood is thus:
logp1(z1)=logp0(z0)-log\left|\det
\right|
In general, the above applies to any
and
. Since
is equal to
subtracted by a non-recursive term, we can infer by
induction that:
logpK(zK)=logp0(z0)-
log\left|\det
\right|
Training method
As is generally done when training a deep learning model, the goal with normalizing flows is to minimize the Kullback–Leibler divergence between the model's likelihood and the target distribution to be estimated. Denoting
the model's likelihood and
the target distribution to learn, the (forward) KL-divergence is:
DKL[p*(x)\|p\theta(x)]=
[logp\theta(x)]+
[logp*(x)]
The second term on the right-hand side of the equation corresponds to the entropy of the target distribution and is independent of the parameter
we want the model to learn, which only leaves the expectation of the negative log-likelihood to minimize under the target distribution. This intractable term can be approximated with a Monte-Carlo method by
importance sampling. Indeed, if we have a dataset
of samples each independently drawn from the target distribution
, then this term can be estimated as:
}_[\log p_{\theta}(x)] = -\frac \sum_^ \log p_(x_)
Therefore, the learning objective
\underset{\theta}{\operatorname{argmin}} DKL[p*(x)\|p\theta(x)]
is replaced by
| N |
| \underset{\theta}{\operatorname{argmax}} \sum | |
| i=0 |
logp\theta(xi)
In other words, minimizing the Kullback–Leibler divergence between the model's likelihood and the target distribution is equivalent to maximizing the model likelihood under observed samples of the target distribution.[9]
A pseudocode for training normalizing flows is as follows:[10]
, normalizing flow model
.
max\theta\sumjlogp\theta(xj)
by gradient descent
Variants
Planar Flow
The earliest example.[11] Fix some activation function
, and let
with the appropriate dimensions, then
The inverse
has no closed-form solution in general.
The Jacobian is
|\det(I+h'(\langlew,z\rangle+b)uwT)|=|1+h'(\langlew,z\rangle+b)\langleu,w\rangle|
.
For it to be invertible everywhere, it must be nonzero everywhere. For example,
and
satisfies the requirement.
Nonlinear Independent Components Estimation (NICE)
Let
be even-dimensional, and split them in the middle. Then the normalizing flow functions are
where
is any neural network with weights
.
is just
, and the Jacobian is just 1, that is, the flow is volume-preserving.
When
, this is seen as a curvy shearing along the
direction.
Real Non-Volume Preserving (Real NVP)
The Real Non-Volume Preserving model generalizes NICE model by:
Its inverse is
z1=x1,z2=
\odot(x2-m\theta(x1))
, and its Jacobian is
. The NICE model is recovered by setting
.Since the Real NVP map keeps the first and second halves of the vector
separate, it's usually required to add a permutation
after every Real NVP layer.
Generative Flow (Glow)
In generative flow model, each layer has 3 parts:
- channel-wise affine transform with Jacobian
.
- invertible 1x1 convolution with Jacobian
. Here
is any invertible matrix.
- Real NVP, with Jacobian as described in Real NVP.
The idea of using the invertible 1x1 convolution is to permute all layers in general, instead of merely permuting the first and second half, as in Real NVP.
Masked Autoregressive Flow (MAF)
An autoregressive model of a distribution on
is defined as the following stochastic process:
[12] where
and
\sigmai:\Ri-1\to(0,infty)
are fixed functions that define the autoregressive model.
By the reparameterization trick, the autoregressive model is generalized to a normalizing flow:The autoregressive model is recovered by setting
.
The forward mapping is slow (because it's sequential), but the backward mapping is fast (because it's parallel).
The Jacobian matrix is lower-diagonal, so the Jacobian is
\sigma1\sigma2(x1) … \sigman(x1:n-1)
.
Reversing the two maps
and
of MAF results in Inverse Autoregressive Flow (IAF), which has fast forward mapping and slow backward mapping.
[13] Continuous Normalizing Flow (CNF)
Instead of constructing flow by function composition, another approach is to formulate the flow as a continuous-time dynamic.[14] [15] Let
be the latent variable with distribution
. Map this latent variable to data space with the following flow function:
where
is an arbitrary function and can be modeled with e.g. neural networks.
The inverse function is then naturally:
z0=F-1(x)=zT+
f(zt,t)dt=zT-
f(zt,t)dt
And the log-likelihood of
can be found as:
log(p(x))=log(p(z0))-
\right]dt
Since the trace depends only on the diagonal of the Jacobian
, this allows "free-form" Jacobian.
[16] Here, "free-form" means that there is no restriction on the Jacobian's form. It is contrasted with previous discrete models of normalizing flow, where the Jacobian is carefully designed to be only upper- or lower-diagonal, so that the Jacobian can be evaluated efficiently.
The trace can be estimated by "Hutchinson's trick":[17] [18]
Given any matrix
, and any random
with
, we have
. (Proof: expand the expectation directly.)
Usually, the random vector is sampled from
(normal distribution) or
(Rademacher distribution).
When
is implemented as a neural network,
neural ODE methods
[19] would be needed. Indeed, CNF was first proposed in the same paper that proposed neural ODE.
There are two main deficiencies of CNF, one is that a continuous flow must be a homeomorphism, thus preserve orientation and ambient isotopy (for example, it's impossible to flip a left-hand to a right-hand by continuous deforming of space, and it's impossible to turn a sphere inside out, or undo a knot), and the other is that the learned flow
might be ill-behaved, due to degeneracy (that is, there are an infinite number of possible
that all solve the same problem).
By adding extra dimensions, the CNF gains enough freedom to reverse orientation and go beyond ambient isotopy (just like how one can pick up a polygon from a desk and flip it around in 3-space, or unknot a knot in 4-space), yielding the "augmented neural ODE".[20]
Any homeomorphism of
can be approximated by a neural ODE operating on
, proved by combining
Whitney embedding theorem for manifolds and the
universal approximation theorem for neural networks.
[21] To regularize the flow
, one can impose regularization losses. The paper
[17] proposed the following regularization loss based on
optimal transport theory:
where
are hyperparameters. The first term punishes the model for oscillating the flow field over time, and the second term punishes it for oscillating the flow field over space. Both terms together guide the model into a flow that is smooth (not "bumpy") over space and time.
Flows on manifolds
When a probabilistic flow transforms a distribution on an
-dimensional smooth manifold embedded in
, where
, and where the transformation is specified as a function,
, the scaling factor between the source and transformed
PDFs is
not given by the naive computation of the
determinant of the
Jacobian (which is zero), but instead by the determinant(s) of one or more suitably defined
matrices. This section is an interpretation of the tutorial in the appendix of Sorrenson et al.(2023),
[22] where the more general case of non-isometrically embedded
Riemann manifolds is also treated. Here we restrict attention to
isometrically embedded manifolds.
As running examples of manifolds with smooth, isometric embedding in
we shall use:
, where flows can be used to generalize e.g.
Von Mises-Fisher or uniform spherical distributions.
\Deltan-1=\{p=(p1,...,p
\sumipi=1\}
, where
-way
categorical distributions live; and where flows can be used to generalize e.g.
Dirichlet, or uniform simplex distributions.
As a first example of a spherical manifold flow transform, consider the normalized linear transform, which radially projects onto the unit sphere the output of an invertible linear transform, parametrized by the
invertible matrix
:
In full Euclidean space,
is
not invertible, but if we restrict the domain and co-domain to the unit sphere, then
is invertible (more specifically it is a
bijection and a
homeomorphism and a
diffeomorphism), with inverse
. The Jacobian of
, at
is
\lVertMx\rVert-1(In-yy')M
, which has rank
and determinant of zero; while as explained here, the factor (see subsection below) relating source and transformed densities is:
\lVertMx\rVert-n\left|\operatorname{det}M\right|
.
Differential volume ratio
For
, let
be an
-dimensional manifold with a smooth, isometric embedding into
. Let
be a smooth flow transform with range restricted to
. Let
be sampled from a distribution with density
. Let
, with resultant (pushforward) density
. Let
be a small, convex region containing
and let
be its image, which contains
; then by conservation of probability mass:
PX(x)\operatorname{volume}(U) ≈ PY(y)\operatorname{volume}(V)
where volume (for very small regions) is given by
Lebesgue measure in
-dimensional
tangent space. By making the regions infinitessimally small, the factor relating the two densities is the ratio of volumes, which we term the
differential volume ratio.
To obtain concrete formulas for volume on the
-dimensional manifold, we construct
by mapping an
-dimensional rectangle in (local) coordinate space to the manifold via a smooth embedding function:
. At very small scale, the embedding function becomes essentially linear so that
is a parallelotope (multidimensional generalization of a parallelogram). Similarly, the flow transform,
becomes linear, so that the image,
is also a parallelotope. In
, we can represent an
-dimensional parallelotope with an
matrix whose column-vectors are a set of edges (meeting at a common vertex) that span the paralellotope. The volume is given by the absolute value of the determinant of this matrix. If more generally (as is the case here), an
-dimensional paralellotope is embedded in
, it can be represented with a (tall)
matrix, say
. Denoting the parallelotope as
, its volume is then given by the square root of the Gram determinant:
\operatorname{volume}/V/=\sqrt{\left|\operatorname{det}(V'V)\right|}
In the sections below, we show various ways to use this volume formula to derive the differential volume ratio.
Simplex flow
As a first example, we develop expressions for the differential volume ratio of a simplex flow,
, where
. Define the
embedding function:
e:\tildep=(p1...,pn-1)\mapstop=(p1...,pn-1
pi)
which maps a conveniently chosen,
-dimensional representation,
, to the embedded manifold. The
Jacobian is
E=\begin{bmatrix}
In-1\\
-\boldsymbol{1}'
\end{bmatrix}
.To define
, the differential volume element at the transformation input (
), we start with a rectangle in
-space, having (signed) differential side-lengths,
from which we form the square diagonal matrix
, the columns of which span the rectangle. At very small scale, we get
, with:
\operatorname{volume}(U)=\sqrt{\left|\operatorname{det}(DE'ED)\right|}
=
| n-1 |
| \sqrt{\left|\operatorname{det}(E'E)\right|}
\left|\operatorname{det}D)\right|
=\sqrtn\prod | |
| i=1 |
\left|dpi\right|
To understand the geometric interpretation of the factor
, see the example for the 1-simplex in the diagram at right.
The differential volume element at the transformation output (
), is the parallelotope,
, where
is the
Jacobian of
at
. Its volume is:
\operatorname{volume}(V)=
| \sqrt{\left|\operatorname{det}(DE'Fp'FpED)\right|}
= |
\sqrt{\left|\operatorname{det}(| E'Fp'FpE)\right|}
\left|\operatorname{det}D)\right|
|
|
so that the factor
\left|\operatorname{det}D)\right|
cancels in the volume ratio, which can now already be numerically evaluated. It can however be rewritten in a sometimes more convenient form by also introducing the
representation function,
, which simply extracts the first
components. The Jacobian is
R=\begin{bmatrix}In&\boldsymbol0\end{bmatrix}
. Observe that, since
, the chain rule for function composition gives:
. By plugging this expansion into the above Gram determinant and then refactoring it as a product of determinants of square matrices, we can extract the factor
\sqrt{\left|\operatorname{det}(E'E)\right|}=\sqrtn
, which now also cancels in the ratio, which finally simpifies to the determinant of the Jacobian of the "sandwiched" flow transformation,
:
| \Delta |
| R | |
| f(| p)= | \operatorname{volume | | (V)}{\operatorname{volume}(U)}
= | \left|\operatorname{det}(RFpE)\right|
|
|
which, if
, can be used to derive the pushforward density after a change of variables,
:
This formula is valid only because the simplex is flat and the Jacobian,
is constant. The more general case for curved manifolds is discussed below, after we present two concrete examples of simplex flow transforms.
Simplex calibration transform
A calibration transform,
, which is sometimes used in machine learning for post-processing of the (class posterior) outputs of a probabilistic
-class classifier,
[23] [24] uses the
softmax function to renormalize categorical distributions after scaling and translation of the input distributions in log-probability space. For
and with parameters,
and
the transform can be specified as:
q=fcal(p;a,c)=\operatorname{softmax}(a-1
| -1 |
| logp+c) \iff
p=f | |
| cal(q;a, |
c)=\operatorname{softmax}(alogq-ac)
where the log is applied elementwise. After some algebra the
differential volume ratio can be expressed as:
c)=
| \left|\operatorname{det}(RFpE)\right| |
=\left|a\right|1-n
- This result can also be obtained by factoring the density of the SGB distribution,[25] which is obtained by sending Dirichlet variates through
.While calibration transforms are most often trained as
discriminative models, the reinterpretation here as a probabilistic flow allows also the design of
generative calibration models based on this transform. When used for calibration, the restriction
can be imposed to prevent direction reversal in log-probability space. With the additional restriction
, this transform (with discriminative training) is known in machine learning as temperature scaling.
Generalized calibration transform
The above calibration transform can be generalized to
, with parameters
and
invertible:
[26] q=fgcal(p;A,c)
=\operatorname{softmax}(Alogp+c), subjectto
A1=λ1
where the condition that
has
as an
eigenvector ensures invertibility by sidestepping the information loss due to the invariance:
\operatorname{softmax}(x+\alpha1)=\operatorname{softmax}(x)
. Note in particular that
is the
only allowed diagonal parametrization, in which case we recover
, while (for
) generalization
is possible with non-diagonal matrices. The
inverse is:
p=
,-A-1c), where
A1=λ1\LongrightarrowA-11=λ-11
The
differential volume ratio is:
| \Delta |
| R | |
| gcal(p;A,| c)
= | \left|\operatorname{det | | (A)\right|}{|λ|}\prod |
|
|
|
|
If
is to be used as a calibration transform, further constraint could be imposed, for example that
be
positive definite, so that
, which avoids direction reversals. (This is one possible generalization of
in the
parameter.)
For
,
and
positive definite, then
and
are equivalent in the sense that in both cases,
is a straight line, the (positive) slope and offset of which are functions of the transform parameters. For
does generalize
.
It must however be noted that chaining multiple
flow transformations does
not give a further generalization, because:
fgcal( ⋅ ;A1,c1)\circ
fgcal( ⋅ ;A2,c2)
=fgcal( ⋅ ;A1A2,c1+A1c2)
In fact, the set of
transformations form a
group under function composition. The set of
transformations form a subgroup.
Also see: Dirichlet calibration,[27] which generalizes
, by not placing any restriction on the matrix,
, so that invertibility is not guaranteed. While Dirichlet calibration is trained as a discriminative model,
can also be trained as part of a generative calibration model.
Differential volume ratio for curved manifolds
Consider a flow,
on a curved manifold, for example
which we equip with the embedding function,
that maps a set of
angular spherical coordinates to
. The Jacobian of
is non-constant and we have to evaluate it at both input (
) and output (
). The same applies to
, the representation function that recovers spherical coordinates from points on
, for which we need the Jacobian at the output (
). The differential volume ratio now generalizes to:
Rf(x)=\left|\operatorname{det}(RyF)\right|
| \sqrt{\left|\operatorname{det |
| (E |
| |
| | y'Ey)\right|}}{\sqrt{\left|\operatorname{det}(E |
|
|
For geometric insight, consider
, where the spherical coordinates are co-latitude,
and longitude,
. At
, we get
| \sqrt{\left|\operatorname{det}(E | |
| |
, which gives the radius of the circle at that latitude (compare e.g. polar circle to equator). The differential volume (surface area on the sphere) is:
.
The above derivation for
is fragile in the sense that when using
fixed functions
, there may be places where they are not well-defined, for example at the poles of the 2-sphere where longitude is arbitrary. This problem is sidestepped (using standard manifold machinery) by generalizing to
local coordinates (charts), where in the vicinities of
, we map from local
-dimensional coordinates to
and back using the respective function pairs
and
. We continue to use the same notation for the Jacobians of these functions (
), so that the above formula for
remains valid.
We can however, choose our local coordinate system in a way that simplifies the expression for
and indeed also its practical implementation. Let
be a smooth idempotent projection (
) from the
projectible set,
, onto the embedded manifold. For example:
is projected onto the
simplex as:
are projected onto the
unit sphere as:
For every
, we require of
that its
Jacobian,
has rank
(the manifold dimension), in which case
is an
idempotent linear projection onto the local tangent space (
orthogonal for the unit sphere:
;
oblique for the simplex:
). The columns of
span the
-dimensional tangent space at
. We use the notation,
for any
matrix with orthonormal columns (
) that span the local tangent space. Also note:
. We can now choose our local coordinate embedding function,
:
ex(\tildex)=\pi(x+
| Tx\tildex),
withJacobian:Ex=Txat\tildex=0.
|
Since the Jacobian is injective (full rank:
), a local (not necessarily unique) left inverse, say
with Jacobian
, exists such that
and
. In practice we do not need the left inverse function itself, but we
do need its Jacobian, for which the above equation does not give a unique solution. We can however enforce a unique solution for the Jacobian by choosing the left inverse as,
:
We can now finally plug
and
into our previous expression for
, the
differential volume ratio, which because of the orthonormal Jacobians, simplifies to:
[28] Rf(x)=
| \left|\operatorname{det}(Ty'FxTx)\right|
|
Practical implementation
For learning the parameters of a manifold flow transformation, we need access to the differential volume ratio,
, or at least to its gradient w.r.t. the parameters. Moreover, for some inference tasks, we need access to
itself. Practical solutions include:
- Sorrenson et al.(2023) give a solution for computationally efficient stochastic parameter gradient approximation for
- For some hand-designed flow transforms,
can be analytically derived in closed form, for example the above-mentioned simplex calibration transforms. Further examples are given below in the section on simple spherical flows.
Rf(x)=
| \left|\operatorname{det}(Ty'FxTx)\right| |
can be automatically evaluated, given access to only
.
[29] But this is expensive for high-dimensional data, with at least
computational costs. Even then, the slow automatic solution can be invaluable as a tool for numerically verifying hand-designed closed-form solutions.
Simple spherical flows
In machine learning literature, various complex spherical flows formed by deep neural network architectures may be found. In contrast, this section compiles from statistics literature the details of three very simple spherical flow transforms, with simple closed-form expressions for inverses and differential volume ratios. These flows can be used individually, or chained, to generalize distributions on the unit sphere,
. All three flows are compositions of an invertible affine transform in
, followed by radial projection back onto the sphere. The flavours we consider for the affine transform are: pure translation, pure linear and general affine. To make these flows fully functional for learning, inference and sampling, the tasks are:
- To derive the inverse transform, with suitable restrictions on the parameters to ensure invertibility.
- To derive in simple closed form the differential volume ratio,
.An interesting property of these simple spherical flows is that they don't make use of any non-linearities apart from the radial projection. Even the simplest of them, the normalized translation flow, can be chained to form perhaps surprisingly flexible distributions.
Normalized translation flow
The normalized translation flow,
, with parameter
, is given by:
y=
| f | |
| | trans(,
where \lVertc\rVert< |
|
1
The inverse function may be derived by considering, for
:
and then using
to get a
quadratic equation to recover
, which gives:
x=
c,where
\ell=y'c+\sqrt{(y'c)2+1-c'c}
from which we see that we need
to keep
real and positive for all
. The
differential volume ratio is given (without derivation) by Boulerice & Ducharme(1994) as:
[30] | R | |
| | trans(x;c)= | 1+x'c | | \lVertx+c\rVertn |
|
This can indeed be verified analytically:
- By a laborious manipulation of
Rf(x)=
| \left|\operatorname{det}(Ty'FxTx)\right| |
.
in
, which is given below.Finally, it is worth noting that
and
do not have the same functional form.
Normalized linear flow
The normalized linear flow,
, where parameter
is an invertible
matrix, is given by:
The
differential volume ratio is:
Rlin(x;M)=
| \left|\operatorname{det |
| M\right|}
{\lVertMx\rVert |
n}
This result can be derived indirectly via the
Angular central Gaussian distribution (ACG),
[31] which can be obtained via normalized linear transform of either Gaussian, or uniform spherical variates. The first relationship can be used to derive the ACG density by a marginalization integral over the radius; after which the second relationship can be used to factor out the differential volume ratio. For details, see ACG distribution.
Normalized affine flow
The normalized affine flow,
, with parameters
and
,
invertible, is given by:
| f | |
| aff(| x;M,c)
= | Mx+c | | \lVertMx+c\rVert | ,
where \lVertM-1c\rVert |
|
<1
The inverse function, derived in a similar way to the normalized translation inverse is:
x=
(\elly-c),where
\ell=
| y'Wc+\sqrt{(y'Wc)2+y'Wy(1-c'Wc) |
|
} where
. The
differential volume ratio is:
Raff(x;M,c)
=R
| n}
|
| |
| lin(x;| M+cx')=
| \left|\operatorname{det | M\right|(1+| x'M-1c)}
{\lVertMx+c\rVert |
|
|
|
|
|
The final RHS numerator was expanded from
\operatorname{det}(M+cx')
by the
matrix determinant lemma. Recalling
Rf(x)=\left|\operatorname{det}(T
, the equality between
and
holds because not only:
x'x=1 \Longrightarrow y=faff(x;M,c)=flin(x;M+cx')
but also, by orthogonality of
to the local tangent space:
| |
| x'Tx=\boldsymbol0 \Longrightarrow F |
| |
| x |
=
where
is the Jacobian of
differentiated w.r.t. its input, but
not also w.r.t. to its parameter.
Downsides
Despite normalizing flows success in estimating high-dimensional densities, some downsides still exist in their designs. First of all, their latent space where input data is projected onto is not a lower-dimensional space and therefore, flow-based models do not allow for compression of data by default and require a lot of computation. However, it is still possible to perform image compression with them.[32]
Flow-based models are also notorious for failing in estimating the likelihood of out-of-distribution samples (i.e.: samples that were not drawn from the same distribution as the training set).[33] Some hypotheses were formulated to explain this phenomenon, among which the typical set hypothesis,[34] estimation issues when training models,[35] or fundamental issues due to the entropy of the data distributions.[36]
One of the most interesting properties of normalizing flows is the invertibility of their learned bijective map. This property is given by constraints in the design of the models (cf.: RealNVP, Glow) which guarantee theoretical invertibility. The integrity of the inverse is important in order to ensure the applicability of the change-of-variable theorem, the computation of the Jacobian of the map as well as sampling with the model. However, in practice this invertibility is violated and the inverse map explodes because of numerical imprecision.[37]
Applications
Flow-based generative models have been applied on a variety of modeling tasks, including:
- Audio generation[38]
- Image generation
- Molecular graph generation[39]
- Point-cloud modeling[40]
- Video generation[41]
- Lossy image compression[32]
- Anomaly detection[42]
External links
Notes and References
- Tabak . Esteban G. . Vanden-Eijnden . Eric . Density estimation by dual ascent of the log-likelihood . Communications in Mathematical Sciences . 2010 . 8 . 1 . 217–233 . 10.4310/CMS.2010.v8.n1.a11 .
- Tabak . Esteban G. . Turner . Cristina V. . A family of nonparametric density estimation algorithms . Communications on Pure and Applied Mathematics . 2012 . 66 . 2 . 145–164 . 10.1002/cpa.21423 . 11336/8930 . 17820269 . free . subscription .
- George . Papamakarios . Eric . Nalisnick . Danilo . Jimenez Rezende . Shakir . Mohamed . Balaji . Bakshminarayanan . 2021 . Normalizing flows for probabilistic modeling and inference . Journal of Machine Learning Research . 22 . 1 . 2617–2680 . 1912.02762 .
- Bell, A. J.; Sejnowski, T. J. (1995). "An information-maximization approach to blind separation and blind deconvolution". Neural Computation. **7** (6): 1129–1159. doi:10.1162/neco.1995.7.6.1129.
- Roth, Z.; Baram, Y. (1996). "Multidimensional density shaping by sigmoids". IEEE Transactions on Neural Networks. **7** (5): 1291–1298. doi:10.1109/72.536322.
- 1410.8516. Dinh. Laurent. Krueger. David. Bengio. Yoshua. NICE: Non-linear Independent Components Estimation. 2014. cs.LG.
- 1605.08803. Dinh. Laurent. Sohl-Dickstein. Jascha. Bengio. Samy. Density estimation using Real NVP. 2016. cs.LG.
- 1807.03039. Kingma. Diederik P.. Dhariwal. Prafulla. Glow: Generative Flow with Invertible 1x1 Convolutions. 2018. stat.ML.
- Papamakarios . George . Nalisnick . Eric . Rezende . Danilo Jimenez . Shakir . Mohamed . Balaji . Lakshminarayanan . March 2021 . Normalizing Flows for Probabilistic Modeling and Inference . Journal of Machine Learning Research . 22 . 57 . 1–64 . 1912.02762.
- Kobyzev . Ivan . Prince . Simon J.D. . Brubaker . Marcus A. . November 2021 . Normalizing Flows: An Introduction and Review of Current Methods . IEEE Transactions on Pattern Analysis and Machine Intelligence . 43 . 11 . 3964–3979 . 10.1109/TPAMI.2020.2992934 . 32396070 . 1908.09257 . 2021ITPAM..43.3964K . 208910764 . 1939-3539.
- 1505.05770. Danilo Jimenez Rezende. Mohamed. Shakir. Variational Inference with Normalizing Flows. 2015. stat.ML.
- Papamakarios . George . Pavlakou . Theo . Murray . Iain . 2017 . Masked Autoregressive Flow for Density Estimation . Advances in Neural Information Processing Systems . Curran Associates, Inc. . 30. 1705.07057 .
- Kingma . Durk P . Salimans . Tim . Jozefowicz . Rafal . Chen . Xi . Sutskever . Ilya . Welling . Max . 2016 . Improved Variational Inference with Inverse Autoregressive Flow . Advances in Neural Information Processing Systems . Curran Associates, Inc. . 29. 1606.04934 .
- 1810.01367. Grathwohl. Will. Chen. Ricky T. Q.. Bettencourt. Jesse. Sutskever. Ilya. Duvenaud. David. FFJORD: Free-form Continuous Dynamics for Scalable Reversible Generative Models. 2018. cs.LG.
- Lipman . Yaron . Chen . Ricky T. Q. . Ben-Hamu . Heli . Nickel . Maximilian . Le . Matt . 2022-10-01 . Flow Matching for Generative Modeling . cs.LG . 2210.02747.
- Grathwohl . Will . Chen . Ricky T. Q. . Bettencourt . Jesse . Sutskever . Ilya . Duvenaud . David . 2018-10-22 . FFJORD: Free-form Continuous Dynamics for Scalable Reversible Generative Models . cs.LG . 1810.01367 .
- Finlay . Chris . Jacobsen . Joern-Henrik . Nurbekyan . Levon . Oberman . Adam . 2020-11-21 . How to Train Your Neural ODE: the World of Jacobian and Kinetic Regularization . International Conference on Machine Learning . en . PMLR . 3154–3164. 2002.02798 .
- Hutchinson . M.F. . January 1989 . A Stochastic Estimator of the Trace of the Influence Matrix for Laplacian Smoothing Splines . Communications in Statistics - Simulation and Computation . en . 18 . 3 . 1059–1076 . 10.1080/03610918908812806 . 0361-0918. subscription .
- Chen . Ricky T. Q. . Rubanova . Yulia . Bettencourt . Jesse . Duvenaud . David K. . 2018 . Bengio . S. . Wallach . H. . Larochelle . H. . Grauman . K. . Cesa-Bianchi . N. . Garnett . R. . Neural Ordinary Differential Equations . Curran Associates, Inc. . 31 . 1806.07366 . Advances in Neural Information Processing Systems.
- Dupont . Emilien . Doucet . Arnaud . Teh . Yee Whye . 2019 . Augmented Neural ODEs . Advances in Neural Information Processing Systems . Curran Associates, Inc. . 32.
- Zhang . Han . Gao . Xi . Unterman . Jacob . Arodz . Tom . 2019-07-30 . Approximation Capabilities of Neural ODEs and Invertible Residual Networks . cs.LG . en . 1907.12998.
- Sorrenson . Peter . Draxler . Felix . Rousselot . Armand . Hummerich . Sander . Köthe . Ullrich . Learning Distributions on Manifolds with Free-Form Flows . 2312.09852 . 2023. cs.LG .
- Brümmer . Niko . van Leeuwen . D. A. . On calibration of language recognition scores . Proceedings of IEEE Odyssey: The Speaker and Language Recognition Workshop . 2006 . San Juan, Puerto Rico . 1–8 . 10.1109/ODYSSEY.2006.248106.
- Ferrer . Luciana . Ramos . Daniel . Evaluating Posterior Probabilities: Decision Theory, Proper Scoring Rules, and Calibration . 2408.02841 . 2024. stat.ML .
- Web site: Graf . Monique (2019). The Simplicial Generalized Beta distribution - R-package SGB and applications . Libra . 26 May 2025.
- Brümmer . Niko . Measuring, refining and calibrating speaker and language information extracted from speech . PhD thesis . Department of Electrical & Electronic Engineering, University of Stellenbosch . Stellenbosch, South Africa . 18 October 2010 .
- Beyond temperature scaling: Obtaining well-calibrated multiclass probabilities with Dirichlet calibration . Meelis Kull, Miquel Perelló‑Nieto, Markus Kängsepp, Telmo Silva Filho, Hao Song, Peter A. Flach . 1910.12656 . 28 October 2019. cs.LG .
- The tangent matrices are not unique: if
has orthonormal columns and
is an orthogonal matrix, then
also has orthonormal columns that span the same subspace; it is easy to verify that
| \left|\operatorname{det}(Ty'FxTx)\right| |
is invariant to such transformations of the tangent representatives.
- With PyTorch:
from torch.linalg import qr
from torch.func import jacrev
def logRf(pi, m, f, x):
y = f(x)
Fx, PI = jacrev(f)(x), jacrev(pi)
Tx, Ty = [qr(PI(z)).Q[:,:m] for z in (x,y)]
return (Ty.T @ Fx @ Tx).slogdet.logabsdet
- Boulerice . Bernard . Ducharme . Gilles R. . Decentered Directional Data . Annals of the Institute of Statistical Mathematics . 46 . 3 . 573–586 . 1994. 10.1007/BF00773518 .
- Statistical analysis for the angular central Gaussian distribution on the sphere. Tyler. David E. Biometrika. 74. 3. 579–589. 1987. 10.2307/2336697. 2336697 .
- 2008.10486. Helminger. Leonhard. Djelouah. Abdelaziz. Gross. Markus. Schroers. Christopher. Lossy Image Compression with Normalizing Flows. 2020. cs.CV.
- 1810.09136v3. Nalisnick. Eric. Matsukawa. Teh. Zhao. Yee Whye. Song. Zhao. Do Deep Generative Models Know What They Don't Know?. 2018. stat.ML.
- 1906.02994. Nalisnick. Eric. Matsukawa. Teh. Zhao. Yee Whye. Song. Zhao. Detecting Out-of-Distribution Inputs to Deep Generative Models Using Typicality. 2019. stat.ML.
- Zhang . Lily . Goldstein . Mark . Ranganath . Rajesh . 2021 . Understanding Failures in Out-of-Distribution Detection with Deep Generative Models . Proceedings of Machine Learning Research . 139 . 12427–12436. 35860036 . 9295254 .
- Caterini . Anthony L. . Loaiza-Ganem . Gabriel . 2022 . Entropic Issues in Likelihood-Based OOD Detection . 21–26. stat.ML . 2109.10794 .
- 2006.09347. Behrmann. Jens. Vicol. Paul. Wang. Kuan-Chieh. Grosse. Roger. Jacobsen. Jörn-Henrik. Understanding and Mitigating Exploding Inverses in Invertible Neural Networks. 2020. cs.LG.
- 1912.01219. Ping. Wei. Peng. Kainan. Gorur. Dilan. Lakshminarayanan. Balaji. WaveFlow: A Compact Flow-based Model for Raw Audio. 2019. cs.SD.
- 2001.09382. Shi. Chence. Xu. Minkai. Zhu. Zhaocheng. Zhang. Weinan. Zhang. Ming. Tang. Jian. GraphAF: A Flow-based Autoregressive Model for Molecular Graph Generation. 2020. cs.LG.
- 1906.12320. Yang. Guandao. Huang. Xun. Hao. Zekun. Liu. Ming-Yu. Belongie. Serge. Hariharan. Bharath. PointFlow: 3D Point Cloud Generation with Continuous Normalizing Flows. 2019. cs.CV.
- 1903.01434. Kumar. Manoj. Babaeizadeh. Mohammad. Erhan. Dumitru. Finn. Chelsea. Chelsea Finn. Sergey Levine. Levine. Sergey. Dinh. Laurent. Kingma. Durk. VideoFlow: A Conditional Flow-Based Model for Stochastic Video Generation. 2019. cs.CV.
- 2008.12577. Rudolph. Marco. Wandt. Bastian. Rosenhahn. Bodo. Same Same But DifferNet: Semi-Supervised Defect Detection with Normalizing Flows. 2021. cs.CV.