{"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/safe-imitation-learning-via-fast-bayesian","title":"Safe Imitation Learning via Fast Bayesian Reward Inference from Preferences","arxiv_id":"2002.09089","date":"2020-02-21","proceeding":"ICML 2020 1","authors":["Daniel S. Brown","Russell Coleman","Ravi Srinivasan","Scott Niekum"],"abstract":"Bayesian reward learning from demonstrations enables rigorous safety and uncertainty analysis when performing imitation learning. However, Bayesian reward learning methods are typically computationally intractable for complex control problems. We propose Bayesian Reward Extrapolation (Bayesian REX), a highly efficient Bayesian reward learning algorithm that scales to high-dimensional imitation learning problems by pre-training a low-dimensional feature encoding via self-supervised tasks and then leveraging preferences over demonstrations to perform fast Bayesian inference. Bayesian REX can learn to play Atari games from demonstrations, without access to the game score and can generate 100,000 samples from the posterior over reward functions in only 5 minutes on a personal laptop. Bayesian REX also results in imitation learning performance that is competitive with or better than state-of-the-art methods that only learn point estimates of the reward function. Finally, Bayesian REX enables efficient high-confidence policy evaluation without having access to samples of the reward function. These high-confidence performance bounds can be used to rank the performance and risk of a variety of evaluation policies and provide a way to detect reward hacking behaviors.","url_abs":"https://arxiv.org/abs/2002.09089v4","url_pdf":"https://arxiv.org/pdf/2002.09089v4.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":"safe-imitation-learning-via-fast-bayesian","repo_url":"https://github.com/dsbrown1331/bayesianrex","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"tf","reach":null}],"tasks":[{"task_slug":"atari-games","task_name":"Atari Games"},{"task_slug":"bayesian-inference","task_name":"Bayesian Inference"},{"task_slug":"imitation-learning","task_name":"Imitation Learning"}],"methods":[{"method_slug":"bayesian-rex","method_name":"Bayesian REX"}],"datasets_introduced":[],"methods_introduced":[{"slug":"bayesian-rex","name":"Bayesian REX","full_name":"Bayesian Reward Extrapolation"}],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2002.09089","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2002.09089"}},"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/dsbrown1331/brex_","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/dsbrown1331/bayesianrex","reach":null}],"summary":{"ran_fixture":1,"ran_honours":1,"ran_draft_wrong":3,"unverified":5},"by_repo_kind":{"official":{"samples":8,"ran":4,"repositories":1},"community":{"samples":2,"ran":1,"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":"28c2d8ba6dfc0f57","entry":"calc_linearized_pairwise_ranking_loss","repo":"dsbrown1331/brex_gridworld_cpp","repo_kind":"community","path":"python/bayesianREX_basic.py","file_url":"https://github.com/dsbrown1331/brex_gridworld_cpp/blob/HEAD/python/bayesianREX_basic.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"28c2d8ba6dfc0f57"}},{"code_sha256_prefix":"596357f074d947e6","entry":"compute_l2","repo":"dsbrown1331/bayesianrex","repo_kind":"official","path":"code/LinearFeatureMCMC_auxiliary.py","file_url":"https://github.com/dsbrown1331/bayesianrex/blob/HEAD/code/LinearFeatureMCMC_auxiliary.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"596357f074d947e6"}},{"code_sha256_prefix":"d02b4c9f8709dee9","entry":"create_mcmc_likelihood_data","repo":"dsbrown1331/bayesianrex","repo_kind":"official","path":"code/LinearFeatureMCMC_auxiliary.py","file_url":"https://github.com/dsbrown1331/bayesianrex/blob/HEAD/code/LinearFeatureMCMC_auxiliary.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d02b4c9f8709dee9"}},{"code_sha256_prefix":"2c0910a0bc8022d0","entry":"create_training_data","repo":"dsbrown1331/bayesianrex","repo_kind":"official","path":"code/LearnAtariRewardLinear.py","file_url":"https://github.com/dsbrown1331/bayesianrex/blob/HEAD/code/LearnAtariRewardLinear.py","link_basis":"first_harvest_node","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":"2c0910a0bc8022d0"}},{"code_sha256_prefix":"cfe0f494b5c6542d","entry":"reconstruction_loss","repo":"dsbrown1331/bayesianrex","repo_kind":"official","path":"code/LearnAtariRewardLinear.py","file_url":"https://github.com/dsbrown1331/bayesianrex/blob/HEAD/code/LearnAtariRewardLinear.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cfe0f494b5c6542d"}},{"code_sha256_prefix":"58181c5e66390b8d","entry":"calc_linearized_pairwise_ranking_loss","repo":"dsbrown1331/bayesianrex","repo_kind":"official","path":"code/LinearFeatureMCMC_auxiliary.py","file_url":"https://github.com/dsbrown1331/bayesianrex/blob/HEAD/code/LinearFeatureMCMC_auxiliary.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":"58181c5e66390b8d"}},{"code_sha256_prefix":"b0e91e00b56dcd92","entry":"get_weight_vector","repo":"dsbrown1331/bayesianrex","repo_kind":"official","path":"code/LinearFeatureMCMC_auxiliary.py","file_url":"https://github.com/dsbrown1331/bayesianrex/blob/HEAD/code/LinearFeatureMCMC_auxiliary.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":"b0e91e00b56dcd92"}},{"code_sha256_prefix":"9f5cef830fea3e84","entry":"mcmc_map_search","repo":"dsbrown1331/brex_gridworld_cpp","repo_kind":"community","path":"python/bayesianREX_basic.py","file_url":"https://github.com/dsbrown1331/brex_gridworld_cpp/blob/HEAD/python/bayesianREX_basic.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":"9f5cef830fea3e84"}},{"code_sha256_prefix":"f3987c649d049ce3","entry":"mcmc_map_search","repo":"dsbrown1331/bayesianrex","repo_kind":"official","path":"code/LinearFeatureMCMC_auxiliary.py","file_url":"https://github.com/dsbrown1331/bayesianrex/blob/HEAD/code/LinearFeatureMCMC_auxiliary.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":"f3987c649d049ce3"}},{"code_sha256_prefix":"e18e2b6a06d313ad","entry":"write_weights_likelihood","repo":"dsbrown1331/bayesianrex","repo_kind":"official","path":"code/LinearFeatureMCMC_auxiliary.py","file_url":"https://github.com/dsbrown1331/bayesianrex/blob/HEAD/code/LinearFeatureMCMC_auxiliary.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":"e18e2b6a06d313ad"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}