{"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/a-connection-between-generative-adversarial","title":"A Connection between Generative Adversarial Networks, Inverse Reinforcement Learning, and Energy-Based Models","arxiv_id":"1611.03852","date":"2016-11-11","proceeding":null,"authors":["Chelsea Finn","Paul Christiano","Pieter Abbeel","Sergey Levine"],"abstract":"Generative adversarial networks (GANs) are a recently proposed class of\ngenerative models in which a generator is trained to optimize a cost function\nthat is being simultaneously learned by a discriminator. While the idea of\nlearning cost functions is relatively new to the field of generative modeling,\nlearning costs has long been studied in control and reinforcement learning (RL)\ndomains, typically for imitation learning from demonstrations. In these fields,\nlearning cost function underlying observed behavior is known as inverse\nreinforcement learning (IRL) or inverse optimal control. While at first the\nconnection between cost learning in RL and cost learning in generative modeling\nmay appear to be a superficial one, we show in this paper that certain IRL\nmethods are in fact mathematically equivalent to GANs. In particular, we\ndemonstrate an equivalence between a sample-based algorithm for maximum entropy\nIRL and a GAN in which the generator's density can be evaluated and is provided\nas an additional input to the discriminator. Interestingly, maximum entropy IRL\nis a special case of an energy-based model. We discuss the interpretation of\nGANs as an algorithm for training energy-based models, and relate this\ninterpretation to other recent work that seeks to connect GANs and EBMs. By\nformally highlighting the connection between GANs, IRL, and EBMs, we hope that\nresearchers in all three communities can better identify and apply transferable\nideas from one domain to another, particularly for developing more stable and\nscalable algorithms: a major challenge in all three domains.","url_abs":"http://arxiv.org/abs/1611.03852v3","url_pdf":"http://arxiv.org/pdf/1611.03852v3.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":"a-connection-between-generative-adversarial","repo_url":"https://github.com/Haichao-Zhang/IRL","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"a-connection-between-generative-adversarial","repo_url":"https://github.com/hsilva664/nstep_airl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"a-connection-between-generative-adversarial","repo_url":"https://github.com/justinjfu/inverse_rl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"imitation-learning","task_name":"Imitation Learning"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1611.03852","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1611.03852"}},"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/hsilva664/nstep_airl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Haichao-Zhang/IRL","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/justinjfu/inverse_rl","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"listed":{"samples":7,"ran":0,"repositories":2}},"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":"4331957088f93026","entry":"discounted_reduce_sum","repo":"justinjfu/inverse_rl","repo_kind":"listed","path":"inverse_rl/models/tf_util.py","file_url":"https://github.com/justinjfu/inverse_rl/blob/HEAD/inverse_rl/models/tf_util.py","link_basis":"harvester_set","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":"4331957088f93026"}},{"code_sha256_prefix":"58c90800e2b0a760","entry":"flat_to_one_hot","repo":"Haichao-Zhang/IRL","repo_kind":"listed","path":"tabular_maxent_irl/utils.py","file_url":"https://github.com/Haichao-Zhang/IRL/blob/HEAD/tabular_maxent_irl/utils.py","link_basis":"harvester_set","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":"58c90800e2b0a760"}},{"code_sha256_prefix":"60d4b81474c1cd33","entry":"flatten_list","repo":"Haichao-Zhang/IRL","repo_kind":"listed","path":"tabular_maxent_irl/utils.py","file_url":"https://github.com/Haichao-Zhang/IRL/blob/HEAD/tabular_maxent_irl/utils.py","link_basis":"harvester_set","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":"60d4b81474c1cd33"}},{"code_sha256_prefix":"3eeebe2737d5a99c","entry":"linear","repo":"justinjfu/inverse_rl","repo_kind":"listed","path":"inverse_rl/models/tf_util.py","file_url":"https://github.com/justinjfu/inverse_rl/blob/HEAD/inverse_rl/models/tf_util.py","link_basis":"harvester_set","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":"3eeebe2737d5a99c"}},{"code_sha256_prefix":"d852619dcff53264","entry":"one_hot_to_flat","repo":"Haichao-Zhang/IRL","repo_kind":"listed","path":"tabular_maxent_irl/utils.py","file_url":"https://github.com/Haichao-Zhang/IRL/blob/HEAD/tabular_maxent_irl/utils.py","link_basis":"harvester_set","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":"d852619dcff53264"}},{"code_sha256_prefix":"7e9b7f501f8e5477","entry":"relu_layer","repo":"justinjfu/inverse_rl","repo_kind":"listed","path":"inverse_rl/models/tf_util.py","file_url":"https://github.com/justinjfu/inverse_rl/blob/HEAD/inverse_rl/models/tf_util.py","link_basis":"harvester_set","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":"7e9b7f501f8e5477"}},{"code_sha256_prefix":"d46376eaa3b436fa","entry":"softmax","repo":"Haichao-Zhang/IRL","repo_kind":"listed","path":"tabular_maxent_irl/q_iteration.py","file_url":"https://github.com/Haichao-Zhang/IRL/blob/HEAD/tabular_maxent_irl/q_iteration.py","link_basis":"harvester_set","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":"d46376eaa3b436fa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}