{"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/belief-enriched-pessimistic-q-learning","title":"Belief-Enriched Pessimistic Q-Learning against Adversarial State Perturbations","arxiv_id":"2403.04050","date":"2024-03-06","proceeding":null,"authors":["Xiaolin Sun","Zizhan Zheng"],"abstract":"Reinforcement learning (RL) has achieved phenomenal success in various domains. However, its data-driven nature also introduces new vulnerabilities that can be exploited by malicious opponents. Recent work shows that a well-trained RL agent can be easily manipulated by strategically perturbing its state observations at the test stage. Existing solutions either introduce a regularization term to improve the smoothness of the trained policy against perturbations or alternatively train the agent's policy and the attacker's policy. However, the former does not provide sufficient protection against strong attacks, while the latter is computationally prohibitive for large environments. In this work, we propose a new robust RL algorithm for deriving a pessimistic policy to safeguard against an agent's uncertainty about true states. This approach is further enhanced with belief state inference and diffusion-based state purification to reduce uncertainty. Empirical results show that our approach obtains superb performance under strong attacks and has a comparable training overhead with regularization-based methods. Our code is available at https://github.com/SliencerX/Belief-enriched-robust-Q-learning.","url_abs":"https://arxiv.org/abs/2403.04050v1","url_pdf":"https://arxiv.org/pdf/2403.04050v1.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":"belief-enriched-pessimistic-q-learning","repo_url":"https://github.com/sliencerx/belief-enriched-robust-q-learning","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"q-learning","task_name":"Q-Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.04050","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.04050"}},"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/SliencerX/Belief-enriched-robust-Q-learning","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/sliencerx/belief-enriched-robust-q-learning","reach":{"status":"ok"}}],"summary":{"ran":10,"ran_draft_wrong":2,"ran_violates":1,"ran_fixture":1,"unverified":10},"by_repo_kind":{"official":{"samples":24,"ran":14,"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":24,"samples":[{"code_sha256_prefix":"69017b3a991e0815","entry":"activation_bound","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"models_wocar.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/models_wocar.py","link_basis":"harvester_set","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":"69017b3a991e0815"}},{"code_sha256_prefix":"62000ff4e804fe8d","entry":"argparser","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"argparser.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/argparser.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":"62000ff4e804fe8d"}},{"code_sha256_prefix":"d8851346794d5b25","entry":"conv","repo":"sliencerx/belief-enriched-robust-q-learning","repo_kind":"official","path":"pfrnns/model.py","file_url":"https://github.com/sliencerx/belief-enriched-robust-q-learning/blob/HEAD/pfrnns/model.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d8851346794d5b25"}},{"code_sha256_prefix":"73c8d2526f595b71","entry":"conv2d","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"diffusion_distiller/unet_ddpm.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/diffusion_distiller/unet_ddpm.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":"73c8d2526f595b71"}},{"code_sha256_prefix":"85a898709da49405","entry":"fgsm","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"attacks.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/attacks.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"85a898709da49405"}},{"code_sha256_prefix":"2f8e524a282482b9","entry":"isfloat","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"argparser.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/argparser.py","link_basis":"plan_row","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2f8e524a282482b9"}},{"code_sha256_prefix":"10119e52ad9b6cf6","entry":"isint","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"argparser.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/argparser.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":"10119e52ad9b6cf6"}},{"code_sha256_prefix":"b9aebc971fbddb2e","entry":"linear","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"diffusion_distiller/unet_ddpm.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/diffusion_distiller/unet_ddpm.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":"b9aebc971fbddb2e"}},{"code_sha256_prefix":"c0731c6888d80b74","entry":"normalize_batch","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"atari_utils.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/atari_utils.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":"c0731c6888d80b74"}},{"code_sha256_prefix":"b04a1a19e73c0ebb","entry":"pgd","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"attacks.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/attacks.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":"b04a1a19e73c0ebb"}},{"code_sha256_prefix":"3785859a782d59c1","entry":"process_frame","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"atari_utils.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/atari_utils.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":"3785859a782d59c1"}},{"code_sha256_prefix":"660f559cc77eb623","entry":"random_belief","repo":"sliencerx/belief-enriched-robust-q-learning","repo_kind":"official","path":"test_atari.py","file_url":"https://github.com/sliencerx/belief-enriched-robust-q-learning/blob/HEAD/test_atari.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"660f559cc77eb623"}},{"code_sha256_prefix":"264892ef469646de","entry":"variance_scaling_init_","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"diffusion_distiller/unet_ddpm.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/diffusion_distiller/unet_ddpm.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":"264892ef469646de"}},{"code_sha256_prefix":"eba320329ae9cb63","entry":"weighted_bound","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"models_wocar.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/models_wocar.py","link_basis":"harvester_set","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":"eba320329ae9cb63"}},{"code_sha256_prefix":"ceb412b14159f122","entry":"Belief_model","repo":"sliencerx/belief-enriched-robust-q-learning","repo_kind":"official","path":"pfrnns/model.py","file_url":"https://github.com/sliencerx/belief-enriched-robust-q-learning/blob/HEAD/pfrnns/model.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":"ceb412b14159f122"}},{"code_sha256_prefix":"8874fd053928cefe","entry":"add_noise","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"data_utils.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/data_utils.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":"8874fd053928cefe"}},{"code_sha256_prefix":"7c9f13bc7ba9c460","entry":"add_noise_gauss","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"data_utils.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/data_utils.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":"7c9f13bc7ba9c460"}},{"code_sha256_prefix":"acb3ad120884bed7","entry":"atari_env","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"atari_utils.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/atari_utils.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":"acb3ad120884bed7"}},{"code_sha256_prefix":"80057eea63e12ab2","entry":"gen_traj","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"data_utils.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/data_utils.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":"80057eea63e12ab2"}},{"code_sha256_prefix":"32cc364b718bc705","entry":"worker_add","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"async_rb.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/async_rb.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":"32cc364b718bc705"}},{"code_sha256_prefix":"6c52378bcd295e24","entry":"worker_add_belief","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"async_rb.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/async_rb.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":"6c52378bcd295e24"}},{"code_sha256_prefix":"7593b9941ac42115","entry":"worker_sample","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"async_rb.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/async_rb.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":"7593b9941ac42115"}},{"code_sha256_prefix":"006b972124ee4c79","entry":"worker_seed","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"async_env.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/async_env.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":"006b972124ee4c79"}},{"code_sha256_prefix":"23a2244f0a9ef7fd","entry":"worker_step","repo":"SliencerX/Belief-enriched-robust-Q-learning","repo_kind":"official","path":"async_env.py","file_url":"https://github.com/SliencerX/Belief-enriched-robust-Q-learning/blob/HEAD/async_env.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":"23a2244f0a9ef7fd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}