Learning Diffusion Priors from Observations by Expectation Maximization

François Rozet, Gérôme Andry, Francois Lanusse, Gilles Louppe

Introduction

Training state-of-the-art diffusion models typically necessitates vast repositories of "clean," high-fidelity data. However, in many scientific domains—ranging from medical imaging to astrophysics—obtaining such ground-truth data is often impossible. Instead, researchers are limited to "observations" that are inherently noisy, incomplete, or corrupted. This paper introduces DiEM (Diffusion Expectation-Maximization), a framework designed to learn diffusion priors directly from these degraded observations. By combining the classic Expectation-Maximization (EM) algorithm with a novel, stable posterior sampling scheme called Moment Matching Posterior Sampling (MMPS), DiEM enables the training of powerful generative models in data-constrained environments.

The Challenge of Learning from Messy Data

Diffusion models have revolutionized generative modeling, particularly as priors for solving inverse problems like image deblurring or MRI reconstruction. The standard training paradigm assumes access to clean samples $x$ to learn the score function $\nabla_x \log p(x)$. In practice, we often only possess observations $y = \mathcal{A}(x) + \epsilon$, where $\mathcal{A}$ is a forward operator (e.g., blurring, masking) and $\epsilon$ is noise.

While "Empirical Bayes" methods attempt to estimate priors from such observations, they frequently falter in high-dimensional spaces or require the prior to have a specific, differentiable form. DiEM bridges this gap by treating the clean data as a latent variable, allowing for the recovery of a standard diffusion prior from corrupted inputs.

Methodology: DiEM and MMPS

The DiEM framework iterates between two primary steps:

  1. Expectation (E-step): Using the current estimate of the diffusion prior, the model generates "hallucinated" clean samples $x$ that are consistent with the observed data $y$. This involves sampling from the posterior $p(x | y)$.
  2. Maximization (M-step): The diffusion model is updated by performing standard denoising score matching on these hallucinated samples.

A critical challenge in the E-step is accurately sampling from the posterior. Previous approaches, such as Diffusion Posterior Sampling (DPS), often rely on heuristics that ignore the local variance of the model, leading to unstable training or "overly dispersed" samples that fail to match the observations.

To address this, the authors propose Moment Matching Posterior Sampling (MMPS). MMPS leverages Tweedie’s formula to estimate the posterior covariance, ensuring the diffusion process is guided more accurately toward the observations. To maintain computational efficiency in high dimensions, the method employs a Conjugate Gradient (CG) solver, avoiding the explicit calculation of massive covariance matrices.

Figure 1: Comparison of posterior sampling methods. Panels A-C illustrate how different variance estimates affect the alignment of samples with the observation manifold $y=Ax$. The graph shows that MMPS (using Tweedie's formula) significantly reduces the divergence from the true posterior compared to common heuristics.

Experimental Evaluation

The authors validated DiEM across synthetic and real-world datasets:

  • Synthetic 5D Manifold: Confirmed that the EM algorithm converges to the true underlying distribution when the ground truth is known.
  • Corrupted CIFAR-10: Images were subjected to up to 75% pixel deletion and additive noise. DiEM demonstrated remarkable resilience, significantly outperforming baselines like AmbientDiffusion.
  • Accelerated MRI (fastMRI): The model was trained using only undersampled $k$-space data. This task is particularly challenging as the "clean" images are never seen during training.

Key Results and Discussion

The effectiveness of DiEM is most evident in its quantitative performance and convergence stability. On CIFAR-10 with 75% corruption, DiEM achieved a Fréchet Inception Distance (FID) of 13.18, whereas AmbientDiffusion lagged behind at 28.88 even with less corruption (60%).

Figure 5: FID convergence over EM iterations $k$. The plot demonstrates that using the Tweedie-based variance estimate (MMPS) leads to faster and deeper convergence in FID compared to simpler heuristics like $\Sigma_t$ or zero-variance approximations.

Beyond raw metrics, several key insights emerged:

  • Stability through Variance: Accurate covariance estimation is not just a refinement but a necessity for EM stability. Heuristics often lead to model collapse.
  • Standard Priors: Unlike methods that alter the diffusion objective, DiEM produces a standard diffusion model. This allows for the use of any off-the-shelf inference technique post-training.
  • Efficiency via Warm Starts: Initializing each M-step with weights from the previous iteration drastically reduces the total training time.

Conclusion and Future Directions

DiEM provides a robust pathway for training diffusion models in fields where clean data is a luxury. While the iterative nature of EM introduces a higher computational cost compared to standard training, the ability to learn high-quality priors from 75% corrupted data is a significant advancement. Future work may explore "maximum entropy" principles to handle the inherently ill-posed nature of learning priors from observations and extending the framework to non-linear forward models.

Summary updated

BibTeX
@inproceedings{rozet2024learning,
  author = {François Rozet and Gérôme Andry and Francois Lanusse and Gilles Louppe},
  title = {{Learning Diffusion Priors from Observations by Expectation Maximization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=7v88Fh6iSM},
}
Figure