{"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/bayes-newton-methods-for-approximate-bayesian","title":"Bayes-Newton Methods for Approximate Bayesian Inference with PSD Guarantees","arxiv_id":"2111.01721","date":"2021-11-02","proceeding":null,"authors":["William J. Wilkinson","Simo Särkkä","Arno Solin"],"abstract":"We formulate natural gradient variational inference (VI), expectation propagation (EP), and posterior linearisation (PL) as extensions of Newton's method for optimising the parameters of a Bayesian posterior distribution. This viewpoint explicitly casts inference algorithms under the framework of numerical optimisation. We show that common approximations to Newton's method from the optimisation literature, namely Gauss-Newton and quasi-Newton methods (e.g., the BFGS algorithm), are still valid under this 'Bayes-Newton' framework. This leads to a suite of novel algorithms which are guaranteed to result in positive semi-definite (PSD) covariance matrices, unlike standard VI and EP. Our unifying viewpoint provides new insights into the connections between various inference schemes. All the presented methods apply to any model with a Gaussian prior and non-conjugate likelihood, which we demonstrate with (sparse) Gaussian processes and state space models.","url_abs":"https://arxiv.org/abs/2111.01721v3","url_pdf":"https://arxiv.org/pdf/2111.01721v3.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":"bayes-newton-methods-for-approximate-bayesian","repo_url":"https://github.com/AaltoML/BayesNewton","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"bayesian-inference","task_name":"Bayesian Inference"},{"task_slug":"gaussian-processes","task_name":"Gaussian Processes"},{"task_slug":"state-space-models","task_name":"State Space Models"},{"task_slug":"variational-inference","task_name":"Variational Inference"},{"task_slug":null,"task_name":"valid"}],"methods":[{"method_slug":"variational-inference","method_name":"Variational Inference"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2111.01721","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2111.01721"}},"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/AaltoML/BayesNewton","reach":{"status":"ok","spdx":"Apache-2.0"}}],"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":"6100466c1367a03d","entry":"bfgs","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/inference.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/inference.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":"6100466c1367a03d"}},{"code_sha256_prefix":"9aae62a9f99047b2","entry":"blocktensor_to_blockdiagmatrix","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/ops.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/ops.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":"9aae62a9f99047b2"}},{"code_sha256_prefix":"94d3b7a9318afcff","entry":"coeff","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/kernels.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/kernels.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":"94d3b7a9318afcff"}},{"code_sha256_prefix":"bc57cb302c717818","entry":"damped_bfgs","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/inference.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/inference.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":"bc57cb302c717818"}},{"code_sha256_prefix":"286d7367835461f3","entry":"factorial","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/kernels.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/kernels.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":"286d7367835461f3"}},{"code_sha256_prefix":"2bf235dc5954887b","entry":"gauss_hermite","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/cubature.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/cubature.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":"2bf235dc5954887b"}},{"code_sha256_prefix":"6f157040825f5857","entry":"get_blocks","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/ops.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/ops.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":"6f157040825f5857"}},{"code_sha256_prefix":"1886c3dfe4b4324c","entry":"get_diag_and_offdiag_components","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/ops.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/ops.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":"1886c3dfe4b4324c"}},{"code_sha256_prefix":"d8bdc4bb0675df6f","entry":"inv","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/utils.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/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":"d8bdc4bb0675df6f"}},{"code_sha256_prefix":"4277fb46e3b5740c","entry":"inv_vmap","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/utils.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/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":"4277fb46e3b5740c"}},{"code_sha256_prefix":"0eeed36a96e1f3a7","entry":"mvhermgauss","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/cubature.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/cubature.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":"0eeed36a96e1f3a7"}},{"code_sha256_prefix":"cfeeab30c5e0cae1","entry":"negative_binomial","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/likelihoods.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/likelihoods.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":"cfeeab30c5e0cae1"}},{"code_sha256_prefix":"2bb9aee359b6c49e","entry":"newton_update","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/inference.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/inference.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":"2bb9aee359b6c49e"}},{"code_sha256_prefix":"d6b5c53748778f80","entry":"solve","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/utils.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/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":"d6b5c53748778f80"}},{"code_sha256_prefix":"833cb74669877c21","entry":"symmetric_cubature_third_order","repo":"AaltoML/BayesNewton","repo_kind":"official","path":"bayesnewton/cubature.py","file_url":"https://github.com/AaltoML/BayesNewton/blob/HEAD/bayesnewton/cubature.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":"833cb74669877c21"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}