Papers › On Memorization in Diffusion Models

On Memorization in Diffusion Models

4 Oct 2023arXiv:2310.02664archive 2025-07-28

Xiangming Gu, Chao Du, Tianyu Pang, Chongxuan Li, Min Lin, Ye Wang

Due to their capacity to generate novel and high-quality samples, diffusion models have attracted significant research interest in recent years. Notably, the typical training objective of diffusion models, i.e., denoising score matching, has a closed-form optimal solution that can only generate training data replicating samples. This indicates that a memorization behavior is theoretically expected, which contradicts the common generalization ability of state-of-the-art diffusion models, and thus calls for a deeper understanding. Looking into this, we first observe that memorization behaviors tend to occur on smaller-sized datasets, which motivates our definition of effective model memorization (EMM), a metric measuring the maximum size of training data at which a learned diffusion model approximates its theoretical optimum. Then, we quantify the impact of the influential factors on these memorization behaviors in terms of EMM, focusing primarily on data distribution, model configuration, and training procedure. Besides comprehensive empirical results identifying the influential factors, we surprisingly find that conditioning training data on uninformative random labels can significantly trigger the memorization in diffusion models. Our study holds practical significance for diffusion model users and offers clues to theoretical research in deep generative models. Code is available at https://github.com/sail-sg/DiffMemorize.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2310.02664")

Code

Syntology Ran 9 of 14 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 2 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: official repository: 14 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

sail-sg/DiffMemorize officialmentioned in papermentioned on GitHubpytorchMIT report
sixuli/ddpm_and_kde mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

14 samples harvested; 9 ran; 2 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
3ran
5unverified

Licence: 0 of the 14 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from sail-sg/DiffMemorize. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

file_ext sail-sg/DiffMemorize/dataset_utils/dataset_diversity.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · a2b45afa097b55b6 · report
find_class_folders sail-sg/DiffMemorize/dataset_utils/sample_imagenet.py official repository ran MIT (permissive) · 2bc3b7a1e6f0984b · report
format_time sail-sg/DiffMemorize/dnnlib/util.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 674eca7b9e1b6439 · report
format_time_brief sail-sg/DiffMemorize/dnnlib/util.py official repository ran · our draft was wrong fingerprinted MIT (permissive) · 32af001972a0699f · report
maybe_min sail-sg/DiffMemorize/dataset_utils/dataset_diversity.py official repository ran · honoured contract MIT (permissive) · dd1dc700e87f36cc · report
parse_int_list sail-sg/DiffMemorize/generate_edm.py official repository ran · honoured contract MIT (permissive) · cacd4f6ec202d9b4 · report
parse_tuple sail-sg/DiffMemorize/dataset_utils/dataset_diversity.py official repository ran MIT (permissive) · 07b21b35ecb4815c · report
sample_images sail-sg/DiffMemorize/dataset_utils/sample_imagenet.py official repository ran MIT (permissive) · f1eb8f458487f3ab · report
weight_init sail-sg/DiffMemorize/training/networks.py official repository ran · fixture could not drive it MIT (permissive) · d41a4250066bce93 · report
ablation_sampler sail-sg/DiffMemorize/generate_edm.py official repository unverified MIT (permissive) · 9fbf646e18eed1db · report
ask_yes_no sail-sg/DiffMemorize/dnnlib/util.py official repository unverified MIT (permissive) · 9d31d2c4cd16bb2d · report
edm_sampler sail-sg/DiffMemorize/generate_edm.py official repository unverified MIT (permissive) · 8b16b0674af254db · report
file_ext sail-sg/DiffMemorize/mem_ratio.py official repository unverified MIT (permissive) · b1986232479684ae · report
load_cifar10_zip sail-sg/DiffMemorize/mem_ratio.py official repository unverified MIT (permissive) · ad63e5e1c1e32ab7 · report

Tasks

DenoisingMemorization

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Diffusion

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections