{"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/compound-returns-reduce-variance-in","title":"Averaging $n$-step Returns Reduces Variance in Reinforcement Learning","arxiv_id":"2402.03903","date":"2024-02-06","proceeding":null,"authors":["Brett Daley","Martha White","Marlos C. Machado"],"abstract":"Multistep returns, such as $n$-step returns and $\\lambda$-returns, are commonly used to improve the sample efficiency of reinforcement learning (RL) methods. The variance of the multistep returns becomes the limiting factor in their length; looking too far into the future increases variance and reverses the benefits of multistep learning. In our work, we demonstrate the ability of compound returns -- weighted averages of $n$-step returns -- to reduce variance. We prove for the first time that any compound return with the same contraction modulus as a given $n$-step return has strictly lower variance. We additionally prove that this variance-reduction property improves the finite-sample complexity of temporal-difference learning under linear function approximation. Because general compound returns can be expensive to implement, we introduce two-bootstrap returns which reduce variance while remaining efficient, even when using minibatched experience replay. We conduct experiments showing that compound returns often increase the sample efficiency of $n$-step deep RL agents like DQN and PPO.","url_abs":"https://arxiv.org/abs/2402.03903v3","url_pdf":"https://arxiv.org/pdf/2402.03903v3.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":[],"tasks":[{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dqn","method_name":"DQN"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"entropy-regularization","method_name":"Entropy Regularization"},{"method_slug":"ppo","method_name":"PPO"},{"method_slug":"q-learning","method_name":"Q-Learning"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2402.03903","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.03903"}},"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/brett-daley/averaging-nstep-returns","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":4,"unverified":3},"by_repo_kind":{"found_in_text":{"samples":8,"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":"beb42d440ccf2925","entry":"layer_init","repo":"brett-daley/averaging-nstep-returns","repo_kind":"found_in_text","path":"run_ppo.py","file_url":"https://github.com/brett-daley/averaging-nstep-returns/blob/HEAD/run_ppo.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":"beb42d440ccf2925"}},{"code_sha256_prefix":"06ab2be7a18cea95","entry":"make_env","repo":"brett-daley/averaging-nstep-returns","repo_kind":"found_in_text","path":"run_ppo.py","file_url":"https://github.com/brett-daley/averaging-nstep-returns/blob/HEAD/run_ppo.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":"06ab2be7a18cea95"}},{"code_sha256_prefix":"363d1c954acd4477","entry":"parse_extra","repo":"brett-daley/averaging-nstep-returns","repo_kind":"found_in_text","path":"cmdline/parse.py","file_url":"https://github.com/brett-daley/averaging-nstep-returns/blob/HEAD/cmdline/parse.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":"363d1c954acd4477"}},{"code_sha256_prefix":"bde5baf8af452a92","entry":"parse_kwargs","repo":"brett-daley/averaging-nstep-returns","repo_kind":"found_in_text","path":"cmdline/parse.py","file_url":"https://github.com/brett-daley/averaging-nstep-returns/blob/HEAD/cmdline/parse.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":"bde5baf8af452a92"}},{"code_sha256_prefix":"2b0b94149a0318a6","entry":"try_cast","repo":"brett-daley/averaging-nstep-returns","repo_kind":"found_in_text","path":"cmdline/parse.py","file_url":"https://github.com/brett-daley/averaging-nstep-returns/blob/HEAD/cmdline/parse.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":"2b0b94149a0318a6"}},{"code_sha256_prefix":"5a2d82c50fce3111","entry":"insert_defaults","repo":"brett-daley/averaging-nstep-returns","repo_kind":"found_in_text","path":"cmdline/defaults.py","file_url":"https://github.com/brett-daley/averaging-nstep-returns/blob/HEAD/cmdline/defaults.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":"5a2d82c50fce3111"}},{"code_sha256_prefix":"8d4d29fcc36bc1b4","entry":"load_defaults","repo":"brett-daley/averaging-nstep-returns","repo_kind":"found_in_text","path":"cmdline/defaults.py","file_url":"https://github.com/brett-daley/averaging-nstep-returns/blob/HEAD/cmdline/defaults.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":"8d4d29fcc36bc1b4"}},{"code_sha256_prefix":"fb6ccdff5d66ce79","entry":"run","repo":"brett-daley/averaging-nstep-returns","repo_kind":"found_in_text","path":"run_ppo.py","file_url":"https://github.com/brett-daley/averaging-nstep-returns/blob/HEAD/run_ppo.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":"fb6ccdff5d66ce79"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}