Giter Club home page Giter Club logo

simpleanns's Introduction

SimpleANNS

Naive implementations of some ANN (Approximate Nearest Neighbor) search algorithms without any optimization and generalization.

Progess

  • FLAT
  • IVF_FLAT
  • IVF_SQ8
  • IVF_PQ
  • HNSW
  • RHNSW_FLAT
  • RHNSW_SQ
  • RHNSW_PQ

Algorithms

The algorithms used in ANN search can generally be classified as tree based, LHS based, graph based and IVF based, where graph and IVF based algorithms are more popular today but tree and LHS based algorithms are no longer commonly used. Moreover, quantization can be used to compress data and reduce memory usage.

[CVPR20 Tutorial] Billion-scale Approximate Nearest Neighbor Search is a good tutorial for ANN beginners.

ann-benchmarks contains some tools to benchmark various implementations of approximate nearest neighbor (ANN) search for different metrics.

Tree Based

Based on the idea of partitioning vector space, performs poorly in high demensional vector space due to the curse of dimensionality.

LHS (Locality Sensitive Hashing) Based

Instead of collision avoidance, the general idea of hashing, the idea of LSH is to expolit collisions for mapping points which are nearby into the same bucket. It is popular in theory area, but performs poorly in practice with real-world data.

Graph Based

Popular in recent years, mostly based on the idea of proximity graph. Given a query, start from a source point (randomly chosen or supplied by a separate algorithm), greedily find the closest point to the query.

Blog: Proximity Graph-based Approximate Nearest Neighbor Search

Inverted Index Based

This algorithm clusters the dataset to partition the space to Voronoi Cells, and by searching only neighbor cells reduces the data points needed to search.

Quantization

Datasets

simpleanns's People

Contributors

hhy3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.