Why Gaussian Diffusion Models Fail on Discrete Data and How to Prevent It?
Organizations: Constructor University, Bremen, Germany · Lomonosov Moscow State University, Moscow, Russia
Abstract
Diffusion models have become a standard approach for generative modeling in continuous domains, yet their application to discrete data remains challenging. We investigate why Gaussian diffusion models with the DDPM solver struggle to sample from discrete distributions that are represented as a mixture of delta-distributions in the continuous space. Using a toy Random Hierarchy Model, we identify a critical sampling interval in which the density of noisified data becomes multimodal. In this regime, DDPM occasionally enters low-density regions between modes producing out-of-distribution inputs for the model and degrading sample quality. We show that existing heuristics, including self-conditioning and a solver we term q-sampling, help alleviate this issue. Furthermore, we demonstrate that combining self-conditioning with switching from DDPM to q-sampling within the critical interval improves generation quality on real data. We validate these findings across conditional and unconditional tasks in multiple domains, including text, programming code, and proteins.
Figures & tables
| ROCStories | Wikipedia | |||||
|---|---|---|---|---|---|---|
| Model | Mauve | PPL | Div | Mauve | PPL | Div |
| Diffusion-LM | 16.2_{{\color[rgb]{0.5,0.5,0.5}\pm 2.9}} | 148.9_{{\color[rgb]{0.5,0.5,0.5}\pm 2.7}} | \textbf{33.7}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} | 1.2_{{\color[rgb]{0.5,0.5,0.5}\pm 0.2}} | 419.8_{{\color[rgb]{0.5,0.5,0.5}\pm 9.3}} | 49.5_{{\color[rgb]{0.5,0.5,0.5}\pm 0.6}} |
| + SC 0.5 | 71.3_{{\color[rgb]{0.5,0.5,0.5}\pm 3.8}} | 73.8_{{\color[rgb]{0.5,0.5,0.5}\pm 0.8}} | 30.2_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} | 12.1_{{\color[rgb]{0.5,0.5,0.5}\pm 1.9}} | 300.2_{{\color[rgb]{0.5,0.5,0.5}\pm 6.7}} | \textbf{58.7}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} |
| + QS 0.3 | 72.7_{{\color[rgb]{0.5,0.5,0.5}\pm 4.3}} | 42.7_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} | 17.4_{{\color[rgb]{0.5,0.5,0.5}\pm 0.2}} | 5.8_{{\color[rgb]{0.5,0.5,0.5}\pm 0.8}} | 166.6_{{\color[rgb]{0.5,0.5,0.5}\pm 3.3}} | 40.0_{{\color[rgb]{0.5,0.5,0.5}\pm 0.6}} |
| + QS 0.3 + SC 0.5 | \textbf{81.6}_{{\color[rgb]{0.5,0.5,0.5}\pm 2.7}} | \textbf{41.0}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.6}} | 22.9_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} | 36.4_{{\color[rgb]{0.5,0.5,0.5}\pm 4.4}} | \textbf{114.2}_{{\color[rgb]{0.5,0.5,0.5}\pm 2.4}} | 48.4_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} |
| + SC 0.95 | 75.2_{{\color[rgb]{0.5,0.5,0.5}\pm 2.4}} | 59.5_{{\color[rgb]{0.5,0.5,0.5}\pm 1.1}} | 29.0_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} | 27.8_{{\color[rgb]{0.5,0.5,0.5}\pm 3.2}} | 197.4_{{\color[rgb]{0.5,0.5,0.5}\pm 4.8}} | 56.6_{{\color[rgb]{0.5,0.5,0.5}\pm 0.5}} |
| Method | Mauve | PPL | Div |
|---|---|---|---|
| Diffusion-LM | 16.2_{{\color[rgb]{0.5,0.5,0.5}\pm 3.0}} | 148.9_{{\color[rgb]{0.5,0.5,0.5}\pm 2.7}} | 33.7_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} |
| + MBR 0.3 | 20.8_{{\color[rgb]{0.5,0.5,0.5}\pm 3.5}} | 136.3_{{\color[rgb]{0.5,0.5,0.5}\pm 1.8}} | 32.2_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} |
| TEncDM Emb | 15.7_{{\color[rgb]{0.5,0.5,0.5}\pm 2.9}} | 123.2_{{\color[rgb]{0.5,0.5,0.5}\pm 1.8}} | 36.6_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} |
| + MBR 0.3 | 18.9_{{\color[rgb]{0.5,0.5,0.5}\pm 1.8}} | 101.5_{{\color[rgb]{0.5,0.5,0.5}\pm 1.9}} | 31.6_{{\color[rgb]{0.5,0.5,0.5}\pm 0.5}} |
| TEncDM Enc | 70.1_{{\color[rgb]{0.5,0.5,0.5}\pm 3.2}} | 54.2_{{\color[rgb]{0.5,0.5,0.5}\pm 1.1}} | 31.2_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} |
| + MBR 0.3 | 72.3_{{\color[rgb]{0.5,0.5,0.5}\pm 2.0}} | 48.0_{{\color[rgb]{0.5,0.5,0.5}\pm 44.5}} | 28.3_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} |
Appendix figures & tables17 assets
Supplementary material from the paper’s appendix.
Appendix
| RHM | ROCStories | Wikipedia | OWT | |
| Max length | ||||
| XSum | QQP | IWSLT14 | CoNaLa | |
| Max input length | ||||
| Max target length |
| MBR candidate | b l b b j b j k | b l f b j b j k | i n f b l d d i | k n j i o a p a |
|---|---|---|---|---|
| Candidate #1 | b l b b j b j k | i c b b j b j k | i n f b l d d i | k g o c k i h n |
| Candidate #2 | b l b b j b j k | i n f b j b j k | n o b h k o k i | h n c e f b l e |
| Candidate #3 | b l b b j b j k | b l f b j b o k | e n f b o o m b | k n j i o a p a |
| Candidate #4 | b l b b j b j k | b l f b j b j k | i c b b l d j b | j k j m a i o a |
| Candidate #5 | b l b b j b j k | b l f b j b j k | b g f b j b h b | d e j d p b c b |
| MBR | \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25John; and John decided to build a lemonade stand. They \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25got; together in \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25a; big lemonade stand in their yard. picking out the lemonade, they put it in a \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25jar;. They ate the lemonade for a week. The neighbor told them to go home without their lemonade. |
|---|---|
| #1 | \tikz [baseline=(a.base),inner sep=0pt] \node fill=red!25Amy; and John decided to build a lemonade stand. They \tikz [baseline=(a.base),inner sep=0pt] \node fill=red!25walked; together in \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25a; big lemonade stand in their yard. picking out the lemonade, they put it in a \tikz [baseline=(a.base),inner sep=0pt] \node fill=red!25bowl;. They ate the lemonade for a week. The neighbor told them to go home without their lemonade. |
| #2 | \tikz [baseline=(a.base),inner sep=0pt] \node fill=red!25Sam; and John decided to make a lemonade stand. They \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25got; together in \tikz [baseline=(a.base),inner sep=0pt] \node fill=red!25the; big lemonade stand in their yard. picking out the lemonade, they put it in a \tikz [baseline=(a.base),inner sep=0pt] \node fill=red!25bowl;. They ate the lemonade for a week. The neighbor told them to go home without their lemonade. |
| #3 | \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25John; and John decided to build a lemonade stand. They \tikz [baseline=(a.base),inner sep=0pt] \node fill=red!25sat; together in \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25a; large lemonade stand in their yard. picking out the lemonade, they put it in a \tikz [baseline=(a.base),inner sep=0pt] \node fill=red!25box;. They ate the lemonade for a week. The neighbor told them to go home without their lemonade. |
| #4 | \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25John; and John decided to make a lemonade stand. They \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25got; together in \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25a; large lemonade stand in their yard. picking out the lemonade, they put it in a \tikz [baseline=(a.base),inner sep=0pt] \node fill=Green!25jar;. They ate the lemonade for a week. The neighbor told them to go home without their lemonade. |
| ROCStories | Wikipedia | OpenWebText | |||||||
| Model | Mauve | PPL | Div | Mauve | PPL | Div | Mauve | PPL | Div |
| Diffusion-LM | |||||||||
| + SC 0.5 | 71.3_{{\color[rgb]{0.5,0.5,0.5}\pm 3.8}} | 74.5_{{\color[rgb]{0.5,0.5,0.5}\pm 0.9}} | \textbf{30.2}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} | 12.1_{{\color[rgb]{0.5,0.5,0.5}\pm 1.9}} | 300.2_{{\color[rgb]{0.5,0.5,0.5}\pm 6.7}} | 58.7_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} | — | — | — |
| + SC 0.8 | 74.0_{{\color[rgb]{0.5,0.5,0.5}\pm 4.3}} | 66.5_{{\color[rgb]{0.5,0.5,0.5}\pm 1.0}} | 30.1_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} | 16.8_{{\color[rgb]{0.5,0.5,0.5}\pm 1.6}} | 271.2_{{\color[rgb]{0.5,0.5,0.5}\pm 7.4}} | \textbf{58.8}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.5}} | — | — | — |
| + SC 0.9 | 74.0_{{\color[rgb]{0.5,0.5,0.5}\pm 1.9}} | 61.8_{{\color[rgb]{0.5,0.5,0.5}\pm 0.5}} | 29.2_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} | 24.3_{{\color[rgb]{0.5,0.5,0.5}\pm 3.5}} | 229.5_{{\color[rgb]{0.5,0.5,0.5}\pm 5.1}} | \textbf{58.8}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.5}} | — | — | — |
| + SC 0.95 | \textbf{75.2}_{{\color[rgb]{0.5,0.5,0.5}\pm 2.4}} | 59.5_{{\color[rgb]{0.5,0.5,0.5}\pm 1.1}} | 29.0_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} | 27.8_{{\color[rgb]{0.5,0.5,0.5}\pm 3.2}} | 197.4_{{\color[rgb]{0.5,0.5,0.5}\pm 4.8}} | 56.6_{{\color[rgb]{0.5,0.5,0.5}\pm 0.5}} | — | — | — |
| OpenWebText | |||
| Model | Mauve | PPL | Div |
| TEncDM Emb | 2.6_{{\color[rgb]{0.5,0.5,0.5}\pm 0.4}} | 185.3_{{\color[rgb]{0.5,0.5,0.5}\pm 2.4}} | \textbf{34.6}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.2}} |
| + SC 0.5 | 59.8_{{\color[rgb]{0.5,0.5,0.5}\pm 4.7}} | 70.6_{{\color[rgb]{0.5,0.5,0.5}\pm 0.8}} | 26.7_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} |
| + QS 0.4 | 6.2_{{\color[rgb]{0.5,0.5,0.5}\pm 0.8}} | 106.8_{{\color[rgb]{0.5,0.5,0.5}\pm 1.7}} | 27.7_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} |
| + QS 0.4 + SC 0.5 | \textbf{67.3}_{{\color[rgb]{0.5,0.5,0.5}\pm 4.5}} | \textbf{53.9}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.7}} | 23.4_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} |
| TEncDM Enc | 20.8_{{\color[rgb]{0.5,0.5,0.5}\pm 3.0}} | 176.1_{{\color[rgb]{0.5,0.5,0.5}\pm 2.0}} | \textbf{39.7}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.3}} |
| FD-seq | pppl | CD 0.5 | |
|---|---|---|---|
| DiMA Emb | 1.086_{{\color[rgb]{0.5,0.5,0.5}\pm 0.006}} | 12.62_{{\color[rgb]{0.5,0.5,0.5}\pm 0.25}} | 87.9_{{\color[rgb]{0.5,0.5,0.5}\pm 0.9}} |
| + SC 0.5 | 1.015_{{\color[rgb]{0.5,0.5,0.5}\pm 0.024}} | 11.33_{{\color[rgb]{0.5,0.5,0.5}\pm 0.21}} | \textbf{92.5}_{{\color[rgb]{0.5,0.5,0.5}\pm 1.6}} |
| + QS 0.4 | 1.045_{{\color[rgb]{0.5,0.5,0.5}\pm 0.009}} | 12.04_{{\color[rgb]{0.5,0.5,0.5}\pm 0.25}} | 87.1_{{\color[rgb]{0.5,0.5,0.5}\pm 1.3}} |
| + QS 0.4 + SC 0.5 | \textbf{1.004}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.026}} | \textbf{10.89}_{{\color[rgb]{0.5,0.5,0.5}\pm 0.23}} | 91.5_{{\color[rgb]{0.5,0.5,0.5}\pm 1.5}} |
| IWSLT14 (SeqDiffuSeq) | QQP (SeqDiffuSeq) | XSum (TEncDM Emb) | |||||
|---|---|---|---|---|---|---|---|
| Solver | BLEU | R-1/2/L | BS | BLEU | R-1/2/L | BS | R-1/2/L |
| DDPM | 29.19 | 82.8 | |||||
| + SC 0.5 | 82.8 | 34.13 | |||||
| + QS 1.0 | |||||||
| + QS 1.0 + SC 0.5 | 34.11 | 67.5 | |||||
| Method | FID | Precision | Recall | Density | Coverage |
|---|---|---|---|---|---|
| SongUNet | |||||
| + QS 0.025 | |||||
| + QS 0.05 | |||||
| + QS 0.075 | |||||
| + QS 0.1 | |||||
| + SC |
Diffusion Models
Diffusion models learn to reverse gradual data corruption, enabling flexible generation, editing, forecasting, and inference.
See all 1,169 papers