{"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/video-prediction-models-as-rewards-for","title":"Video Prediction Models as Rewards for Reinforcement Learning","arxiv_id":"2305.14343","date":"2023-05-23","proceeding":"NeurIPS 2023 11","authors":[],"abstract":"Specifying reward signals that allow agents to learn complex behaviors is a long-standing challenge in reinforcement learning. A promising approach is to extract preferences for behaviors from unlabeled videos, which are widely available on the internet. We present Video Prediction Rewards (VIPER), an algorithm that leverages pretrained video prediction models as action-free reward signals for reinforcement learning. Specifically, we first train an autoregressive transformer on expert videos and then use the video prediction likelihoods as reward signals for a reinforcement learning agent. VIPER enables expert-level control without programmatic task rewards across a wide range of DMC, Atari, and RLBench tasks. Moreover, generalization of the video prediction model allows us to derive rewards for an out-of-distribution environment where no expert data is available, enabling cross-embodiment generalization for tabletop manipulation. We see our work as starting point for scalable reward specification from unlabeled videos that will benefit from the rapid advances in generative modeling. Source code and datasets are available on the project website: https://escontrela.me/viper","url_abs":"https://arxiv.org/abs/2305.14343v2","url_pdf":"https://arxiv.org/pdf/2305.14343v2.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":"video-prediction-models-as-rewards-for","repo_url":"https://github.com/Alescontrela/viper_rl","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"video-prediction-models-as-rewards-for","repo_url":"https://github.com/alescontrela/viper","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"video-prediction-models-as-rewards-for","repo_url":"https://github.com/nyuolab/VIPER-torch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"prediction","task_name":"Prediction"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"video-prediction","task_name":"Video Prediction"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2305.14343","atlas_url":"https://app.syntology.ai/?focus=2305.14343","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.14343"}},"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/alescontrela/viper","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nyuolab/VIPER-torch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Alescontrela/viper_rl","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":8,"ran_honours":2,"ran_draft_wrong":1,"unverified":4},"by_repo_kind":{"listed":{"samples":14,"ran":10,"repositories":2}},"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":1,"samples":[{"code_sha256_prefix":"24fe13b4f847da6b","entry":"cast_to_compute","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/dreamerv3/jaxutils.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/dreamerv3/jaxutils.py","link_basis":"harvester_set","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":"24fe13b4f847da6b"}},{"code_sha256_prefix":"b7ff9ef9697d35f1","entry":"count_steps","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"b7ff9ef9697d35f1"}},{"code_sha256_prefix":"688edacb9a7e28a4","entry":"extract_iteration","repo":"nyuolab/VIPER-torch","repo_kind":"listed","path":"scripts/train_vqgan.py","file_url":"https://github.com/nyuolab/VIPER-torch/blob/HEAD/scripts/train_vqgan.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"688edacb9a7e28a4"}},{"code_sha256_prefix":"f22419e1c6850259","entry":"gelu2","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/videogpt/models/transformer.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/videogpt/models/transformer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f22419e1c6850259"}},{"code_sha256_prefix":"3420673d38aa9a45","entry":"load_npz","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/videogpt/data.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/videogpt/data.py","link_basis":"harvester_set","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":"3420673d38aa9a45"}},{"code_sha256_prefix":"9482258884b8a214","entry":"minibatch_stddev_layer","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/videogpt/models/stylegan_disc.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/videogpt/models/stylegan_disc.py","link_basis":"harvester_set","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":"9482258884b8a214"}},{"code_sha256_prefix":"d189db7683bb8237","entry":"prepare","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/videogpt/data.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/videogpt/data.py","link_basis":"harvester_set","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":"d189db7683bb8237"}},{"code_sha256_prefix":"5f596558510431da","entry":"pure","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/dreamerv3/ninjax.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/dreamerv3/ninjax.py","link_basis":"harvester_set","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":"5f596558510431da"}},{"code_sha256_prefix":"e5b1910ea05891b1","entry":"subsample","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/dreamerv3/jaxutils.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/dreamerv3/jaxutils.py","link_basis":"harvester_set","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":"e5b1910ea05891b1"}},{"code_sha256_prefix":"67c6d2355562342f","entry":"tensorstats","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/dreamerv3/jaxutils.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/dreamerv3/jaxutils.py","link_basis":"harvester_set","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":"67c6d2355562342f"}},{"code_sha256_prefix":"1afd8c944e46c401","entry":"train_step","repo":"nyuolab/VIPER-torch","repo_kind":"listed","path":"scripts/train_vqgan.py","file_url":"https://github.com/nyuolab/VIPER-torch/blob/HEAD/scripts/train_vqgan.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1afd8c944e46c401"}},{"code_sha256_prefix":"03dd934385b4d240","entry":"get_act","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/dreamerv3/nets.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/dreamerv3/nets.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":"03dd934385b4d240"}},{"code_sha256_prefix":"afd5fe78d3d65a81","entry":"grad","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/dreamerv3/ninjax.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/dreamerv3/ninjax.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":"afd5fe78d3d65a81"}},{"code_sha256_prefix":"a03f3f2133e3fcee","entry":"rng","repo":"Alescontrela/viper_rl","repo_kind":"listed","path":"viper_rl/dreamerv3/ninjax.py","file_url":"https://github.com/Alescontrela/viper_rl/blob/HEAD/viper_rl/dreamerv3/ninjax.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":"a03f3f2133e3fcee"}},{"code_sha256_prefix":"ecce8632ff15a248","entry":"train_step","repo":"nyuolab/VIPER-torch","repo_kind":"listed","path":"scripts/train_videogpt.py","file_url":"https://github.com/nyuolab/VIPER-torch/blob/HEAD/scripts/train_videogpt.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":"ecce8632ff15a248"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}