Pseudo-Encoded Stochastic Variational Inference

Amir Zadeh, Smon Hessner, Yao Chong Lim, Louis-Philippe MorencyarXiv 2019

Abstract

In generative modeling, a persistent trade-off exists between the inference speed of Variational Auto-Encoders (VAEs) and the accuracy of Stochastic Variational Inference (SVI). VAEs utilize amortized inference for rapid processing but often suffer from an "amortization gap," while SVI achieves high accuracy at the cost of significant computational overhead at test time. This paper introduces Pseudo-Encoded Stochastic Variational Inference (PE-SVI), a framework that decouples decoder and encoder training. By training a "pseudo-encoder" to initialize SVI, PE-SVI achieves SVI-level accuracy with over a 100x reduction in gradient updates, effectively bridging the gap between amortized and iterative inference.

Introduction

Maximizing the Evidence Lower Bound (ELBo) is central to training directed graphical models. Currently, two primary paradigms dominate:

  1. VAEs employ an inference model (encoder) to map inputs to latent variables. While fast, the encoder's limited capacity often leads to suboptimal performance due to the amortization gap.
  2. SVI optimizes latent parameters per data point via gradient descent. This eliminates the amortization gap but creates a bottleneck at test time, requiring thousands of sequential updates for each new sample.

PE-SVI addresses this by providing a high-quality initialization for SVI through a deferred encoder training strategy, allowing for massive step sizes and minimal refinement steps.

Methodology

PE-SVI utilizes a three-stage pipeline to optimize inference:

  1. Early Decoder Training: The decoder is trained independently using standard SVI. This prevents the "chicken and egg" problem where a weak encoder hinders decoder development.
  2. Deferred Encoder Training: Once the decoder is optimized, a pseudo-encoder is trained in a supervised manner to predict the optimal latent parameters discovered by SVI. The encoder essentially learns to mimic the result of long-chain SVI optimization.
  3. Pace Adjustment: At test time, the pseudo-encoder provides a "warm start." This proximity to the optimum allows for the use of significantly larger learning rates during a brief refinement phase, which would otherwise cause divergence if started from a random initialization.

Experimental Setup

The framework was evaluated across four diverse datasets to demonstrate its generalizability:

  • Synthetic Data: Used to analyze the fundamental mechanics of the amortization gap.
  • CMU-MOSI: A multimodal sentiment dataset (video, audio, text).
  • 300-W: Facial landmark datasets used for statistical shape modeling.
  • SST (Stanford Sentiment Treebank): Movie review excerpts for natural language processing.

Key Results

Quantitative analysis demonstrates that PE-SVI consistently outperforms standard VAEs and matches SVI performance with drastically fewer computations. On average, PE-SVI reached the target ELBo in just 15.2 gradient updates, compared to 1826.1 updates required by standard SVI—a speedup of over 100x.

Performance comparison across datasets and latent dimensions. Lower values indicate better performance (reduced amortization gap).

As shown in the results above, even without refinement steps (PE-SVI-0), the model frequently outperforms standard VAEs. This suggests that training the encoder to mimic a mature decoder is inherently more effective than joint training. Furthermore, the gains are consistent across varying latent space dimensions ($|z|$) and architectures.

Discussion and Conclusion

PE-SVI demonstrates that the best approach to complex joint-optimization problems may be decoupling. By allowing the decoder to lead and the encoder to follow, the framework achieves high-fidelity generative performance without sacrificing the speed necessary for real-world applications. Future work may involve automating the "Pace Adjustment" phase through Bayesian hyperparameter optimization to further streamline the refinement process. Ultimately, PE-SVI provides a robust path forward for efficient, high-accuracy inference in deep generative models.

Summary updated

BibTeX
@misc{zadeh2019pseudo,
  author = {Amir Zadeh and Smon Hessner and Yao Chong Lim and Louis-Philippe Morency},
  title = {{Pseudo-Encoded Stochastic Variational Inference}},
  year = {2019},
  eprint = {1912.09423},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.09423},
}
Figure