{"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/on-uncertainty-tempering-and-data","title":"On Uncertainty, Tempering, and Data Augmentation in Bayesian Classification","arxiv_id":"2203.16481","date":"2022-03-30","proceeding":null,"authors":["Sanyam Kapoor","Wesley J. Maddox","Pavel Izmailov","Andrew Gordon Wilson"],"abstract":"Aleatoric uncertainty captures the inherent randomness of the data, such as measurement noise. In Bayesian regression, we often use a Gaussian observation model, where we control the level of aleatoric uncertainty with a noise variance parameter. By contrast, for Bayesian classification we use a categorical distribution with no mechanism to represent our beliefs about aleatoric uncertainty. Our work shows that explicitly accounting for aleatoric uncertainty significantly improves the performance of Bayesian neural networks. We note that many standard benchmarks, such as CIFAR, have essentially no aleatoric uncertainty. Moreover, we show data augmentation in approximate inference has the effect of softening the likelihood, leading to underconfidence and profoundly misrepresenting our honest beliefs about aleatoric uncertainty. Accordingly, we find that a cold posterior, tempered by a power greater than one, often more honestly reflects our beliefs about aleatoric uncertainty than no tempering -- providing an explicit link between data augmentation and cold posteriors. We show that we can match or exceed the performance of posterior tempering by using a Dirichlet observation model, where we explicitly control the level of aleatoric uncertainty, without any need for tempering.","url_abs":"https://arxiv.org/abs/2203.16481v1","url_pdf":"https://arxiv.org/pdf/2203.16481v1.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":"on-uncertainty-tempering-and-data","repo_url":"https://github.com/activatedgeek/bayesian-classification","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"classification-1","task_name":"Classification"},{"task_slug":"data-augmentation","task_name":"Data Augmentation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.16481","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.16481"}},"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/activatedgeek/bayesian-classification","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_honours":2,"ran_violates":1,"unverified":13},"by_repo_kind":{"official":{"samples":16,"ran":3,"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":"be1cf2403304fa6d","entry":"float_parameter","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/data_aug/augmentations.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/data_aug/augmentations.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"be1cf2403304fa6d"}},{"code_sha256_prefix":"beaa91443124b324","entry":"int_parameter","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/data_aug/augmentations.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/data_aug/augmentations.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"beaa91443124b324"}},{"code_sha256_prefix":"5cc8d4764ac07a35","entry":"sample_level","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/data_aug/augmentations.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/data_aug/augmentations.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5cc8d4764ac07a35"}},{"code_sha256_prefix":"f3e585fbf55734ee","entry":"aug","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/data_aug/datasets.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/data_aug/datasets.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":"f3e585fbf55734ee"}},{"code_sha256_prefix":"27e48eb779078e1a","entry":"collect_runs","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/bnn_priors/bnn_priors/notebook_utils.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/bnn_priors/bnn_priors/notebook_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":"27e48eb779078e1a"}},{"code_sha256_prefix":"f35c35e0ab818b93","entry":"device","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/bnn_priors/bnn_priors/exp_utils.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/bnn_priors/bnn_priors/exp_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":"f35c35e0ab818b93"}},{"code_sha256_prefix":"8f08beab287a74d2","entry":"ewma","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/bnn_priors/bnn_priors/plot.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/bnn_priors/bnn_priors/plot.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":"8f08beab287a74d2"}},{"code_sha256_prefix":"0529d320cd63ce5a","entry":"flatten","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/bnn_priors/bnn_priors/notebook_utils.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/bnn_priors/bnn_priors/notebook_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":"0529d320cd63ce5a"}},{"code_sha256_prefix":"212c42ec4fea4835","entry":"get_cosine_schedule","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/bnn_priors/bnn_priors/utils.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/bnn_priors/bnn_priors/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":"212c42ec4fea4835"}},{"code_sha256_prefix":"8b17daa681f75fdc","entry":"get_sizes","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/bnn_priors/bnn_priors/plot.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/bnn_priors/bnn_priors/plot.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":"8b17daa681f75fdc"}},{"code_sha256_prefix":"39e9624185b2cc27","entry":"prepare_transforms","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/data_aug/datasets.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/data_aug/datasets.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":"39e9624185b2cc27"}},{"code_sha256_prefix":"b13c39f5f6f594b3","entry":"test","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"experiments/train_aug_lik.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/experiments/train_aug_lik.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":"b13c39f5f6f594b3"}},{"code_sha256_prefix":"12cf4ec8f4c807be","entry":"test_bma","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"experiments/train_aug_lik.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/experiments/train_aug_lik.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":"12cf4ec8f4c807be"}},{"code_sha256_prefix":"4dbfc79b7cf9df58","entry":"train_test_split","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/data_aug/datasets.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/data_aug/datasets.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":"4dbfc79b7cf9df58"}},{"code_sha256_prefix":"34decb89bfa1acc6","entry":"unique_cols","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/bnn_priors/bnn_priors/notebook_utils.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/bnn_priors/bnn_priors/notebook_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":"34decb89bfa1acc6"}},{"code_sha256_prefix":"3fed205996d7794e","entry":"weighted_var_se","repo":"activatedgeek/bayesian-classification","repo_kind":"official","path":"src/bnn_priors/bnn_priors/plot.py","file_url":"https://github.com/activatedgeek/bayesian-classification/blob/HEAD/src/bnn_priors/bnn_priors/plot.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":"3fed205996d7794e"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}