Denoising Deep Generative Models

Gabriel Loaiza-Ganem, Brendan Leigh Ross, Luhuan Wu, John Patrick Cunningham, Jesse C Cresswell, Anthony L. Caterini

Abstract

Likelihood-based deep generative models have recently been shown to exhibit pathological behaviour under the manifold hypothesis as a consequence of using high-dimensional densities to model data with low-dimensional structure. In this paper we propose two methodologies aimed at addressing this problem. Both are based on adding Gaussian noise to the data to remove the dimensionality mismatch during training, and both provide a denoising mechanism whose goal is to sample from the model as though no noise had been added to the data. Our first approach is based on Tweedie's formula, and the second on models which take the variance of added noise as a conditional input. We show that surprisingly, while well motivated, these approaches only sporadically improve performance over not adding noise, and that other methods of addressing the dimensionality mismatch are more empirically adequate.

Introduction: The Manifold Overfitting Problem

In machine learning, the manifold hypothesis suggests that high-dimensional data, such as natural images, actually lies on or near a much lower-dimensional manifold. For instance, a 32x32 color image lives in a 3,072-dimensional space, but the degrees of freedom representing its semantic content—such as the position of an object or its color—are far fewer.

Deep Generative Models (DGMs), like Variational Autoencoders (VAEs) and Normalizing Flows (NFs), are typically designed to model densities in high-dimensional space. When these models encounter low-dimensional data, they often suffer from manifold overfitting. The model attempts to assign infinite density to the infinitely thin manifold, resulting in a "spiky" distribution that achieves high likelihood scores but fails to capture the true underlying structure or produce high-quality samples.

Visualization of a density model $p_\eta(x)$ attempting to capture a low-dimensional manifold in a higher-dimensional space.

To mitigate this, the authors explore adding Gaussian noise during training to "fatten" the manifold, effectively removing the dimensionality mismatch. They then propose denoising mechanisms to recover clean samples from these noise-regularized models.

Proposed Denoising Methodologies

The authors introduce two "plug-and-play" strategies to incorporate denoising into standard DGMs:

  1. Tweedie Denoising DGMs (TD-DGMs):
    • Training: A fixed level of Gaussian noise is added to the training data. This ensures the data distribution has full support in the high-dimensional space, preventing infinite likelihoods.
  2. Sampling: To generate a clean sample, the model first produces a noisy sample. Then, Tweedie’s formula—a mathematical identity that relates the mean of a posterior distribution to the gradient of the log-density—is used to move the noisy sample toward the manifold of clean data.
  3. Conditional Denoising DGMs (CD-DGMs):
    • Training: The model is trained to be "noise-aware" by including the noise variance ($\sigma$) as a conditional input. The model learns to represent the data distribution at various noise levels.
  4. Sampling: A clean image is generated by simply conditioning the model on a noise level of zero ($\sigma = 0$).

These methods are designed to be easily integrated into existing VAE and NF architectures without requiring fundamental changes to their core logic.

Experimental Evaluation

The researchers evaluated their methods on four standard image benchmarks: MNIST, Fashion-MNIST (FMNIST), SVHN, and CIFAR-10. These datasets represent a range of complexity and are known to exhibit low-dimensional manifold structures.

Performance was assessed using the Fréchet Inception Distance (FID). FID is a more robust metric than likelihood for evaluating generative models, as it captures both the quality and diversity of generated images by comparing feature distributions in a pre-trained neural network.

FID scores for various models across four datasets. Lower is better. Bold indicates the best performance in each category.

The results, summarized in the table above, show that the denoising models (TD and CD) only sporadically outperformed the standard baselines. For example, while CD-NF showed a significant improvement on MNIST (87.4 vs 137.2 for vanilla NF), the gains were less consistent on more complex datasets like CIFAR-10. Interestingly, simply adding noise without a denoising step (the "ND" models) often performed as well as the proposed denoising techniques, suggesting that the primary benefit of adding noise may be regularization rather than the denoising process itself.

Discussion and Conclusion

This paper provides a valuable "negative result" in the field of deep generative modeling. Despite the mathematical elegance of Tweedie's formula and conditional noise modeling, these approaches did not provide a consistent solution to manifold overfitting in standard likelihood-based models.

The authors hypothesize several reasons for these findings:

  • Hyperparameter Sensitivity: The effectiveness of these methods is highly dependent on the noise scale $\sigma$. Too little noise fails to prevent overfitting, while too much noise obscures the data's underlying structure.
  • Gradient Accuracy: Tweedie's formula relies on accurate gradients of the log-density. Standard models may not be powerful enough to represent these gradients with the precision required for effective denoising.
  • Inherent Noise: Real-world data may already contain enough noise to mitigate some manifold effects, making additional noise less impactful.

While denoising is a cornerstone of modern Diffusion Models, this work suggests that applying it as a post-hoc fix to standard DGMs is not a silver bullet. Future work should focus on more deeply integrating the geometric properties of the data manifold into the model architecture itself.

Summary updated

BibTeX
@inproceedings{loaizaganem2022denoising,
  author = {Gabriel Loaiza-Ganem and Brendan Leigh Ross and Luhuan Wu and John Patrick Cunningham and Jesse C Cresswell and Anthony L. Caterini},
  title = {{Denoising Deep Generative Models}},
  booktitle = {ICBINB @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=2Ze_U-JilX},
}
Figure