Density Deconvolution with Normalizing Flows

Tim Dockhorn, James A. Ritchie, Yaoliang Yu, Iain MurrayarXiv 2020

Abstract

Density deconvolution is the task of estimating a probability density function given only noise-corrupted samples. We can fit a Gaussian mixture model to the underlying density by maximum likelihood if the noise is normally distributed, but would like to exploit the superior density estimation performance of normalizing flows and allow for arbitrary noise distributions. Since both adjustments lead to an intractable likelihood, we resort to amortized variational inference. We demonstrate some problems involved in this approach, however, experiments on real data demonstrate that flows can already out-perform Gaussian mixtures for density deconvolution.

Introduction

In many scientific and engineering applications, observed data is rarely "clean." Instead, measurements are typically corrupted by noise, such that the observed variable $\mathbf{w}$ is the sum of a latent true value $\mathbf{v}$ and random noise $\mathbf{n}$: $\mathbf{w} = \mathbf{v} + \mathbf{n}$. Density deconvolution is the statistical challenge of recovering the distribution of $\mathbf{v}$ when only $\mathbf{w}$ is accessible, alongside some knowledge of the noise statistics $p(\mathbf{n})$.

The density deconvolution task: recovering the clean distribution $p(\mathbf{v})$ from the noise-corrupted observations $p(\mathbf{w})$.

Traditional approaches often rely on Kernel Density Estimation or Gaussian Mixture Models (GMMs). While GMMs are flexible, they may require an impractical number of components to model complex, non-Gaussian shapes. Normalizing Flows (NFs) have emerged as a powerful alternative for density estimation, but they typically require the exact likelihood of observed data for training. In the context of deconvolution, the observed likelihood $p(\mathbf{w})$ is a convolution integral that is usually analytically intractable, precluding standard maximum likelihood estimation.

Methodology

To address the intractability of the likelihood, the authors frame density deconvolution as a latent variable problem and employ Amortized Variational Inference.

  1. The Generative Model ($p_\theta$): The underlying "clean" density $p(\mathbf{v})$ is modeled using a Masked Autoregressive Flow (MAF). This provides a highly expressive prior for the latent variables.
  2. The Inference Network ($q_\phi$): Because the true posterior $p(\mathbf{v}|\mathbf{w})$ is unknown, a second flow—specifically an Inverse Autoregressive Flow (IAF)—is trained to approximate it. This "recognition network" learns to map noisy observations back to the latent clean space.
  3. The Objective: The model is trained by maximizing a variational lower bound. The authors compare the standard Evidence Lower Bound (ELBO) against the tighter Importance Weighted (IWAE) bound, which uses multiple samples to reduce the gap between the bound and the true likelihood.
  4. Fixed Likelihood Constraint: Unlike standard Variational Autoencoders (VAEs) where both the encoder and decoder are learned, the "decoder" in this framework is fixed by the known noise distribution $p(\mathbf{w}|\mathbf{v}) = p_n(\mathbf{w} - \mathbf{v})$.

Results and Discussion

Synthetic Benchmark

The approach was first tested on a 2D "toy" dataset where the ground truth is a mixture of Gaussians. This setup allows for a direct comparison between the proposed flow-based method and traditional GMM-based deconvolution (Extreme Deconvolution or XD-GMM).

Deconvolution results on synthetic data. Top row: learned prior $p_\theta(\mathbf{v})$. Bottom row: approximate posterior $q_\phi(\mathbf{v})$. Note how IWAE ($\mathcal{L}_{IW}(50)$) improves the recovery of the clean distribution compared to standard ELBO ($\mathcal{L}(1)$).

As shown in Figure 5, while the GMM baseline performs exceptionally well when the data matches its model class, the flow-based approach successfully recovers the broad topological features of the distribution. A critical finding was the role of importance weighting: using the IWAE objective ($\mathcal{L}_{IW}(50)$) significantly improved the stability and accuracy of the recovered density compared to the standard ELBO ($\mathcal{L}(1)$).

Real-World Data

The authors further evaluated the method on the UCI Wine datasets (Red and White). By adding artificial Gaussian noise to these tabular datasets, they created a controlled deconvolution benchmark. On the White Wine dataset, the Normalizing Flow approach achieved a negative log-likelihood (NLL) of 8.685, significantly outperforming the XD-GMM baseline's 9.903. This demonstrates that for real-world data with complex dependencies, the expressivity of flows outweighs the challenges of variational training.

Key Insights and Limitations

  • Variational Bias: The authors observed that the variational bound is not always tight, which can lead to a "blurry" learned prior where the flow over-concentrates mass in the center of the distribution.
  • Posterior Complexity: Even for simple clean data, the posterior $p(\mathbf{v}|\mathbf{w})$ can be highly complex or multi-modal. Using a flow for the recognition network was found to be essential for capturing these shapes.
  • Fixed Decoder Challenges: In a standard VAE, the model can adjust the decoder to compensate for a poor encoder. In deconvolution, the fixed noise model means that any inaccuracies in the recognition network $q$ directly bias the learned prior $p(\mathbf{v})$.

Conclusion

This work demonstrates that Normalizing Flows, when combined with amortized variational inference and importance weighting, are a viable and often superior alternative to GMMs for density deconvolution. Future work will focus on reducing variational bias through MCMC-based inference and scaling the method to high-dimensional data such as images.

Summary updated

BibTeX
@misc{dockhorn2020density,
  author = {Tim Dockhorn and James A. Ritchie and Yaoliang Yu and Iain Murray},
  title = {{Density Deconvolution with Normalizing Flows}},
  year = {2020},
  eprint = {2006.09396},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.09396},
}
Figure