{"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/ollie-imitation-learning-from-offline","title":"OLLIE: Imitation Learning from Offline Pretraining to Online Finetuning","arxiv_id":"2405.17477","date":"2024-05-24","proceeding":null,"authors":["Sheng Yue","Xingyuan Hua","Ju Ren","Sen Lin","Junshan Zhang","Yaoxue Zhang"],"abstract":"In this paper, we study offline-to-online Imitation Learning (IL) that pretrains an imitation policy from static demonstration data, followed by fast finetuning with minimal environmental interaction. We find the na\\\"ive combination of existing offline IL and online IL methods tends to behave poorly in this context, because the initial discriminator (often used in online IL) operates randomly and discordantly against the policy initialization, leading to misguided policy optimization and $\\textit{unlearning}$ of pretraining knowledge. To overcome this challenge, we propose a principled offline-to-online IL method, named $\\texttt{OLLIE}$, that simultaneously learns a near-expert policy initialization along with an $\\textit{aligned discriminator initialization}$, which can be seamlessly integrated into online IL, achieving smooth and fast finetuning. Empirically, $\\texttt{OLLIE}$ consistently and significantly outperforms the baseline methods in $\\textbf{20}$ challenging tasks, from continuous control to vision-based domains, in terms of performance, demonstration efficiency, and convergence speed. This work may serve as a foundation for further exploration of pretraining and finetuning in the context of IL.","url_abs":"https://arxiv.org/abs/2405.17477v3","url_pdf":"https://arxiv.org/pdf/2405.17477v3.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":"ollie-imitation-learning-from-offline","repo_url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"continuous-control","task_name":"Continuous Control"},{"task_slug":"imitation-learning","task_name":"Imitation Learning"},{"task_slug":"continuous-control","task_name":"continuous-control"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.17477","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.17477"}},"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/secury/optidice","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/HansenHua/OLLIEoffline-to-online-imitation-learning","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning","reach":null}],"summary":{"ran":6,"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":4,"repositories":1},"found_in_text":{"samples":6,"ran":2,"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":13,"samples":[{"code_sha256_prefix":"60820261a045e8c6","entry":"FullyConnectedQFunction","repo":"hansenhua/ollie-offline-to-online-imitation-learning","repo_kind":"official","path":"offline_to_online.py","file_url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning/blob/HEAD/offline_to_online.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":"60820261a045e8c6"}},{"code_sha256_prefix":"90b115e018d31278","entry":"ReparameterizedTanhGaussian","repo":"hansenhua/ollie-offline-to-online-imitation-learning","repo_kind":"official","path":"offline_to_online.py","file_url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning/blob/HEAD/offline_to_online.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"90b115e018d31278"}},{"code_sha256_prefix":"edb756571764039b","entry":"ReplayBuffer","repo":"hansenhua/ollie-offline-to-online-imitation-learning","repo_kind":"official","path":"offline_to_online.py","file_url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning/blob/HEAD/offline_to_online.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":"edb756571764039b"}},{"code_sha256_prefix":"e4002bdf5440538b","entry":"TanhGaussianPolicy","repo":"hansenhua/ollie-offline-to-online-imitation-learning","repo_kind":"official","path":"offline_to_online.py","file_url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning/blob/HEAD/offline_to_online.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e4002bdf5440538b"}},{"code_sha256_prefix":"d19706eb97928131","entry":"dice_dataset","repo":"secury/optidice","repo_kind":"found_in_text","path":"util.py","file_url":"https://github.com/secury/optidice/blob/HEAD/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":"d19706eb97928131"}},{"code_sha256_prefix":"6047e3c9383e4164","entry":"generate_random_mdp","repo":"secury/optidice","repo_kind":"found_in_text","path":"mdp.py","file_url":"https://github.com/secury/optidice/blob/HEAD/mdp.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":"6047e3c9383e4164"}},{"code_sha256_prefix":"0a4fc95528324a12","entry":"OTOF","repo":"hansenhua/ollie-offline-to-online-imitation-learning","repo_kind":"official","path":"offline_to_online.py","file_url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning/blob/HEAD/offline_to_online.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0a4fc95528324a12"}},{"code_sha256_prefix":"c3ae101599b97fa4","entry":"Trainer","repo":"hansenhua/ollie-offline-to-online-imitation-learning","repo_kind":"official","path":"offline_to_online.py","file_url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning/blob/HEAD/offline_to_online.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c3ae101599b97fa4"}},{"code_sha256_prefix":"3b81875ee24223a6","entry":"boolean","repo":"secury/optidice","repo_kind":"found_in_text","path":"default_config.py","file_url":"https://github.com/secury/optidice/blob/HEAD/default_config.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3b81875ee24223a6"}},{"code_sha256_prefix":"5c12e4fde6f862c0","entry":"init_module_weights","repo":"hansenhua/ollie-offline-to-online-imitation-learning","repo_kind":"official","path":"offline_to_online.py","file_url":"https://github.com/hansenhua/ollie-offline-to-online-imitation-learning/blob/HEAD/offline_to_online.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5c12e4fde6f862c0"}},{"code_sha256_prefix":"4a2bd7bd68b877ce","entry":"move","repo":"secury/optidice","repo_kind":"found_in_text","path":"example_fourrooms.py","file_url":"https://github.com/secury/optidice/blob/HEAD/example_fourrooms.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a2bd7bd68b877ce"}},{"code_sha256_prefix":"f9ceec323249d2b9","entry":"policy_evaluation","repo":"secury/optidice","repo_kind":"found_in_text","path":"mdp.py","file_url":"https://github.com/secury/optidice/blob/HEAD/mdp.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f9ceec323249d2b9"}},{"code_sha256_prefix":"a85083311a121189","entry":"solve_MDP","repo":"secury/optidice","repo_kind":"found_in_text","path":"mdp.py","file_url":"https://github.com/secury/optidice/blob/HEAD/mdp.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a85083311a121189"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}