{"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/settling-the-bias-and-variance-of-meta","title":"A Theoretical Understanding of Gradient Bias in Meta-Reinforcement Learning","arxiv_id":"2112.15400","date":"2021-12-31","proceeding":null,"authors":["Xidong Feng","Bo Liu","Jie Ren","Luo Mai","Rui Zhu","Haifeng Zhang","Jun Wang","Yaodong Yang"],"abstract":"Gradient-based Meta-RL (GMRL) refers to methods that maintain two-level optimisation procedures wherein the outer-loop meta-learner guides the inner-loop gradient-based reinforcement learner to achieve fast adaptations. In this paper, we develop a unified framework that describes variations of GMRL algorithms and points out that existing stochastic meta-gradient estimators adopted by GMRL are actually \\textbf{biased}. Such meta-gradient bias comes from two sources: 1) the compositional bias incurred by the two-level problem structure, which has an upper bound of $\\mathcal{O}\\big(K\\alpha^{K}\\hat{\\sigma}_{\\text{In}}|\\tau|^{-0.5}\\big)$ \\emph{w.r.t.} inner-loop update step $K$, learning rate $\\alpha$, estimate variance $\\hat{\\sigma}^{2}_{\\text{In}}$ and sample size $|\\tau|$, and 2) the multi-step Hessian estimation bias $\\hat{\\Delta}_{H}$ due to the use of autodiff, which has a polynomial impact $\\mathcal{O}\\big((K-1)(\\hat{\\Delta}_{H})^{K-1}\\big)$ on the meta-gradient bias. We study tabular MDPs empirically and offer quantitative evidence that testifies our theoretical findings on existing stochastic meta-gradient estimators. Furthermore, we conduct experiments on Iterated Prisoner's Dilemma and Atari games to show how other methods such as off-policy learning and low-bias estimator can help fix the gradient bias for GMRL algorithms in general.","url_abs":"https://arxiv.org/abs/2112.15400v4","url_pdf":"https://arxiv.org/pdf/2112.15400v4.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":"settling-the-bias-and-variance-of-meta","repo_url":"https://github.com/Benjamin-eecs/Theoretical-GMRL","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"atari-games","task_name":"Atari Games"},{"task_slug":"meta-reinforcement-learning","task_name":"Meta Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"},{"task_slug":"transfer-learning","task_name":"Transfer Learning"},{"task_slug":"reinforcement-learning-2","task_name":"reinforcement-learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2112.15400","atlas_url":"https://app.syntology.ai/?focus=2112.15400","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2112.15400"}},"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":"deterministic:regex_extraction","url":"https://github.com/Benjamin-eecs/Theoretical-GMRL","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/alexis-jacq/LOLA_DiCE","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran_violates":1,"ran_honours":1},"by_repo_kind":{"official":{"samples":2,"ran":2,"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":1,"samples":[{"code_sha256_prefix":"2d97875446464dc6","entry":"magic_box","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"2d97875446464dc6"}},{"code_sha256_prefix":"1bfb38a7f9b8eda2","entry":"phi","repo":"Benjamin-eecs/Theoretical-GMRL","repo_kind":"official","path":"lola/lola_dice_original.py","file_url":"https://github.com/Benjamin-eecs/Theoretical-GMRL/blob/HEAD/lola/lola_dice_original.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1bfb38a7f9b8eda2"}},{"code_sha256_prefix":"a7b323241cd70612","entry":"safemean","repo":"Benjamin-eecs/Theoretical-GMRL","repo_kind":"official","path":"mgrl/main_meta_condition_kl.py","file_url":"https://github.com/Benjamin-eecs/Theoretical-GMRL/blob/HEAD/mgrl/main_meta_condition_kl.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":"a7b323241cd70612"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}