All Projects → yahoojapan → Ngt

yahoojapan / Ngt

Licence: apache-2.0
Nearest Neighbor Search with Neighborhood Graph and Tree for High-dimensional Data

Projects that are alternatives of or similar to Ngt

kdtree-rs
K-dimensional tree in Rust for fast geospatial indexing and lookup
Stars: ✭ 137 (-78.46%)
Mutual labels:  nearest-neighbor-search
docarray
The data structure for unstructured data
Stars: ✭ 561 (-11.79%)
Mutual labels:  nearest-neighbor-search
N2
TOROS N2 - lightweight approximate Nearest Neighbor library which runs fast even with large datasets
Stars: ✭ 457 (-28.14%)
Mutual labels:  nearest-neighbor-search
annoy.rb
annoy-rb provides Ruby bindings for the Annoy (Approximate Nearest Neighbors Oh Yeah).
Stars: ✭ 23 (-96.38%)
Mutual labels:  nearest-neighbor-search
kdtree
A k-d tree implementation in Go.
Stars: ✭ 98 (-84.59%)
Mutual labels:  nearest-neighbor-search
pgvector
Open-source vector similarity search for Postgres
Stars: ✭ 482 (-24.21%)
Mutual labels:  nearest-neighbor-search
awesome-vector-search
Collections of vector search related libraries, service and research papers
Stars: ✭ 460 (-27.67%)
Mutual labels:  nearest-neighbor-search
Smile
Statistical Machine Intelligence & Learning Engine
Stars: ✭ 5,412 (+750.94%)
Mutual labels:  nearest-neighbor-search
graphgrove
A framework for building (and incrementally growing) graph-based data structures used in hierarchical or DAG-structured clustering and nearest neighbor search
Stars: ✭ 29 (-95.44%)
Mutual labels:  nearest-neighbor-search
Pynndescent
A Python nearest neighbor descent for approximate nearest neighbors
Stars: ✭ 377 (-40.72%)
Mutual labels:  nearest-neighbor-search
Dolphinn
High Dimensional Approximate Near(est) Neighbor
Stars: ✭ 32 (-94.97%)
Mutual labels:  nearest-neighbor-search
ann-benchmarks
Benchmarking approximate nearest neighbors. Note: This is an archived version from our SISAP 2017 paper, see below.
Stars: ✭ 30 (-95.28%)
Mutual labels:  nearest-neighbor-search
lbvh
an implementation of parallel linear BVH (LBVH) on GPU
Stars: ✭ 67 (-89.47%)
Mutual labels:  nearest-neighbor-search
Rayuela.jl
Code for my PhD thesis. Library of quantization-based methods for fast similarity search in high dimensions. Presented at ECCV 18.
Stars: ✭ 54 (-91.51%)
Mutual labels:  nearest-neighbor-search
Lopq
Training of Locally Optimized Product Quantization (LOPQ) models for approximate nearest neighbor search of high dimensional data in Python and Spark.
Stars: ✭ 530 (-16.67%)
Mutual labels:  nearest-neighbor-search
lshensemble
LSH index for approximate set containment search
Stars: ✭ 48 (-92.45%)
Mutual labels:  nearest-neighbor-search
adventures-with-ann
All the code for a series of Medium articles on Approximate Nearest Neighbors
Stars: ✭ 40 (-93.71%)
Mutual labels:  nearest-neighbor-search
Milvus
An open-source vector database for embedding similarity search and AI applications.
Stars: ✭ 9,015 (+1317.45%)
Mutual labels:  nearest-neighbor-search
Soundfingerprinting
Open source audio fingerprinting in .NET. An efficient algorithm for acoustic fingerprinting written purely in C#.
Stars: ✭ 554 (-12.89%)
Mutual labels:  nearest-neighbor-search
Mlpack
mlpack: a scalable C++ machine learning library --
Stars: ✭ 3,859 (+506.76%)
Mutual labels:  nearest-neighbor-search

Neighborhood Graph and Tree for Indexing High-dimensional Data

Home / Installation / Command / License / Publications / About Us / 日本語

NGT provides commands and a library for performing high-speed approximate nearest neighbor searches against a large volume of data (several million to several 10 million items of data) in high dimensional vector data space (several ten to several thousand dimensions).

News

  • 03/12/2021 The results for the quantized graph are added to this README.
  • 01/15/2021 NGT v1.13.0 to provide the quantized graph (NGTQG) is released.
  • 11/04/2019 NGT tutorial has been released.
  • 06/26/2019 Jaccard distance is available. (v1.7.6)
  • 06/10/2019 PyPI NGT package v1.7.5 is now available.
  • 01/17/2019 Python NGT can be installed via pip from PyPI. (v1.5.1)
  • 12/14/2018 NGTQ (NGT with Quantization) is now available. (v1.5.0)
  • 08/08/2018 ONNG is now available. (v1.4.0)

Key Features

  • Supported operating systems: Linux and macOS
  • Object additional registration and removal are available.
  • Objects beyond the memory size can be handled using the shared memory (memory mapped file) option.
  • Supported distance functions: L1, L2, Cosine similarity, Angular, Hamming, Jaccard, Poincare, and Lorentz
  • Data Types: 4 byte floating point number and 1 byte unsigned integer
  • Supported languages: Python, Ruby, Rust, Go, C, and C++
  • Distributed servers: ngtd and vald
  • NGTQ can handle billions of objects.

Documents

Installation

Downloads

Pre-Built

On macOS

  $ brew install ngt

Build

On Linux

  $ unzip NGT-x.x.x.zip
  $ cd NGT-x.x.x
  $ mkdir build
  $ cd build
  $ cmake ..
  $ make
  $ make install
  $ ldconfig /usr/local/lib

On macOS using homebrew

  $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  $ brew install cmake
  $ brew install [email protected]
  $ export CXX=/usr/local/bin/g++-9
  $ export CC=/usr/local/bin/gcc-9
  $ unzip NGT-x.x.x.zip
  $ cd NGT-x.x.x
  $ mkdir build
  $ cd build
  $ cmake ..
  $ make
  $ make install

Shared memory use

The index can be placed in shared memory with memory mapped files. Using shared memory can reduce the amount of memory needed when multiple processes are using the same index. In addition, it can not only handle an index with a large number of objects that cannot be loaded into memory, but also reduce time to open it. Since changes become necessary at build time, please add the following parameter when executing "cmake" in order to use shared memory.

  $ cmake -DNGT_SHARED_MEMORY_ALLOCATOR=ON ..

Note: Since there is no lock function, the index should be used only for reference when multiple processes are using the same index.

Large-scale data use

When you insert more than about 5 million objects, please add the following parameter to improve the search time.

  $ cmake -DNGT_LARGE_DATASET=ON ..

Utilities

Supported Programming Languages

Benchmark Results

The followings are the results of ann benchmarks for NGT v1.13.5 where the timeout is 5 hours on an AWS c5.4xlarge instance.

glove-100-angular

gist-960-euclidean

fashion-mnist-784-euclidean

nytimes-256-angular

sift-128-euclidean

License

Copyright (C) 2015 Yahoo Japan Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributor License Agreement

This project requires contributors to accept the terms in the Contributor License Agreement (CLA).

Please note that contributors to the NGT repository on GitHub (https://github.com/yahoojapan/NGT) shall be deemed to have accepted the CLA without individual written agreements.

Contact Person

masajiro

Publications

ONNG
  • Iwasaki, M., Miyazaki, D.: Optimization of Indexing Based on k-Nearest Neighbor Graph for Proximity. arXiv:1810.07355 [cs] (2018). (pdf)
PANNG
  • Iwasaki, M.: Pruned Bi-directed K-nearest Neighbor Graph for Proximity Search. Proc. of SISAP2016 (2016) 20-33. (pdf)
  • Sugawara, K., Kobayashi, H. and Iwasaki, M.: On Approximately Searching for Similar Word Embeddings. Proc. of ACL2016 (2016) 2265-2275. (pdf)
ANNGT
  • Iwasaki, M.: Applying a Graph-Structured Index to Product Image Search (in Japanese). IIEEJ Journal 42(5) (2013) 633-641. (pdf)
  • Iwasaki, M.: Proximity search using approximate k nearest neighbor graph with a tree structured index (in Japanese). IPSJ Journal 52(2) (2011) 817-828. (pdf)
ANNG
  • Iwasaki, M.: Proximity search in metric spaces using approximate k nearest neighbor graph (in Japanese). IPSJ Trans. on Database 3(1) (2010) 18-28. (pdf)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].