{"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/fine-grained-causal-dynamics-learning-with","title":"Fine-Grained Causal Dynamics Learning with Quantization for Improving Robustness in Reinforcement Learning","arxiv_id":"2406.03234","date":"2024-06-05","proceeding":null,"authors":["Inwoo Hwang","Yunhyeok Kwak","Suhyung Choi","Byoung-Tak Zhang","Sanghack Lee"],"abstract":"Causal dynamics learning has recently emerged as a promising approach to enhancing robustness in reinforcement learning (RL). Typically, the goal is to build a dynamics model that makes predictions based on the causal relationships among the entities. Despite the fact that causal connections often manifest only under certain contexts, existing approaches overlook such fine-grained relationships and lack a detailed understanding of the dynamics. In this work, we propose a novel dynamics model that infers fine-grained causal structures and employs them for prediction, leading to improved robustness in RL. The key idea is to jointly learn the dynamics model with a discrete latent variable that quantizes the state-action space into subgroups. This leads to recognizing meaningful context that displays sparse dependencies, where causal structures are learned for each subgroup throughout the training. Experimental results demonstrate the robustness of our method to unseen states and locally spurious correlations in downstream tasks where fine-grained causal reasoning is crucial. We further illustrate the effectiveness of our subgroup-based approach with quantization in discovering fine-grained causal relationships compared to prior methods.","url_abs":"https://arxiv.org/abs/2406.03234v1","url_pdf":"https://arxiv.org/pdf/2406.03234v1.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":"fine-grained-causal-dynamics-learning-with","repo_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.03234","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.03234"}},"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/iwhwang/Fine-Grained-Causal-RL","reach":null}],"summary":{"ran":2,"ran_draft_wrong":4,"unverified":5},"by_repo_kind":{"official":{"samples":11,"ran":6,"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":"01a299feb3afceea","entry":"NearestEmbed","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"01a299feb3afceea"}},{"code_sha256_prefix":"ecb0e7b0c5200bbb","entry":"NearestEmbedEMA","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"ecb0e7b0c5200bbb"}},{"code_sha256_prefix":"e068bd1d96a5dfbb","entry":"gumbel_sigmoid_batch","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"e068bd1d96a5dfbb"}},{"code_sha256_prefix":"34f0bd8890d57785","entry":"nearest_embed","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"34f0bd8890d57785"}},{"code_sha256_prefix":"5d1698fd8ac701df","entry":"sample_logistic","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"5d1698fd8ac701df"}},{"code_sha256_prefix":"e8a1a77da0a39f61","entry":"to_numpy","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"e8a1a77da0a39f61"}},{"code_sha256_prefix":"f1fd3b6a5e8c1295","entry":"Inference","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"f1fd3b6a5e8c1295"}},{"code_sha256_prefix":"3830e846ed12b85e","entry":"InferenceOursBase","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"3830e846ed12b85e"}},{"code_sha256_prefix":"f55aad2046e48425","entry":"NearestEmbedFunc","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"f55aad2046e48425"}},{"code_sha256_prefix":"a845f759481f9c69","entry":"VQVAEGumbelMatrixLatent","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"a845f759481f9c69"}},{"code_sha256_prefix":"9ffd4319295052f4","entry":"kaiming_init","repo":"iwhwang/Fine-Grained-Causal-RL","repo_kind":"official","path":"fcdl/model/inference_ours_base.py","file_url":"https://github.com/iwhwang/Fine-Grained-Causal-RL/blob/HEAD/fcdl/model/inference_ours_base.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":"9ffd4319295052f4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}