{"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/on-diffusion-models-for-amortized-inference","title":"Improved off-policy training of diffusion samplers","arxiv_id":"2402.05098","date":"2024-02-07","proceeding":null,"authors":["Marcin Sendera","Minsu Kim","Sarthak Mittal","Pablo Lemos","Luca Scimeca","Jarrid Rector-Brooks","Alexandre Adam","Yoshua Bengio","Nikolay Malkin"],"abstract":"We study the problem of training diffusion models to sample from a distribution with a given unnormalized density or energy function. We benchmark several diffusion-structured inference methods, including simulation-based variational approaches and off-policy methods (continuous generative flow networks). Our results shed light on the relative advantages of existing algorithms while bringing into question some claims from past work. We also propose a novel exploration strategy for off-policy methods, based on local search in the target space with the use of a replay buffer, and show that it improves the quality of samples on a variety of target distributions. Our code for the sampling methods and benchmarks studied is made public at https://github.com/GFNOrg/gfn-diffusion as a base for future work on diffusion models for amortized inference.","url_abs":"https://arxiv.org/abs/2402.05098v4","url_pdf":"https://arxiv.org/pdf/2402.05098v4.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":"on-diffusion-models-for-amortized-inference","repo_url":"https://github.com/gfnorg/gfn-diffusion","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"benchmarking","task_name":"Benchmarking"}],"methods":[{"method_slug":"base","method_name":"BASE"},{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.05098","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.05098"}},"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/GFNOrg/gfn-diffusion","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gfnorg/gfn-diffusion","reach":{"status":"ok"}}],"summary":{"ran":15,"unverified":2},"by_repo_kind":{"official":{"samples":17,"ran":15,"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":17,"samples":[{"code_sha256_prefix":"5bf80298d705eb51","entry":"adjust_ld_step","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/langevin.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/langevin.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5bf80298d705eb51"}},{"code_sha256_prefix":"da64b9cc0cb5f420","entry":"bwd_tb","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/gflownet_losses.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/gflownet_losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"da64b9cc0cb5f420"}},{"code_sha256_prefix":"b12c326f37f6b931","entry":"collate","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/buffer.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/buffer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b12c326f37f6b931"}},{"code_sha256_prefix":"8758016c1e97eb30","entry":"collate","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"vae/buffer.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/vae/buffer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8758016c1e97eb30"}},{"code_sha256_prefix":"7a713c0355a39fa4","entry":"dcp","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/utils.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7a713c0355a39fa4"}},{"code_sha256_prefix":"371d2c191597088e","entry":"fwd_tb","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"vae/gflownet_losses.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/vae/gflownet_losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"371d2c191597088e"}},{"code_sha256_prefix":"aed2af6e29d0346b","entry":"fwd_tb_avg","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/gflownet_losses.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/gflownet_losses.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"aed2af6e29d0346b"}},{"code_sha256_prefix":"7d2f988fc32e4ecd","entry":"get_figure","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/plot_utils.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/plot_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7d2f988fc32e4ecd"}},{"code_sha256_prefix":"e02c1b1c37c66258","entry":"langevin_dynamics","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/langevin.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/langevin.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e02c1b1c37c66258"}},{"code_sha256_prefix":"bb890357a4a87c70","entry":"linear_mmd2","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/sample_metrics.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/sample_metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bb890357a4a87c70"}},{"code_sha256_prefix":"cded7f5b04d3ed38","entry":"logmeanexp","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/utils.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cded7f5b04d3ed38"}},{"code_sha256_prefix":"9970f30509d9c6ff","entry":"poly_mmd2","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/sample_metrics.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/sample_metrics.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9970f30509d9c6ff"}},{"code_sha256_prefix":"3952c49c556847d5","entry":"viz_many_well","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/plot_utils.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/plot_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3952c49c556847d5"}},{"code_sha256_prefix":"c564a15078fe1e13","entry":"viz_sample2d","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/plot_utils.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/plot_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c564a15078fe1e13"}},{"code_sha256_prefix":"48975d6f9511eaee","entry":"wasserstein","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/sample_metrics.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/sample_metrics.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"48975d6f9511eaee"}},{"code_sha256_prefix":"ac941abcdd9c5845","entry":"cal_subtb_coef_matrix","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/utils.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ac941abcdd9c5845"}},{"code_sha256_prefix":"1022ab51101ead2b","entry":"fwd_tb","repo":"GFNOrg/gfn-diffusion","repo_kind":"official","path":"energy_sampling/gflownet_losses.py","file_url":"https://github.com/GFNOrg/gfn-diffusion/blob/HEAD/energy_sampling/gflownet_losses.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1022ab51101ead2b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}