{"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-policy-learning-in-stochastic-1","title":"Compositional Policy Learning in Stochastic Control Systems with Formal Guarantees","arxiv_id":"2312.01456","date":"2023-12-03","proceeding":"NeurIPS 2023 11","authors":["Đorđe Žikelić","Mathias Lechner","Abhinav Verma","Krishnendu Chatterjee","Thomas A. Henzinger"],"abstract":"Reinforcement learning has shown promising results in learning neural network policies for complicated control tasks. However, the lack of formal guarantees about the behavior of such policies remains an impediment to their deployment. We propose a novel method for learning a composition of neural network policies in stochastic environments, along with a formal certificate which guarantees that a specification over the policy's behavior is satisfied with the desired probability. Unlike prior work on verifiable RL, our approach leverages the compositional nature of logical specifications provided in SpectRL, to learn over graphs of probabilistic reach-avoid specifications. The formal guarantees are provided by learning neural network policies together with reach-avoid supermartingales (RASM) for the graph's sub-tasks and then composing them into a global policy. We also derive a tighter lower bound compared to previous work on the probability of reach-avoidance implied by a RASM, which is required to find a compositional policy with an acceptable probabilistic threshold for complex tasks with multiple edge policies. We implement a prototype of our approach and evaluate it on a Stochastic Nine Rooms environment.","url_abs":"https://arxiv.org/abs/2312.01456v1","url_pdf":"https://arxiv.org/pdf/2312.01456v1.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-policy-learning-in-stochastic-1","repo_url":"https://github.com/mlech26l/neural_martingales","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2312.01456","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.01456"}},"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/mlech26l/neural_martingales","reach":null}],"summary":{"ran":5,"ran_draft_wrong":5,"ran_honours":2,"unverified":6},"by_repo_kind":{"official":{"samples":18,"ran":12,"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":"f1e4fbbcfa50bc57","entry":"Dense","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f1e4fbbcfa50bc57"}},{"code_sha256_prefix":"e6f27ce0cd0ccd68","entry":"ExperienceBuffer","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e6f27ce0cd0ccd68"}},{"code_sha256_prefix":"b1fe18dc127c4fd5","entry":"IBPMLP","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b1fe18dc127c4fd5"}},{"code_sha256_prefix":"d6c0ab2b08001e11","entry":"MLP","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d6c0ab2b08001e11"}},{"code_sha256_prefix":"8da6d9f473137584","entry":"PPO","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8da6d9f473137584"}},{"code_sha256_prefix":"c7c3d01d90cd968f","entry":"create_train_state","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c7c3d01d90cd968f"}},{"code_sha256_prefix":"36774259cd87b905","entry":"jax_load","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"36774259cd87b905"}},{"code_sha256_prefix":"d0572d00a75060af","entry":"lipschitz_l1_jax","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d0572d00a75060af"}},{"code_sha256_prefix":"e0d8b0ab3120de38","entry":"martingale_loss","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e0d8b0ab3120de38"}},{"code_sha256_prefix":"5246cad8d478b520","entry":"pretty_time","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5246cad8d478b520"}},{"code_sha256_prefix":"98da6feb7127d25d","entry":"train_step_value","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"98da6feb7127d25d"}},{"code_sha256_prefix":"0ffe4d76721da7dc","entry":"triangular","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0ffe4d76721da7dc"}},{"code_sha256_prefix":"6599e51ec0488b6f","entry":"RSMLearner","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.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":"6599e51ec0488b6f"}},{"code_sha256_prefix":"9e14d50c7aebab23","entry":"clip_grad_norm","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.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":"9e14d50c7aebab23"}},{"code_sha256_prefix":"0744fbc00a5e00d8","entry":"gauss_log_prob","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.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":"0744fbc00a5e00d8"}},{"code_sha256_prefix":"5e6c9f2799afda75","entry":"jax_save","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.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":"5e6c9f2799afda75"}},{"code_sha256_prefix":"37e02abbd643e919","entry":"np_gauss_log_prob","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.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":"37e02abbd643e919"}},{"code_sha256_prefix":"80915e76d57c6c97","entry":"train_step_policy","repo":"mlech26l/neural_martingales","repo_kind":"official","path":"rsm_learner.py","file_url":"https://github.com/mlech26l/neural_martingales/blob/HEAD/rsm_learner.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":"80915e76d57c6c97"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}