Manuscript Offprint

arXiv:2608.27663

A Versioned Unified Graph Index for Dynamic Timestamp-Aware Nearest Neighbor Search

Jun Woo Chung, Weijie Zhao

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

ABSTRACT

We present TiGER (Time-Integrated Graph for Efficient Retrieval), a novel approach for performing fast time-aware approximate nearest neighbor searches on dynamic vector datasets with flexibility over any possible time range. Our proposed algorithm builds and maintains a unified graph for all vectors by leveraging an index structure based on integrated versioned connectivity, allowing arbitrary time intervals to be queried directly on the unified graph without having to traverse invalid vectors. This forgoes the need for post-search filtering or merging, or separate graphs for each possible composite range. Empirical evaluations show that our method attains up to a 5x improvement in queries per second (QPS) without compromising accuracy over baselines based on filtering or per-time-segment sub-graphs. We believe that this method will enable efficient temporal analysis across evolving datasets in real-time recommendation systems, log analysis, and any scenario requiring fast similarity search over dynamic, time-segmented data.

1 INTRODUCTION

As the volume of textual data continues to expand at an unprecedented rate, efficient and accurate text retrieval has become a cornerstone for numerous online applications, including Retrieval-Augmented Generation (RAG) (Fan et al., 2024; Gao et al., 2023) and news fact-checking (Capuano et al., 2023; Liao et al., 2023). The ability to quickly retrieve relevant information is particularly critical in the context of large-scale corpora, where similarity search serves as a foundational mechanism for modern information retrieval systems. Its significance has grown with the rise of Large Language Model (LLM) workflows, where effective retrieval underpins tasks ranging from contextual augmentation to real-time query generation (Chen et al., 2022; Shorten et al., 2021; Wu et al., 2019).

To meet the demands of fast and accurate query processing, Approximate Nearest Neighbor (ANN) search has emerged as a promising strategy (Macdonald & Tonellotto, 2021; Tu et al., 2020; Xiong et al., 2021). By tolerating a small margin of error, ANN techniques achieve significant speedups, enabling rapid nearest-neighbor queries even in massive datasets. Among the various ANN methods developed (Cai, 2021; He et al., 2019; Jégou et al., 2011; Ram & Sinha, 2019), graph-based techniques have consistently demonstrated superior performance, excelling in key metrics such as recall and query time across a range of benchmarks (Fu et al., 2019; Li et al., 2020; Morozov & Babenko, 2018; Wang et al., 2021). This advantage stems from their ability to capture local neighborhood relationships, making graph-based ANN an indispensable tool for large-scale retrieval.

Similarity Search with Time Constraints. However, in many real-world applications, straightforward similarity search is insufficient. We often need to retrieve topk results under specific constraints—known as Range-Filtering Approximate Nearest Neighbor Search (RFANNS) (Zuo et al., 2024)—such as categories, keywords, or temporal restrictions (Engels et al., 2024; Kovacs et al., 2024; Zhang et al., 2022). Time-based constraints are particularly common, such as fetching news articles or social network posts within a given timeframe (Awao et al., 2023; Wang et al., 2022a) or w.r.t. periodic trends. (Bertrand et al., 2013; Golder & Macy, 2011)

Most graph-based ANN methods are not designed for such filtering and typically use post-filtering or pre-filtering (Dilocker, 2021; Xu et al., 2024): (1) Post-filtering retrieves topk without constraints and filters results afterward, leading to inefficiencies under tight constraints due to excess candidates. (2)

Pre-filtering tailors the initial index to the constraint, but constructing or maintaining graphs for all possible filters is impractical. Dynamic graph construction for each query would be computationally costly, and maintaining per-timestamp graphs and performing searches individually across the relevant graphs minimizes search cost, but requires expensive merging and ordering operations at query time.

Challenges. Existing approaches (Cai et al., 2024; Gollapudi et al., 2023; Xu et al., 2024; Zuo et al., 2024) address constrained ANN search but often face challenges with dynamic updates, requiring extensive graph rebuilding, or are designed for contiguous ranges, making them less suitable for more complex or fragmented constraints. In dynamic or evolving datasets, where queries and constraints frequently shift, these limitations necessitate a solution that can flexibly and efficiently integrate temporal filtering without heavy reconstruction or excessive search overhead.

Our Approach. We propose a unified index that seamlessly integrates time constraints into similarity search without requiring multiple graphs or extensive post-processing. Specifically, for any query vector qq and timestamp set Tq={t1,t2,…,tn}T_q = \{t_1, t_2, \ldots, t_n\}, whether contiguous (e.g., [ta,tb][t_a, t_b]) or disjoint (e.g., {t1,t3,t9}\{t_1, t_3, t_9\}), our method retrieves the top-k approximate neighbors matching any timestamp in TqT_q directly during search.

Our core structure is a versioned proximity graph where each node represents an embedding with temporal metadata. Nodes track active time periods, and edges are annotated with validity ranges, allowing efficient time-constrained traversal without needing graph modifications for each query. Additionally, to guarantee full reachability without costly reconstructions, we maintain dynamic predecessor links that adapt as new nodes are inserted. This structure enables direct traversal without unnecessary connections or broken graphs for any specified time range (continuous or not), eliminating the need for post-filtering or maintaining multiple subgraphs while remaining scalable for dynamic datasets.

Contributions. We summarize our main contributions as follows:

• We propose TiGER (Time-Integrated Graph for Efficient Retrieval), a unified graph-based ANN framework that supports arbitrary temporal filtering during search while enabling dynamic updates.

• We introduce a dynamic edge management mechanism that preserves graph connectivity across time, minimizing reconstruction costs.

• We design an integrated sparse edge database to efficiently aggregate edge information for broad or continuous time filters, improving search speed.

• We experimentally show that TiGER achieves up to a 5x improvement in queries per second (QPS) while maintaining comparable or superior recall compared to pre- and post-filtering baselines.

References (40)

  • Best position algorithms for top-k queries
  • Social media use early in the pandemic predicted later social well-being and mental health in a national online sample of adults in the united states
  • Practical range minimum queries revisited
  • Sentiment in new york city: A high resolution spatial and temporal view (opens arXiv in a new tab)
  • Navigating labels and vectors: A unified approach to filtered approximate nearest neighbor search
  • Content-based fake news detection with machine and deep learning: a systematic review
  • Murag: Multimodal retrieval-augmented generator for open question answering over images and text
  • Approximate nearest neighbor search with window filters
  • RIGHT: retrieval-augmented generation for mainstream hashtag recommendation
  • Fast approximate nearest neighbor search with the navigating spreading-out graph
  • Retrieval-Augmented Generation for Large Language Models: A Survey
  • Diurnal and seasonal mood vary with work, sleep, and daylength across diverse cultures
  • Filtered-diskann: Graph algorithms for approximate nearest neighbor search with filters
  • K-nearest neighbors hashing
  • Product quantization for nearest neighbor search
  • DIGRA: A dynamic graph indexing for approximate nearest neighbor search with range filter
  • January 6th on twitter: measuring social media attitudes towards the capitol riot through unhealthy online conversation and sentiment analysis
  • A multiway merge sorting network
  • Using persistent data structures for adding range restrictions to searching problems
  • Approximate nearest neighbor search on high dimensional data - experiments, analyses, and improvement
  • MUSER: A multi-step evidence retrieval enhancement framework for fake news detection
  • On approximate nearest neighbour selection for multi-stage dense retrieval
  • Non-metric similarity graphs for maximum inner product search
  • Glove: Global vectors for word representation
  • Falconn++: A locality-sensitive filtering approach for approximate nearest neighbor search
  • Hybrid approximate nearest neighbor indexing and search (HANNIS) for large descriptor databases
  • Revisiting kd-tree for nearest neighbor search
  • HM-ANN: efficient billion-point nearest neighbor search on heterogeneous memory
  • Text data augmentation for deep learning
  • Approximate nearest neighbor search and lightweight dense vector reranking in multi-stage retrieval architectures
  • Global evidence of expressed sentiment alterations during the covid-19 pandemic
  • A comprehensive survey and experimental comparison of graph-based approximate nearest neighbor search
  • Navigable proximity graph-driven native hybrid queries with structured and unstructured constraints (opens arXiv in a new tab)
  • Conditional BERT contextual augmentation
  • Approximate nearest neighbor negative contrastive learning for dense text retrieval
  • irangegraph: Improvising range-dedicated graphs for range-filtering nearest neighbor search (opens arXiv in a new tab)
  • The impact of twitter-based sentiment on us sectoral returns
  • The evolution and disparities of online attitudes toward covid-19 vaccines: year-long longitudinal and cross-sectional study
  • SONG: approximate nearest neighbor search on GPU. In 36th IEEE International Conference on Data Engineering, ICDE 2020, Dallas, TX, USA, April 20-24, 2020, pp. 1033–1044
  • Serf: Segment graph for range-filtering approximate nearest neighbor search