PatANN is a pattern-aware, massively parallel, and distributed vector search framework designed for scalable and efficient nearest neighbor search, operating both in-memory and on-disk. Unlike conventional algorithms, PatANN leverages macro and micro patterns within vectors to drastically reduce search space before performing costly distance computations.
Refer to the website for technical details, algorithm overview, key innovations, benchmarks, and tutorials.
While still in beta, PatANN's pattern-first approach delivers unprecedented performance advantages. As shown in our benchmarks (Figure 1), PatANN consistently outperforms leading ANN libraries including HNSW (hnswlib), Google ScaNN, Facebook FAISS variants, and others in the critical recall-throughput tradeoff.
This repository contains:
- ann-benchmarks: Benchmarking tools and results comparing PatANN to other ANN libraries. Refer to the README in ann-benchmarks folder for more details
- examples: Sample code demonstrating PatANN integration across multiple platforms
The examples directory includes implementation samples for multiple platforms. Refer to the tutorial on PatANN website https://patann.dev for details
patann_sync_example.py: Synchronous PatANN API usage examplepatann_async_example.py: Asynchronous PatANN API usage examplepatann_async_parallel_example.py: Example demonstrating parallel asynchronous vector searchpatann_utils.py: Common utility functions used in all examples
PatANNExampleKotlin: Synchronous and Asynchronous Android implementation using KotlinPatANNExampleJava: Synchronous and Asynchronous Android implementation using Java
PatAnnExampleSwift: Synchronous and Asynchronous iOS implementation using SwiftPatAnnExampleObjC: Synchronous and Asynchronous iOS implementation using Objective-C
Refer to the examples directory for platform-specific integration guides. Visit our website for complete documentation, installation instructions, and additional resources.