Randomized Algorithms for Comparison-based Search

Dominique Tschopp, Suhas N. Diggavi, Payam Delgosha, Soheil MohajerNeurIPS 2011

Standard nearest neighbor (NN) search algorithms typically rely on a metric space where numerical distances between points are explicitly known. However, in many real-world applications—such as recommendation systems or human-assisted image search—numerical distances are unavailable. Instead, we rely on a "comparison oracle": a human or a model that can only tell us which of two objects is more similar to a given query (e.g., "Is object A more like B or C?").

The primary challenge in this setting is that invoking the oracle is "expensive," representing either human effort or complex computation. This paper explores how to minimize the number of questions asked during both the "learning phase" (pre-processing the database) and the "search phase" (finding the NN for a new query). By characterizing the underlying structure of the data through a concept called "disorder," the authors establish fundamental lower bounds for search complexity and introduce a randomized hierarchical algorithm that significantly improves upon previous efficiency bounds.

Methods and Lower Bound Construction

The paper introduces several key theoretical and algorithmic components to tackle comparison-based search:

  • Combinatorial Disorder ($D$): This parameter defines how much the "triangle inequality" is violated when looking at the ranks of objects rather than their physical distances. A low $D$ means the space is well-behaved, while a high $D$ indicates a "disordered" space. $D$ acts as the "intrinsic dimension" for comparison-based search.
  • Lower Bound Construction: Using Yao’s minimax principle, the authors prove the minimum number of questions any randomized algorithm must ask to find a nearest neighbor. To do this, they construct a specialized "star-shaped graph" database structure.
Synthetic star graph used to establish the lower bound for comparison-based search.
  • Randomized Hierarchical Scheme: The authors propose a top-down learning algorithm that samples the database at increasing densities across multiple levels.
  • Learning: The algorithm "bins" objects based on their proximity to samples at each level. By leveraging the disorder constant $D$, it only needs to rank a small subset of samples to maintain the hierarchy.
  • Search: To find a query's NN, the algorithm traverses this hierarchy, using the "bins" from sparse levels to prune the search space in denser levels.
  • Randomized k-d Trees Extension: For cases where the space's characterization is unknown, the authors briefly discuss a method to decompose the space so that similar objects stay together, effectively generalizing metric k-d trees to a comparison-based framework.

Key Insights and Results

The paper shifts the focus from absolute distance to relative rank. In human-centric data, the exact "distance" between two movies is often meaningless, but the "rank" (e.g., is movie A the 1st or 10th most similar to movie B?) is a robust metric. A major innovation of this work is the ability to infer these ranks through the density of random sampling. By carefully choosing sample densities at each level of the hierarchy, the algorithm can "guess" which objects are likely to be neighbors without asking the oracle about every pair.

Theoretical Guarantees: * Lower Bound: The authors established that any randomized algorithm requires at least $\Omega(D \log \frac{n}{D} + D^2)$ questions on average in the search phase. * Improved Search Complexity: Their proposed algorithm achieves a search complexity of $O(D^3 \log^2 n + D \log^2 n \log \log n^{D^3})$ questions. * Learning Efficiency: The learning phase requires $O(nD^3 \log^2 n + \dots)$ questions. This is a significant improvement—roughly a factor of $D^4$—over previous state-of-the-art algorithms. * Storage: The resulting data structure is highly memory-efficient, requiring only $O(n \log^2 n / \log(2D))$ bits to store.

Limitations and Future Work

While the paper provides strong provable bounds, there are practical limitations to consider:

  • Knowledge of $D$: The primary algorithm assumes that the disorder constant $D$ is known or can be accurately estimated beforehand. If $D$ is unknown, the theoretical guarantees are harder to maintain.
  • High Disorder Scenarios: If the database is extremely disordered (where $D$ approaches $\sqrt{n}$), the efficiency gains of this method over a simple linear scan diminish.
  • Theoretical vs. Practical Gap: The constants hidden in the $O(\cdot)$ notation (like $D^3$) could be large in practice. The authors suggest that further heuristic refinements are necessary for real-world deployment.

Future directions point toward developing data structures that can adaptively discover the "intrinsic dimension" of the space on the fly, even when no prior characterization like $D$ is available.

Summary updated

BibTeX
@inproceedings{tschopp2011randomized,
  author = {Dominique Tschopp and Suhas N. Diggavi and Payam Delgosha and Soheil Mohajer},
  title = {{Randomized Algorithms for Comparison-based Search}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2011},
}
Figure