{"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/bridging-state-and-history-representations","title":"Bridging State and History Representations: Understanding Self-Predictive RL","arxiv_id":"2401.08898","date":"2024-01-17","proceeding":null,"authors":["Tianwei Ni","Benjamin Eysenbach","Erfan Seyedsalehi","Michel Ma","Clement Gehring","Aditya Mahajan","Pierre-Luc Bacon"],"abstract":"Representations are at the core of all deep reinforcement learning (RL) methods for both Markov decision processes (MDPs) and partially observable Markov decision processes (POMDPs). Many representation learning methods and theoretical frameworks have been developed to understand what constitutes an effective representation. However, the relationships between these methods and the shared properties among them remain unclear. In this paper, we show that many of these seemingly distinct methods and frameworks for state and history abstractions are, in fact, based on a common idea of self-predictive abstraction. Furthermore, we provide theoretical insights into the widely adopted objectives and optimization, such as the stop-gradient technique, in learning self-predictive representations. These findings together yield a minimalist algorithm to learn self-predictive representations for states and histories. We validate our theories by applying our algorithm to standard MDPs, MDPs with distractors, and POMDPs with sparse rewards. These findings culminate in a set of preliminary guidelines for RL practitioners.","url_abs":"https://arxiv.org/abs/2401.08898v3","url_pdf":"https://arxiv.org/pdf/2401.08898v3.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":"bridging-state-and-history-representations","repo_url":"https://github.com/twni2016/self-predictive-rl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}}],"tasks":[{"task_slug":"deep-reinforcement-learning","task_name":"Deep Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.08898","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.08898"}},"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/twni2016/self-predictive-rl","reach":{"status":"ok"}}],"summary":{"ran":8,"unverified":1},"by_repo_kind":{"official":{"samples":9,"ran":8,"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":9,"samples":[{"code_sha256_prefix":"d32e3bf521a45cc9","entry":"apply_transition","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"linear_code/replearn/learn.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/linear_code/replearn/learn.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":"d32e3bf521a45cc9"}},{"code_sha256_prefix":"e96a22e24051892b","entry":"convert_int_to_onehot","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"minigrid_code/models.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/minigrid_code/models.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":"e96a22e24051892b"}},{"code_sha256_prefix":"86bdc9baa6659155","entry":"cosine_similarity","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"linear_code/experiments/plot.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/linear_code/experiments/plot.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":"86bdc9baa6659155"}},{"code_sha256_prefix":"d9cccd149ff01a53","entry":"create_latent_encoder","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"linear_code/replearn/learn.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/linear_code/replearn/learn.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":"d9cccd149ff01a53"}},{"code_sha256_prefix":"09f2ec0dd993bee2","entry":"profile","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"minigrid_code/logger.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/minigrid_code/logger.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":"09f2ec0dd993bee2"}},{"code_sha256_prefix":"8a7d4bf0997a2696","entry":"put_in_middle","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"minigrid_code/logger.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/minigrid_code/logger.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":"8a7d4bf0997a2696"}},{"code_sha256_prefix":"f5e9fc328ce0627b","entry":"sum_rewards","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"minigrid_code/r2d2replaybuffer.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/minigrid_code/r2d2replaybuffer.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":"f5e9fc328ce0627b"}},{"code_sha256_prefix":"65a4b775f50a747f","entry":"walk_through","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"minigrid_code/vis_tool.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/minigrid_code/vis_tool.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":"65a4b775f50a747f"}},{"code_sha256_prefix":"db5b40218f291550","entry":"train","repo":"twni2016/self-predictive-rl","repo_kind":"official","path":"linear_code/replearn/learn.py","file_url":"https://github.com/twni2016/self-predictive-rl/blob/HEAD/linear_code/replearn/learn.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":"db5b40218f291550"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}