{"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/diffail-diffusion-adversarial-imitation","title":"DiffAIL: Diffusion Adversarial Imitation Learning","arxiv_id":"2312.06348","date":"2023-12-11","proceeding":null,"authors":["Bingzheng Wang","Guoqiang Wu","Teng Pang","Yan Zhang","Yilong Yin"],"abstract":"Imitation learning aims to solve the problem of defining reward functions in real-world decision-making tasks. The current popular approach is the Adversarial Imitation Learning (AIL) framework, which matches expert state-action occupancy measures to obtain a surrogate reward for forward reinforcement learning. However, the traditional discriminator is a simple binary classifier and doesn't learn an accurate distribution, which may result in failing to identify expert-level state-action pairs induced by the policy interacting with the environment. To address this issue, we propose a method named diffusion adversarial imitation learning (DiffAIL), which introduces the diffusion model into the AIL framework. Specifically, DiffAIL models the state-action pairs as unconditional diffusion models and uses diffusion loss as part of the discriminator's learning objective, which enables the discriminator to capture better expert demonstrations and improve generalization. Experimentally, the results show that our method achieves state-of-the-art performance and significantly surpasses expert demonstration on two benchmark tasks, including the standard state-action setting and state-only settings. Our code can be available at the link https://github.com/ML-Group-SDU/DiffAIL.","url_abs":"https://arxiv.org/abs/2312.06348v2","url_pdf":"https://arxiv.org/pdf/2312.06348v2.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":"diffail-diffusion-adversarial-imitation","repo_url":"https://github.com/ml-group-sdu/diffail","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"decision-making","task_name":"Decision Making"},{"task_slug":"imitation-learning","task_name":"Imitation Learning"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2312.06348","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.06348"}},"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/ml-group-sdu/diffail","reach":{"status":"ok"}}],"summary":{"ran":9},"by_repo_kind":{"official":{"samples":9,"ran":9,"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":9,"samples":[{"code_sha256_prefix":"22460aa398318fb4","entry":"create_linear_schedule","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"rlkit/core/train_util.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/rlkit/core/train_util.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":"22460aa398318fb4"}},{"code_sha256_prefix":"74f5c8625fad7bbc","entry":"create_stats_ordered_dict","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"rlkit/core/eval_util.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/rlkit/core/eval_util.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":"74f5c8625fad7bbc"}},{"code_sha256_prefix":"44ccd48c6687e39b","entry":"get_average_returns","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"rlkit/core/eval_util.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/rlkit/core/eval_util.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":"44ccd48c6687e39b"}},{"code_sha256_prefix":"a4a9e133dad5ba08","entry":"get_data","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"image/draw_plot_final.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/image/draw_plot_final.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":"a4a9e133dad5ba08"}},{"code_sha256_prefix":"5319d16fbb6eeb71","entry":"get_generic_path_information","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"rlkit/core/eval_util.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/rlkit/core/eval_util.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":"5319d16fbb6eeb71"}},{"code_sha256_prefix":"46ed8de2de1967ca","entry":"insert_expert_return","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"image/draw_plot_final.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/image/draw_plot_final.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":"46ed8de2de1967ca"}},{"code_sha256_prefix":"6287f9aeab092560","entry":"linear_schedule","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"rlkit/core/train_util.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/rlkit/core/train_util.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":"6287f9aeab092560"}},{"code_sha256_prefix":"5162b4c3f8ee2137","entry":"load_from_file","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"rlkit/core/logger.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/rlkit/core/logger.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":"5162b4c3f8ee2137"}},{"code_sha256_prefix":"5cb0c55f58279f59","entry":"simple_separated_format","repo":"ml-group-sdu/diffail","repo_kind":"official","path":"rlkit/core/tabulate.py","file_url":"https://github.com/ml-group-sdu/diffail/blob/HEAD/rlkit/core/tabulate.py","link_basis":"harvester_set","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":"5cb0c55f58279f59"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}