{"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/fast-matrix-square-roots-with-applications-to","title":"Fast Matrix Square Roots with Applications to Gaussian Processes and Bayesian Optimization","arxiv_id":"2006.11267","date":"2020-06-19","proceeding":"NeurIPS 2020 12","authors":["Geoff Pleiss","Martin Jankowiak","David Eriksson","Anil Damle","Jacob R. Gardner"],"abstract":"Matrix square roots and their inverses arise frequently in machine learning, e.g., when sampling from high-dimensional Gaussians $\\mathcal{N}(\\mathbf 0, \\mathbf K)$ or whitening a vector $\\mathbf b$ against covariance matrix $\\mathbf K$. While existing methods typically require $O(N^3)$ computation, we introduce a highly-efficient quadratic-time algorithm for computing $\\mathbf K^{1/2} \\mathbf b$, $\\mathbf K^{-1/2} \\mathbf b$, and their derivatives through matrix-vector multiplication (MVMs). Our method combines Krylov subspace methods with a rational approximation and typically achieves $4$ decimal places of accuracy with fewer than $100$ MVMs. Moreover, the backward pass requires little additional computation. We demonstrate our method's applicability on matrices as large as $50,\\!000 \\times 50,\\!000$ - well beyond traditional methods - with little approximation error. Applying this increased scalability to variational Gaussian processes, Bayesian optimization, and Gibbs sampling results in more powerful models with higher accuracy.","url_abs":"https://arxiv.org/abs/2006.11267v2","url_pdf":"https://arxiv.org/pdf/2006.11267v2.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":"fast-matrix-square-roots-with-applications-to","repo_url":"https://github.com/gpleiss/ciq_experiments","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"bayesian-optimization","task_name":"Bayesian Optimization"},{"task_slug":"gaussian-processes","task_name":"Gaussian Processes"},{"task_slug":"subspace-methods","task_name":"subspace methods"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2006.11267","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2006.11267"}},"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/gpleiss/ciq_experiments","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":"af00b91406dbc454","entry":"Phi","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/crps.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/crps.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":"af00b91406dbc454"}},{"code_sha256_prefix":"58983a88cbdb1cad","entry":"crps","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/crps.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/crps.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":"58983a88cbdb1cad"}},{"code_sha256_prefix":"99a0fb32c2e3d86f","entry":"downsample_img","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"super_resolution/sr.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/super_resolution/sr.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":"99a0fb32c2e3d86f"}},{"code_sha256_prefix":"4882830652616cef","entry":"from_unit_cube","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"bayesopt/ciq_bo/utils.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/bayesopt/ciq_bo/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":"4882830652616cef"}},{"code_sha256_prefix":"fb5b4b75bd55fd1c","entry":"get_logger","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/logger.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/logger.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":"fb5b4b75bd55fd1c"}},{"code_sha256_prefix":"d0f69205712e19ce","entry":"inv_matmul","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"super_resolution/sr.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/super_resolution/sr.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":"d0f69205712e19ce"}},{"code_sha256_prefix":"19ac6cfc2910162d","entry":"load_airline_data","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/load_uci_data.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/load_uci_data.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":"19ac6cfc2910162d"}},{"code_sha256_prefix":"d36530514ec97b1a","entry":"load_covtype_data","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/load_uci_data.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/load_uci_data.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":"d36530514ec97b1a"}},{"code_sha256_prefix":"8a1f1a7cf2984a2e","entry":"load_robopush_data","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/load_uci_data.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/load_uci_data.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":"8a1f1a7cf2984a2e"}},{"code_sha256_prefix":"64c69a6908432123","entry":"mvn_sample","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"super_resolution/sr.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/super_resolution/sr.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":"64c69a6908432123"}},{"code_sha256_prefix":"085f08870c397e8d","entry":"output_class","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/util.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/util.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":"085f08870c397e8d"}},{"code_sha256_prefix":"400cde6d40f64792","entry":"phi","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/crps.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/crps.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":"400cde6d40f64792"}},{"code_sha256_prefix":"8c6692f79520aea4","entry":"result_class","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"svgp/util.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/svgp/util.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":"8c6692f79520aea4"}},{"code_sha256_prefix":"675f960778d15b16","entry":"standardize","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"bayesopt/ciq_bo/utils.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/bayesopt/ciq_bo/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":"675f960778d15b16"}},{"code_sha256_prefix":"d4f3607c98798b5f","entry":"to_unit_cube","repo":"gpleiss/ciq_experiments","repo_kind":"official","path":"bayesopt/ciq_bo/utils.py","file_url":"https://github.com/gpleiss/ciq_experiments/blob/HEAD/bayesopt/ciq_bo/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":"d4f3607c98798b5f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}