TL;DR
This paper provides the first rigorous theoretical explanation for why deterministic diffusion samplers (DDIM) produce more hallucinations than stochastic ones (DDPM). The authors prove that DDIM trajectories often get trapped in "midpoint neighborhoods" between data modes, while the stochastic noise in DDPM provides the necessary "kick" to escape these regions and reach valid data points.
What Problem Does This Paper Address?
Diffusion models have revolutionized generative AI, but they still suffer from "hallucinations"—generations that look plausible at a glance but violate structural constraints (like the infamous six-fingered hand).
While practitioners have empirically observed that the deterministic Denoising Diffusion Implicit Model (DDIM) hallucinates more than the stochastic Denoising Diffusion Probabilistic Model (DDPM), the reason why remained a mystery. Some attributed it to numerical errors from skipping steps in DDIM, while others blamed the smoothing of the score function by neural networks. This paper seeks to provide a solid mathematical foundation for this phenomenon, treating hallucinations as a structural artifact of the reverse diffusion process itself.
Methods
The authors analyze the reverse dynamics of diffusion models by modeling the target data distribution as an $N$-mode Gaussian Mixture Model (GMM). This setup allows for rigorous analysis of the two primary sampling paths:
- Reverse ODE (DDIM): A deterministic path.
- Reverse SDE (DDPM): A stochastic path that includes a noise term.
They characterize hallucinations as mode interpolations: instances where a sample ends up on the line segment connecting two modes rather than at a mode itself. The analysis breaks the reverse process into two phases:
- Phase 1 (Early Convergence): The trajectory is rapidly attracted to the nearest line segment connecting two data modes.
- Phase 2 (Late Convergence): The trajectory moves along that line segment toward a mode.
Datasets
The study primarily uses controlled synthetic environments to validate the theory:
- 25-mode Gaussian Mixture: Arranged on a 2D grid and extended to higher dimensions (up to 64D).
- 3-Triangle Dataset: A custom image dataset consisting of 10,000 images ($64 \times 64$) with three non-overlapping triangles placed randomly, used to evaluate "counting hallucinations" in a more complex visual task.
Key Insights and Ideas
- The Midpoint Trap: The authors prove that the midpoint between two data modes acts as an unstable equilibrium (a hyperbolic saddle point). In the deterministic DDIM process, if a trajectory enters the neighborhood of this midpoint, it can become "stuck" because the repulsive force away from the midpoint is too weak to push it to a mode within the remaining time steps.
- Stochasticity as an Escape Room: In DDPM, the added noise term acts as a constant perturbation. This noise helps the trajectory "jump" out of the unstable midpoint region, allowing the drift term to then pull it toward a true mode.
- It's Not Just Step-Skipping: A common belief was that DDIM hallucinates because it uses fewer steps (discretization error). The authors show that even with the same number of steps and the exact score function, the hallucination gap persists.
Key Results
- Hallucination Rates: In a 25-mode GMM, DDPM consistently shows a significantly lower hallucination rate than DDIM across various discretization levels.
- Discretization Independence: Figure 3 demonstrates that increasing the number of DDIM steps (from 200 to 1000) does not close the hallucination gap with DDPM, ruling out step-skipping as the primary cause.
- Hybrid Samplers: The authors propose a simple fix: start with DDIM for speed, but switch to a few DDPM (stochastic) steps at the end. They found that adding just 5-8 stochastic steps at the end of a DDIM run can drastically reduce hallucinations.
Limitations and Future Work
- GMM Assumption: The theoretical proofs rely on the target distribution being a mixture of well-separated Gaussians. While empirical tests on images support the findings, a full theoretical characterization for complex natural image manifolds is still open.
- Score Error: While the paper touches on how score estimation error (from the neural network) affects the saddle point, a deeper dive into how specific network architectures influence these dynamics is left for future work.
- Latent Space Dynamics: The authors suggest extending this analysis to Latent Diffusion Models (like Stable Diffusion), where mode interpolation might happen in the latent space rather than pixel space.
Summary updated