TL;DR
Standard similarity search algorithms like Locality Sensitive Hashing (LSH) are inherently biased, favoring points closest to a query over those further away. This paper introduces "Fair Near Neighbor" search, providing new data structures and algorithms that ensure every point within a target radius has an equal probability of being returned, all while maintaining high-dimensional efficiency.
What Problem Does This Paper Address?
Similarity search is a cornerstone of modern computer science, powering everything from movie recommendations to facial recognition. The classic $r$-near neighbor ($r$-NN) problem asks: "Given a query point $q$, find any point $p$ within distance $r$."
The industry standard for solving this in high dimensions is Locality Sensitive Hashing (LSH). LSH is brilliant because it's fast; it works by ensuring that points closer to each other have a higher probability of "colliding" in the same hash bucket. However, this efficiency comes with a hidden cost: bias. If you have ten points within distance $r$, LSH is much more likely to return the one at distance $0.1r$ than the one at $0.9r$.
In many applications—like ensuring diversity in recommendations, anonymizing data, or avoiding algorithmic discrimination—this bias is a bug, not a feature. The authors tackle the challenge of "individual fairness," where every valid answer (every point within the radius) deserves an equal opportunity to be chosen.
Methods
The authors bridge the gap between fairness and efficiency by treating the problem as a "sampling from a union of sets" challenge. In LSH, a query point $q$ hashes into multiple buckets, and the set of potential neighbors is the union of all points in those buckets.
Key techniques introduced include:
- Exact and Approximate Degree Computation: To sample uniformly from a union of sets, you need to know how many sets each element belongs to (its "degree"). The authors propose using rejection sampling: pick a point from a bucket and accept it with probability $1/\text{degree}$. Since calculating the exact degree is slow, they use count-distinct sketches and simulation techniques to approximate it efficiently.
- Rank Perturbation: A method that assigns random ranks to points and uses priority queues to find the minimum-rank neighbor. They show that by "shuffling" these ranks during the query, they can achieve independent, uniform samples.
- Locality Sensitive Filters (LSF): For inner product similarity (common in machine learning), they develop a nearly-linear space data structure that avoids the overhead of traditional LSH while maintaining fairness guarantees.
Datasets
The researchers evaluated their algorithms on five diverse, real-world datasets:
- MovieLens: User-movie ratings (Jaccard similarity).
- Last.FM: User-artist preferences (Jaccard similarity).
- MNIST: Hand-written digits (Euclidean distance).
- SIFT: Image descriptors (Euclidean distance).
- GloVe: Word embeddings (Euclidean distance).
Key Insights and Ideas
- The LSH Fairness Gap: The paper quantifies just how "unfair" standard LSH is. In the Last.FM dataset, a point with very high similarity was nearly 6 times more likely to be returned than a point just barely meeting the similarity threshold.
- Fairness is a Choice: The authors demonstrate that you don't have to sacrifice high-dimensional performance for fairness. By adding a layer of sampling logic on top of LSH, you can achieve near-perfect uniformity.
- The "Clustered Neighborhood" Trap: In their analysis of approximate fairness, they found that if a point is surrounded by many similar "clones," those clones can effectively "drown out" other valid neighbors in the hash buckets. This highlights a subtle way that data distribution can lead to unintentional bias.
Key Results
- Bias Reduction: The proposed "Optimal" and "Approximate Degree" algorithms drastically reduced the Total Variation Distance (a measure of how far a distribution is from uniform) compared to standard LSH approaches.
- Efficiency Trade-off: Achieving fairness isn't free. The fair algorithms were generally about 10 times slower than standard, biased LSH. However, they remained significantly faster than a naive "find all neighbors and pick one" approach, which can be 2-3 times slower than the authors' optimized fair methods.
- Practicality: The "Rank Perturbation" method emerged as a particularly strong practical candidate, offering a good balance of speed and statistical fairness.
Limitations and Future Work
- Parameter Sensitivity: The performance of these fair data structures still relies on carefully tuning LSH parameters (like the number of hash functions and tables). The authors suggest that moving toward "parameter-free" fair structures would be a major step forward.
- Weighted Fairness: While this paper focuses on uniform sampling, some applications might want a specific, controlled bias (e.g., "prefer closer points, but not by much"). The authors leave this "weighted fairness" as an open problem.
- Computational Cost: While sub-linear, the 10x overhead compared to standard LSH might be a hurdle for ultra-low-latency systems, suggesting a need for even more optimized implementations or hardware acceleration.
Summary updated