{"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/learning-energy-based-models-by-cooperative","title":"Learning Energy-Based Models by Cooperative Diffusion Recovery Likelihood","arxiv_id":"2309.05153","date":"2023-09-10","proceeding":null,"authors":["Yaxuan Zhu","Jianwen Xie","YingNian Wu","Ruiqi Gao"],"abstract":"Training energy-based models (EBMs) on high-dimensional data can be both challenging and time-consuming, and there exists a noticeable gap in sample quality between EBMs and other generative frameworks like GANs and diffusion models. To close this gap, inspired by the recent efforts of learning EBMs by maximizing diffusion recovery likelihood (DRL), we propose cooperative diffusion recovery likelihood (CDRL), an effective approach to tractably learn and sample from a series of EBMs defined on increasingly noisy versions of a dataset, paired with an initializer model for each EBM. At each noise level, the two models are jointly estimated within a cooperative training framework: samples from the initializer serve as starting points that are refined by a few MCMC sampling steps from the EBM. The EBM is then optimized by maximizing recovery likelihood, while the initializer model is optimized by learning from the difference between the refined samples and the initial samples. In addition, we made several practical designs for EBM training to further improve the sample quality. Combining these advances, our approach significantly boost the generation performance compared to existing EBM methods on CIFAR-10 and ImageNet datasets. We also demonstrate the effectiveness of our models for several downstream tasks, including classifier-free guided generation, compositional generation, image inpainting and out-of-distribution detection.","url_abs":"https://arxiv.org/abs/2309.05153v5","url_pdf":"https://arxiv.org/pdf/2309.05153v5.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":"learning-energy-based-models-by-cooperative","repo_url":"https://github.com/alvinzhuyx/cdrl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-inpainting","task_name":"Image Inpainting"},{"task_slug":"out-of-distribution-detection","task_name":"Out-of-Distribution Detection"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"ebm","method_name":"EBM"},{"method_slug":"pixel-prediction","method_name":"Inpainting"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.05153","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.05153"}},"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/alvinzhuyx/cdrl","reach":null}],"summary":{"ran_draft_wrong":2,"ran_honours":2,"ran_fixture":1},"by_repo_kind":{"official":{"samples":5,"ran":5,"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":5,"samples":[{"code_sha256_prefix":"29a12f8d8f29d419","entry":"diffusion_reverse","repo":"alvinzhuyx/cdrl","repo_kind":"official","path":"main_uncond.py","file_url":"https://github.com/alvinzhuyx/cdrl/blob/HEAD/main_uncond.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"29a12f8d8f29d419"}},{"code_sha256_prefix":"975717adefe9a6e4","entry":"generate_square_samples","repo":"alvinzhuyx/cdrl","repo_kind":"official","path":"toy_example.py","file_url":"https://github.com/alvinzhuyx/cdrl/blob/HEAD/toy_example.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"975717adefe9a6e4"}},{"code_sha256_prefix":"f3cf5a0b90d04903","entry":"get_timestep_embedding","repo":"alvinzhuyx/cdrl","repo_kind":"official","path":"toy_example.py","file_url":"https://github.com/alvinzhuyx/cdrl/blob/HEAD/toy_example.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f3cf5a0b90d04903"}},{"code_sha256_prefix":"e7f4adc4baa22f87","entry":"logsnr_schedule_fn","repo":"alvinzhuyx/cdrl","repo_kind":"official","path":"main_uncond.py","file_url":"https://github.com/alvinzhuyx/cdrl/blob/HEAD/main_uncond.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e7f4adc4baa22f87"}},{"code_sha256_prefix":"2feb1340096324ce","entry":"pred_x_from_eps","repo":"alvinzhuyx/cdrl","repo_kind":"official","path":"toy_example.py","file_url":"https://github.com/alvinzhuyx/cdrl/blob/HEAD/toy_example.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2feb1340096324ce"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}