{"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/diffusing-states-and-matching-scores-a-new","title":"Diffusing States and Matching Scores: A New Framework for Imitation Learning","arxiv_id":"2410.13855","date":"2024-10-17","proceeding":null,"authors":["Runzhe Wu","Yiding Chen","Gokul Swamy","Kianté Brantley","Wen Sun"],"abstract":"Adversarial Imitation Learning is traditionally framed as a two-player zero-sum game between a learner and an adversarially chosen cost function, and can therefore be thought of as the sequential generalization of a Generative Adversarial Network (GAN). A prominent example of this framework is Generative Adversarial Imitation Learning (GAIL). However, in recent years, diffusion models have emerged as a non-adversarial alternative to GANs that merely require training a score function via regression, yet produce generations of a higher quality. In response, we investigate how to lift insights from diffusion modeling to the sequential setting. We propose diffusing states and performing score-matching along diffused states to measure the discrepancy between the expert's and learner's states. Thus, our approach only requires training score functions to predict noises via standard regression, making it significantly easier and more stable to train than adversarial methods. Theoretically, we prove first- and second-order instance-dependent bounds with linear scaling in the horizon, proving that our approach avoids the compounding errors that stymie offline approaches to imitation learning. Empirically, we show our approach outperforms GAN-style imitation learning baselines across various continuous control problems, including complex tasks like controlling humanoids to walk, sit, and crawl.","url_abs":"https://arxiv.org/abs/2410.13855v1","url_pdf":"https://arxiv.org/pdf/2410.13855v1.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":"diffusing-states-and-matching-scores-a-new","repo_url":"https://github.com/ziqian2000/smiling","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"NOASSERTION"}}],"tasks":[{"task_slug":"continuous-control","task_name":"Continuous Control"},{"task_slug":null,"task_name":"Generative Adversarial Network"},{"task_slug":"imitation-learning","task_name":"Imitation Learning"},{"task_slug":"continuous-control","task_name":"continuous-control"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.13855","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.13855"}},"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/ziqian2000/SMILING","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ziqian2000/smiling","reach":{"status":"ok","spdx":"NOASSERTION"}}],"summary":{"ran":4,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"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":6,"samples":[{"code_sha256_prefix":"e44a493bd51f52ec","entry":"Algorithm","repo":"ziqian2000/smiling","repo_kind":"official","path":"algorithm/diffusion.py","file_url":"https://github.com/ziqian2000/smiling/blob/HEAD/algorithm/diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"e44a493bd51f52ec"}},{"code_sha256_prefix":"de17b2e7712e9aa5","entry":"MLP","repo":"ziqian2000/smiling","repo_kind":"official","path":"algorithm/diffusion.py","file_url":"https://github.com/ziqian2000/smiling/blob/HEAD/algorithm/diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"de17b2e7712e9aa5"}},{"code_sha256_prefix":"169e1e96687f1906","entry":"get_agent_model_paths","repo":"ziqian2000/SMILING","repo_kind":"official","path":"utils.py","file_url":"https://github.com/ziqian2000/SMILING/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"169e1e96687f1906"}},{"code_sha256_prefix":"524f939a65aaa2da","entry":"make_agent","repo":"ziqian2000/SMILING","repo_kind":"official","path":"utils.py","file_url":"https://github.com/ziqian2000/SMILING/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"524f939a65aaa2da"}},{"code_sha256_prefix":"ffd563df7cdce850","entry":"Diff","repo":"ziqian2000/smiling","repo_kind":"official","path":"algorithm/diffusion.py","file_url":"https://github.com/ziqian2000/smiling/blob/HEAD/algorithm/diffusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"ffd563df7cdce850"}},{"code_sha256_prefix":"03fd3fdbda82c272","entry":"DiffusionModel","repo":"ziqian2000/smiling","repo_kind":"official","path":"algorithm/diffusion.py","file_url":"https://github.com/ziqian2000/smiling/blob/HEAD/algorithm/diffusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"03fd3fdbda82c272"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}