Papers › Efficient and robust approximate nearest neighbor search using Hierarchical Navigable...

Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs

30 Mar 2016arXiv:1603.09320archive 2025-07-28

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="1603.09320")

Code

Syntology Ran 0 of 32 code samples harvested from 6 repositories linked to this paper; 32 have no recorded run.

By repository: community (archive-listed): 32 samples from 6 repositories, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

46 repositories listed; official and paper-mentioned ones first.

nmslib/hnsw officialmentioned in papermentioned on GitHubmxnet report
searchivarius/nmslib officialmentioned in papermentioned on GitHubnot reachable when probed 2026-09-18 — repositories for recent papers often appear after camera-ready report
yurymalkov/hnsw officialmentioned in papermentioned on GitHubmxnet report
Aktsvigun/hnsw_python mentioned on GitHub report
Aljaksandr/libhn mentioned on GitHubmxnet report
HaoZeSun2016/HNSW-HAMMING mentioned on GitHubmxnet report
JuliaNeighbors/HNSW.jl mentioned on GitHubMIT report
LTLA/knncolle mentioned on GitHubMIT report
RadimBaca/HNSW mentioned on GitHub report
RyanLiGod/HNSW-with-MA mentioned on GitHub report
RyanLiGod/MA-NSW mentioned on GitHub report
RyanLiGod/go-hnsw mentioned on GitHub report
RyanLiGod/multiple_target_hnswlib mentioned on GitHubmxnet report
ShobiStassen/PARC mentioned on GitHubMIT report
ZJULearning/nsg mentioned on GitHub report
datastax/jvector mentioned on GitHubApache-2.0 report
davisidarta/fastlapmap mentioned on GitHub report
evan176/hnswgo mentioned on GitHub report
granne/granne mentioned on GitHubMIT report
herrerik/granne mentioned on GitHubMIT report
javaCJ/HNSW_explain mentioned on GitHubApache-2.0 report
jbellis/jvector mentioned on GitHubApache-2.0 report
jean-pierreBoth/hnswlib-rs mentioned on GitHubNOASSERTION report
jelmerk/hnswlib mentioned on GitHubApache-2.0 report
js1010/cuhnsw mentioned on GitHubApache-2.0 report
kakao/n2 mentioned on GitHubApache-2.0 report
lebrosoft/hnswlib_0.3_leon mentioned on GitHubmxnet report
lebrosoft/hnswlib_new mentioned on GitHubmxnet report
merria28/hnswlib mentioned on GitHubmxnet report
mimbres/neural-audio-fp mentioned on GitHubtf report
nlescoua/faiss-quickeradc mentioned on GitHubNOASSERTION report
nmslib/hnswlib mentioned on GitHubmxnetApache-2.0 report
nmslib/nmslib mentioned on GitHubApache-2.0 report
oddconcepts/n2o mentioned on GitHubApache-2.0 report
sararselitsky/FastPG mentioned on GitHubNOASSERTION report
searchivarius/NonMetricSpaceLib mentioned on GitHubApache-2.0 report
strawberrypie/hnsw_index mentioned on GitHubMIT report
technicolor-research/faiss-quickeradc mentioned on GitHubNOASSERTION report
unum-cloud/usearch mentioned on GitHubApache-2.0 report
vdv1g16/hnswfolder mentioned on GitHubmxnetApache-2.0 report
xinyandai/pnsw mentioned on GitHubmxnet report
xxworkspace/hnswlib mentioned on GitHubmxnet report

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.

Code Syntology ran Syntology

32 samples harvested; 0 ran; 0 honoured the contract we drafted; 32 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

32unverified

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; each sample names its own and says which. “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. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (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 from a repository marked official are listed first. 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 four 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; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). 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.

clear nmslib/nmslib/previous_releases_scripts/genplot.py community (archive-listed) unverified Apache-2.0 (permissive) · f38de72dd78893f4 · report
compare kakao/n2/benchmarks/compare.py community (archive-listed) unverified Apache-2.0 (permissive) · 7f2e786868a36028 · report
dict_param_to_nsmlib_bin_str nmslib/nmslib/benchmark/misc_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 18e581112ad83723 · report
genPGFPlot nmslib/nmslib/previous_releases_scripts/genplot.py community (archive-listed) unverified Apache-2.0 (permissive) · 1c950e4966ec9598 · report
genPGFPlot searchivarius/NonMetricSpaceLib/previous_releases_scripts/nips2013/figures/genplots_nips2013.py community (archive-listed) unverified Apache-2.0 (permissive) · f2e1e86c45959434 · report
getAxisLatex nmslib/nmslib/previous_releases_scripts/genplot.py community (archive-listed) unverified Apache-2.0 (permissive) · ff42ba0e2e3b9192 · report
get_dataset javaCJ/HNSW_explain/benchmarks/benchmark_script.py community (archive-listed) unverified Apache-2.0 (permissive) · 00fd55582acb50eb · report
get_dataset javaCJ/HNSW_explain/benchmarks/youtube_reproduce.py community (archive-listed) unverified Apache-2.0 (permissive) · e835d9076670deaf · report
get_dataset oddconcepts/n2o/benchmarks/benchmark_script.py community (archive-listed) unverified Apache-2.0 (permissive) · 642902330718ba50 · report
get_dataset_fn kakao/n2/benchmarks/download_dataset.py community (archive-listed) unverified Apache-2.0 (permissive) · 706485776c880850 · report
get_fn javaCJ/HNSW_explain/benchmarks/benchmark_script.py community (archive-listed) unverified Apache-2.0 (permissive) · c329b3648ba301d2 · report
get_fn oddconcepts/n2o/benchmarks/benchmark_script.py community (archive-listed) unverified Apache-2.0 (permissive) · 64e8a6840e30069d · report
get_queries javaCJ/HNSW_explain/benchmarks/benchmark_script.py community (archive-listed) unverified Apache-2.0 (permissive) · 52763ab12190a56b · report
get_queries javaCJ/HNSW_explain/benchmarks/youtube_reproduce.py community (archive-listed) unverified Apache-2.0 (permissive) · 0a70bd6ca6481e54 · report
get_queries oddconcepts/n2o/benchmarks/benchmark_script.py community (archive-listed) unverified Apache-2.0 (permissive) · 21dfacf227bb72f7 · report
guess_numpy_dtype_from_filename unum-cloud/usearch/python/usearch/io.py community (archive-listed) unverified Apache-2.0 (permissive) · f51acd5adbd5e1f7 · report
knn_recall kakao/n2/benchmarks/metrics.py community (archive-listed) unverified Apache-2.0 (permissive) · db909965da54b5b6 · report
knn_threshold kakao/n2/benchmarks/metrics.py community (archive-listed) unverified Apache-2.0 (permissive) · 42b99a41e74dbeeb · report
load_dense nmslib/nmslib/benchmark/data_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · d4eb67b43f42acff · report
load_entries nmslib/nmslib/benchmark/make_plots.py community (archive-listed) unverified Apache-2.0 (permissive) · 859111b60568c802 · report
load_matrix unum-cloud/usearch/python/usearch/io.py community (archive-listed) unverified Apache-2.0 (permissive) · 6232ffacb8dd099a · report
load_test_data kakao/n2/benchmarks/benchmark_script.py community (archive-listed) unverified Apache-2.0 (permissive) · 4e54de2be24f817c · report
load_train_data kakao/n2/benchmarks/benchmark_script.py community (archive-listed) unverified Apache-2.0 (permissive) · 08e39aef547dffd7 · report
numpy_scalar_size unum-cloud/usearch/python/usearch/io.py community (archive-listed) unverified Apache-2.0 (permissive) · 5c21b4b0da32e8da · report
parse kakao/n2/benchmarks/compare.py community (archive-listed) unverified Apache-2.0 (permissive) · 8ab19cdee9a46e74 · report
parse kakao/n2/benchmarks/visualize.py community (archive-listed) unverified Apache-2.0 (permissive) · 9765c8d022e20684 · report
pdist kakao/n2/benchmarks/metrics.py community (archive-listed) unverified Apache-2.0 (permissive) · 54a1c6f06f1a932f · report
plot_entry nmslib/nmslib/benchmark/make_plots.py community (archive-listed) unverified Apache-2.0 (permissive) · 906dd13e8bf7767c · report
read_dense_from_text nmslib/nmslib/benchmark/data_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 22b1e9b52b1b0f3a · report
sanitize nmslib/nmslib/benchmark/make_plots.py community (archive-listed) unverified Apache-2.0 (permissive) · 4ca9f55920b86b16 · report
split_data nmslib/nmslib/benchmark/data_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 2687bda4a867ff8a · report
to_int nmslib/nmslib/benchmark/misc_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 6d8f5a668d2ace9f · report

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