Solving Inverse Problems by Joint Posterior Maximization with a VAE Prior

Mario González, Andrés Almansa, Mauricio Delbracio, Pablo Musé, Pauline TanarXiv 2019

Abstract

Inverse problems in imaging, such as inpainting and compressed sensing, are fundamentally ill-posed. While deep generative models like GANs have been employed as priors to regularize these problems, they often suffer from highly non-convex optimization landscapes that lead to poor local optima. This paper introduces Joint Posterior Maximization (JPMAP), a framework that leverages a Variational Autoencoder (VAE) prior. By jointly optimizing the image and its latent representation, JPMAP transforms the reconstruction task into a weakly bi-convex problem. Experimental results on the MNIST dataset demonstrate that JPMAP provides superior stability and reconstruction accuracy compared to traditional GAN-based latent optimization methods.

Introduction

Recovering a clean image from corrupted or incomplete data—known as an inverse problem—requires a strong prior to distinguish natural images from noise. Recent advances have shifted from hand-crafted priors to learned generative priors. However, using a Generative Adversarial Network (GAN) as a prior typically involves solving a non-convex optimization problem in the latent space. This process is prone to getting stuck in "spurious local optima," where the reconstructed image may look like a valid digit but does not match the observed data.

This work proposes a decoupled approach where a pre-trained VAE serves as the prior. Unlike GANs, VAEs provide an encoder that can be utilized during inference to guide the optimization process, ensuring the algorithm finds a high-quality solution regardless of the specific degradation model (e.g., blur or missing pixels).

Methodology: The JPMAP Framework

The core of the proposed method is the Joint Posterior Maximization (JPMAP) objective. Instead of optimizing solely for the image $x$, the algorithm searches for the optimal pair $(x, z)$, where $z$ is the latent code. The objective is to maximize the joint density $p(x, z | y)$, where $y$ represents the corrupted observations.

Bi-convexity and Optimization

A key theoretical advantage of JPMAP is its "weak bi-convexity." When the latent code $z$ is fixed, finding the optimal image $x$ becomes a standard quadratic problem. Conversely, when $x$ is fixed, updating $z$ is a manageable optimization task. The authors propose an alternating minimization strategy to navigate this landscape.

The Role of the VAE Encoder

While the encoder is typically discarded after training in standard VAE applications, JPMAP uses it as an inference tool. The encoder provides a stochastic shortcut to initialize the latent variable update. This initialization prevents the optimizer from becoming lost in the complex landscape of the posterior, a common failure mode in GAN-based methods like Compressed Sensing using Generative Models (CSGM).

Experimental Evaluation

The authors evaluated JPMAP on the MNIST dataset, focusing on two primary tasks: image inpainting (80% pixel loss) and compressed sensing (reconstruction from 100 random measurements).

Reconstruction results and encoder approximation visualization. (a) shows successful digit reconstructions, (b) shows random samples from the prior, and (c) illustrates the encoder's role in approximating the posterior landscape.

Key Results

  • Stability: In a series of 200 random trials, JPMAP successfully reached the global minimum 195 times. In contrast, the GAN-based CSGM method frequently converged to incorrect local optima, producing distorted results.
  • Accuracy: JPMAP consistently achieved lower Mean Squared Error (MSE) than CSGM across varying measurement densities.
  • Visual Fidelity: As seen in Figure 4(a), the reconstructions are clean and faithful to the ground truth, avoiding the "hallucinated" artifacts often seen in competitive generative approaches.

Conclusion

JPMAP demonstrates that VAEs are not just generative models but powerful tools for solving inverse problems when their encoder and latent structure are properly leveraged. By treating the problem as a joint optimization of image and latent space, the framework achieves a level of stability and accuracy that surpasses traditional GAN-based latent optimization. Future work will focus on scaling this approach to high-resolution, complex image datasets and exploring patch-based priors to handle arbitrary image dimensions.

Summary updated

BibTeX
@misc{gonzalez2019solving,
  author = {Mario González and Andrés Almansa and Mauricio Delbracio and Pablo Musé and Pauline Tan},
  title = {{Solving Inverse Problems by Joint Posterior Maximization with a VAE Prior}},
  year = {2019},
  eprint = {1911.06379},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.06379},
}
Figure