{"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/improving-token-based-world-models-with","title":"Improving Token-Based World Models with Parallel Observation Prediction","arxiv_id":"2402.05643","date":"2024-02-08","proceeding":null,"authors":["Lior Cohen","Kaixin Wang","Bingyi Kang","Shie Mannor"],"abstract":"Motivated by the success of Transformers when applied to sequences of discrete symbols, token-based world models (TBWMs) were recently proposed as sample-efficient methods. In TBWMs, the world model consumes agent experience as a language-like sequence of tokens, where each observation constitutes a sub-sequence. However, during imagination, the sequential token-by-token generation of next observations results in a severe bottleneck, leading to long training times, poor GPU utilization, and limited representations. To resolve this bottleneck, we devise a novel Parallel Observation Prediction (POP) mechanism. POP augments a Retentive Network (RetNet) with a novel forward mode tailored to our reinforcement learning setting. We incorporate POP in a novel TBWM agent named REM (Retentive Environment Model), showcasing a 15.4x faster imagination compared to prior TBWMs. REM attains superhuman performance on 12 out of 26 games of the Atari 100K benchmark, while training in less than 12 hours. Our code is available at \\url{https://github.com/leor-c/REM}.","url_abs":"https://arxiv.org/abs/2402.05643v5","url_pdf":"https://arxiv.org/pdf/2402.05643v5.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":"improving-token-based-world-models-with","repo_url":"https://github.com/leor-c/rem","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"GPL-3.0"}}],"tasks":[{"task_slug":null,"task_name":"GPU"},{"task_slug":"prediction","task_name":"Prediction"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dqn","method_name":"DQN"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"q-learning","method_name":"Q-Learning"},{"method_slug":"rem","method_name":"REM"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2402.05643","atlas_url":"https://app.syntology.ai/?focus=2402.05643","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.05643"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/leor-c/rem","reach":{"status":"ok","spdx":"GPL-3.0"}}],"summary":{"ran":7,"unverified":2},"by_repo_kind":{"official":{"samples":9,"ran":7,"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":"1df223f536480c3e","entry":"compute_lambda_returns","repo":"leor-c/rem","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"1df223f536480c3e"}},{"code_sha256_prefix":"72d867b022cd4358","entry":"extract_state_dict","repo":"leor-c/rem","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"72d867b022cd4358"}},{"code_sha256_prefix":"0004f875db350c4a","entry":"generate_reconstructions_with_tokenizer","repo":"leor-c/rem","repo_kind":"official","path":"src/make_reconstructions.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/src/make_reconstructions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"0004f875db350c4a"}},{"code_sha256_prefix":"08180d560581f597","entry":"load_json_scores","repo":"leor-c/rem","repo_kind":"official","path":"results/results.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/results/results.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"08180d560581f597"}},{"code_sha256_prefix":"1ce787baaa0d05ee","entry":"reconstruct_through_tokenizer","repo":"leor-c/rem","repo_kind":"official","path":"src/make_reconstructions.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/src/make_reconstructions.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"1ce787baaa0d05ee"}},{"code_sha256_prefix":"e2b0e923581cf3f5","entry":"score_normalization","repo":"leor-c/rem","repo_kind":"official","path":"results/results.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/results/results.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"e2b0e923581cf3f5"}},{"code_sha256_prefix":"9c2849252ed2f23d","entry":"tensor_to_np_frames","repo":"leor-c/rem","repo_kind":"official","path":"src/make_reconstructions.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/src/make_reconstructions.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"9c2849252ed2f23d"}},{"code_sha256_prefix":"ff6a9322b949853b","entry":"configure_optimizer","repo":"leor-c/rem","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"ff6a9322b949853b"}},{"code_sha256_prefix":"148d1a3e4581ed2a","entry":"convert_to_matrix","repo":"leor-c/rem","repo_kind":"official","path":"results/results.py","file_url":"https://github.com/leor-c/rem/blob/HEAD/results/results.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"148d1a3e4581ed2a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}