Papers › Efficient and robust approximate nearest neighbor search using Hierarchical Navigable...
Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs
Yu. A. Malkov, D. A. Yashunin
We present a new approach for the approximate K-nearest neighbor search based on navigable small world graphs with controllable hierarchy (Hierarchical NSW, HNSW). The proposed solution is fully graph-based, without any need for additional search structures, which are typically used at the coarse search stage of the most proximity graph techniques. Hierarchical NSW incrementally builds a multi-layer structure consisting from hierarchical set of proximity graphs (layers) for nested subsets of the stored elements. The maximum layer in which an element is present is selected randomly with an exponentially decaying probability distribution. This allows producing graphs similar to the previously studied Navigable Small World (NSW) structures while additionally having the links separated by their characteristic distance scales. Starting search from the upper layer together with utilizing the scale separation boosts the performance compared to NSW and allows a logarithmic complexity scaling. Additional employment of a heuristic for selecting proximity graph neighbors significantly increases performance at high recall and in case of highly clustered data. Performance evaluation has demonstrated that the proposed general metric space search index is able to strongly outperform previous opensource state-of-the-art vector-only approaches. Similarity of the algorithm to the skip list structure allows straightforward balanced distributed implementation.
In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.
Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, on Syntology's MCP service (how to connect):
get_harvested_code_for_paper(arxiv_id="1603.09320")get_code(code_sha256="…")with a sample'scode_sha256from the list belowget_citation_path(paper_1="1603.09320", paper_2="…")with another paper's arXiv id or titleget_concepts_for_paper(arxiv_id="1603.09320")
Code
The archive's official repositories (nmslib/hnsw, searchivarius/nmslib, yurymalkov/hnsw) were not harvested; the 32 samples below come from 6 community repositories.
Syntology 32 code samples harvested from 6 repositories linked to this paper: 23 ran (of which 0 constructed an object rather than computing a result; 23 with no instrument failure: 0 honoured, 0 violated, 23 with no contract checked; 0 where Syntology's instrument failed) · 9 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code; here there are none.
By repository: community (archive-listed): 32 samples from 6 repositories, 23 ran (23 with no instrument failure; 0 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
No sample is linked to this paper from 5 of its repositories that Syntology harvested for other papers:
- ZJULearning/nsg, community (archive-listed): harvested for another paper, listed under the repository
- datastax/jvector, community (archive-listed): harvested for another paper, listed under the repository
- js1010/cuhnsw, community (archive-listed): harvested for another paper, listed under the repository
- mimbres/neural-audio-fp, community (archive-listed): harvested for 2 other papers, listed under the repository
- milvus-io/milvus, community (archive-listed): harvested for another paper, listed under the repository
Levels written between 2026-09-25 and 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.
46 repositories listed; official and paper-mentioned ones first.
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.
Code Syntology ran Syntology
32 samples harvested: 23 ran (of which 0 constructed an object rather than computing a result; 23 with no instrument failure: 0 honoured, 0 violated, 23 with no contract checked; 0 where Syntology's instrument failed) · 9 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.
Licence: 0 of the 32 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from 6 repositories linked to this paper, official or community; the list below is grouped by repository, each group headed by its name and what it is to the paper. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 1 sample that ran, the graph records a signature this page does not show: an argument's recorded type or element kind is a printout of an object in Syntology's harness (such as a mock object, a class or a pandas printout), not the type of an input, so it does not describe the call's shape. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.
Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.
c329b3648ba301d2 · report
fixture: signature base:str/0/str, args:Args/0/? · returned str · level recorded 2026-09-26 00fd55582acb50eb · report
e835d9076670deaf · report
52763ab12190a56b · report
0a70bd6ca6481e54 · report
706485776c880850 · report
fixture: returned str · level recorded 2026-09-26 db909965da54b5b6 · report
fixture: signature dataset_distances:list/1/float, run_distances:list/1/float, count:int/0/int, epsilon:float/0/float · returned float · level recorded 2026-09-26 42b99a41e74dbeeb · report
fixture: signature data:ndarray/1/float, count:int/0/int, epsilon:float/0/float · returned float64 · level recorded 2026-09-26 4e54de2be24f817c · report
fixture: signature db:dict/0/?, which:str/0/str · returned tuple · level recorded 2026-09-26 08e39aef547dffd7 · report
fixture: signature db:dict/0/? · returned ndarray · level recorded 2026-09-26 census: 5 implementations from 5 papers, 5 distinct outputs across 3 buckets, one shared input per bucket benchmarks/metrics.py ran Apache-2.0 (permissive) ·
54a1c6f06f1a932f · report
fixture: signature a:ndarray/1/float, b:ndarray/1/float, metric:str/0/str · returned float64 · level recorded 2026-09-26 7f2e786868a36028 · report
8ab19cdee9a46e74 · report
9765c8d022e20684 · report
f38de72dd78893f4 · report
fixture: signature str:str/0/str · returned str · level recorded 2026-09-25 18e581112ad83723 · report
fixture: signature params:dict/0/? · returned str · level recorded 2026-09-25 1c950e4966ec9598 · report
fixture: signature experiments:dict/0/?, methStyles:dict/0/?, outputFile:str/0/str, xAxisField:str/0/str, yAxisField:str/0/str, axisType:int/0/int, noLegend:bool/0/bool, printXaxis:str/0/str, printYaxis:str/0/str, title:str/0/str · returned str · level recorded 2026-09-25 ff42ba0e2e3b9192 · report
fixture: signature axisType:int/0/int · returned list · level recorded 2026-09-25 d4eb67b43f42acff · report
fixture: signature file_name_pref:str/0/str · returned ndarray · level recorded 2026-09-25 859111b60568c802 · report
fixture: signature data:list/1/dict · returned list · level recorded 2026-09-25 906dd13e8bf7767c · report
fixture: signature entry:dict/0/?, out_root:PosixPath/0/? · returned PosixPath · level recorded 2026-09-25 22b1e9b52b1b0f3a · report
fixture: signature file_name:str/0/str, max_qty:int/0/int · returned ndarray · level recorded 2026-09-25 4ca9f55920b86b16 · report
fixture: signature s:str/0/str · returned str · level recorded 2026-09-25 2687bda4a867ff8a · report
fixture: signature all_data_matrix:ndarray/2/float, test_size:float/0/float, seed:int/0/int · returned tuple · level recorded 2026-09-25 6d8f5a668d2ace9f · report
fixture: signature n:str/0/str · returned int · level recorded 2026-09-25 64e8a6840e30069d · report
fixture: signature base:str/0/str, args:Args/0/? · returned str · level recorded 2026-09-26 642902330718ba50 · report
21dfacf227bb72f7 · report
f2e1e86c45959434 · report
fixture: signature experiments:dict/0/?, searchParam:str/0/str, xAxisField:str/0/str, yAxisField:str/0/str, axisType:int/0/int, legendPos:str/0/str, printYaxis:str/0/str, title:str/0/str · returned str · level recorded 2026-09-26 f51acd5adbd5e1f7 · report
fixture: signature filename:str/0/str · returned type · level recorded 2026-09-26 6232ffacb8dd099a · report
fixture: signature filename:str/0/str, start_row:int/0/int, count_rows:NoneType/0/?, view:bool/0/bool, dtype:NoneType/0/? · returned ndarray · level recorded 2026-09-26 5c21b4b0da32e8da · report
fixture: returned int · level recorded 2026-09-26 Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections