{"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/do-bayesian-neural-networks-need-to-be-fully","title":"Do Bayesian Neural Networks Need To Be Fully Stochastic?","arxiv_id":"2211.06291","date":"2022-11-11","proceeding":null,"authors":["Mrinank Sharma","Sebastian Farquhar","Eric Nalisnick","Tom Rainforth"],"abstract":"We investigate the benefit of treating all the parameters in a Bayesian neural network stochastically and find compelling theoretical and empirical evidence that this standard construction may be unnecessary. To this end, we prove that expressive predictive distributions require only small amounts of stochasticity. In particular, partially stochastic networks with only $n$ stochastic biases are universal probabilistic predictors for $n$-dimensional predictive problems. In empirical investigations, we find no systematic benefit of full stochasticity across four different inference modalities and eight datasets; partially stochastic networks can match and sometimes even outperform fully stochastic networks, despite their reduced memory costs.","url_abs":"https://arxiv.org/abs/2211.06291v2","url_pdf":"https://arxiv.org/pdf/2211.06291v2.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":"do-bayesian-neural-networks-need-to-be-fully","repo_url":"https://github.com/MrinankSharma/do_bnns_need_to_be_fully_stochastic","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"do-bayesian-neural-networks-need-to-be-fully","repo_url":"https://github.com/lightning-uq-box/lightning-uq-box","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2211.06291","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2211.06291"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lightning-uq-box/lightning-uq-box","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/MrinankSharma/do_bnns_need_to_be_fully_stochastic","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"ran":0,"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":"2016192a8b36e38a","entry":"Conv2D","repo":"MrinankSharma/do_bnns_need_to_be_fully_stochastic","repo_kind":"official","path":"VI/baselines/cifar/partially_stochastic_models/partially_stochastic_variational_wide_resnet.py","file_url":"https://github.com/MrinankSharma/do_bnns_need_to_be_fully_stochastic/blob/HEAD/VI/baselines/cifar/partially_stochastic_models/partially_stochastic_variational_wide_resnet.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":"2016192a8b36e38a"}},{"code_sha256_prefix":"4767fde16748d4a5","entry":"deterministic_basic_block","repo":"MrinankSharma/do_bnns_need_to_be_fully_stochastic","repo_kind":"official","path":"VI/baselines/cifar/partially_stochastic_models/partially_stochastic_variational_wide_resnet.py","file_url":"https://github.com/MrinankSharma/do_bnns_need_to_be_fully_stochastic/blob/HEAD/VI/baselines/cifar/partially_stochastic_models/partially_stochastic_variational_wide_resnet.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":"4767fde16748d4a5"}},{"code_sha256_prefix":"2552b71ce2921337","entry":"get_nonlinearity_from_string","repo":"MrinankSharma/do_bnns_need_to_be_fully_stochastic","repo_kind":"official","path":"1D_Regression/src/models/bayesian_mlps.py","file_url":"https://github.com/MrinankSharma/do_bnns_need_to_be_fully_stochastic/blob/HEAD/1D_Regression/src/models/bayesian_mlps.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":"2552b71ce2921337"}},{"code_sha256_prefix":"9a8bcdd8ba2aa1f0","entry":"plot_kl_dict","repo":"MrinankSharma/do_bnns_need_to_be_fully_stochastic","repo_kind":"official","path":"1D_Regression/src/plotting/models.py","file_url":"https://github.com/MrinankSharma/do_bnns_need_to_be_fully_stochastic/blob/HEAD/1D_Regression/src/plotting/models.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":"9a8bcdd8ba2aa1f0"}},{"code_sha256_prefix":"40347cf519f666be","entry":"plot_mean","repo":"MrinankSharma/do_bnns_need_to_be_fully_stochastic","repo_kind":"official","path":"1D_Regression/src/plotting/one_d_regression.py","file_url":"https://github.com/MrinankSharma/do_bnns_need_to_be_fully_stochastic/blob/HEAD/1D_Regression/src/plotting/one_d_regression.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":"40347cf519f666be"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}