Understanding Hallucinations in Diffusion Models through Mode Interpolation

Sumukh K Aithal, Pratyush Maini, Zachary Chase Lipton, J Zico Kolter

Abstract

Diffusion models often generate "hallucinations"—artifacts like the "six-fingered hand" that do not exist in training data. This paper identifies mode interpolation as the primary driver of these errors. Because neural networks favor smooth score function approximations, they inevitably bridge the gaps between disjoint data modes, creating nonsensical blends of features. We propose a detection metric, Hal(x), based on the variance of the predicted image trajectory ($\hat{x}_0$) during sampling. Our results demonstrate that this metric can filter up to 95% of hallucinations in synthetic datasets and significantly improve the structural integrity of generated human hands.

Introduction

While diffusion models have revolutionized image generation, they are prone to producing "hallucinations": samples that fall entirely outside the support of the true data distribution. Unlike mode collapse or memorization, hallucinations involve the creation of novel, incorrect structures. As synthetic data increasingly populates the internet, these errors threaten to pollute future training sets, leading to a compounding "model collapse."

The Mechanism: Mode Interpolation

The authors posit that hallucinations arise from the inductive bias of neural networks toward smoothness. In the learned score function—the gradient of the data distribution—the model should ideally represent sharp boundaries between distinct data clusters (modes). Instead, it learns smooth approximations that interpolate between these modes.

Figure 1: Overview of mode interpolation causing hallucinations in shapes and hands.

As shown in Figure 1, when a model navigates the "no-man's-land" between valid modes, it generates a blend of features, such as overlapping shapes or hands with anatomically impossible digit counts. This "filling in the blanks" is a direct consequence of the model's inability to represent the silence between data modes.

Detecting Hallucinations with Hal(x)

The researchers observed that the model's internal state becomes unstable when generating a hallucination. For valid, "in-support" samples, the prediction of the final image ($\hat{x}_0$) stabilizes early in the reverse diffusion process. Conversely, hallucinations exhibit high variance in the $\hat{x}_0$ trajectory during the final sampling steps. The proposed Hal(x) metric measures this variance to flag problematic samples. Essentially, the model's own "jittery" behavior acts as an internal uncertainty sensor.

Experimental Results

The theory was tested on datasets ranging from 1D Gaussians to complex human hand images. On a dataset of 5,000 high-quality hand images, the model frequently produced "extra finger" artifacts.

Figure 5: Detection of hallucinations (extra fingers) in the generated hand dataset using the proposed metric.

As illustrated in Figure 5, the metric effectively separates valid hands from hallucinations. By filtering out samples with high metric values, the authors eliminated 80% of hallucinated hands while retaining 81% of normal ones.

Additional key findings include:

  • High-Precision Filtering: The metric filtered >95% of hallucinations in synthetic shape datasets.
  • Stabilizing Recursive Training: On MNIST, filtering hallucinations before retraining significantly slowed the degradation of model quality (measured by FID score), proving that "pre-emptive cleaning" can mitigate the risks of models training on their own output.

Conclusion and Future Work

Mode interpolation provides a structural explanation for common generative artifacts. While the Hal(x) metric is highly effective, its performance depends on tuning the variance window for specific architectures. Future research will investigate how anatomical complexity and occlusion in datasets like human hands interact with interpolation to create particularly persistent hallucinations. The researchers hope this work encourages the community to move beyond just measuring image quality and start looking at the structural integrity of learned manifolds.

Summary updated

BibTeX
@inproceedings{aithal2024understanding,
  author = {Sumukh K Aithal and Pratyush Maini and Zachary Chase Lipton and J Zico Kolter},
  title = {{Understanding Hallucinations in Diffusion Models through Mode Interpolation}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=aNTnHBkw4T},
}
Figure