{"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/lorann-low-rank-matrix-factorization-for","title":"LoRANN: Low-Rank Matrix Factorization for Approximate Nearest Neighbor Search","arxiv_id":"2410.18926","date":"2024-10-24","proceeding":null,"authors":["Elias Jääsaari","Ville Hyvönen","Teemu Roos"],"abstract":"Approximate nearest neighbor (ANN) search is a key component in many modern machine learning pipelines; recent use cases include retrieval-augmented generation (RAG) and vector databases. Clustering-based ANN algorithms, that use score computation methods based on product quantization (PQ), are often used in industrial-scale applications due to their scalability and suitability for distributed and disk-based implementations. However, they have slower query times than the leading graph-based ANN algorithms. In this work, we propose a new supervised score computation method based on the observation that inner product approximation is a multivariate (multi-output) regression problem that can be solved efficiently by reduced-rank regression. Our experiments show that on modern high-dimensional data sets, the proposed reduced-rank regression (RRR) method is superior to PQ in both query latency and memory usage. We also introduce LoRANN, a clustering-based ANN library that leverages the proposed score computation method. LoRANN is competitive with the leading graph-based algorithms and outperforms the state-of-the-art GPU ANN methods on high-dimensional data sets.","url_abs":"https://arxiv.org/abs/2410.18926v1","url_pdf":"https://arxiv.org/pdf/2410.18926v1.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":"lorann-low-rank-matrix-factorization-for","repo_url":"https://github.com/ejaasaari/lorann","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"lorann-low-rank-matrix-factorization-for","repo_url":"https://github.com/ejaasaari/lorann-experiments","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"quantization","task_name":"Quantization"},{"task_slug":"rag","task_name":"RAG"},{"task_slug":"retrieval-augmented-generation","task_name":"Retrieval-augmented Generation"},{"task_slug":"regression-1","task_name":"regression"}],"methods":[{"method_slug":null,"method_name":"Library"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.18926","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.18926"}},"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/ejaasaari/lorann-experiments","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ejaasaari/lorann","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":20},"by_repo_kind":{"official":{"samples":20,"ran":0,"repositories":2}},"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":"1a459680e482b1e0","entry":"algorithm_status","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/definitions.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/definitions.py","link_basis":"first_harvest_node","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":"1a459680e482b1e0"}},{"code_sha256_prefix":"1a2ffd7252fad4b2","entry":"build","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"install.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/install.py","link_basis":"first_harvest_node","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":"1a2ffd7252fad4b2"}},{"code_sha256_prefix":"eb502608c05c9c3a","entry":"build_multiprocess","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"install.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/install.py","link_basis":"first_harvest_node","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":"eb502608c05c9c3a"}},{"code_sha256_prefix":"ba29d4db272d5078","entry":"compute_V","repo":"ejaasaari/lorann","repo_kind":"official","path":"python/lorann_gpu/lorann_gpu.py","file_url":"https://github.com/ejaasaari/lorann/blob/HEAD/python/lorann_gpu/lorann_gpu.py","link_basis":"first_harvest_node","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":"ba29d4db272d5078"}},{"code_sha256_prefix":"33781da3207cc49d","entry":"compute_distance","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/distance.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/distance.py","link_basis":"first_harvest_node","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":"33781da3207cc49d"}},{"code_sha256_prefix":"67137b50ff87ea9b","entry":"compute_recall","repo":"ejaasaari/lorann","repo_kind":"official","path":"python/lorann/lorann.py","file_url":"https://github.com/ejaasaari/lorann/blob/HEAD/python/lorann/lorann.py","link_basis":"first_harvest_node","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":"67137b50ff87ea9b"}},{"code_sha256_prefix":"71f7ee0bb635fb1a","entry":"config_write","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"convert_algos.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/convert_algos.py","link_basis":"first_harvest_node","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":"71f7ee0bb635fb1a"}},{"code_sha256_prefix":"24ec4bb9c63da4f6","entry":"convert_color","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"create_website.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/create_website.py","link_basis":"first_harvest_node","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":"24ec4bb9c63da4f6"}},{"code_sha256_prefix":"feb0a5830b75c0f5","entry":"convert_linestyle","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"create_website.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/create_website.py","link_basis":"first_harvest_node","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":"feb0a5830b75c0f5"}},{"code_sha256_prefix":"58e6e4420d6b0cef","entry":"euclidean","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/distance.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/distance.py","link_basis":"first_harvest_node","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":"58e6e4420d6b0cef"}},{"code_sha256_prefix":"44fa38f4dba6c740","entry":"float_parse_entry","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/data.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/data.py","link_basis":"first_harvest_node","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":"44fa38f4dba6c740"}},{"code_sha256_prefix":"43546c638e833781","entry":"float_unparse_entry","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/data.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/data.py","link_basis":"first_harvest_node","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":"43546c638e833781"}},{"code_sha256_prefix":"781712699c80561e","entry":"get_config_files","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/definitions.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/definitions.py","link_basis":"first_harvest_node","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":"781712699c80561e"}},{"code_sha256_prefix":"1832a37264ff8488","entry":"get_dataset","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/datasets.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/datasets.py","link_basis":"first_harvest_node","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":"1832a37264ff8488"}},{"code_sha256_prefix":"08c7a13d549d2592","entry":"get_dataset_fn","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/datasets.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/datasets.py","link_basis":"first_harvest_node","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":"08c7a13d549d2592"}},{"code_sha256_prefix":"239f62264b6ae120","entry":"get_run_desc","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"create_website.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/create_website.py","link_basis":"first_harvest_node","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":"239f62264b6ae120"}},{"code_sha256_prefix":"378ed3f6e88f78c2","entry":"int_parse_entry","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/data.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/data.py","link_basis":"first_harvest_node","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":"378ed3f6e88f78c2"}},{"code_sha256_prefix":"df5a5ca06135cc3f","entry":"jaccard","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/distance.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/distance.py","link_basis":"first_harvest_node","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":"df5a5ca06135cc3f"}},{"code_sha256_prefix":"a78b6c11cea19a3d","entry":"replace_hyphens_in_keys","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"convert_algos.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/convert_algos.py","link_basis":"first_harvest_node","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":"a78b6c11cea19a3d"}},{"code_sha256_prefix":"762ddcae80faee0b","entry":"train_test_split","repo":"ejaasaari/lorann-experiments","repo_kind":"official","path":"ann_benchmarks/datasets.py","file_url":"https://github.com/ejaasaari/lorann-experiments/blob/HEAD/ann_benchmarks/datasets.py","link_basis":"first_harvest_node","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":"762ddcae80faee0b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}