Hierarchical Semi-Implicit Variational Inference with Application to Diffusion Model Acceleration

Longlin Yu, Tianyu Xie, Yu Zhu, Tong Yang, Xiangyu Zhang, Cheng Zhang

Introduction

Variational Inference (VI) is a fundamental technique in Bayesian machine learning used to approximate complex posterior distributions. However, traditional VI often relies on simple parametric families, such as Gaussians, which struggle to capture the multi-modal and highly non-linear nature of real-world data. While Semi-Implicit Variational Inference (SIVI) was introduced to enhance flexibility by defining the variational distribution as a mixture, its standard single-layer implementation remains limited in its ability to represent intricate manifolds.

Simultaneously, Diffusion Models have emerged as a state-of-the-art generative paradigm. Despite their success, they are computationally expensive, requiring hundreds or thousands of sequential sampling steps. Existing fast samplers, such as DDIM, often trade off sample diversity or quality when operating at extremely low step counts (e.g., under 10 steps). This paper introduces Hierarchical Semi-Implicit Variational Inference (HSIVI), a framework that extends SIVI into a deep hierarchy to capture complex distributions and significantly accelerate the diffusion sampling process.

Methodology

Hierarchical Construction

HSIVI generalizes the SIVI framework by defining the variational distribution through a sequence of $T$ conditional layers. Instead of a single mixing step, the model constructs a hierarchy where each layer is an explicit, reparameterizable distribution. The mean and variance of these layers are typically defined by neural networks, allowing the model to learn highly flexible representations.

Auxiliary Bridges and Progressive Training

Training deep hierarchical models end-to-end presents significant optimization challenges. To mitigate this, the authors introduce a sequence of intermediate "bridging" distributions. These bridges interpolate between a simple base distribution (noise) and the complex target distribution (data). By training the layers to match these bridges sequentially, the framework employs a "divide and conquer" strategy that simplifies the learning of the target distribution's complexity.

Application to Diffusion Models

A key insight of this work is that the diffusion process itself can be viewed as a sequence of auxiliary distributions. HSIVI leverages pre-trained score networks—which act as natural bridges—and optimizes a Fisher divergence-based objective. This is formulated as a tractable minimax problem, enabling the training of a fast, stochastic sampler. Notably, this process does not require access to the original training data, only the pre-trained score model.

Experimental Evaluation

Synthetic and High-Dimensional Tasks

The researchers first validated HSIVI on 2D synthetic tasks, including Gaussian mixtures and manifolds like the Swissroll and Checkerboard. While single-layer SIVI often collapsed into a single mode, HSIVI successfully captured all modes of the distributions. The framework was also tested on a 300-dimensional latent state estimation problem based on Langevin SDEs, demonstrating its scalability to high-dimensional Bayesian inference.

Image Generation Benchmarks

HSIVI was evaluated on standard image datasets, including MNIST, CIFAR-10, CelebA, and ImageNet ($64 \times 64$). The primary metric for evaluation was the Fréchet Inception Distance (FID) relative to the number of function evaluations (NFE).

  • CIFAR-10: At only 5 NFE, HSIVI achieved an FID of 6.27, vastly outperforming the DDIM sampler, which scored 41.53 at the same step count.
  • CelebA: HSIVI reached an FID of 6.22 at 5 steps, compared to 27.38 for DDIM.
  • ImageNet: HSIVI maintained a strong FID of 40.43 at 5 steps, significantly outperforming other fast-sampling baselines like Analytic-DPM and DPM-Solver-fast.

Discussion

Stochasticity and Diversity

Unlike many fast-sampling techniques that convert diffusion into a deterministic Ordinary Differential Equation (ODE), HSIVI remains a stochastic sampler. This preservation of stochasticity allows the model to maintain better image structure and produce more diverse samples at extremely low step counts. Qualitatively, HSIVI samples at 5–10 steps appear cleaner and more recognizable than those from DDPM or DDIM, which often suffer from blurriness or noise in high-speed regimes.

Implementation Considerations

To manage memory overhead in large-scale image models, the authors utilized parameter sharing across hierarchical layers, similar to the U-Net architecture in standard diffusion models. While HSIVI is highly effective, its performance is ultimately bounded by the quality of the pre-trained score model it aims to accelerate.

Conclusion

HSIVI provides a powerful framework for increasing the expressiveness of variational inference. By treating the diffusion process as a hierarchical variational bridge, it enables high-quality, diverse image generation in a fraction of the time required by standard methods. Future work may further explore ELBO-based objectives (HSIVI-LB) for diffusion acceleration and methods to reduce the memory requirements of training deep hierarchical layers.

Summary updated

BibTeX
@inproceedings{yu2023hierarchical,
  author = {Longlin Yu and Tianyu Xie and Yu Zhu and Tong Yang and Xiangyu Zhang and Cheng Zhang},
  title = {{Hierarchical Semi-Implicit Variational Inference with Application to Diffusion Model Acceleration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=ghIBaprxsV},
}
Figure