arXiv:2611.12539cs.DBNov 2026

Manuscript Offprint

arXiv:2611.12539

Dynamic Graph Indexing for Label-Filtered Approximate Nearest Neighbor Search

Mengxu Jiang, Zhi Yang, Fangyuan Zhang, Yin Yang, Sibo Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

MENGXU JIANG, The Chinese University of Hong Kong, Hong Kong

ZHI YANG, The Chinese University of Hong Kong, Hong Kong

FANGYUAN ZHANG, Harbin Institute of Technology, China

YIN YANG, Hamad Bin Khalifa University, Qatar

SIBO WANG ∗^{*}, The Chinese University of Hong Kong, Hong Kong

Approximate nearest neighbor search (ANNS) over high-dimensional vectors is a core primitive in modern retrieval systems. In practice, objects are often also associated with labels (e.g., attributes or keywords), and retrieval must combine vector similarity with explicit label-based filtering, giving rise to label-filtered ANNS. This task is challenging because label filtering and ANNS favor very different index structures, selective filters fragment the admissible search space, and updates complicate index maintenance.

To address these challenges, we propose DYLAN, a dynamic composite index for label-filtered ANNS supporting containment, overlap, and their conjunctions and disjunctions. DYLAN organizes label sets by shared prefixes in a frequency-ordered trie and selectively shares HNSW-style graph indices across trie-induced subsets, so that each trie region has a constant-factor covering index while each object participates in only logarithmically many indices. To mitigate fragmentation, DYLAN performs a cross-region multi-graph search that exploits ancestor-level indices as bridges between otherwise isolated trie regions. To support insertions, it adopts a threshold-based maintenance scheme that rebuilds shared indices only when necessary, yielding low amortized update cost.

Extensive experiments with real data show that DYLAN consistently improves query throughput at comparable recall, by up to two orders of magnitude on challenging label-rich datasets, while retaining competitive memory, construction, and update costs.

CCS Concepts: • Information systems → Retrieval models and ranking.

Additional Key Words and Phrases: Label-Filtering Approximate Nearest Neighbor Search; Vector Database; Dynamic Indexing

ACM Reference Format:

Mengxu Jiang, Zhi Yang, Fangyuan Zhang, Yin Yang, and Sibo Wang. 2026. Dynamic Graph Indexing for Label-Filtered Approximate Nearest Neighbor Search. Proc. ACM Manag. Data 4, 6 (SIGMOD), Article 335 (December 2026), 34 pages. https://doi.org/10.1145/3856330

1 Introduction

Recent advances in machine learning, especially large language models (LLMs), have significantly increased the demand for managing high-dimensional vector data. Through a machine learning

∗^{*}Sibo Wang is the corresponding author.

Authors' Contact Information: Mengxu Jiang, mxjiang@se.cuhk.edu.hk, The Chinese University of Hong Kong, Hong Kong; Zhi Yang, zyang@se.cuhk.edu.hk, The Chinese University of Hong Kong, Hong Kong; Fangyuan Zhang, Harbin Institute of Technology, Shenzhen, China, zzzzzfy@link.cuhk.edu.hk; Yin Yang, Hamad Bin Khalifa University, Doha, Qatar, yyang@hbku.edu.qa; Sibo Wang, swang@se.cuhk.edu.hk, The Chinese University of Hong Kong, Hong Kong.

Figure

This work is licensed under a Creative Commons Attribution 4.0 International License.

© 2026 Copyright held by the owner/author(s).

ACM 2836-6573/2026/12-ART335

https://doi.org/10.1145/3856330

335:2

Mengxu Jiang, Zhi Yang, Fangyuan Zhang, Yin Yang, and Sibo Wang

Table 1. Comparison of label-filtered ANNS methods. ✓: full support; ×: no support; “Partial”: limited support. Query-efficiency ratings summarize the empirical trends in Sec. 4. “High”: consistently reaches the target recall and is among the fastest across reported datasets; “Medium”: reaches the recall but with clearly lower throughput or only on some datasets; “Low”: often falls short or is substantially slower. Label scalability is rated by how index space grows with the label universe. “High”: near-constant or slowly growing; “Low”: a growth rate that becomes prohibitive.

MethodLabel AwareQuery EfficiencyUpdate SupportLabel Scalability
ContainmentOverlapComplexVectorLabel set
ACORN [28]×LowLowLow✓✓High
NaviX [32]×LowLowLow✓✓High
Filtered-DiskANN [19]✓LowMedium×✓✓High
RWalks [5]✓MediumMedium×××Low
UNG [11]✓MediumMedium×✓×High
UniFilter [41]✓Low××✓PartialHigh
Curator [23]✓MediumMediumMedium✓✓High
DYLAN (Ours)✓HighHighHigh✓✓High

model, an unstructured object, such as an image or a full-text article, can be mapped to a high-dimensional vector called its embedding, in such a way that objects close in the vector space are often semantically related. For example, under a vision-language model such as CLIP [29], the image of a pill and the textual instructions of the corresponding medicine map to nearby embeddings. This enables semantic retrieval over unstructured data, typically through approximate nearest neighbor search (ANNS) [20], which is supported effectively in modern vector database systems [12, 13, 37].

In practice, however, retrieval is rarely based on vector similarity alone. Each object is often also associated with a set of labels, such as categories, tags, or keywords. For example, medical articles may be tagged as “papers in reputed medical journals”, “manufacturer instructions”, or “social posts”. Accordingly, ANNS is often augmented with explicit label-based filtering, e.g., retrieving only papers in reputed medical journals and manufacturer instructions, so as to provide stronger control over the source of information. Such a query is referred to as label-filtered ANNS [19].

Main challenges. Although both ANNS and label-based filtering have been studied extensively, their combination remains challenging because the two tasks favor fundamentally different index structures. Label filtering is typically supported by set-oriented structures such as inverted lists [45], whereas ANNS is usually supported by graph-based indices such as HNSW [26]. A straightforward approach is to choose one of these structures, which leads to either pre-filtering (i.e., employing a label index to filter objects but performing ANNS index-free) or post-filtering (index-based ANNS with post-processing to filter the results with labels). The former may incur a costly scan over a large candidate set, whereas the latter often requires substantial over-retrieval to maintain recall.

A more integrated direction, called in-filtering [28], performs filtering during graph traversal. Specifically, when processing a label-filtered ANNS query on an HNSW-style graph [26], the search expands only neighbors that satisfy the filter. The main difficulty is that a selective filter may eliminate a large fraction of graph edges, effectively sparsifying the admissible subgraph and making many qualified objects unreachable, which leads to false dismissals and low recall. Existing techniques alleviate this issue by exploring larger local neighborhoods, e.g., via two-hop expansion [28, 32], but this increases traversal cost and still does not exploit the structure of label-set relationships. In particular, such methods are largely label-agnostic: they treat the filter as a generic predicate rather than explicitly indexing how label sets relate to one another.

Existing label-aware solutions. To our knowledge, only a limited number of label-aware ANNS indices have been proposed, and existing solutions still address only part of the problem. Table 1 summarizes representative methods in terms of label awareness, query efficiency across predicates, update support, and label scalability. Label filter types (i.e., containment/overlap/complex) are

335:3

formally defined in Section 2.1. Update support and label scalability are assessed from each method's reported behavior.

A first line of work augments a single graph index with label information. Filtered-DiskANN [19] incorporates labels into both index construction and search and supports incremental updates, but focuses on overlap filters, performs poorly on containment filters, and does not extend to complex predicates. RWalks [5] instead guides retrieval by a hybrid score combining vector proximity with label similarity, avoiding a hard admissibility check during expansion; however, it encodes labels into vector-like representations, so its index expands substantially with many distinct label types, and updates are not explicitly addressed. As reflected in Table 1, both fail to preserve enough edges that guide the search from one qualified object to another, and hence struggle with highly selective label filters, as shown in our experiments.

Another line of work adopts a partitioned multi-graph design. Notably, UNG [11] groups objects by distinct label sets and builds a separate graph index for each group, which fragments the vector space and weakens global navigability. UNG alleviates this with a label navigating graph (LNG) connecting related subgraphs, but cross-region connectivity may still be insufficient for queries spanning multiple regions, hurting recall. Inserting a new label set may also trigger widespread changes in the LNG, slowing down updates.

A third category materializes filter states, e.g., UniFilter [41] combines an HNSW graph with an AND/OR-style graph for label relationships. Targeting containment queries, it caps the size of its auxiliary label index, so its memory stays bounded as the label universe grows; the price, as reflected in Table 1, is that new labels are only partially absorbed and query performance degrades substantially on label-rich datasets.

Finally, Curator [23] applies an IVF-based index for filtered ANNS under low selectivity, whose search effectiveness is weaker than that of graph-based ANNS indices as acknowledged in [23]. Our solution. We propose DYNAMIC Label-filtered Approximate Nearest neighbor search (DYLAN), an index for label-filtered ANNS with efficient updates. DYLAN supports containment, overlap, and complex predicates composed via conjunction and disjunction. In this paper, we assume the index fits in main memory, and our implementation is single-threaded.

Our starting point is simple: organizing data objects in a shared-prefix label trie (efficient for label-based filtering), and then materializing graph indices (effective for ANNS) over trie-induced subsets of vectors. The challenge, however, is that materializing a graph index for every trie node incurs prohibitive space and update costs for a large trie, whereas maintaining graph indices only at lower-level (i.e., fine-grained) trie nodes fragments the search space and restricts the global navigability required by graph-based ANNS; moreover, updates may substantially change the trie structure and invalidate pre-built graph indices. DYLAN therefore builds on three key ideas: selective graph materialization, cross-region graph navigation, and threshold-based maintenance of shared graph indices.

Concretely, DYLAN is built in two phases. The first constructs a label trie TT capturing the relationships among label sets in the data: each non-root node u∈Tu \in T carries a label and a prefix formed by the labels on the root-to-uu path, each object is assigned to the leaf whose prefix matches its label set, and the objects assigned to leaves in the subtree rooted at uu form the trie region of uu. The second phase selectively materializes multiple HNSW-style graph indices embedded in TT, rather than building one for every trie node. Each object participates in only logarithmically many graph indices, keeping the total index size near-linear (Theorem 3.9), while the shared index covering a trie region contains at most a constant factor more objects than the region itself, thereby avoiding substantial degradation in search efficiency. Intuitively, graph indices near the root capture more global vector relationships across broader label regions, whereas those near the leaves preserve denser local connectivity among objects with highly similar label sets.

Mengxu Jiang, Zhi Yang, Fangyuan Zhang, Yin Yang, and Sibo Wang

335:4

Given a query vector q\mathbf{q} with a label predicate Φ\Phi, the filtered search space often spans multiple trie regions. DYLAN first identifies a set N\mathcal{N} of trie nodes whose subtrees jointly cover the filtered object set: the regions of containment and overlap predicates are located directly on the trie, whereas a complex predicate is recursively decomposed into sub-predicates combined by conjunction or disjunction, whose regions are computed separately and then combined. Searching the corresponding graph indices in isolation is ineffective, because the search may become trapped in local optima and miss promising candidates in other regions. DYLAN therefore performs a cross-region multi-graph search, further exploiting the graph indices at common ancestors of the nodes in N\mathcal{N}; these ancestor-level indices may contain cross-subtree connections that serve as effective bridges across otherwise isolated trie regions, restoring the global navigability needed by graph-based ANNS.

DYLAN also supports dynamic updates. Following common practice in dynamic graph-based ANNS indices [22, 41, 43], deletions are handled lazily by marking deleted objects as invalid and skipping them during search. Insertions are more challenging: a single insertion may affect multiple shared graph indices along the corresponding root-to-leaf path, and an eager strategy would trigger the construction of new graph indices or the rebuilding of existing ones. DYLAN therefore adopts a threshold-based maintenance scheme, which rebuilds a shared graph index only when its size mismatch with the target region exceeds a prescribed threshold, yielding a provably bounded amortized insertion cost while preserving the search effectiveness of the maintained indices.

Extensive experiments on multiple real datasets validate the effectiveness of DYLAN. Our main contributions are as follows.

  • We propose the DYLAN index, which introduces a selective graph materialization scheme on a label trie for effective label-filtered ANNS, while keeping the index size near-linear.

  • We design a cross-region multi-graph search algorithm that exploits ancestor graph indices to bridge fragmented trie regions, balancing query efficiency and accuracy.

  • We develop a threshold-based maintenance scheme for dynamic updates, with a provably bounded amortized insertion cost.

  • Extensive experiments show that DYLAN achieves superior query efficiency at similar recall levels, with favorable update and indexing costs across multiple datasets for label-filtered ANNS.