{"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/cola-exploiting-compositional-structure-for","title":"CoLA: Exploiting Compositional Structure for Automatic and Efficient Numerical Linear Algebra","arxiv_id":"2309.03060","date":"2023-09-06","proceeding":"NeurIPS 2023 11","authors":["Andres Potapczynski","Marc Finzi","Geoff Pleiss","Andrew Gordon Wilson"],"abstract":"Many areas of machine learning and science involve large linear algebra problems, such as eigendecompositions, solving linear systems, computing matrix exponentials, and trace estimation. The matrices involved often have Kronecker, convolutional, block diagonal, sum, or product structure. In this paper, we propose a simple but general framework for large-scale linear algebra problems in machine learning, named CoLA (Compositional Linear Algebra). By combining a linear operator abstraction with compositional dispatch rules, CoLA automatically constructs memory and runtime efficient numerical algorithms. Moreover, CoLA provides memory efficient automatic differentiation, low precision computation, and GPU acceleration in both JAX and PyTorch, while also accommodating new objects, operations, and rules in downstream packages via multiple dispatch. CoLA can accelerate many algebraic operations, while making it easy to prototype matrix structures and algorithms, providing an appealing drop-in tool for virtually any computational effort that requires linear algebra. We showcase its efficacy across a broad range of applications, including partial differential equations, Gaussian processes, equivariant model construction, and unsupervised learning.","url_abs":"https://arxiv.org/abs/2309.03060v2","url_pdf":"https://arxiv.org/pdf/2309.03060v2.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":"cola-exploiting-compositional-structure-for","repo_url":"https://github.com/wilson-labs/cola","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":null,"task_name":"CoLA"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"gaussian-processes","task_name":"Gaussian Processes"}],"methods":[{"method_slug":"cola","method_name":"COLA"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.03060","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.03060"}},"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":"deterministic:regex_extraction","url":"https://github.com/wilson-labs/cola","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/treforevans/uci_","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}}],"summary":{"ran":17},"by_repo_kind":{"official":{"samples":17,"ran":17,"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":"1222b814438ac04e","entry":"build_tqdm","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/utils/jax_tqdm.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/utils/jax_tqdm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1222b814438ac04e"}},{"code_sha256_prefix":"1505bc3ca64e8748","entry":"check_valid_dtype","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/backends/backends.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/backends/backends.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1505bc3ca64e8748"}},{"code_sha256_prefix":"e09ed6dad6d629b9","entry":"combine","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/utils/custom_autodiff.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/utils/custom_autodiff.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e09ed6dad6d629b9"}},{"code_sha256_prefix":"194698227eb24ab9","entry":"eig","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/backends/np_fns.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/backends/np_fns.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"194698227eb24ab9"}},{"code_sha256_prefix":"79232c17bd3e80b9","entry":"is_xnp_array","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/ops/operator_base.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/ops/operator_base.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"79232c17bd3e80b9"}},{"code_sha256_prefix":"07094ab2794b77be","entry":"iterative_autograd","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/utils/custom_autodiff.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/utils/custom_autodiff.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"07094ab2794b77be"}},{"code_sha256_prefix":"d551c022a49dc59a","entry":"loop_tqdm","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/utils/jax_tqdm.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/utils/jax_tqdm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d551c022a49dc59a"}},{"code_sha256_prefix":"5dc26cca6fae567f","entry":"lstsq","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/backends/np_fns.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/backends/np_fns.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5dc26cca6fae567f"}},{"code_sha256_prefix":"12064a51bf1dd610","entry":"maybe_get_dtype","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/ops/operator_base.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/ops/operator_base.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"12064a51bf1dd610"}},{"code_sha256_prefix":"18ed40676168eff9","entry":"product","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/ops/operators.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/ops/operators.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"18ed40676168eff9"}},{"code_sha256_prefix":"06b12e67297b8604","entry":"scan_tqdm","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/utils/jax_tqdm.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/utils/jax_tqdm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"06b12e67297b8604"}},{"code_sha256_prefix":"c56a560ef1f1c286","entry":"sparse_csr","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/backends/jax_fns.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/backends/jax_fns.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c56a560ef1f1c286"}},{"code_sha256_prefix":"624ef6c3eeae7741","entry":"sparse_csr","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/backends/torch_fns.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/backends/torch_fns.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"624ef6c3eeae7741"}},{"code_sha256_prefix":"a9583780ceda1e46","entry":"svd","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/backends/jax_fns.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/backends/jax_fns.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a9583780ceda1e46"}},{"code_sha256_prefix":"0381ba678b73491b","entry":"to_np","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/backends/jax_fns.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/backends/jax_fns.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0381ba678b73491b"}},{"code_sha256_prefix":"200e115745cfc25b","entry":"while_loop","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/utils/torch_tqdm.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/utils/torch_tqdm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"200e115745cfc25b"}},{"code_sha256_prefix":"f71a8d09e632c999","entry":"while_loop_winfo","repo":"wilson-labs/cola","repo_kind":"official","path":"cola/utils/torch_tqdm.py","file_url":"https://github.com/wilson-labs/cola/blob/HEAD/cola/utils/torch_tqdm.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f71a8d09e632c999"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}