LotusFilter: Fast Diverse Nearest Neighbor Search via a Learned Cutoff Table

Yusuke Matsui
2/10/2026

No official code found. Best implementation: matsui528/lotf (13 stars, MIT, last commit 2026-04-27).

Abstract

Approximate nearest neighbor search (ANNS) is an essential building block for applications like RAG but can sometimes yield results that are overly similar to each other. In certain scenarios, search results should be similar to the query and yet diverse. We propose LotusFilter, a post-processing module to diversify ANNS results. We precompute a cutoff table summarizing vectors that are close to each other. During the filtering, LotusFilter greedily looks up the table to delete redundant vectors from the candidates. We demonstrated that the LotusFilter operates fast (0.02 [ms/query]) in settings resembling real-world RAG applications, utilizing features such as OpenAI embeddings. Our code is publicly available at https://github.com/matsui528/lotf.

View on arXivView PDF

Code Implementations(1)

matsui528/lotfCommunity100%
MIT

[CVPR25] LotusFilter: Fast Diverse Nearest Neighbor Search

130C++, CMakeJun 5, 20255 months agoMIT
approximate-nearest-neighbor-searchboost-unordereddiverse-neighbor-searchnanobind

Similar Papers

Cite this paper

@article{matsui2026lotusfilter,
  title  = {LotusFilter: Fast Diverse Nearest Neighbor Search via a Learned Cutoff Table},
  author = {Yusuke Matsui},
  year   = {2026},
  eprint = {2506.04790},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2506.04790},
  journal = {CVPR 2025 2025}
}

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

Discussion