{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/interpreting-and-improving-diffusion-models","title":"Interpreting and Improving Diffusion Models from an Optimization Perspective","arxiv_id":"2306.04848","date":"2023-06-08","proceeding":null,"authors":["Frank Permenter","Chenyang Yuan"],"abstract":"Denoising is intuitively related to projection. Indeed, under the manifold hypothesis, adding random noise is approximately equivalent to orthogonal perturbation. Hence, learning to denoise is approximately learning to project. In this paper, we use this observation to interpret denoising diffusion models as approximate gradient descent applied to the Euclidean distance function. We then provide straight-forward convergence analysis of the DDIM sampler under simple assumptions on the projection error of the denoiser. Finally, we propose a new gradient-estimation sampler, generalizing DDIM using insights from our theoretical results. In as few as 5-10 function evaluations, our sampler achieves state-of-the-art FID scores on pretrained CIFAR-10 and CelebA models and can generate high quality samples on latent diffusion models.","url_abs":"https://arxiv.org/abs/2306.04848v4","url_pdf":"https://arxiv.org/pdf/2306.04848v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"interpreting-and-improving-diffusion-models","repo_url":"https://github.com/toyotaresearchinstitute/gradient-estimation-sampler","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2306.04848","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.04848"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/mseitzer/pytorch-fid","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/toyotaresearchinstitute/gradient-estimation-sampler","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":2,"ran_draft_wrong":2,"ran_honours":1,"ran_fixture":1,"unverified":8},"by_repo_kind":{"official":{"samples":14,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"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"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"470ac5baf9cb29b5","entry":"GEScheduler","repo":"toyotaresearchinstitute/gradient-estimation-sampler","repo_kind":"official","path":"gescheduler/scheduling_gradient_estimation.py","file_url":"https://github.com/toyotaresearchinstitute/gradient-estimation-sampler/blob/HEAD/gescheduler/scheduling_gradient_estimation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"470ac5baf9cb29b5"}},{"code_sha256_prefix":"654c11faff8d06ac","entry":"GESchedulerOutput","repo":"toyotaresearchinstitute/gradient-estimation-sampler","repo_kind":"official","path":"gescheduler/scheduling_gradient_estimation.py","file_url":"https://github.com/toyotaresearchinstitute/gradient-estimation-sampler/blob/HEAD/gescheduler/scheduling_gradient_estimation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"654c11faff8d06ac"}},{"code_sha256_prefix":"c3a6b977022957cb","entry":"Normalize","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/ddim_model.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/ddim_model.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c3a6b977022957cb"}},{"code_sha256_prefix":"58ae788835842263","entry":"betas_for_alpha_bar","repo":"toyotaresearchinstitute/gradient-estimation-sampler","repo_kind":"official","path":"gescheduler/scheduling_gradient_estimation.py","file_url":"https://github.com/toyotaresearchinstitute/gradient-estimation-sampler/blob/HEAD/gescheduler/scheduling_gradient_estimation.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"58ae788835842263"}},{"code_sha256_prefix":"cb49209c125de1b4","entry":"get_timestep_embedding","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/ddim_model.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/ddim_model.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cb49209c125de1b4"}},{"code_sha256_prefix":"3137073275f8c21a","entry":"nonlinearity","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/ddim_model.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/ddim_model.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3137073275f8c21a"}},{"code_sha256_prefix":"ae9cd031d83e91e1","entry":"batched_t","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/experiment_utils.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/experiment_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ae9cd031d83e91e1"}},{"code_sha256_prefix":"2ba5b12cc97477f9","entry":"get_experiment_celeba","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/run_experiments.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/run_experiments.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2ba5b12cc97477f9"}},{"code_sha256_prefix":"69f576a7867d0e84","entry":"get_experiment_cifar10","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/run_experiments.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/run_experiments.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"69f576a7867d0e84"}},{"code_sha256_prefix":"a7e279fafe623d56","entry":"norm","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/experiment_utils.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/experiment_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a7e279fafe623d56"}},{"code_sha256_prefix":"3e7d0174c03ef683","entry":"projections","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/ideal_denoiser.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/ideal_denoiser.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3e7d0174c03ef683"}},{"code_sha256_prefix":"4a2eec11353e2317","entry":"show","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/experiment_utils.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/experiment_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4a2eec11353e2317"}},{"code_sha256_prefix":"e4f8a62a2e20ec8c","entry":"sq_norm","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/ideal_denoiser.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/ideal_denoiser.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e4f8a62a2e20ec8c"}},{"code_sha256_prefix":"d4f6bea07d7f48a0","entry":"tensor_to_pil","repo":"ToyotaResearchInstitute/gradient-estimation-sampler","repo_kind":"official","path":"experiments/stable_diffusion_exp.py","file_url":"https://github.com/ToyotaResearchInstitute/gradient-estimation-sampler/blob/HEAD/experiments/stable_diffusion_exp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d4f6bea07d7f48a0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}