{"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/kale-when-energy-based-learning-meets","title":"Generalized Energy Based Models","arxiv_id":"2003.05033","date":"2020-03-10","proceeding":"ICLR 2021 1","authors":["Michael Arbel","Liang Zhou","Arthur Gretton"],"abstract":"We introduce the Generalized Energy Based Model (GEBM) for generative modelling. These models combine two trained components: a base distribution (generally an implicit model), which can learn the support of data with low intrinsic dimension in a high dimensional space; and an energy function, to refine the probability mass on the learned support. Both the energy function and base jointly constitute the final model, unlike GANs, which retain only the base distribution (the \"generator\"). GEBMs are trained by alternating between learning the energy and the base. We show that both training stages are well-defined: the energy is learned by maximising a generalized likelihood, and the resulting energy-based loss provides informative gradients for learning the base. Samples from the posterior on the latent space of the trained model can be obtained via MCMC, thus finding regions in this space that produce better quality samples. Empirically, the GEBM samples on image-generation tasks are of much better quality than those from the learned generator alone, indicating that all else being equal, the GEBM will outperform a GAN of the same complexity. When using normalizing flows as base measures, GEBMs succeed on density modelling tasks, returning comparable performance to direct maximum likelihood of the same networks.","url_abs":"https://arxiv.org/abs/2003.05033v5","url_pdf":"https://arxiv.org/pdf/2003.05033v5.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":"kale-when-energy-based-learning-meets","repo_url":"https://github.com/MichaelArbel/GeneralizedEBM","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"paper_slug":"kale-when-energy-based-learning-meets","repo_url":"https://github.com/soran-ghaderi/torchebm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"unanswered"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"normalizing-flows","method_name":"Normalizing Flows"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2003.05033","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2003.05033"}},"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/MichaelArbel/GeneralizedEBM","reach":{"status":"ok","spdx":"BSD-3-Clause"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/soran-ghaderi/torchebm","reach":{"status":"unanswered"}}],"summary":{"ran_honours":1,"unverified":10},"by_repo_kind":{"official":{"samples":11,"ran":1,"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":"a4dfb67f7c8176a7","entry":"get_mask","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"models/made_model.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/models/made_model.py","link_basis":"plan_row","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"a4dfb67f7c8176a7"}},{"code_sha256_prefix":"4d97c9c0c834ec63","entry":"accimage_loader","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"helpers.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/helpers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"4d97c9c0c834ec63"}},{"code_sha256_prefix":"ac697f1483fd8751","entry":"conv_sizes","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"models/generator.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/models/generator.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"ac697f1483fd8751"}},{"code_sha256_prefix":"3d73aadb98e568a1","entry":"create_masks","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"models/mog_maf_model.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/models/mog_maf_model.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"3d73aadb98e568a1"}},{"code_sha256_prefix":"60b61672c09d4d82","entry":"default_loader","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"helpers.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/helpers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"60b61672c09d4d82"}},{"code_sha256_prefix":"53e612a15ebd62ae","entry":"kale","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"compute.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/compute.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"53e612a15ebd62ae"}},{"code_sha256_prefix":"f82f297375e8ab15","entry":"logistic","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"compute.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/compute.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"f82f297375e8ab15"}},{"code_sha256_prefix":"72759a3ac997477e","entry":"pil_loader","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"helpers.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/helpers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"72759a3ac997477e"}},{"code_sha256_prefix":"7405f2156522f874","entry":"polynomial_mmd","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"utils/kid_score.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/utils/kid_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7405f2156522f874"}},{"code_sha256_prefix":"72e586d54fdfcd3c","entry":"polynomial_mmd_averages","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"utils/kid_score.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/utils/kid_score.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"72e586d54fdfcd3c"}},{"code_sha256_prefix":"7ce07d3de4fd0786","entry":"wasserstein","repo":"MichaelArbel/GeneralizedEBM","repo_kind":"official","path":"compute.py","file_url":"https://github.com/MichaelArbel/GeneralizedEBM/blob/HEAD/compute.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":true,"mcp_get_code":{"code_sha256":"7ce07d3de4fd0786"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}