Skip to main content
QUICK REVIEW

[Paper Review] Learning Space Partitions for Nearest Neighbor Search

Yihe Dong, Piotr Indyk|arXiv (Cornell University)|Jan 24, 2019
Advanced Image and Video Retrieval TechniquesComputer Science46 references27 citations
TL;DR

This paper proposes Neural Locality-Sensitive Hashing (Neural LSH), a novel framework for learning space partitions in $ℝ^d$ that improves nearest neighbor search (NNS) performance by combining balanced graph partitioning of the $k$-NN graph with supervised classification. The method outperforms quantization-based, tree-based, and classic LSH methods on standard benchmarks, achieving higher accuracy with fewer candidates.

ABSTRACT

Space partitions of $\mathbb{R}^d$ underlie a vast and important class of fast nearest neighbor search (NNS) algorithms. Inspired by recent theoretical work on NNS for general metric spaces [Andoni, Naor, Nikolov, Razenshteyn, Waingarten STOC 2018, FOCS 2018], we develop a new framework for building space partitions reducing the problem to balanced graph partitioning followed by supervised classification. We instantiate this general approach with the KaHIP graph partitioner [Sanders, Schulz SEA 2013] and neural networks, respectively, to obtain a new partitioning procedure called Neural Locality-Sensitive Hashing (Neural LSH). On several standard benchmarks for NNS, our experiments show that the partitions obtained by Neural LSH consistently outperform partitions found by quantization-based and tree-based methods as well as classic, data-oblivious LSH.

Motivation & Objective

  • To address the gap in leveraging modern supervised machine learning for space partitioning in nearest neighbor search (NNS), despite its success in sketching-based methods.
  • To design a framework that optimizes key NNS metrics—candidate set size, recall, and computational efficiency—by learning data-aware partitions.
  • To overcome limitations of data-oblivious and unsupervised partitioning methods like $k$-means and random projections in NNS indexing.
  • To explore whether supervised classification can effectively extend combinatorial graph partitions to the full ambient space $ℝ^d$.
  • To demonstrate that learning-based space partitions can surpass traditional indexing methods in both accuracy and efficiency.

Proposed method

  • Construct the $k$-nearest neighbor (k-NN) graph $G$ of the dataset, where each point is connected to its $k$ nearest neighbors.
  • Apply balanced graph partitioning (using KaHIP) to divide $G$ into $m$ parts of nearly equal size while minimizing inter-partition edges.
  • Train a supervised classifier (e.g., logistic regression or neural network) on the data points, using the partition labels as targets, to extend the partition to all of $ℝ^d$.
  • Use the resulting classifier to assign any query point to a bin, and retrieve all data points in that bin (and nearby bins) as candidates.
  • Optimize the classifier using soft labels (temperature scaling) to improve generalization and robustness.
  • The framework is general and can be instantiated with various partitioners and classifiers, with empirical evaluation on standard NNS benchmarks.

Experimental results

Research questions

  • RQ1Can supervised machine learning techniques improve space partitioning for nearest neighbor search compared to traditional unsupervised or data-oblivious methods?
  • RQ2Does partitioning the $k$-NN graph and extending it via classification lead to better NNS performance than existing indexing methods?
  • RQ3How does the choice of $k$ in the $k$-NN graph affect the quality of the resulting partition and search accuracy?
  • RQ4Can soft labeling during classifier training improve the generalization and robustness of the partitioning scheme?
  • RQ5Can this framework be extended to non-Euclidean spaces or combined with ensemble methods for further performance gains?

Key findings

  • Neural LSH consistently outperforms $k$-means clustering and PCA trees on both GloVe and SIFT datasets in terms of $k$-NN accuracy and candidate set size.
  • On the SIFT dataset, Neural LSH matches $k$-means in average candidate count but achieves significantly better 95th percentile performance.
  • For GloVe, Neural LSH with $k=50$ outperforms $k$-means with $k=50$ even when using only the $10$-NN graph, indicating robustness to $k$-choice.
  • Setting the soft label temperature $S=15$ yields significantly better results than $S=1$, with diminishing returns beyond $S=15$.
  • Neural LSH dramatically improves upon random projection trees, which are inherently stochastic and require ensembling to improve accuracy.
  • The framework generalizes well: the average $k$-NN accuracy of the partition is directly related to the fraction of $k$-NN edges split across partitions, validating the theoretical foundation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.