{"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/low-rank-approximation-and-regression-in","title":"Low Rank Approximation and Regression in Input Sparsity Time","arxiv_id":"1207.6365","date":"2012-07-26","proceeding":null,"authors":["Kenneth L. Clarkson","David P. Woodruff"],"abstract":"We design a new distribution over $\\poly(r \\eps^{-1}) \\times n$ matrices $S$ so that for any fixed $n \\times d$ matrix $A$ of rank $r$, with probability at least 9/10, $\\norm{SAx}_2 = (1 \\pm \\eps)\\norm{Ax}_2$ simultaneously for all $x \\in \\mathbb{R}^d$. Such a matrix $S$ is called a \\emph{subspace embedding}. Furthermore, $SA$ can be computed in $\\nnz(A) + \\poly(d \\eps^{-1})$ time, where $\\nnz(A)$ is the number of non-zero entries of $A$. This improves over all previous subspace embeddings, which required at least $\\Omega(nd \\log d)$ time to achieve this property. We call our matrices $S$ \\emph{sparse embedding matrices}. Using our sparse embedding matrices, we obtain the fastest known algorithms for $(1+\\eps)$-approximation for overconstrained least-squares regression, low-rank approximation, approximating all leverage scores, and $\\ell_p$-regression. The leading order term in the time complexity of our algorithms is $O(\\nnz(A))$ or $O(\\nnz(A)\\log n)$. We optimize the low-order $\\poly(d/\\eps)$ terms in our running times (or for rank-$k$ approximation, the $n*\\poly(k/eps)$ term), and show various tradeoffs. For instance, we also use our methods to design new preconditioners that improve the dependence on $\\eps$ in least squares regression to $\\log 1/\\eps$. Finally, we provide preliminary experimental results which suggest that our algorithms are competitive in practice.","url_abs":"https://arxiv.org/abs/1207.6365v4","url_pdf":"https://arxiv.org/pdf/1207.6365v4.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":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"low-rank-approximation-and-regression-in","repo_url":"https://github.com/jomsdev/randNLA","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1207.6365","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1207.6365"}},"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/jomsdev/randNLA","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":2},"by_repo_kind":{"listed":{"samples":2,"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":"4519761d05590b11","entry":"clarkson_woodruff_transform","repo":"jomsdev/randNLA","repo_kind":"listed","path":"randnla/cwt_sketch.py","file_url":"https://github.com/jomsdev/randNLA/blob/HEAD/randnla/cwt_sketch.py","link_basis":"harvester_set","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":"4519761d05590b11"}},{"code_sha256_prefix":"230aa8d7da376327","entry":"cwt_matrix","repo":"jomsdev/randNLA","repo_kind":"listed","path":"randnla/cwt_sketch.py","file_url":"https://github.com/jomsdev/randNLA/blob/HEAD/randnla/cwt_sketch.py","link_basis":"harvester_set","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":"230aa8d7da376327"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}