Graph-based Nearest Neighbors with Dynamic Updates via Random Walks

Nina Mishra, Yonatan Naamad, Tal Wagner, Lichen Zhang
12/19/2025
cs.DScs.LG

No official code found. Best implementation: RustedBytes/spatch (0 stars, Rust, last commit 2025-12-25).

Abstract

Approximate nearest neighbor search (ANN) is a common way to retrieve relevant search results, especially now in the context of large language models and retrieval augmented generation. One of the most widely used algorithms for ANN is based on constructing a multi-layer graph over the dataset, called the Hierarchical Navigable Small World (HNSW). While this algorithm supports insertion of new data, it does not support deletion of existing data. Moreover, deletion algorithms described by prior work come at the cost of increased query latency, decreased recall, or prolonged deletion time. In this paper, we propose a new theoretical framework for graph-based ANN based on random walks. We then utilize this framework to analyze a randomized deletion approach that preserves hitting time statistics compared to the graph before deleting the point. We then turn this theoretical framework into a deterministic deletion algorithm, and show that it provides better tradeoff between query latency, recall, deletion time, and memory usage through an extensive collection of experiments.

View on arXivView PDF

Code Implementations(1)

RustedBytes/spatchCommunity69%
Rust

Graph-based Nearest Neighbors with Dynamic Updates via Random Walks

00RustDec 25, 202510 months ago
graphshnsw

Similar Papers

Cite this paper

@article{mishra2025graphbased,
  title  = {Graph-based Nearest Neighbors with Dynamic Updates via Random Walks},
  author = {Nina Mishra and Yonatan Naamad and Tal Wagner and Lichen Zhang},
  year   = {2025},
  eprint = {2512.18060},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2512.18060v1}
}

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/2512.18060.svg)](https://codeofpaper.com/paper/2512.18060)

Discussion