Abstract
Normalizing Flows (NFs) provide a powerful framework for generative modeling by learning invertible mappings between data and noise distributions. However, the requirement for an exact analytic inverse often necessitates restrictive architectures, leading to significant computational bottlenecks during sampling. We introduce BiFlow (Bidirectional Normalizing Flow), a novel approach that decouples the forward and reverse processes. By training a separate, flexible neural network to learn the reverse mapping through a "hidden alignment" objective, BiFlow enables the use of non-invertible, high-capacity architectures like Vision Transformers. Our results on ImageNet 256×256 demonstrate that BiFlow not only achieves state-of-the-art image quality (FID 2.39) but also accelerates sampling by up to 700x compared to existing flow-based models.
Introduction
Normalizing Flows (NFs) are distinguished by their ability to learn data-to-noise trajectories rather than relying on pre-defined diffusion paths. Despite this flexibility, they have traditionally been constrained by the mathematical necessity that the generative process be the exact analytic inverse of the forward process. This constraint forces the use of specific architectures, such as autoregressive flows, which are often computationally expensive. For instance, models like TARFlow require thousands of sequential steps for image generation, making them significantly slower than modern alternatives like GANs or distilled diffusion models.
The BiFlow Framework
BiFlow addresses these limitations by treating the reverse process as a separate, learnable entity. Instead of forcing a mathematical mirror of the forward process, BiFlow optimizes a dedicated reverse model $G$ to approximate the inverse of the forward model $F$.
The core innovation of BiFlow is the Hidden Alignment objective. Rather than relying solely on "Naive Distillation"—which only compares the final generated image to the original—BiFlow aligns the intermediate hidden states of the forward and reverse models. Since these models may have different internal dimensions, learnable projection heads map the hidden states into a shared space for comparison. This alignment allows the reverse model to leverage powerful, non-invertible architectures, such as bidirectional Vision Transformers (ViTs), which can process the entire image context simultaneously.
Key Insights
A significant finding of this work is that a learned inverse can outperform an exact analytic one. While an analytic inverse is strictly bound to the noise produced by the forward model, a learned model can be optimized to reconstruct the data distribution directly, correcting for off-distribution noise. Furthermore, removing the invertibility constraint allows for the integration of perceptual losses (e.g., LPIPS) and training-time Classifier-Free Guidance (CFG), enabling high-quality, guided samples in a single forward pass at inference time.
Experimental Results
BiFlow was evaluated on the ImageNet 256×256 dataset for class-conditional generation. The model utilizes a pre-trained VAE tokenizer to operate in a latent space, a standard practice for high-resolution modeling.
As shown in Figure 2, BiFlow-B/2 achieved a state-of-the-art FID of 2.39, surpassing previous flow-based methods. More impressively, BiFlow demonstrated a massive increase in sampling speed. On an NVIDIA H200 GPU, it is approximately 712x faster than the improved TARFlow baseline, reducing generation time to just 2.15ms per image. This efficiency is achieved with a relatively modest parameter count of 133M.
Conclusion and Future Work
BiFlow represents a significant step forward for Normalizing Flows, demonstrating that decoupling the forward and reverse processes can yield both higher quality and vastly superior efficiency. While the model currently relies on a pre-trained forward model, future research could explore simultaneous training of both directions. Additionally, as the generative pass has become extremely fast, the primary computational bottleneck has shifted to the VAE decoder, suggesting new directions for optimizing the entire generative pipeline.
Summary updated