Deep Diffeomorphic Normalizing Flows (DDNF) represent a significant advancement in density estimation, bridging the gap between deep learning and Riemannian geometry. By framing normalizing flows as solutions to Ordinary Differential Equations (ODEs), this framework provides a highly flexible, smooth, and easily invertible approach to variational inference.
The Problem: Expressivity vs. Invertibility
In Bayesian inference, approximating the posterior distribution is a central challenge. Normalizing Flows (NFs) address this by transforming a simple base distribution (e.g., a Gaussian) through a series of invertible mappings. However, researchers often face a trade-off: models are either easy to invert but lack expressivity (like planar flows) or are highly expressive but computationally expensive to invert (like autoregressive flows). DDNF overcomes this by modeling the transformation as a continuous "flow" governed by an ODE.
Methodology
The core of DDNF is defining the transformation $\phi$ as the solution to an ODE: $$\frac{d}{dt}\phi(t, z) = v(t, \phi(t, z))$$ where $v$ is a velocity field modeled by a deep neural network. This formulation ensures the transformation is a diffeomorphism—a smooth, differentiable mapping with a smooth inverse.
Hierarchical Architecture
The model leverages the intuition that Residual Networks (ResNets) are discrete approximations of continuous ODEs. The architecture is structured hierarchically:
- ResNet Cells: Each cell performs one Euler integration step: $\phi(t + \Delta t, z) = \phi(t, z) + \Delta t \cdot v(\phi(t, z))$.
- Stationary Velocity Blocks: These group multiple cells where the velocity field remains constant over a time interval.
- Non-Stationary Blocks: These stack stationary blocks to build complex, time-varying mappings.
Efficient Computation
To handle high-dimensional data, DDNF uses a Taylor series expansion and Hutchinson’s randomized trace estimator to approximate the Jacobian determinant efficiently ($O(Md)$ complexity). Inversion is straightforward: because the flow is an ODE, one simply integrates the negative velocity field backward in time.
Key Insights and Regularization
DDNF introduces geodesic regularization, which encourages the flow to follow the "shortest path." This stabilizes training and ensures the transformation remains smooth rather than becoming unnecessarily complex. Additionally, an inverse consistency loss ensures that forward and backward passes remain aligned, even with coarse integration steps.
Experimental Results
DDNF was evaluated against several benchmarks, demonstrating superior performance in both expressivity and accuracy.
Toy 2D Densities
On complex, multi-modal distributions, DDNF successfully captured intricate structures that simpler models like planar-NF struggled to resolve. The model's expressivity increases naturally with the number of integration steps ($K$).
High-Dimensional Performance
In Variational Autoencoder (VAE) tasks using MNIST and Omniglot, DDNF achieved results competitive with state-of-the-art Neural Autoregressive Flows (NAF). For instance, on MNIST, DDNF reached a negative ELBO of 88.97, significantly outperforming vanilla VAEs (103.46) and planar-NF (102.14), while maintaining the advantage of easy invertibility.
Conclusion
Deep Diffeomorphic Normalizing Flows offer a robust framework for density estimation by combining the strengths of ODEs and deep residual architectures. By ensuring transformations are smooth and easily invertible, DDNF provides a powerful tool for complex variational inference tasks without the architectural constraints of previous flow-based methods.
Summary updated