about
Approximate Nearest Neighbor Search with Window Filters (arxiv.org)
4 points by PaulHoule on Feb 11, 2024 | hide | past | pdf | discuss on HN

In plain words: Similarity search can now respect numeric filters like a date or price range: a tree-based wrapper turns any standard nearest-neighbor index into one that handles these ranges. It runs up to 75 times faster than today's best filtered-search solutions at the same accuracy.

Abstract

We define and investigate the problem of $\textit{c-approximate window search}$: approximate nearest neighbor search where each point in the dataset has a numeric label, and the goal is to find nearest neighbors to queries within arbitrary label ranges. Many semantic search problems, such as image and document search with timestamp filters, or product search with cost filters, are natural examples of this problem. We propose and theoretically analyze a modular tree-based framework for transforming an index that solves the traditional c-approximate nearest neighbor problem into a data structure that solves window search. On standard nearest neighbor benchmark datasets equipped with random label values, adversarially constructed embeddings, and image search embeddings with real timestamps, we obtain up to a $75\times$ speedup over existing solutions at the same level of recall.

Joshua Engels, Benjamin Landrum, Shangdi Yu, Laxman Dhulipala, Julian Shun
arXiv:2402.00943 · cs.DS, cs.IR, cs.LG · submitted Feb 1, 2024 · updated Jun 4, 2024
abstract · pdf · html · Code available: https://github.com/JoshEngels/RangeFilteredANN

add comment on HN