{"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/sampling-methods-for-inner-product-sketching","title":"Sampling Methods for Inner Product Sketching","arxiv_id":"2309.16157","date":"2023-09-28","proceeding":null,"authors":["Majid Daliri","Juliana Freire","Christopher Musco","Aécio Santos","Haoxiang Zhang"],"abstract":"Recently, Bessa et al. (PODS 2023) showed that sketches based on coordinated weighted sampling theoretically and empirically outperform popular linear sketching methods like Johnson-Lindentrauss projection and CountSketch for the ubiquitous problem of inner product estimation. We further develop this finding by introducing and analyzing two alternative sampling-based methods. In contrast to the computationally expensive algorithm in Bessa et al., our methods run in linear time (to compute the sketch) and perform better in practice, significantly beating linear sketching on a variety of tasks. For example, they provide state-of-the-art results for estimating the correlation between columns in unjoined tables, a problem that we show how to reduce to inner product estimation in a black-box way. While based on known sampling techniques (threshold and priority sampling) we introduce significant new theoretical analysis to prove approximation guarantees for our methods.","url_abs":"https://arxiv.org/abs/2309.16157v4","url_pdf":"https://arxiv.org/pdf/2309.16157v4.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":"sampling-methods-for-inner-product-sketching","repo_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2309.16157","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2309.16157"}},"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/vida-nyu/samplingmethodsforinnerproductsketching","reach":{"status":"ok"}}],"summary":{"ran":8,"unverified":2},"by_repo_kind":{"official":{"samples":10,"ran":8,"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":10,"samples":[{"code_sha256_prefix":"769c8e47a8702202","entry":"compute_adaptive_threshold","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"src/abstract_class.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/src/abstract_class.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"769c8e47a8702202"}},{"code_sha256_prefix":"98e7420906a04f11","entry":"compute_adaptive_threshold_corr","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"src/corr_methods.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/src/corr_methods.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"98e7420906a04f11"}},{"code_sha256_prefix":"de8d72059a550d91","entry":"compute_estimation","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"script/experiment_ip.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/script/experiment_ip.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"de8d72059a550d91"}},{"code_sha256_prefix":"c055f1c9987df574","entry":"hash_kwise","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"src/abstract_class.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/src/abstract_class.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c055f1c9987df574"}},{"code_sha256_prefix":"500b88617ae1e086","entry":"hash_kwise_kv","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"src/abstract_class.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/src/abstract_class.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"500b88617ae1e086"}},{"code_sha256_prefix":"268c80d0cb705aa4","entry":"ips_est_topics","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"script/experiment_20news.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/script/experiment_20news.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"268c80d0cb705aa4"}},{"code_sha256_prefix":"499081899742421f","entry":"ips_topics","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"script/experiment_20news.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/script/experiment_20news.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"499081899742421f"}},{"code_sha256_prefix":"bde27b83b469d0d4","entry":"vars_from_args","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"script/experiment_ip.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/script/experiment_ip.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bde27b83b469d0d4"}},{"code_sha256_prefix":"b82b89ccee261003","entry":"preprocess_data","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"script/experiment_20news.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/script/experiment_20news.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":"b82b89ccee261003"}},{"code_sha256_prefix":"ebcd0b9b1b736941","entry":"vars_from_args","repo":"vida-nyu/samplingmethodsforinnerproductsketching","repo_kind":"official","path":"script/experiment_corr.py","file_url":"https://github.com/vida-nyu/samplingmethodsforinnerproductsketching/blob/HEAD/script/experiment_corr.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":"ebcd0b9b1b736941"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}