arXiv:2610.40146cs.DSOct 2026

Manuscript Offprint

arXiv:2610.40146

Nearly Optimal Sparse Navigable Graphs in General Metrics

Hongyi Chen, Tianyi Zhang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study approximation algorithms for constructing sparse navigable graphs in general metrics. Given an nn-point metric (P,d)(P, d) and a parameter α≥1\alpha \geq 1, a directed graph on PP is α\alpha-navigable if, for every pair of distinct points s,t∈Ps, t \in P, the source ss has an outgoing neighbor pp with d(p,t)<d(s,t)/αd(p, t) < d(s, t)/\alpha. The objective is to minimize the number of edges. Recent independent works of Khanna, Padaki, and Waingarten (2026) and Conway et al. (2026) give O(log⁡n)O(\log n)-approximation algorithms and show that an o(log⁡n)o(\log n) approximation is NP-hard in general. Before our work, the best known running time for such an approximation for general α≥1\alpha \geq 1 was O~(min⁡{nOPT⁡α,n2.5})\widetilde{O}(\min\{n \operatorname{OPT}_\alpha, n^{2.5}\}), where OPT⁡α\operatorname{OPT}_\alpha is the minimum number of edges in an α\alpha-navigable graph.

In this paper, we give a randomized algorithm that, with high probability, runs in O~(n2)\widetilde{O}(n^2) time and achieves an O(log⁡n)O(\log n) approximation for every α≥1\alpha \geq 1. In general, these guarantees are nearly optimal up to constant factors in the approximation and polylogarithmic factors in the running time.

*State Key Laboratory for Novel Software Technology, Nanjing University, hychener01@gmail.com

†^{\dagger}State Key Laboratory for Novel Software Technology, Nanjing University, tianyiz25@nju.edu.cn

1 Introduction

Nearest neighbor search aims to preprocess a dataset so that, given a query point, an exact or approximate nearest neighbor can be found efficiently. Graph-based methods approach this problem by building a graph on the dataset points and answering queries by following edges toward points closer to the query. This approach underlies practical methods such as HNSW [MY20], NSG [FXWC19], and DiskANN [SDK +^{+}19]. The graph must provide edges that allow a search to make progress, while keeping neighborhoods small enough to inspect efficiently.

Recent work has improved graph construction and search guarantees [DGM +^{+}24, LT25, GKSW25, AJDG +^{+}25]. Complementary studies examine the efficiency, accuracy, and scalability of graph-based search in practical settings [ZPL +^{+}26, AEP25, SSKS21, GKL +^{+}25, AM26].

A central theoretical abstraction for this approach is navigability [IX23].

Definition 1.1 ( α\alpha-navigability). Let (P,d)(P, d) be an nn-point metric and let α≥1\alpha \geq 1. A directed graph (P,E)(P, E) with no self-loops is α\alpha-navigable if, for every pair of distinct points s,t∈Ps, t \in P, some edge (s,p)∈E(s, p) \in E satisfies

αd(p,t)<d(s,t).\alpha d(p,t)<d(s,t).

We call ss the source, tt the target, and pp an intermediate point; pp may be tt itself. For α=1\alpha = 1, the condition guarantees that a greedy search can always move closer to a target in PP until it reaches that target. Larger values of α\alpha require more progress from each step. The analysis of Indyk and Xu [IX23] implies that, for every 0<ε≤10 < \varepsilon \leq 1, one can choose α=O(1/ε)\alpha = O(1/\varepsilon) so that greedy search on an α\alpha-navigable graph finds a (1+ε)(1 + \varepsilon)-approximate nearest neighbor (ANN) of any query point in O(log⁡(Δ/ε))O(\log(\Delta/\varepsilon)) search steps, where Δ\Delta is the aspect ratio of (P,d)(P, d), defined as the ratio of the largest pairwise distance to the smallest nonzero pairwise distance. Logarithmic factors in asymptotic bounds are understood to be at least 1.

This motivates the following problem: given (P,d)(P, d) and α≥1\alpha \geq 1, build an α\alpha-navigable graph with as few edges as possible. Let OPTαOPT_{\alpha} denote the minimum number of edges in such a graph. We seek an efficient algorithm whose output size is within a small multiplicative factor of OPTαOPT_{\alpha} for every input metric.

Previous work. Khanna, Padaki, and Waingarten [KPW26] and, independently, Conway et al. [CDFC +^{+}26] initiated the study of approximation algorithms for this problem. Both formulate the problem as a Set Cover instance for each source. For a fixed source s, each possible outgoing edge (s,p)(s, p) corresponds to the set of targets t∈P∖{s}t \in P \setminus \{s\} for which (s,p)(s, p) satisfies the navigation requirement. Choosing outgoing neighbors for s is therefore equivalent to selecting as few such sets as possible to cover P∖{s}P \setminus \{s\}. Applying greedy Set Cover to all n instances yields an O(log⁡n)O(\log n) approximation in O(n3)O(n^3) time. Both works also show that obtaining an o(log⁡n)o(\log n) approximation is NP-hard in general. Thus the remaining algorithmic question is how quickly we can obtain the logarithmic approximation.

For general α≥1\alpha \geq 1, Khanna, Padaki, and Waingarten [KPW26] give an O~(nOPTα)\widetilde{O}(n \text{OPT}_\alpha)-time algorithm, and Conway et al. [CDFC +^{+}26] obtain O~(min⁡{nOPTα,n2.5})\widetilde{O}(\min\{n \text{OPT}_\alpha, n^{2.5}\}) time. Here O~\widetilde{O} suppresses factors polylogarithmic in nn. For α=1\alpha = 1, Conway et al. further obtain an O~(n2)\widetilde{O}(n^2)-time construction, assuming that the distances from each point to the other points are pairwise distinct. Their work leaves near-quadratic construction for general α\alpha open. Khanna, Padaki, and Waingarten also use matrix multiplication to obtain a bicriteria guarantee: the output is α\alpha-navigable, but its size is compared with the optimum under a stronger navigation requirement. These results leave the following question:

Can we obtain an O(log⁡n)O(\log n) approximation to the sparsest α\alpha-navigable graph in near-quadratic time for every α≥1\alpha \geq 1?

References (26)