Scaling Laws for Grid-Based Approximate Nearest Neighbor Search in High Dimensions

Matthew J Liu, Wei Hang Zheng, Vidhan Purohit, Siqi Xie, Chieh-En Li +2 more
7/1/2026
cs.LGcs.AI
transformer-attention

Official code: weiz345/MultiProbeANN (1 star, Python, last commit 2026-08-25).

Abstract

Grid-based approaches to approximate nearest neighbor (ANN) search have been absent from modern scaling analyses. We present a systematic characterization of a multiprobe grid algorithm with respect to dataset size $N$ and dimensionality $d$.

Show full abstract

Our experiments reveal a previously unreported $d$-scaling crossover on the GloVe embedding family, in which multiprobe grid search maintains an approximately constant dimensional scaling exponent while other graph-, tree-, and partitioning-based methods exhibit degrading throughput. The advantage comes with near-linear query scaling in $N$, but also with lower indexing cost than competing ANN methods. Our results suggest that grid-based methods such as multiprobe grid may be competitive in rebuild-heavy or high-dimensional settings where indexing cost and dimensional robustness dictate performance. More broadly, recent work has formalized self-attention as an ANN operation. Thus, the $N$- and $d$-scaling properties of ANN algorithms may guide cost analysis of efficient transformer architectures. Code is available at: https://github.com/weiz345/MultiProbeANN.

View on arXivView PDF

Code Implementations(1)

11Python, ShellMay 28, 20263 months ago

Similar Papers

Cite this paper

@article{liu2026scaling,
  title  = {Scaling Laws for Grid-Based Approximate Nearest Neighbor Search in High Dimensions},
  author = {Matthew J Liu and Wei Hang Zheng and Vidhan Purohit and Siqi Xie and Chieh-En Li and Jerry Li and Noah Flynn},
  year   = {2026},
  eprint = {2607.01283},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.01283v1}
}

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

Discussion