Search arXiv⌕ Search

arXiv · 2611.40064

Fast Diverse Nearest Neighbor Search

Abstract

In the $k$-diverse nearest neighbor search problem, the input is a dataset in which each point is assigned a color, and given a query $q$, the goal is to retrieve $k$ approximate nearest neighbors with distinct colors. This color diversity metric is essential for information retrieval tasks where results are required to have different categories, e.g., recommending products from different sellers. Previous state-of-the-art solution by Anand et al. [ICML 2025] constructs a diversity-aware graph to meet this requirement. However, they suffer from an $\mathcal{O}(k^2)$ multiplicative query time overhead, creating a computational bottleneck when $k$ is large. To break this barrier, we propose a novel color bucketing framework that selects a subset of colors in each bucket and instantiates an independent approximate nearest neighbor search algorithm on the corresponding points. Inspired by group testing, we provide a randomized color sampling scheme that achieves an $\mathcal{O}\left(k^{1-\frac{1}{c^2}-o(1)}\log k\right)$ overhead in Euclidean spaces and an $\mathcal{O}\left(k \log k\right)$ overhead in general metric spaces, where $c$ is the approximation factor, reducing a factor of $k$. In addition, the space usage to store the data structure matches or improves upon prior methods. Empirical results on semi-synthetic and real-world datasets demonstrate that our approach achieves significantly faster search times and higher recall compared to state-of-the-art diversity search baselines. Abstract shortened to meet arXiv requirements.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Justin Y. Chen, Soham Naganwashi, Shenghao Xie, Haike Xu, Alan Zhou, Samson Zhou. 2026-11-29. Fast Diverse Nearest Neighbor Search. https://searcharxiv.org/abs/2611.40064

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

Edge-Tilting Field Dynamics: Rapid Mixing at the Uniqueness Threshold and Optimal Mixing for Swendsen-Wang Dynamics

We prove two results on the mixing times of Markov chains for two-spin systems. First, we show that the Glauber dynamics mixes in polynomial time for the Gibbs distributions of antiferromagnetic two-spin systems at the critical threshold of the uniqueness phase transition of the Gibbs measure on infinite regular trees. This result complements the near-linear-time optimal mixing in the uniqueness regime [Chen-Liu-Vigoda, STOC '21; Chen-Feng-Yin-Zhang, FOCS '22] and the NP-hardness of approximate sampling in the non-uniqueness regime [Sly-Sun, FOCS '12]. Along the way, we prove a tight spectral-independence bound for antiferromagnetic two-spin systems by introducing a new control-function approach to total influence. Second, we prove an optimal $O(\log n)$ mixing-time bound and an optimal $Ω(1)$ spectral-gap bound for the Swendsen-Wang dynamics for the ferromagnetic Ising model with external field on bounded-degree graphs. These bounds improve the previous general $O(n\log n)$ mixing-time bound and resolve a conjecture of [Feng-Guo-Wang, IANDC '23]. A key ingredient in both proofs is a new family of localization schemes that extends the field dynamics of [Chen-Feng-Yin-Zhang, FOCS '21] by tilting general edge (or hyperedge) weights rather than vertex fields. This framework, which subsumes the classical Swendsen-Wang dynamics as a special case, extends the localization framework of [Chen-Eldan, FOCS '22] beyond stochastic and field localizations, and enables controlled tilting of interaction strengths while preserving external fields.

cs.DS↗

Orienting Unrooted Binary Networks Faster: Focus on the Generator

The problem of orienting an unrooted phylogenetic network to obtain a rooted network belonging to a specific network class is NP-hard in many cases. In this paper, we introduce two algorithmic frameworks that yield significantly improved fixed-parameter tractable (FPT) algorithms parameterized by the network level $\ell$. We show that, for several prominent network classes, the core algorithmic difficulty lies in finding a directed spanning tree of the network's unrooted generator. By enumerating these spanning trees in $O(5.3334^\ell)$ time and orienting all remaining edges in polynomial time, we solve the orientation problem in $O(5.3334^\ell \cdot n)$ time for tree-based networks and in $O(5.3334^\ell \cdot n^2)$ time for orchards, where~$n$ is the number of vertices of the network. Extending this approach with further branching yields $O(10.6667^\ell \cdot n^2)$-time algorithms for tree-child and normal networks. Our second technique bypasses spanning trees by directly guessing the placement of reticulations on the generator. This framework provides $O(12.2071^\ell \cdot n^2)$-time algorithms for temporal, reticulation-visible, and tree-sibling networks. We further demonstrate the versatility of the reticulation guessing framework by showing that even computing an orientation with minimum scanwidth is single-exponential FPT with respect to the level.

cs.DS↗

A 3.1462-Competitive Algorithm for Matroid Secretary

In the matroid secretary problem, a set of elements arrives one at a time in a uniformly random order, and the weight of each element is revealed only when it arrives. The goal is to maximize the total weight of the selected elements, subject to the constraint that they form an independent set of a given matroid. An online algorithm must decide immediately and irrevocably whether to select each arriving element. Singla (2026) recently resolved the long-standing open question of whether a constant competitive ratio is achievable for every matroid by giving a $4$-competitive algorithm. His algorithm requires only the number of elements and the ability to ask, for any set of already-arrived elements, whether that set is independent in the matroid. With access to the same information, we provide an algorithm, Dynamic Thinning, with an improved competitive ratio of $C_*\approx3.1462$, where $C_*-\log C_*=2$. Like Singla's algorithm, it maintains a set of previously seen elements and accepts an arriving element only if it belongs to the maximum-weight independent subset of the maintained set together with that element. In addition, between consecutive arrivals, the algorithm may randomly remove unselected elements from the maintained set, and in certain cases it accepts an arriving element with a probability that depends on when it arrives. The frequency of these removals and the acceptance probabilities are chosen so that each element of a fixed maximum-weight independent set is selected with probability exactly $\frac{1}{C_*}$, which immediately yields the competitive ratio.

cs.DS↗