Abstract
Normalizing Flows are generative models that directly maximize the likelihood. Previously, the design of normalizing flows was largely constrained by the need for analytical invertibility. We overcome this constraint by a training procedure that uses an efficient estimator for the gradient of the change of variables formula. This enables any dimension-preserving neural network to serve as a generative model through maximum likelihood training. Our approach allows placing the emphasis on tailoring inductive biases precisely to the task at hand. Specifically, we achieve excellent results in molecule generation benchmarks utilizing E(n)-equivariant networks at greatly improved sampling speed. Moreover, our method is competitive in an inverse problem benchmark, while employing off-the-shelf ResNet architectures.
Introduction
Normalizing flows (NFs) are powerful generative models capable of exact likelihood estimation, a feature highly valued in scientific domains like physics and chemistry. However, traditional NFs are constrained by strict architectural requirements: they must be bijective and possess a tractable Jacobian determinant. These constraints often force researchers to use restrictive coupling layers or computationally expensive Neural ODEs, preventing the use of architectures with optimal inductive biases—such as equivariant graph neural networks for molecular data.
Free-form Flows (FFF) addresses this by allowing any dimension-preserving neural network to be trained as a normalizing flow. By relaxing the requirement for structural invertibility and instead learning it through a specialized training procedure, FFF enables the use of highly specialized architectures that better reflect the underlying symmetries of the data.
Methods
The FFF framework replaces the single invertible network of standard flows with a pair: an encoder ($f_\theta$) and a decoder ($g_\phi$).
The training procedure relies on three key components:
- Gradient Estimation: Instead of calculating the Jacobian determinant directly, FFF uses the Hutchinson trace estimator to estimate the gradient of the log-determinant. This approach utilizes efficient vector-Jacobian and Jacobian-vector products available in modern deep learning frameworks.
- Learned Invertibility: To ensure the encoder and decoder act as inverses, a reconstruction loss ($\mathcal{L}_R$) is added to the objective. This encourages the model to find a bijective mapping during training.
- Optimization Stability: A "stop-gradient" operation is applied to the estimated inverse Jacobian, focusing the optimization process on the most relevant parts of the likelihood objective.
Datasets and Evaluation
The authors evaluated FFF across several benchmarks:
- QM9: Generation of small organic molecules.
- Boltzmann Generators: Physical systems including DW4 (double-well) and Lennard-Jones clusters (LJ13, LJ55).
- Simulation-Based Inference (SBI): A suite of 10 inverse problems for posterior distribution estimation.
- MINIBOONE: Used for architectural ablation studies.
Results and Discussion
The primary advantage of FFF is the ability to prioritize inductive bias over mathematical purity. By using equivariant networks for molecular data, FFF achieves state-of-the-art results with significantly improved efficiency.
Key findings include:
- Sampling Speed: In the QM9 benchmark, FFF generated stable molecules 200x faster than diffusion models and 20x faster than previous equivariant normalizing flows.
- Likelihood Accuracy: On Boltzmann benchmarks, FFF achieved better negative log-likelihoods than existing methods, demonstrating that learned invertibility does not compromise the model's capacity to capture complex distributions.
- Theoretical Soundness: The authors proved that while non-invertible "bad" solutions exist in the relaxed objective, they are typically saddle points that gradient descent naturally avoids.
Conclusion and Limitations
Free-form Flows provide a flexible path for likelihood-based generative modeling without architectural restrictions. While the method introduces a hyperparameter ($\beta$) for reconstruction loss and produces approximate rather than exact likelihoods, the gains in sampling speed and architectural freedom are substantial. Future work may focus on automating the tuning of the reconstruction weight and extending the method to non-dimension-preserving architectures.
Summary updated