{"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/laplace-redux-effortless-bayesian-deep","title":"Laplace Redux -- Effortless Bayesian Deep Learning","arxiv_id":"2106.14806","date":"2021-06-28","proceeding":"NeurIPS 2021 12","authors":["Erik Daxberger","Agustinus Kristiadi","Alexander Immer","Runa Eschenhagen","Matthias Bauer","Philipp Hennig"],"abstract":"Bayesian formulations of deep learning have been shown to have compelling theoretical properties and offer practical functional benefits, such as improved predictive uncertainty quantification and model selection. The Laplace approximation (LA) is a classic, and arguably the simplest family of approximations for the intractable posteriors of deep neural networks. Yet, despite its simplicity, the LA is not as popular as alternatives like variational Bayes or deep ensembles. This may be due to assumptions that the LA is expensive due to the involved Hessian computation, that it is difficult to implement, or that it yields inferior results. In this work we show that these are misconceptions: we (i) review the range of variants of the LA including versions with minimal cost overhead; (ii) introduce \"laplace\", an easy-to-use software library for PyTorch offering user-friendly access to all major flavors of the LA; and (iii) demonstrate through extensive experiments that the LA is competitive with more popular alternatives in terms of performance, while excelling in terms of computational cost. We hope that this work will serve as a catalyst to a wider adoption of the LA in practical deep learning, including in domains where Bayesian approaches are not typically considered at the moment.","url_abs":"https://arxiv.org/abs/2106.14806v3","url_pdf":"https://arxiv.org/pdf/2106.14806v3.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":"laplace-redux-effortless-bayesian-deep","repo_url":"https://github.com/AlexImmer/Laplace","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"laplace-redux-effortless-bayesian-deep","repo_url":"https://github.com/runame/laplace-redux","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"laplace-redux-effortless-bayesian-deep","repo_url":"https://github.com/klemens-floege/svn_ensembles","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"laplace-redux-effortless-bayesian-deep","repo_url":"https://github.com/wiseodd/laplace-bayesopt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"laplace-redux-effortless-bayesian-deep","repo_url":"https://github.com/ENSTA-U2IS-AI/torch-uncertainty","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"laplace-redux-effortless-bayesian-deep","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":[{"task_slug":"deep-learning","task_name":"Deep Learning"},{"task_slug":"misconceptions","task_name":"Misconceptions"},{"task_slug":"model-selection","task_name":"Model Selection"},{"task_slug":"uncertainty-quantification","task_name":"Uncertainty Quantification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2106.14806","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.14806"}},"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/AlexImmer/Laplace","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ENSTA-U2IS-AI/torch-uncertainty","reach":{"status":"ok","spdx":"Apache-2.0"}},{"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/wiseodd/laplace-bayesopt","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/runame/laplace-redux","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/klemens-floege/svn_ensembles","reach":null}],"summary":{"ran_honours":1,"unverified":4},"by_repo_kind":{"official":{"samples":2,"ran":1,"repositories":1},"listed":{"samples":3,"ran":0,"repositories":2}},"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":"502285137fd0223f","entry":"optimize_marglik","repo":"runame/laplace-redux","repo_kind":"official","path":"continual_learning.py","file_url":"https://github.com/runame/laplace-redux/blob/HEAD/continual_learning.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"502285137fd0223f"}},{"code_sha256_prefix":"ff544b6334f717df","entry":"HessianApproximation","repo":"klemens-floege/svn_ensembles","repo_kind":"listed","path":"SVN/hessian_approximation.py","file_url":"https://github.com/klemens-floege/svn_ensembles/blob/HEAD/SVN/hessian_approximation.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ff544b6334f717df"}},{"code_sha256_prefix":"947b9be1a0abe8e1","entry":"LaplaceApprox","repo":"ENSTA-U2IS-AI/torch-uncertainty","repo_kind":"listed","path":"src/torch_uncertainty/post_processing/laplace.py","file_url":"https://github.com/ENSTA-U2IS-AI/torch-uncertainty/blob/HEAD/src/torch_uncertainty/post_processing/laplace.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":"947b9be1a0abe8e1"}},{"code_sha256_prefix":"6f2d687cea93e0a1","entry":"PostProcessing","repo":"ENSTA-U2IS-AI/torch-uncertainty","repo_kind":"listed","path":"src/torch_uncertainty/post_processing/laplace.py","file_url":"https://github.com/ENSTA-U2IS-AI/torch-uncertainty/blob/HEAD/src/torch_uncertainty/post_processing/laplace.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":"6f2d687cea93e0a1"}},{"code_sha256_prefix":"0bb74d222799962d","entry":"test","repo":"runame/laplace-redux","repo_kind":"official","path":"continual_learning.py","file_url":"https://github.com/runame/laplace-redux/blob/HEAD/continual_learning.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":"0bb74d222799962d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}