{"id":13410136,"url":"https://github.com/nmslib/nmslib","last_synced_at":"2025-04-25T14:43:04.243Z","repository":{"id":37432451,"uuid":"11309795","full_name":"nmslib/nmslib","owner":"nmslib","description":"Non-Metric Space Library (NMSLIB): An efficient similarity search library and a toolkit for evaluation of k-NN methods for generic non-metric spaces.","archived":false,"fork":false,"pushed_at":"2024-09-21T03:01:04.000Z","size":99207,"stargazers_count":3475,"open_issues_count":96,"forks_count":459,"subscribers_count":92,"default_branch":"master","last_synced_at":"2025-04-24T04:15:00.239Z","etag":null,"topics":["k-nn-graphs","knn-search","neighborhood-graphs","non-metric","vp-tree"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nmslib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-Apache-2.0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-07-10T11:06:06.000Z","updated_at":"2025-04-23T20:50:56.000Z","dependencies_parsed_at":"2022-08-08T20:15:54.065Z","dependency_job_id":"6cd02939-4973-4a94-bb63-bb55a2ce0a2d","html_url":"https://github.com/nmslib/nmslib","commit_stats":{"total_commits":1319,"total_committers":50,"mean_commits":26.38,"dds":0.3722517058377559,"last_synced_commit":"ade4bcdc9dd3719990de2503871450b8a62df4a5"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmslib%2Fnmslib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmslib%2Fnmslib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmslib%2Fnmslib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmslib%2Fnmslib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmslib","download_url":"https://codeload.github.com/nmslib/nmslib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250560056,"owners_count":21450173,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["k-nn-graphs","knn-search","neighborhood-graphs","non-metric","vp-tree"],"created_at":"2024-07-30T20:01:05.145Z","updated_at":"2025-04-24T04:15:18.381Z","avatar_url":"https://github.com/nmslib.png","language":"C++","readme":"[![Pypi version](https://img.shields.io/pypi/v/nmslib.svg)](http://pypi.python.org/pypi/nmslib)\n[![Downloads](https://pepy.tech/badge/nmslib)](https://pepy.tech/project/nmslib)\n[![Downloads](https://pepy.tech/badge/nmslib/month)](https://pepy.tech/project/nmslib)\n[![Windows Build Status](https://ci.appveyor.com/api/projects/status/wd63b9doe7xco81t/branch/master?svg=true)](https://ci.appveyor.com/project/searchivarius/nmslib)\n[![Join the chat at https://gitter.im/nmslib/Lobby](https://badges.gitter.im/nmslib/Lobby.svg)](https://gitter.im/nmslib/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n# Non-Metric Space Library (NMSLIB) \n\n## Important Notes\n\n* NMSLIB is generic but fast, see the results of [ANN benchmarks](https://github.com/erikbern/ann-benchmarks).\n* A standalone implementation of our fastest method HNSW [also exists as a header-only library](https://github.com/nmslib/hnswlib).\n* **All the documentation** (including using **Python bindings** and the query server, description of methods and spaces, building the library, etc) can be found [on this page](/manual/README.md).\n* For **generic questions/inquiries**, please, use [**the Gitter chat**](https://gitter.im/nmslib/Lobby?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge): GitHub issues page is for bugs and feature requests.\n\n## Objectives\n\nNon-Metric Space Library (NMSLIB) is an **efficient** cross-platform similarity search library and a toolkit for evaluation of similarity search methods. The core-library does **not** have any third-party dependencies. It has been gaining popularity recently. In particular, it has become a part of [Amazon Elasticsearch Service](https://aws.amazon.com/about-aws/whats-new/2020/03/build-k-nearest-neighbor-similarity-search-engine-with-amazon-elasticsearch-service/).\n\nThe goal of the project is to create an effective and **comprehensive** toolkit for searching in **generic and non-metric** spaces.\nEven though the library contains a variety of metric-space access methods,\nour main focus is on **generic** and **approximate** search methods,\nin particular, on methods for non-metric spaces.\nNMSLIB is possibly the first library with a principled support for non-metric space searching.\n\nNMSLIB is an **extendible library**, which means that is possible to add new search methods and distance functions. NMSLIB can be used directly in C++ and Python (via Python bindings). In addition, it is also possible to build a query server, which can be used from Java (or other languages supported by Apache Thrift (**version 0.12**). Java has a native client, i.e., it works on many platforms without requiring a C++ library to be installed.\n\n**Authors**: Bilegsaikhan Naidan, Leonid Boytsov, Yury Malkov, David Novak. **With contributions from** Ben Frederickson, Lawrence Cayton, Wei Dong, Avrelin Nikita, Dmitry Yashunin, Bob Poekert, @orgoro, @gregfriedland, \nScott Gigante, Maxim Andreev, Daniel Lemire, Nathan Kurz, Alexander Ponomarenko.\n\n## Brief History\n\nNMSLIB started as a personal project of Bilegsaikhan Naidan, who created the initial code base, the Python bindings,\nand participated in earlier evaluations. \nThe most successful class of methods--neighborhood/proximity graphs--is represented by the Hierarchical Navigable Small World Graph (HNSW) due to Malkov and Yashunin (see the publications below). Other most useful methods, include a modification of the VP-tree due to Boytsov and Naidan (2013), a Neighborhood APProximation index (NAPP) proposed by Tellez et al. (2013) and improved by David Novak, as well as a vanilla uncompressed inverted file.\n\n\n## Credits and Citing\n\nIf you find this library useful, feel free to cite our SISAP paper [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/conf/sisap/BoytsovN13) as well as other papers listed in the end. One **crucial contribution** to cite is the fast Hierarchical Navigable World graph (HNSW) method [**[BibTex]**](https://dblp.uni-trier.de/rec/bibtex/journals/corr/MalkovY16). Please, [also check out the stand-alone HNSW implementation by Yury Malkov](https://github.com/nmslib/hnswlib), which is released as a header-only HNSWLib library.\n\n## License\n\nThe code is released under the Apache License Version 2.0 http://www.apache.org/licenses/. \nOlder versions of the library include additional components, which have different licenses (but this does not apply to NMLISB 2.x):\n\nOlder versions of the library included the following components:\n* The LSHKIT, which is embedded in our library, is distributed under the GNU General Public License, see http://www.gnu.org/licenses/. \n* The k-NN graph construction algorithm *NN-Descent* due to Dong et al. 2011 (see the links below), which is also embedded in our library, seems to be covered by a free-to-use license, similar to Apache 2.\n* FALCONN library's licence is MIT.\n\n## Funding\n\nLeonid Boytsov was supported by the [Open Advancement of Question Answering Systems (OAQA) group](https://github.com/oaqa) and the following NSF grant #1618159: \"[Matching and Ranking via Proximity Graphs: Applications to Question Answering and Beyond](https://www.nsf.gov/awardsearch/showAward?AWD_ID=1618159\u0026HistoricalAwards=false)\". Bileg was supported by the [iAd Center](https://web.archive.org/web/20160306011711/http://www.iad-center.com/).\n\n## Related Publications\n\nMost important related papers are listed below in the chronological order: \n* L. Boytsov, D. Novak, Y. Malkov, E. Nyberg  (2016). [Off the Beaten Path: Let’s Replace Term-Based Retrieval\nwith k-NN Search.](http://boytsov.info/pubs/cikm2016.pdf) In proceedings of CIKM'16. [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/conf/cikm/BoytsovNMN16) We use a special branch of this library, plus [the following Java code](https://github.com/oaqa/knn4qa/tree/cikm2016).\n* Malkov, Y.A., Yashunin, D.A.. (2016). [Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs. CoRR](http://arxiv.org/abs/1603.09320), abs/1603.09320. [**[BibTex]**](http://adsabs.harvard.edu/cgi-bin/nph-bib_query?bibcode=2016arXiv160309320M\u0026data_type=BIBTEX\u0026db_key=PRE\u0026nocookieset=1)\n* Bilegsaikhan, N., Boytsov, L. 2015 [Permutation Search Methods are Efficient, Yet Faster Search is Possible](http://boytsov.info/pubs/p2332-naidan-arxiv.pdf) PVLDB, 8(12):1618--1629, 2015 [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/journals/corr/NaidanBN15)\n* Ponomarenko, A., Averlin, N., Bilegsaikhan, N., Boytsov, L., 2014. [Comparative Analysis of Data Structures for Approximate Nearest Neighbor Search.](http://boytsov.info/pubs/da2014.pdf) [**[BibTex]**](http://scholar.google.com/scholar.bib?q=info:yOjNiT2Ql4AJ:scholar.google.com/\u0026output=citation\u0026hl=en\u0026ct=citation\u0026cd=0)\n* Malkov, Y., Ponomarenko, A., Logvinov, A., \u0026 Krylov, V., 2014. [Approximate nearest neighbor algorithm based on navigable small world graphs.](http://www.sciencedirect.com/science/article/pii/S0306437913001300) Information Systems, 45, 61-68. [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/journals/is/MalkovPLK14)\n* Boytsov, L., Bilegsaikhan, N., 2013. [Engineering Efficient and Effective Non-Metric Space Library.](http://boytsov.info/pubs/sisap2013.pdf)   In Proceedings of the 6th International Conference on Similarity Search and Applications (SISAP 2013). [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/conf/sisap/BoytsovN13)  \n* Boytsov, L., Bilegsaikhan, N., 2013. [Learning to Prune in Metric and Non-Metric Spaces.](http://boytsov.info/pubs/nips2013.pdf)   In Advances in Neural Information Processing Systems 2013. [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/conf/nips/BoytsovN13)\n* Tellez, Eric Sadit, Edgar Chávez, and Gonzalo Navarro. [Succinct nearest neighbor search.](http://www.dcc.uchile.cl/~gnavarro/ps/is12.pdf) Information Systems 38.7 (2013): 1019-1030. [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/journals/is/TellezCN13)\n* A. Ponomarenko, Y. Malkov, A. Logvinov, and V. Krylov  [Approximate nearest\nneighbor search small world approach.](http://www.iiis.org/CDs2011/CD2011IDI/ICTA_2011/Abstract.asp?myurl=CT175ON.pdf) ICTA 2011 \n* Dong, Wei, Charikar Moses, and Kai Li. 2011. [Efficient k-nearest neighbor graph construction for generic similarity measures.](http://wwwconference.org/proceedings/www2011/proceedings/p577.pdf) Proceedings of the 20th international conference on World wide web. ACM, 2011.\n[**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/conf/mir/DongWCL12)\n* L. Cayton, 2008 [Fast nearest neighbor retrieval for bregman divergences.](http://lcayton.com/bbtree.pdf) Twenty-Fifth International Conference on Machine Learning (ICML). [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/conf/icml/Cayton08)\n* Amato, Giuseppe, and Pasquale Savino. 2008 Approximate similarity search in metric spaces using inverted files. [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/conf/infoscale/AmatoS08)\n* Gonzalez, Edgar Chavez, Karina Figueroa, and Gonzalo Navarro. [Effective proximity retrieval by ordering permutations.](http://www.dcc.uchile.cl/~gnavarro/ps/tpami07.pdf) Pattern Analysis and Machine Intelligence, IEEE Transactions on 30.9 (2008): 1647-1658. [**[BibTex]**](http://dblp.uni-trier.de/rec/bibtex/journals/pami/ChavezFN08)\n\n","funding_links":[],"categories":["C++","Open Source Databases","Machine Learning Framework","向量相似度搜索（ANN）","Feature Extraction","Awesome Vector Search Engine","Sdks \u0026 Libraries","Industry Strength Information Retrieval"],"sub_categories":["Nearest Neighbors \u0026 Similarity","Text/NLP","Library"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmslib%2Fnmslib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmslib%2Fnmslib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmslib%2Fnmslib/lists"}