Invertible generative models for inverse problems: mitigating representation error and dataset bias

Muhammad Asim, Mara Daniels, Oscar Leong, Ali Ahmed, Paul Hand

TL;DR

While Generative Adversarial Networks (GANs) are powerful tools for solving inverse problems like denoising and compressive sensing, they are often hamstrung by "representation error"—an inability to reconstruct images that fall outside their narrow, biased training distributions. This paper demonstrates that invertible neural networks (like Glow) solve this by offering zero representation error by design, acting as highly robust priors that can recover even out-of-distribution images that leave traditional GANs stumped.

What Problem Does This Paper Address?

In imaging, "inverse problems" involve recovering a high-quality image from degraded measurements—think removing noise (denoising), filling in missing pixels (inpainting), or reconstructing an image from a fraction of its data (compressive sensing).

Modern approaches often use deep generative models (like GANs or VAEs) as "priors." These models learn what "natural images" look like from a training set. However, GANs have a major flaw: they map a low-dimensional latent space to a high-dimensional image space. This means there are many images the GAN simply cannot represent. If your target image has a feature rare in the training data (like a beard or glasses in a biased dataset) or is completely out-of-distribution, the GAN will fail to reconstruct it accurately, often "hallucinating" a version that fits its biased internal model.

Methods

The authors propose using Invertible Neural Networks (INNs), specifically the Glow architecture, as priors. Unlike GANs, INNs are mathematically one-to-one and onto. The latent space ($z$) has the exact same dimensionality as the image space ($x$). This ensures zero representation error: every possible image has a corresponding latent code.

To solve an inverse problem, they perform optimization in the latent space. Because Glow is trained to map a standard Gaussian distribution to the image distribution, the log-likelihood of a latent representation $z$ is simply proportional to its squared Euclidean norm, $\|z\|^2$.

  • Denoising: They minimize a loss function that balances data fit with a penalty on the latent code's norm: $\min_z \|G(z) - y\|^2 + \gamma\|z\|^2$.
  • Compressive Sensing & Inpainting: They found that explicit penalization wasn't always necessary. Instead, they used algorithmic regularization: starting the optimization at $z=0$ and letting gradient descent find the "simplest" (highest likelihood) image consistent with the measurements.

Datasets

  • Training: The models were trained on the CelebA (64x64 pixels) and CelebA-HQ (128x128 pixels) datasets, which consist of celebrity face images.
  • Evaluation:
    • In-distribution: Test sets from CelebA/CelebA-HQ.
  • Out-of-distribution (OOD): The FFHQ (Flickr Faces High Quality) dataset, which contains much more variation in age, skin tone, and accessories than CelebA.
  • Extreme OOD: The authors also tested semantically unrelated images like cars, houses, and butterflies to push the limits of the prior.

Key Insights and Ideas

  • The End of Representation Error: Because the model is invertible, it doesn't "force" an image to look like the training data. If the measurements say there's a beard, the invertible prior can represent it, whereas a biased GAN might smooth it away.
  • Mitigating Dataset Bias: Figure 1 perfectly illustrates this. A GAN trained on the biased CelebA dataset (which lacks bearded men with glasses) fails to reconstruct those features. The invertible prior, having no architectural restriction on what it can represent, succeeds.
Figure 1. We train an invertible generative model with CelebA images (including those shown). When used as a prior for com- pressive sensing, it can yield higher quality image reconstructions than Lasso and a trained DCGAN, even on out-of-distribution im- ages. Note that the DCGAN reflects biases of the training set by removing the man’s glasses and beard, whereas our invertible prior does not.
  • Implicit Regularization: For compressive sensing, the choice of starting the optimization at $z=0$ (the most likely point in a Gaussian distribution) is a powerful "warm start" that naturally leads the algorithm toward high-likelihood natural images without needing complex penalty terms.
  • Dynamic Manifolds: While GANs fix the dimensionality of the signal they can represent, invertible priors allow each new measurement to effectively increase the dimensionality of the modeled signal manifold, leading to better reconstructions as more data becomes available.

Key Results

  • Denoising: The Glow prior outperformed the classical BM3D algorithm by nearly 2 dB in PSNR at high noise levels ($\sigma = 0.2$). Visually, Glow recoveries are significantly sharper.
Figure 4. Denoising results using the Glow prior, the DCGAN prior, and BM3D at noise level σ = 0.1. Note that the Glow prior gives a sharper image than BM3D in these cases.
  • Compressive Sensing: Invertible priors yielded higher accuracy (PSNR) than sparsity-based priors (Lasso) and GANs across almost all undersampling ratios. While GAN performance saturates quickly due to representation error, the invertible prior's performance continues to improve as more measurements are added.
  • OOD Robustness: On the FFHQ dataset, the Glow prior maintained high performance, while the PGGAN (a powerful GAN) failed completely on images with darker skin tones or accessories that were rare in its CelebA training set.

Limitations and Future Work

  • Computational Cost: Inversion is slow. Reconstructing a single 128x128 image took about 11 minutes on an NVIDIA 2080 Ti. GANs, by contrast, are much faster at inference time.
  • Training Complexity: Invertible networks are notoriously difficult and memory-intensive to train compared to standard architectures.
  • Theoretical Gap: The authors provided a theoretical analysis for linear invertible models. Extending this theory to the complex, non-linear transformations used in deep networks like Glow remains an open challenge.
  • Hybrid Approaches: The authors suggest future work could explore architectures that sit between low-dimensional GANs and fully invertible models to balance representation power with computational efficiency.

Summary updated

Abstract

Trained generative models have shown remarkable performance as priors for inverse problems in imaging -- for example, Generative Adversarial Network priors permit recovery of test images from 5-10x fewer measurements than sparsity priors. Unfortunately, these models may be unable to represent any particular image because of architectural choices, mode collapse, and bias in the training dataset. In this paper, we demonstrate that invertible neural networks, which have zero representation error by design, can be effective natural signal priors at inverse problems such as denoising, compressive sensing, and inpainting. Given a trained generative model, we study the empirical risk formulation of the desired inverse problem under a regularization that promotes high likelihood images, either directly by penalization or algorithmically by initialization. For compressive sensing, invertible priors can yield higher accuracy than sparsity priors across almost all undersampling ratios, and due to their lack of representation error, invertible priors can yield better reconstructions than GAN priors for images that have rare features of variation within the biased training set, including out-of-distribution natural images. We additionally compare performance for compressive sensing to unlearned methods, such as the deep decoder, and we establish theoretical bounds on expected recovery error in the case of a linear invertible model.
BibTeX
@inproceedings{asim2020invertible,
  author = {Muhammad Asim and Mara Daniels and Oscar Leong and Ali Ahmed and Paul Hand},
  title = {{Invertible generative models for inverse problems: mitigating representation error and dataset bias}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=gm7HhfR8ST},
}
Figure