PatANN is a massively parallel, distributed, and scalable in-memory/on-disk vector database library for efficient nearest neighbor search across large-scale datasets by finding vector patterns.
Project description
PatANN - Pattern-Aware Vector Database / ANN
Overview
PatANN is a pattern-aware, massively parallel, distributed, and scalable vector database algorithm and framework for efficient nearest neighbor search, operating both in-memory and on-disk.
Unlike conventional algorithms, PatANN extracts and hashes patterns from vectors, and use them for initial filtering before performing expensive distance computations. During a search, PatANN first examines these pattern hashes to identify a subset of vectors that share similar patterns with the query vector. Only after this preliminary filtering does PatANN apply traditional distance metrics (Euclidean, cosine, etc.) to this smaller candidate set.
However, the actual implementation is more involved. Vectors are encoded at multiple resolutions, capturing both macro and micro patterns within the data. This multi-scale approach ensures that both broad similarities and fine details are captured. The patterns are hashed to maintain locality of reference, minimizing cross-shard communication during searches. PatANN also uses recursive patterns to mitigate the curse of dimensionality and hubness in high-dimensional data. The system dynamically selects which patterns to prioritize based on the distribution characteristics of the vector space, optimizing for the specific dataset. Additionally, PatANN employs probabilistic matching rather than exact pattern matching to achieve massive speed advantages while maintaining high recall. A detailed research paper is forthcoming.
Performance Implications
While still in beta, this pattern-first, details-later approach results in significant performance advantages. PatANN outperforms conventional ANN libraries including HNSW, Google ScaNN, Microsoft DiskANN, and Facebook FAISS by a substantial margin, with superior recall and speed. Detailed benchmarks conducted using industry-standard ann-benchmarks are available at https://patann.dev.
By filtering candidates based on patterns before computing exact distances, PatANN drastically reduces the number of expensive distance calculations.
For disk-based operations, pattern probing allows PatANN to be more selective about which vectors to load from disk, minimizing I/O operations.
Pattern probing operations are highly parallelized, taking advantage of modern CPU architectures and distributed computing environments. Also, as dataset size increases, the efficiency gains from pattern probing become more pronounced, making PatANN particularly effective for very large-scale vector databases.
Mathematical Foundation
The pattern probing approach is grounded in information theory and dimensionality reduction techniques. While traditional methods like locality-sensitive hashing (LSH) approximate similarity through random projections, PatANN's pattern probing uses a more structured approach that:
- Identifies statistically significant patterns in the vector space
- Leverages these patterns to create a hierarchical filtering system
- Dynamically adjusts the pattern sensitivity based on the density and distribution of the vector space
This mathematically rigorous foundation ensures that PatANN maintains high recall rates while achieving substantial speedups over conventional ANN implementations.
By combining this pattern probing technique with traditional distance metrics in a tiered approach, PatANN achieves both speed and accuracy, representing a significant advancement in vector search technology.
Platforms
- Linux
- macOS (Apple Silicon)
- Windows
- Android
- iOS
Key Distinguishing Features
- Novel pattern-based probing technique for ANN search
- In-Memory, On-Disk and Hybrid Index
- Refined search, filtering and pagination algorithm
- Unlimited scalability without pre-specified capacity
- Dynamic sharding to load balance across servers
- Cloud (in-progress) and Serverless
- SIMD-Accelerated for both x86_64 (SSE*, AVX2, AVX-512), and ARM (NEON, SVE) Platforms
- OS-optimized I/O--huge (Linux), large (Windows), and super (macOS)
- NUMA-aware architecture
Status
Beta Version: Currently in Beta. Not for production use yet.
Contributions
We are seeking help to:
- Run additional datasets. So far, all tested datasets (including self-generated) exhibit patterns that helps algorithm. We have yet to test datasets without clear patterns or with uniform distribution.
- Validate and improve the algorithm
Contact
For support / questions, please contact: support@mesibo.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file patann-0.0.86.tar.gz.
File metadata
- Download URL: patann-0.0.86.tar.gz
- Upload date:
- Size: 4.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6f927c2d24cb697e2e12f770392c2a931e036809534830fece1b8daff388547
|
|
| MD5 |
b611d1051fa8125aeb704bdacb7f8709
|
|
| BLAKE2b-256 |
c32bee7b012998d27ea96b6d74b910bb4f9c5be1d0959a27dde61d63d891ee6b
|
File details
Details for the file patann-0.0.86-py3-none-any.whl.
File metadata
- Download URL: patann-0.0.86-py3-none-any.whl
- Upload date:
- Size: 4.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
101d4f1102dc80485378bcafd98f1c212ae0fa4a3c0481e897f6920193b23487
|
|
| MD5 |
518725761b42473e3233f4a9dfe95b0e
|
|
| BLAKE2b-256 |
64208fb08c0cd61b6d8caddf3c48e0b98a592cc75cb1d7d03ea98148e9c9b74a
|