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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext eb2ecac6-1d81-4fa8-abb7-bed81df31771Cited 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
