{"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/learning-temporally-consistent-1","title":"Learning Temporally-Consistent Representations for Data-Efficient Reinforcement Learning","arxiv_id":"2110.04935","date":"2021-10-11","proceeding":null,"authors":["Trevor McInroe","Lukas Schäfer","Stefano V. Albrecht"],"abstract":"Deep reinforcement learning (RL) agents that exist in high-dimensional state spaces, such as those composed of images, have interconnected learning burdens. Agents must learn an action-selection policy that completes their given task, which requires them to learn a representation of the state space that discerns between useful and useless information. The reward function is the only supervised feedback that RL agents receive, which causes a representation learning bottleneck that can manifest in poor sample efficiency. We present $k$-Step Latent (KSL), a new representation learning method that enforces temporal consistency of representations via a self-supervised auxiliary task wherein agents learn to recurrently predict action-conditioned representations of the state space. The state encoder learned by KSL produces low-dimensional representations that make optimization of the RL task more sample efficient. Altogether, KSL produces state-of-the-art results in both data efficiency and asymptotic performance in the popular PlaNet benchmark suite. Our analyses show that KSL produces encoders that generalize better to new tasks unseen during training, and its representations are more strongly tied to reward, are more invariant to perturbations in the state space, and move more smoothly through the temporal axis of the RL problem than other methods such as DrQ, RAD, CURL, and SAC-AE.","url_abs":"https://arxiv.org/abs/2110.04935v1","url_pdf":"https://arxiv.org/pdf/2110.04935v1.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":"learning-temporally-consistent-1","repo_url":"https://github.com/anon-researcher-repo/ksl","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"learning-temporally-consistent-1","repo_url":"https://github.com/uoe-agents/ksl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"deep-reinforcement-learning","task_name":"Deep Reinforcement Learning"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2110.04935","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2110.04935"}},"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/uoe-agents/ksl","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/anon-researcher-repo/ksl","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":2,"ran_draft_wrong":2,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":6,"ran":5,"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":"31e6960f8b942b0d","entry":"center_crop_image","repo":"anon-researcher-repo/ksl","repo_kind":"official","path":"ksl/utils.py","file_url":"https://github.com/anon-researcher-repo/ksl/blob/HEAD/ksl/utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"31e6960f8b942b0d"}},{"code_sha256_prefix":"00cae89471470576","entry":"loss_fn","repo":"anon-researcher-repo/ksl","repo_kind":"official","path":"ksl/ksl.py","file_url":"https://github.com/anon-researcher-repo/ksl/blob/HEAD/ksl/ksl.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"00cae89471470576"}},{"code_sha256_prefix":"bdef24507a4ccfa7","entry":"mlp","repo":"anon-researcher-repo/ksl","repo_kind":"official","path":"ksl/utils.py","file_url":"https://github.com/anon-researcher-repo/ksl/blob/HEAD/ksl/utils.py","link_basis":"harvester_set","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":"bdef24507a4ccfa7"}},{"code_sha256_prefix":"77241bfa75e23abd","entry":"random_translate","repo":"anon-researcher-repo/ksl","repo_kind":"official","path":"ksl/replay_buffer.py","file_url":"https://github.com/anon-researcher-repo/ksl/blob/HEAD/ksl/replay_buffer.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"77241bfa75e23abd"}},{"code_sha256_prefix":"6ee8c9901ab984a9","entry":"to_np","repo":"anon-researcher-repo/ksl","repo_kind":"official","path":"ksl/utils.py","file_url":"https://github.com/anon-researcher-repo/ksl/blob/HEAD/ksl/utils.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ee8c9901ab984a9"}},{"code_sha256_prefix":"0102ca5f42b3d967","entry":"random_crop","repo":"anon-researcher-repo/ksl","repo_kind":"official","path":"ksl/replay_buffer.py","file_url":"https://github.com/anon-researcher-repo/ksl/blob/HEAD/ksl/replay_buffer.py","link_basis":"harvester_set","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":"0102ca5f42b3d967"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}