{"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/variance-networks-when-expectation-does-not","title":"Variance Networks: When Expectation Does Not Meet Your Expectations","arxiv_id":"1803.03764","date":"2018-03-10","proceeding":"ICLR 2019 5","authors":["Kirill Neklyudov","Dmitry Molchanov","Arsenii Ashukha","Dmitry Vetrov"],"abstract":"Ordinary stochastic neural networks mostly rely on the expected values of\ntheir weights to make predictions, whereas the induced noise is mostly used to\ncapture the uncertainty, prevent overfitting and slightly boost the performance\nthrough test-time averaging. In this paper, we introduce variance layers, a\ndifferent kind of stochastic layers. Each weight of a variance layer follows a\nzero-mean distribution and is only parameterized by its variance. We show that\nsuch layers can learn surprisingly well, can serve as an efficient exploration\ntool in reinforcement learning tasks and provide a decent defense against\nadversarial attacks. We also show that a number of conventional Bayesian neural\nnetworks naturally converge to such zero-mean posteriors. We observe that in\nthese cases such zero-mean parameterization leads to a much better training\nobjective than conventional parameterizations where the mean is being learned.","url_abs":"http://arxiv.org/abs/1803.03764v5","url_pdf":"http://arxiv.org/pdf/1803.03764v5.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":"variance-networks-when-expectation-does-not","repo_url":"https://github.com/da-molchanov/variance-networks","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"variance-networks-when-expectation-does-not","repo_url":"https://github.com/jondaa/CS236605FinalProject","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"efficient-exploration","task_name":"Efficient Exploration"},{"task_slug":"reinforcement-learning","task_name":"Reinforcement Learning"},{"task_slug":"reinforcement-learning-1","task_name":"Reinforcement Learning (RL)"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1803.03764","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1803.03764"}},"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/da-molchanov/variance-networks","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/jondaa/CS236605FinalProject","reach":{"status":"ok"}}],"summary":{"unverified":15},"by_repo_kind":{"official":{"samples":15,"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":"7af694ab54bce535","entry":"accuracy_tf","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/metrics.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7af694ab54bce535"}},{"code_sha256_prefix":"8553e59eb6f6feab","entry":"average_gradients","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/utils.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/utils.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8553e59eb6f6feab"}},{"code_sha256_prefix":"3345ba65ea3269ff","entry":"build_graph","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/utils.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3345ba65ea3269ff"}},{"code_sha256_prefix":"36332b7ff0ea3084","entry":"build_graph_stoch","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/utils.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"36332b7ff0ea3084"}},{"code_sha256_prefix":"42717521963e9e3b","entry":"dense_layer","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/layers.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"42717521963e9e3b"}},{"code_sha256_prefix":"f801a0306e227354","entry":"initialize_variable","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/layers.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f801a0306e227354"}},{"code_sha256_prefix":"81f3af1dfd943004","entry":"initialize_weights_with_loss","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/layers.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/layers.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"81f3af1dfd943004"}},{"code_sha256_prefix":"e67270287a1be393","entry":"kl_ard","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-pytorch/core/metrics.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-pytorch/core/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e67270287a1be393"}},{"code_sha256_prefix":"2589b1ab2d40cde2","entry":"linear_decay","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/policies.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/policies.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2589b1ab2d40cde2"}},{"code_sha256_prefix":"1742234ac855b716","entry":"linear_growth","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/policies.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/policies.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1742234ac855b716"}},{"code_sha256_prefix":"4434bc86b61349d1","entry":"log_loss","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/metrics.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4434bc86b61349d1"}},{"code_sha256_prefix":"49e5cec9ba33f129","entry":"logit2acc","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-pytorch/core/metrics.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-pytorch/core/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"49e5cec9ba33f129"}},{"code_sha256_prefix":"764cb9125f7ab709","entry":"lr_linear","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-pytorch/core/metrics.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-pytorch/core/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"764cb9125f7ab709"}},{"code_sha256_prefix":"7cefef8be692c402","entry":"sgvlb","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/metrics.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/metrics.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7cefef8be692c402"}},{"code_sha256_prefix":"d1e757a31aafc9a3","entry":"step_decay","repo":"da-molchanov/variance-networks","repo_kind":"official","path":"variance-networks-tf/nets/policies.py","file_url":"https://github.com/da-molchanov/variance-networks/blob/HEAD/variance-networks-tf/nets/policies.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d1e757a31aafc9a3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}