TPU-KNN: K Nearest Neighbor Search at Peak FLOP/s
Felix Chern, Blake Hechtman, Andy Davis, Ruiqi Guo, David Majnemer, Sanjiv Kumar
Abstract
This paper presents a novel nearest neighbor search algorithm achieving TPU (Google Tensor Processing Unit) peak performance, outperforming state-of-the-art GPU algorithms with similar level of recall. The design of the proposed algorithm is motivated by an accurate accelerator performance model that takes into account both the memory and instruction bottlenecks. Our algorithm comes with an analytical guarantee of recall in expectation and does not require maintaining sophisticated index data structure or tuning, making it suitable for applications with frequent updates. Our work is available in the open-source package of Jax and Tensorflow on TPU.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
11 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Co-design Hardware and Algorithm for Vector Search cites Improving Language Models by Retrieving from Trillions of Tokens
- Co-design Hardware and Algorithm for Vector Search cites HM-ANN: Efficient Billion-Point Nearest Neighbor Search on Heterogeneous Memory
- SPANN: Highly-efficient Billion-scale Approximate Nearest Neighborhood Search cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
- SPANN: Highly-efficient Billion-scale Approximate Nearest Neighborhood Search cites HM-ANN: Efficient Billion-Point Nearest Neighbor Search on Heterogeneous Memory
- Improving Language Models by Retrieving from Trillions of Tokens cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
- Fast Graph Vector Search via Hardware Acceleration and Delayed-Synchronization Traversal cites Co-design Hardware and Algorithm for Vector Search
- Fast Graph Vector Search via Hardware Acceleration and Delayed-Synchronization Traversal cites Improving Language Models by Retrieving from Trillions of Tokens
- Fast Graph Vector Search via Hardware Acceleration and Delayed-Synchronization Traversal cites HM-ANN: Efficient Billion-Point Nearest Neighbor Search on Heterogeneous Memory
- DeDrift: Robust Similarity Search under Content Drift cites Improving Language Models by Retrieving from Trillions of Tokens
- The Lazy Neuron Phenomenon: On Emergence of Activation Sparsity in Transformers cites Accelerating Large-Scale Inference with Anisotropic Vector Quantization
Cited by top-tier papers11
- Co-design Hardware and Algorithm for Vector SearchWenqi Jiang, Shigang Li, Yu Zhu, Johannes de Fine Licht et al.SC 2023 · 21 citations
- AVIS: Autonomous Visual Information Seeking with Large Language Model AgentZiniu Hu, Ahmet Iscen, Chen Sun, Kai-Wei Chang et al.NeurIPS 2023 · 15 citations
- DeDrift: Robust Similarity Search under Content DriftDmitry Baranchuk, Matthijs Douze, Yash Upadhyay, I. Zeki YalnizICCV 2023 · 15 citations
- Fast Graph Vector Search via Hardware Acceleration and Delayed-Synchronization TraversalWenqi Jiang, Hang Hu, Torsten Hoefler, Gustavo AlonsoVLDB 2025 · 10 citations
- The Lazy Neuron Phenomenon: On Emergence of Activation Sparsity in TransformersZonglin Li, Chong You, Srinadh Bhojanapalli, Daliang Li et al.ICLR 2023 · 10 citations
Builds on7
- Scaling Up Visual and Vision-Language Representation Learning With Noisy Text SupervisionChao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen et al.ICML 2021 · 5,401 citations
- Improving Language Models by Retrieving from Trillions of TokensSebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai et al.ICML 2022 · 1,629 citations
- Accelerating Large-Scale Inference with Anisotropic Vector QuantizationRuiqi Guo, Philip Sun, Erik Lindgren, Quan Geng et al.ICML 2020 · 539 citations
- SPANN: Highly-efficient Billion-scale Approximate Nearest Neighborhood SearchQi Chen, Bing Zhao, Haidong Wang, Mingqin Li et al.NeurIPS 2021 · 219 citations
- HM-ANN: Efficient Billion-Point Nearest Neighbor Search on Heterogeneous MemoryJie Ren, Minjia Zhang, Dong LiNeurIPS 2020 · 136 citations
Related papers
- GPU-Accelerated ANNS: Quantized for Speed, Built for ChangeHunter McCoy, Zikun Wang, Prashant PandeyVLDB 2026 · 3 citations
- JUNO: Optimizing High-Dimensional Approximate Nearest Neighbour Search with Sparsity-Aware Algorithm and Ray-Tracing Core MappingZihan Liu, Wentao Ni, Jingwen Leng, Yu Feng et al.ASPLOS 2024 · 21 citations
- RTNN: accelerating neighbor search using hardware ray tracingYuhao ZhuPPoPP 2022 · 43 citations
- SONG: Approximate Nearest Neighbor Search on GPUWeijie Zhao, Shulong Tan, Ping LiICDE 2020 · 103 citations
- ANNA: Specialized Architecture for Approximate Nearest Neighbor SearchYejin Lee, Hyunji Choi, Sunhong Min, Hyunseung Lee et al.HPCA 2022 · 37 citations
