{"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/optimizing-ddpm-sampling-with-shortcut-fine","title":"Optimizing DDPM Sampling with Shortcut Fine-Tuning","arxiv_id":"2301.13362","date":"2023-01-31","proceeding":null,"authors":["Ying Fan","Kangwook Lee"],"abstract":"In this study, we propose Shortcut Fine-Tuning (SFT), a new approach for addressing the challenge of fast sampling of pretrained Denoising Diffusion Probabilistic Models (DDPMs). SFT advocates for the fine-tuning of DDPM samplers through the direct minimization of Integral Probability Metrics (IPM), instead of learning the backward diffusion process. This enables samplers to discover an alternative and more efficient sampling shortcut, deviating from the backward diffusion process. Inspired by a control perspective, we propose a new algorithm SFT-PG: Shortcut Fine-Tuning with Policy Gradient, and prove that under certain assumptions, gradient descent of diffusion models with respect to IPM is equivalent to performing policy gradient. To our best knowledge, this is the first attempt to utilize reinforcement learning (RL) methods to train diffusion models. Through empirical evaluation, we demonstrate that our fine-tuning method can further enhance existing fast DDPM samplers, resulting in sample quality comparable to or even surpassing that of the full-step model across various datasets.","url_abs":"https://arxiv.org/abs/2301.13362v3","url_pdf":"https://arxiv.org/pdf/2301.13362v3.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":"optimizing-ddpm-sampling-with-shortcut-fine","repo_url":"https://github.com/uw-madison-lee-lab/sft-pg","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"sft","method_name":"SFT"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2301.13362","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2301.13362"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/uw-madison-lee-lab/sft-pg","reach":null}],"summary":{"ran_draft_wrong":2,"ran_honours":2,"unverified":5},"by_repo_kind":{"official":{"samples":9,"ran":4,"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":"ed73b74081cf211c","entry":"calc_diffusion_hyperparams","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"generate.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ed73b74081cf211c"}},{"code_sha256_prefix":"4e07246a19ae09b7","entry":"rescale","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/finetune.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e07246a19ae09b7"}},{"code_sha256_prefix":"9816a0b9e687fd13","entry":"rescale","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"generate.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/generate.py","link_basis":"first_harvest_node","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":"9816a0b9e687fd13"}},{"code_sha256_prefix":"7b34fe9aac7b6f18","entry":"rescale_train","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/finetune.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7b34fe9aac7b6f18"}},{"code_sha256_prefix":"97e1a4476816d9b2","entry":"VAR_get_params","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/finetune.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":"97e1a4476816d9b2"}},{"code_sha256_prefix":"b7444360a7e12ada","entry":"VAR_log_prob","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/finetune.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":"b7444360a7e12ada"}},{"code_sha256_prefix":"ea20ff661e1cebce","entry":"VAR_sampling","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/finetune.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":"ea20ff661e1cebce"}},{"code_sha256_prefix":"7a17021ad959562a","entry":"std_normal","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/finetune.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":"7a17021ad959562a"}},{"code_sha256_prefix":"a94b7f2182fe5c25","entry":"train_one_epoch","repo":"uw-madison-lee-lab/sft-pg","repo_kind":"official","path":"finetune.py","file_url":"https://github.com/uw-madison-lee-lab/sft-pg/blob/HEAD/finetune.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":"a94b7f2182fe5c25"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}