Introduction
Normalizing Flows (NFs) have emerged as a compelling class of generative models, offering unique advantages such as explicit density estimation and exact latent-variable inference. Unlike Generative Adversarial Networks (GANs), which learn to map noise to data without a tractable likelihood, NFs utilize a series of invertible, bijective transformations to map a simple base distribution to a complex data distribution. However, the expressivity of NFs comes at a high computational "tax." To model complex datasets like high-resolution images, NFs typically require hundreds of layers and millions of parameters, leading to slow sampling and high memory requirements.
The Flow Distillation Framework
To address these efficiency challenges, this work introduces Flow Distillation, a novel framework designed to compress large "teacher" flows into smaller, faster "student" models. The core innovation lies in leveraging the specific architectural properties of NFs—namely their invertibility and hierarchical structure—to transfer knowledge more effectively than standard distillation techniques.
Distillation Mechanisms
The authors propose three primary loss functions to guide the student's learning process:
- Latent Knowledge Distillation (LKD): The student is trained to match the final latent representation produced by the teacher for a given input.
- Intermediate Latent Knowledge Distillation (ILKD): Recognizing that NFs transform data through a sequence of steps, ILKD constrains the student to follow the teacher's internal "trajectories." By aligning intermediate states, the student learns the geometric transformations essential for accurate density estimation.
- Synthesized Knowledge Distillation (SKD): Exploiting the invertibility of NFs, SKD focuses on the generation path. Random noise is passed through the inverse flow of both models, and the student is penalized for deviations from the teacher's synthesized output.
The total training objective combines these distillation losses with the standard negative log-likelihood (NLL) loss, ensuring the student remains a valid generative model while mimicking the teacher's behavior.
Key Insights and Results
A critical finding of this research is the importance of Trajectory Alignment. Aligning intermediate states via ILKD prevents the student from falling into poor local minima, which is a common issue when training shallow NFs from scratch. Furthermore, the use of synthesized data (SKD) provides a unique signal that standard forward-pass distillation lacks.
Performance on Image Data
The framework was rigorously tested on the CelebA and CIFAR-10 datasets. On CelebA ($64 \times 64$), the authors successfully distilled a teacher model into a student that was 8x smaller. Remarkably, this distilled student achieved a 35% improvement in Fréchet Inception Distance (FID) compared to a student of the same size trained without distillation.
On CIFAR-10, a student model with only 1/4th the parameters of its teacher maintained a sampling quality gap of less than 2%. Beyond parameter reduction, the distilled models offered significant inference speedups, reducing the per-batch sampling time from $3.89\text{ms}$ to $2.45\text{ms}$ for the GLOW architecture.
Conclusion and Future Work
Flow Distillation effectively bridges the gap between the theoretical power of Normalizing Flows and their practical deployment. By reducing the depth and parameter count of these models without sacrificing sample quality, the authors make NFs more accessible for real-time applications. While SKD showed some numerical instability, the overall framework provides a robust path forward for generative model compression. Future research may extend these hierarchical distillation principles to other architectures, such as diffusion models.
Summary updated