Abstract
Given an inverse problem with a normalizing flow prior, we wish to estimate the distribution of the underlying signal conditioned on the observations. We approach this problem as a task of conditional inference on the pre-trained unconditional flow model. We first establish that this is computationally hard for a large class of flow models. Motivated by this, we propose a framework for approximate inference that estimates the target conditional as a composition of two flow models. This formulation leads to a stable variational inference training procedure that avoids adversarial training. Our method is evaluated on a variety of inverse problems and is shown to produce high quality samples with uncertainty quantification. We further demonstrate that our approach can be amortized for zero-shot inference.
The Challenge of Inverse Problems
Inverse problems involve recovering a hidden, underlying signal from noisy or incomplete measurements. Common examples include image inpainting (filling in missing pixels), super-resolution, or reconstructing medical images from sparse sensor data. While deep generative models serve as excellent priors for natural signals, training a massive model from scratch for every specific task is computationally prohibitive.
Researchers aim to re-purpose pre-trained unconditional normalizing flows for these tasks by performing conditional inference. However, exact conditional sampling from these models is often computationally intractable. Existing workarounds typically rely on slow Markov Chain Monte Carlo (MCMC) sampling, unstable adversarial training (GANs), or only output a single "best guess" (point estimate) rather than capturing the full distribution of possible solutions.
Methods: Composed Flows for Approximate Inference
The authors propose approximate conditional inference via composed flows. Instead of sampling the intractable exact posterior directly, they introduce a smaller flow model called the pre-generator. This pre-generator operates in the latent space of the pre-trained base model. To generate a sample, standard Gaussian noise is passed through the pre-generator, and its output is then passed through the base model.
Because both models are invertible flows, the composed model can be trained using a stable Variational Inference (VI) objective, sidestepping adversarial training. To handle cases where generated samples don't perfectly match observations, they introduce observation smoothing, applying a Gaussian penalty for deviations. Furthermore, this pre-generator can be amortized—trained to accept observations as input—enabling zero-shot inference on new data.
Key Insights and Ideas
- Exact conditioning is NP-hard: The authors formally prove that exact conditional sampling for flow models with additive coupling layers (like RealNVP and Glow) is NP-hard. This justifies the need for approximate conditioning via smoothing.
- Distributions vs. Point Estimates: Recovering the full conditional distribution allows for computing the Minimum Mean Square Error (MMSE) estimator by averaging multiple samples, yielding significantly better reconstruction accuracy than single point estimates.
- Uncertainty Quantification: Since the learned posterior is a flow, it can rapidly generate i.i.d. samples. This allows practitioners to compute pixel-level variance, highlighting areas where the model is uncertain.
Key Results
The method was evaluated on MNIST, CIFAR-10, and CelebA-HQ across tasks like inpainting, super-resolution, and compressed sensing.
- Sample Quality: The proposed method achieves competitive or superior quality compared to MCMC baselines. On MNIST inpainting, it achieved an FID of 5.15 (vs. LMC's 14.56).
- Amortization Speedups: The amortized pre-generator is orders of magnitude faster. On CelebA-HQ, generating a conditional sample took just 0.046 seconds, compared to 70.5 seconds for standard SVI and 88.4 seconds for LMC.
- Compressed Sensing: Using the MMSE estimator (averaging 32 samples) significantly boosted PSNR compared to single-sample estimates or prior point-estimate baselines.
Limitations
- Sensitivity to Smoothing: Performance is highly sensitive to the smoothing parameter ($\sigma$). Values too large lead to ignoring observations, while values too small result in artifact-heavy samples.
- Amortization Trade-offs: Amortization significantly increases speed but degrades sample quality (e.g., CelebA-HQ FID jumps from 37.2 to 83.1).
- Future Directions: Exploring more sophisticated, perceptually-aligned distance measures (like LPIPS) for the smoothing function could further improve sample quality.
Summary updated