WebANNS: Fast and Efficient Approximate Nearest Neighbor Search in Web Browsers
Mugeng Liu, Siqi Zhong, Qi Yang, Yudong Han, Xuanzhe Liu, Yun Ma
Abstract
Approximate nearest neighbor search (ANNS) has become vital to modern AI infrastructure, particularly in retrieval-augmented generation (RAG) applications. Numerous in-browser ANNS engines have emerged to seamlessly integrate with popular LLM-based web applications, while addressing privacy protection and challenges of heterogeneous device deployments. However, web browsers present unique challenges for ANNS, including computational limitations, external storage access issues, and memory utilization constraints, which state-of-the-art (SOTA) solutions fail to address comprehensively.
We propose WebANNS, a novel ANNS engine specifically designed for web browsers. WebANNS leverages WebAssembly to overcome computational bottlenecks, designs a lazy loading strategy to optimize data retrieval from external storage, and applies a heuristic approach to reduce memory usage. Experiments show that WebANNS is fast and memory efficient, achieving up to 743.8× improvement in 99th percentile query latency over the SOTA engine, while reducing memory usage by up to 39%. Note that WebANNS decreases query time from 10 seconds to the 10-millisecond range in browsers, making in-browser ANNS practical with user-acceptable latency.
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.
Cited by top-tier papers3
- Beyond Static Endpoints: Tool Programs as an Interface for Flexible Agentic Web ServicesMugeng Liu, Shuoqi Li, Yixuan Zhang, Yun MaICML 2026
- SIVF: GPU-Resident IVF Index for Streaming Vector AnalyticsDongfang ZhaoHPDC 2026
- Breaking the Single-Reference-Vector Barrier in Approximate Nearest Neighbor SearchJiadong Xie, Jeffrey Liang, Siyi Teng, Jeffrey Xu Yu et al.WWW 2026
Builds on7
- Why Johnny Can't Prompt: How Non-AI Experts Try (and Fail) to Design LLM PromptsJ. D. Zamfirescu-Pereira, Richmond Y. Wong, Bjoern Hartmann, Qian YangCHI 2023 · 892 citations
- SPANN: Highly-efficient Billion-scale Approximate Nearest Neighborhood SearchQi Chen, Bing Zhao, Haidong Wang, Mingqin Li et al.NeurIPS 2021 · 219 citations
- Fast Vector Query Processing for Large Datasets Beyond GPU Memory with Reordered PipeliningZili Zhang, Fangyue Liu, Gang Huang, Xuanzhe Liu et al.NSDI 2024 · 37 citations
- Constructing Tree-based Index for Efficient and Effective Dense RetrievalHaitao Li, Qingyao Ai, Jingtao Zhan, Jiaxin Mao et al.SIGIR 2023 · 21 citations
- Falconn++: A Locality-sensitive Filtering Approach for Approximate Nearest Neighbor SearchNinh Pham, Tao LiuNeurIPS 2022 · 20 citations
Related papers
- UpANNS: Enhancing Billion-Scale ANNS Efficiency with Real-World PIM ArchitectureSitian Chen, Amelie Chi Zhou, Yucheng Shi, Yusen Li et al.SC 2025 · 8 citations
- DRIM-ANN: An Approximate Nearest Neighbor Search Engine based on Commercial DRAM-PIMsMingkai Chen, Tianhua Han, Cheng Liu, Shengwen Liang et al.SC 2025 · 5 citations
- SeIM: In-Memory Acceleration for Approximate Nearest Neighbor SearchChaoqiang Liu, Dan Chen, Yu Huang, Wenjing Xiao et al.DAC 2025 · 2 citations
- REIS: A High-Performance and Energy-Efficient Retrieval System with In-Storage ProcessingKangqi Chen, Rakesh Nadig, Manos Frouzakis, Nika Mansouri-Ghiasi et al.ISCA 2025 · 14 citations
- MIRAGE-ANNS: Mixed Approach Graph-based Indexing for Approximate Nearest Neighbor SearchSairaj Voruganti, M. Tamer ÖzsuSIGMOD 2025 · 10 citations
