Skip to content

diffusion-hallucination/ddim_vs_ddpm_hallucinations

Repository files navigation

Why DDIM Hallucinates More Than DDPM: A Theoretical Analysis of Reverse Dynamics

Muhammad H. Ashiq*1 · Samanyu Arora*1 · Abhinav N. Harish1 · Ishaan Kharbanda1 · Hung Yun Tseng1 · Grigorios G. Chrysos1

1University of Wisconsin-Madison    *Equal contribution

arXiv alphaXiv Website

Abstract

We theoretically study the hallucination phenomena in two canonical diffusion samplers: the stochastic Denoising Diffusion Probabilistic Model (DDPM) and the deterministic Denoising Diffusion Implicit Model (DDIM). We analyze the reverse ODE (DDIM) and SDE (DDPM) for a Gaussian mixture target, proving that after a critical time $\tau$, (a) DDIM can become stuck on the segment connecting the two nearest modes and (b) DDPM stochasticity helps it become unstuck from this region, thus avoiding hallucination. Our empirical validation verifies that DDPM has a significantly lower hallucination rate than DDIM when this region is entered. Building on our observations, we exhibit how using additional stochastic steps can help DDIM avoid hallucinations and offer new insights on how to design improved samplers.

Setup

Firstly, ensure you have Anaconda installed. Then, simply clone the repository and install dependencies through create_env.sh:

chmod +x create_env.sh
bash create_env.sh ddim_vs_ddpm
conda activate ddim_vs_ddpm

Usage

Before attempting to reproduce our experiments, please run:

chmod -R +x scripts

The core scripts are:

bash scripts/protocols/train_main_paper_model.sh # trains the main paper model on a Gaussian mixture with 25 modes 
bash scripts/protocols/run_main_paper_experiments.sh # runs the main paper experiments 
bash scripts/protocols/run_exp_d_image_experiment.sh # trains and runs the appendix image experiment 
bash scripts/protocols/train_high_dim_models.sh  # trains and runs the appendix experiments on higher dim models 
bash scripts/protocols/run_appendix_experiments.sh # runs all other appendix experiments 

The main Python entrypoints are run_train.py and run_eval.py. Model checkpoints and training artifacts are saved in results/. Evaluation outputs are saved in eval_results/. All protocol scripts support DRY_RUN=true to print commands without running them. Code for individual experiments is included in experiments/; a guide for each experiment file is included in experiments/catalogue.md.

Citation

@inproceedings{ashiq2026why,
  title        = {Why DDIM Hallucinates More Than DDPM: A Theoretical Analysis of Reverse Dynamics },
  author       = {Ashiq, Muhammad H. and Arora, Samanyu and Harish, Abhinav N. and Kharbanda, Ishaan and Tseng, Hung Yun and Chrysos, Grigorios G.},
  booktitle    = {International Conference on Machine Learning (ICML)},
  year         = {2026},
}

About

Official repository for ICML'26 paper "Why DDIM Hallucinates More Than DDPM: A Theoretical Analysis of Reverse Dynamics" by Ashiq et al.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Contributors