In this post, we'll look at how we can use the Riemannian volume form and Riemannian densities to measure probability on manifolds.
Probability form
Let \((\mathcal{M},g)\) be a Riemannian manifold with volume form \(dV_g\). We can define the probability of a region \(U\) using a positive function \(\rho: \mathcal{M} \to \mathbb{R}_{+}\) (called a probability density function) as a function that satisfies:
as the integral of \(\rho dV_g\) over \(U\):
We will call the integrand \(\rho dV_g\) a "probability n-form" with respect to the Riemannian metric \(g\) and will denote it by:
The "\(d\)" in front of \(dP\) is not the exterior derivative, just a notation highlight the fact that \(dP\) is closed \(d(dP) = 0\) because \(dV_g\) is closed. In order to recover the probability density function \(\rho\) from \(dP\), we can evaluate \(dP\) (locally) on an orthonormal frame:
where \(E_1,\dots,E_n\) is an orthonormal frame. This is because \(dV_g(E_1,\dots,E_n) = 1\). It is important to note that \(\rho\) is inherently dependent on the choice of \(g\) because \(g\) determines the coordinates of the orthonormal frame.
Pullback of probability forms and normalizing flows
Normalizing flows use a diffemorphism \(F:\mathcal{X} \to \mathcal{Z}\) to map between a data space \(\mathcal{X}\) and base space \(\mathcal{Z}\). If we have a probability form \(dP_{g_z}=\rho_z dV_{g_z}\) on \(\mathcal{Z}\), we can induce a probability form on \(\mathcal{X}\) via the pullback of \(F\), denoted as \(dP_{F^*g_z}=F^*dP_{g_z}\). In order for this to be a valid probability form, we would need:
This is satisfied if \(F\) is a diffeomorphism because of the diffeomorphic invariance of the integral:
The probability density function associated with the pullback form can be found by applying \(F^*dP_{g_z}\) to an orthonormal frame:
In the Euclidean case, this is equivalent to the change of variables formula.
Restricting to submanifolds
Probability forms can be restricted to submanifolds the same way that volume forms can be restricted to submanifolds. Let \(S\subset M\) be a k-dimensional submanifold of \(\mathcal{M}\) and let \((E_1,\dots,E_k)\) and \((N_{k+1},\dots,N_n)\) be local orthonormal frames for the tangent space and normal space of \(S\) respectively. We can use the volume form on \(\mathcal{M}\) to define a volume form on \(S\) by filling \(dV_g\) with the normal space frame and pulling back by the inclusion map:
where \((\epsilon^1,\dots,\epsilon^k)\) is the dual frame for \((E_1,\dots,E_k)\). Similarly, we can define a probability form on \(S\) the same way and renormalizing:
The normalization constant is necessary in order for \(\int_S dP_{\tilde{g}} = 1\) so that \(dP_{\tilde{g}}\) is a probability form on \(S\). The probability density function associated with \(dP_{\tilde{g}}\) can be found by applying the \(dP_{\tilde{g}}\) on an orthonormal frame on \(S\):
So the probability density function on any submanifold is proportional to the probability density function in the ambient space.
Alternate probability forms on submanifolds
There is no unique probability form on \(S\) induced by \(dP_g\). We can pullback and probability form on \(\mathcal{M}\) and then restrict to \(S\):
where \(F:\mathcal{X} \to \mathcal{Z}\) is a diffeomorphism and \((\widetilde{N}_{k+1},\dots,\widetilde{N}_n)\) is a local orthonormal frame for the normal space of \(F^{-1}(S)\). The induced probability density function can be computed using an orthonormal frame on \(S\), \((E_1,\dots,E_k)\):
If \(F^{-1}(S)\) is aligned with the coordinate axes, then this expression is equivalent to the change of variables formula on manifolds.