[Paper Review] Practical linear-space Approximate Near Neighbors in high dimension
This paper presents Dolphinn, a practical linear-space data structure for approximate near neighbor search in high-dimensional spaces. By randomly projecting points to a Hamming cube of dimension log n and querying nearby buckets, it achieves sublinear query time for any c > 1, including c → 1⁺, with significantly reduced memory and preprocessing overhead compared to state-of-the-art LSH libraries like FALCONN.
The $c$-approximate Near Neighbor problem in high dimensional spaces has been mainly addressed by Locality Sensitive Hashing (LSH), which offers polynomial dependence on the dimension, query time sublinear in the size of the dataset, and subquadratic space requirement. For practical applications, linear space is typically imperative. Most previous work in the linear space regime focuses on the case that $c$ exceeds $1$ by a constant term. In a recently accepted paper, optimal bounds have been achieved for any $c>1$ \cite{ALRW17}. Towards practicality, we present a new and simple data structure using linear space and sublinear query time for any $c>1$ including $c o 1^+$. Given an LSH family of functions for some metric space, we randomly project points to the Hamming cube of dimension $\log n$, where $n$ is the number of input points. The projected space contains strings which serve as keys for buckets containing the input points. The query algorithm simply projects the query point, then examines points which are assigned to the same or nearby vertices on the Hamming cube. We analyze in detail the query time for some standard LSH families. To illustrate our claim of practicality, we offer an open-source implementation in { t C++}, and report on several experiments in dimension up to 1000 and $n$ up to $10^6$. Our algorithm is one to two orders of magnitude faster than brute force search. Experiments confirm the sublinear dependence on $n$ and the linear dependence on the dimension. We have compared against state-of-the-art LSH-based library { t FALCONN}: our search is somewhat slower, but memory usage and preprocessing time are significantly smaller.
Motivation & Objective
- To address the challenge of efficient approximate near neighbor search in high-dimensional Euclidean spaces with linear space and sublinear query time.
- To design a practical, data-independent method that maintains efficiency even as the approximation factor c approaches 1 from above.
- To reduce memory consumption and preprocessing time compared to existing LSH-based systems like FALCONN, especially in large-scale settings.
- To provide a simple, open-source C++ implementation that outperforms brute force and scales well with dimension and dataset size.
Proposed method
- The method uses random projection to map high-dimensional points to the Hamming cube of dimension log n, where each point is assigned to a bucket based on its projected binary string.
- The query algorithm projects the query point to the same Hamming cube and retrieves points from the same or nearby buckets to find approximate neighbors.
- It leverages standard LSH families for the Euclidean and Manhattan metrics, analyzing query time complexity under these projections.
- The approach is data-independent, relying on random projections rather than dataset-specific optimizations, enhancing practicality and simplicity.
- The implementation uses a multi-probe strategy over the Hamming cube to efficiently explore nearby vertices during query processing.
- The method is designed to achieve optimal space complexity (linear in n) while maintaining sublinear query time for any c > 1.
Experimental results
Research questions
- RQ1Can a simple, data-independent method achieve sublinear query time and linear space for approximate near neighbor search in high dimensions?
- RQ2How does the performance of random projection to the Hamming cube compare to state-of-the-art LSH libraries in terms of speed, memory, and preprocessing?
- RQ3Does the method scale efficiently with increasing dimension d and dataset size n, particularly when c → 1⁺?
- RQ4What is the trade-off between query time, memory usage, and preprocessing time in practice compared to FALCONN and brute force?
Key findings
- Dolphinn achieves a 1 to 2 orders of magnitude speedup over brute force search in experiments with up to 10⁶ points and 1000 dimensions.
- Query time scales sublinearly with n and linearly with d, confirming theoretical expectations.
- In all tested configurations, Dolphinn consumed 2.1 times less memory than FALCONN, with preprocessing time 6.5 times faster.
- While FALCONN was 1.15x faster in search, Dolphinn achieved comparable accuracy (98.8% on Klein bottle, 100% on SIFT at high thresholds) with far less memory.
- The method maintained maximum accuracy in all experiments, with search times increasing only moderately with the threshold for nearby bucket checks.
- The open-source C++ implementation confirmed practicality, with build times under 1.7 seconds for 1M points and 1024 dimensions.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.