Graph-Based Algorithms for Diverse Similarity Search

Piyush Anand, Piotr Indyk, Ravishankar Krishnaswamy, S. Mahabadi, V. Raykar +2 more
2/14/2026

No confident code implementation found for this paper. 2 possible matches can be shown below.

Abstract

Nearest neighbor search is a fundamental data structure problem with many applications in machine learning, computer vision, recommendation systems and other fields. Although the main objective of the data structure is to quickly report data points that are closest to a given query, it has long been noted (Carbonell and Goldstein, 1998) that without additional constraints the reported answers can be redundant and/or duplicative. This issue is typically addressed in two stages: in the first stage, the algorithm retrieves a (large) number $r$ of points closest to the query, while in the second stage, the $r$ points are post-processed and a small subset is selected to maximize the desired diversity objective. Although popular, this method suffers from a fundamental efficiency bottleneck, as the set of points retrieved in the first stage often needs to be much larger than the final output. In this paper we present provably efficient algorithms for approximate nearest neighbor search with diversity constraints that bypass this two stage process. Our algorithms are based on popular graph-based methods, which allows us to"piggy-back"on the existing efficient implementations. These are the first graph-based algorithms for nearest neighbor search with diversity constraints. For data sets with low intrinsic dimension, our data structures report a diverse set of $k$ points approximately closest to the query, in time that only depends on $k$ and $\log \Delta$, where $\Delta$ is the ratio of the diameter to the closest pair distance in the data set. This bound is qualitatively similar to the best known bounds for standard (non-diverse) graph-based algorithms. Our experiments show that the search time of our algorithms is substantially lower than that using the standard two-stage approach.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 2 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{anand2026graphbased,
  title  = {Graph-Based Algorithms for Diverse Similarity Search},
  author = {Piyush Anand and Piotr Indyk and Ravishankar Krishnaswamy and S. Mahabadi and V. Raykar and Kirankumar Shiragur and Haike Xu},
  year   = {2026},
  eprint = {2502.13336},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2502.13336},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.13336.svg)](https://codeofpaper.com/paper/2502.13336)

Discussion