Reproduce “TPU-KNN: K Nearest Neighbor Search at Peak FLOP/s” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Felix Chern, Blake Hechtman, Andy Davis, Ruiqi Guo, David Majnemer, Sanjiv Kumar
Researchers from Google developed TPU-KNN, an approximate K-nearest neighbor search algorithm designed to achieve near-peak FLOP/s on Google Tensor Processing Units. This method, guided by an extended roofline performance model, demonstrates superior recall-speed trade-offs compared to state-of-the-art GPU implementations while providing an analytical recall guarantee.
Key insights
- Accelerator performance is often limited not only by FLOP/s and memory bandwidth but also by the throughput of non-matrix multiplication, coefficient-wise operations (COPs).
- By aggregating K-selection results directly within the cache, memory bandwidth bottlenecks inherent in fractional searches can be effectively bypassed.
- An analytical recall guarantee based on a balls-and-bins model enables predictable algorithm quality and simplifies deployment by reducing the need for dataset-specific tuning.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.