{"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/compositional-reinforcement-learning-from","title":"Compositional Reinforcement Learning from Logical Specifications","arxiv_id":"2106.13906","date":"2021-06-25","proceeding":"NeurIPS 2021 12","authors":["Kishor Jothimurugan","Suguman Bansal","Osbert Bastani","Rajeev Alur"],"abstract":"We study the problem of learning control policies for complex tasks given by logical specifications. Recent approaches automatically generate a reward function from a given specification and use a suitable reinforcement learning algorithm to learn a policy that maximizes the expected reward. These approaches, however, scale poorly to complex tasks that require high-level planning. In this work, we develop a compositional learning approach, called DiRL, that interleaves high-level planning and reinforcement learning. First, DiRL encodes the specification as an abstract graph; intuitively, vertices and edges of the graph correspond to regions of the state space and simpler sub-tasks, respectively. Our approach then incorporates reinforcement learning to learn neural network policies for each edge (sub-task) within a Dijkstra-style planning algorithm to compute a high-level plan in the graph. An evaluation of the proposed approach on a set of challenging control benchmarks with continuous state and action spaces demonstrates that it outperforms state-of-the-art baselines.","url_abs":"https://arxiv.org/abs/2106.13906v3","url_pdf":"https://arxiv.org/pdf/2106.13906v3.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":"compositional-reinforcement-learning-from","repo_url":"https://github.com/keyshor/dirl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"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":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.13906","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.13906"}},"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/keyshor/dirl","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":7},"by_repo_kind":{"official":{"samples":7,"ran":0,"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":"fb56f489a25ca0d5","entry":"find_state_depths","repo":"keyshor/dirl","repo_kind":"official","path":"spectrl/main/monitor.py","file_url":"https://github.com/keyshor/dirl/blob/HEAD/spectrl/main/monitor.py","link_basis":"first_harvest_node","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":"fb56f489a25ca0d5"}},{"code_sha256_prefix":"627cc4910ecf3261","entry":"land","repo":"keyshor/dirl","repo_kind":"official","path":"spectrl/main/spec_compiler.py","file_url":"https://github.com/keyshor/dirl/blob/HEAD/spectrl/main/spec_compiler.py","link_basis":"first_harvest_node","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":"627cc4910ecf3261"}},{"code_sha256_prefix":"eb381301cd736306","entry":"lor","repo":"keyshor/dirl","repo_kind":"official","path":"spectrl/main/spec_compiler.py","file_url":"https://github.com/keyshor/dirl/blob/HEAD/spectrl/main/spec_compiler.py","link_basis":"first_harvest_node","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":"eb381301cd736306"}},{"code_sha256_prefix":"8cf19b22faba51e3","entry":"monitor_predicate","repo":"keyshor/dirl","repo_kind":"official","path":"spectrl/main/compiler_utility.py","file_url":"https://github.com/keyshor/dirl/blob/HEAD/spectrl/main/compiler_utility.py","link_basis":"first_harvest_node","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":"8cf19b22faba51e3"}},{"code_sha256_prefix":"5149120adece76e7","entry":"project_predicate","repo":"keyshor/dirl","repo_kind":"official","path":"spectrl/main/compiler_utility.py","file_url":"https://github.com/keyshor/dirl/blob/HEAD/spectrl/main/compiler_utility.py","link_basis":"first_harvest_node","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":"5149120adece76e7"}},{"code_sha256_prefix":"a292bfd30b8a48d3","entry":"true_pred","repo":"keyshor/dirl","repo_kind":"official","path":"spectrl/hierarchy/construction.py","file_url":"https://github.com/keyshor/dirl/blob/HEAD/spectrl/hierarchy/construction.py","link_basis":"first_harvest_node","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":"a292bfd30b8a48d3"}},{"code_sha256_prefix":"2141f5a0194b031d","entry":"true_predicate","repo":"keyshor/dirl","repo_kind":"official","path":"spectrl/main/compiler_utility.py","file_url":"https://github.com/keyshor/dirl/blob/HEAD/spectrl/main/compiler_utility.py","link_basis":"first_harvest_node","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":"2141f5a0194b031d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}