arXiv:2605.26474cs.DBcs.IR2026-05KDD被引 1

提出支持任意范围关系的近似最近邻搜索,速度提升12.5倍。

Generalized Range Filtering Approximate Nearest Neighbor Search: Containment and Overlap [Technical Report]

  • 构建多段树图索引,跳过不满足范围条件的节点
  • 在真实数据集上实现最高12.5倍查询加速,精度相当
  • 兼容包含、重叠等多种范围关系,适用价格与时间查询

近似最近邻(ANN)搜索结合范围过滤近年备受关注。本文研究其广义形式——基于范围属性的精确范围-范围(RR)谓词的ANN搜索,称为RRANN。给定ℝᵈ中的n个向量,每个向量vᵢ关联一个数值范围[lᵢ, rᵢ],表示价格区间或时间窗口。一个RRANN查询(v_q, l_q, r_q)旨在找到与v_q最接近的k个向量,且这些向量需满足查询范围与对象范围之间的任意RR谓词。该谓词未指定,可由用户定义,涵盖包含关系([lᵢ, rᵢ] ⊆ [l_q, r_q] 或反之)或重叠关系(lᵢ ≤ l_q ≤ r_i ≤ r_q 等),或其析取。该方法广泛应用于价格、时间相关查询,且推广了现有带范围过滤的ANN搜索。然而,现有方法无法支持任意RR谓词。为此,本文提出多段树图(multi-segment tree graph)新方法,通过避免遍历不满足谓词的节点,高效处理任意RR谓词,同时保持与当前最优方法相当的索引大小和构建时间。在真实数据上的大量实验表明,该方法在RRANN查询中达到最高12.5倍加速,精度与基线相当。此外,其在RFANN搜索性能上相当,在IFANN与TSANN搜索上显著优于现有最优方法。

原文摘要 · Abstract (English)

Approximate nearest neighbor (ANN) search with range filters has recently garnered significant attention. This paper delves into a generalized form of this problem, i.e., ANN search with exact range-range (RR) predicates on a range-valued attribute, named RR filtering ANN (RRANN). Specifically, given $n$ vectors in $\mathbb{R}^d$, each vector $v_i$ is associated with a numeric range $[l_i, r_i]$, symbolizing aspects like a price range or time interval. An RRANN query $(v_q, l_q, r_q)$ aims at finding $k$ vectors closest to $v_q$ within the vectors satisfying an arbitrary RR predicate defined between the query range $[l_q, r_q]$ and the object range $[l_i, r_i]$. The RR predicate remains unspecified, enabling user-defined conditions. It may encompass containment ($[l_i, r_i] \subseteq [l_q, r_q]$ or $[l_q, r_q] \subseteq [l_i, r_i]$), overlap ($l_i \le l_q \le r_i \le r_q$ or $l_q \le l_i \le r_q \le r_i$), or a disjunction of them. RRANN has broad applications in queries related to price ranges or time intervals, and it generalizes existing variants of ANN search with range filters. However, existing dedicated approaches for these problems lack the capacity to support queries with arbitrary RR predicates. Hence, we introduce a new approach, labeled multi-segment tree graph. It efficiently handles arbitrary RR predicates by avoiding traversal through non-predicate-satisfied nodes, and keeps equivalent index size and construction time to state-of-the-art methods for RFANN. Extensive experiments on real-world data demonstrate the efficacy of our approach in RRANN queries, achieving up to 12.5x speedups with the same accuracy as the baselines. Moreover, our approach attains comparable RFANN search performance and notably superior IFANN and TSANN search performance compared to the respective state-of-the-art approaches. Our code is available at https://github.com/FanEDG/MSTG.

近似搜索范围查询索引结构

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。