Skip to main content
QUICK REVIEW

[Paper Review] Conditional Inference in Pre-trained Variational Autoencoders via Cross-coding

Ga Wu, Justin Domke|arXiv (Cornell University)|May 20, 2018
Generative Adversarial Networks and Image SynthesisComputer Science9 references6 citations
TL;DR

This paper proposes cross-coding, a method for efficient conditional inference in pre-trained Variational Autoencoders (VAEs) without retraining the decoder. By using a cross-coder network to approximate the posterior over latent variables given evidence, it enables fast sampling for arbitrary query-evidence decompositions, outperforming Hamiltonian Monte Carlo in both quantitative and qualitative evaluations, especially in high-dimensional settings.

ABSTRACT

Variational Autoencoders (VAEs) are a popular generative model, but one in which conditional inference can be challenging. If the decomposition into query and evidence variables is fixed, conditional VAEs provide an attractive solution. To support arbitrary queries, one is generally reduced to Markov Chain Monte Carlo sampling methods that can suffer from long mixing times. In this paper, we propose an idea we term cross-coding to approximate the distribution over the latent variables after conditioning on an evidence assignment to some subset of the variables. This allows generating query samples without retraining the full VAE. We experimentally evaluate three variations of cross-coding showing that (i) they can be quickly optimized for different decompositions of evidence and query and (ii) they quantitatively and qualitatively outperform Hamiltonian Monte Carlo.

Motivation & Objective

  • To address the challenge of efficient conditional inference in pre-trained VAEs when arbitrary query-evidence decompositions are required.
  • To overcome the limitations of conditional VAEs, which require retraining for each new decomposition.
  • To improve upon MCMC methods like Hamiltonian Monte Carlo, which suffer from long mixing times in high-dimensional latent spaces.
  • To develop a variational inference framework that reuses the pre-trained decoder and avoids costly retraining.
  • To demonstrate that cross-coding enables fast, high-quality sampling across diverse datasets and query types.

Proposed method

  • Introduces a cross-coder network $\mathrm{XCoder}_{\psi}(\bm{\epsilon})$ that maps noise $\bm{\epsilon}$ to a conditional latent distribution $q_{\psi}(\mathbf{z}|\mathbf{x})$ for evidence $\mathbf{x}$.
  • Optimizes the cross-coder using a Conditional Evidence Lower Bound (C-ELBO), which tightens the bound on the true conditional likelihood $p_{\theta}(\mathbf{y}|\mathbf{x})$.
  • Employs reparameterization gradients for efficient backpropagation through the stochastic sampling process.
  • Uses three variants: Gaussian Variational Inference (GVI), Normalizing Flows (NF), and a fully connected network (FCN) for comparison.
  • Leverages the decoder $p_{\theta}(\mathbf{t}|\mathbf{z})$ to generate samples from the conditional distribution $p_{\theta}(\mathbf{y}|\mathbf{x})$ using $M$ samples from the cross-coder.
  • The method ensures that the error in the query distribution is controlled by the latent posterior error due to a favorable cancellation in the KL divergence.

Experimental results

Research questions

  • RQ1Can cross-coding enable fast and accurate conditional inference in pre-trained VAEs without retraining the decoder?
  • RQ2How does cross-coding compare to Hamiltonian Monte Carlo in terms of sampling quality and mixing time in high-dimensional latent spaces?
  • RQ3Do different cross-coder architectures—GVI, NF, and FCN—yield significantly different performance across varying query-evidence decompositions?
  • RQ4Is the C-ELBO a reliable proxy for evaluating the quality of conditional sampling in VAEs?
  • RQ5Can cross-coding maintain performance across diverse datasets like MNIST, Anime, and CelebA with varying latent dimensionality?

Key findings

  • Gaussian Variational Inference (GVI) cross-coder outperformed both Normalizing Flows (NF) and Hamiltonian Monte Carlo (HMC) in C-ELBO and query marginal likelihood on the Anime dataset.
  • On the CelebA dataset, GVI performed comparably to or slightly worse than NF, but both significantly outperformed HMC in both quantitative and qualitative metrics.
  • HMC exhibited poor mixing and coverage in high-dimensional settings (64 and 100 latent dimensions), leading to over-concentrated and low-diversity samples.
  • In low-dimensional MNIST experiments, all cross-coder variants (GVI, NF, FCN) performed well, with GVI and NF outperforming HMC in both C-ELBO and likelihood metrics.
  • The cross-coder framework enabled fast optimization for arbitrary query-evidence decompositions, with no need to retrain the VAE decoder.
  • Qualitative results showed that GVI generated diverse, high-fidelity samples matching the evidence, while HMC and NF often collapsed into single modes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.