Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
GPT-4o
Gemini 2.5 Pro Pro
o3 Pro
GPT-4.1 Pro
DeepSeek R1 via Azure Pro
2000 character limit reached

CleANN: Dynamic Graph ANNS

Updated 31 July 2025
  • CleANN is a dynamic graph-based approximate nearest neighbor system that supports concurrent insertions, deletions, and queries.
  • It leverages workload-aware linking and query-adaptive consolidation to maintain high recall and throughput even under heavy data churn.
  • Its semi-lazy memory cleaning minimizes overhead, achieving 7–1200x throughput improvements over prior dynamic indexing approaches.

CleANN System

CleANN refers to a family of systems and methodologies, chiefly documented under the title “CleANN: Efficient Full Dynamism in Graph-based Approximate Nearest Neighbor Search” (Zhang et al., 26 Jul 2025), that target the challenge of maintaining high-performance, high-quality approximate nearest neighbor search (ANNS) in environments where data and queries are fully dynamic. Unlike traditional graph-based ANN indexes intended for static datasets, CleANN explicitly addresses full dynamism—supporting concurrent insertions, deletions, and searches—through a set of novel algorithmic and system-level innovations. These mechanisms are designed for state-of-the-art throughput and reliability in real-time, large-scale vector search settings, such as those needed for modern vector databases supporting AI workloads.

1. Motivation and Problem Setting

Approximate nearest neighbor search (ANNS) is fundamental for high-dimensional vector retrieval tasks, pivotal to AI, ML, recommender systems, and vector datastores. Standard graph-based indexes (e.g., HNSW, NSG) provide excellent trade-offs between accuracy and efficiency but are built with the assumption of static data—index construction is a one-time operation, with no subsequent insertions or deletions. However, many real-world workloads, such as those seen in streaming analytics, multi-modal content retrieval, and dynamic embeddings for user/item profiles, demand support for:

  • High-frequency insertions and deletions (data churn);
  • Concurrent search and update operations;
  • Sustained query quality despite extensive index modification.

Existing dynamic graph-based ANNS solutions exhibit at least one of the following drawbacks: (a) query accuracy degrades as the index is updated, or (b) index updates require expensive, global graph structure adjustments, leading to high latency and throughput penalties. CleANN is developed to solve these issues, enabling fully dynamic, concurrent operations without sacrificing recall or throughput (Zhang et al., 26 Jul 2025).

2. System Architecture and Key Components

CleANN is composed of three core components, each targeting a unique aspect of dynamism management in graph-based indexing:

2.1 Workload-Aware Linking

Workload-aware linking dynamically reconfigures the graph’s connectivity based on observed query distributions and graph topology changes. When an item is inserted (or when workload profiles shift), CleANN selects node neighbors via an objective that trades off both topological proximity and node "importance," measured by query frequency. The objective function is:

L(i,j)=argmink[d(i,k)+λw(k)]L(i, j) = \arg\min_k \left[ d(i, k) + \lambda \cdot w(k) \right]

where d(i,k)d(i, k) is the inter-node distance, w(k)w(k) quantifies the workload (or query access frequency) at node kk, and λ\lambda is a tunable parameter. This formulation ensures that frequently accessed nodes are favorably connected, minimizing traversal hops for common queries and mitigating distributional shifts in workloads.

2.2 Query-Adaptive Neighborhood Consolidation

Classic graph-based indexes maintain fixed node neighborhoods, which easily become suboptimal after deletions or workload evolution. CleANN introduces query-adaptive consolidation: for each incoming query qq, it selects a per-query candidate set

Np(q)={uN(q):d(q,u)τ(q)}N^*_p(q) = \{ u \in N(q) : d(q, u) \leq \tau(q) \}

where N(q)N(q) is the preliminary candidate list (e.g., the k-nearest neighbors as given by the current graph structure), d(q,u)d(q,u) is the relevant distance metric, and τ(q)\tau(q) is a dynamically chosen, query-dependent threshold. The adaptive threshold reflects local density or query-specific considerations, allowing the candidate set to contract or expand as warranted by localized deletions or insertions. This scheme preserves recall and precision during high-churn updates.

2.3 Semi-Lazy Memory Cleaning

Full index rebuilds are computationally expensive and hinder concurrency. Instead, CleANN employs semi-lazy memory cleaning: maintenance is deferred until the "staleness" in the graph (resulting from insertions/deletions) reaches a critical threshold,

C(t)=I(t)+βD(t)C(t) = I(t) + \beta \cdot D(t)

where I(t)I(t) and D(t)D(t) count insertions and deletions since the last cleaning, respectively, and β\beta weights deletion impact. When C(t)C(t) exceeds a pre-set CmaxC_{\max}, a background cleaning phase is triggered to remove redundant nodes, cleanse obsolete edges, and rebalance neighborhoods. This lazy strategy reduces synchronization overhead and avoids redundant computation, enabling high-throughput dynamic operation.

3. Experimental Evaluation

CleANN has been evaluated on seven diverse, million-scale datasets under workloads characterized by fully dynamic operations—concurrent inserts, deletes, and diverse search queries. Principal findings are:

  • Query Quality: CleANN sustains query quality (recall, precision) that matches or exceeds that of state-of-the-art static indexes, with quality remaining robust as index mutations accrue.
  • Throughput: Under in-memory deployment with 56 hyper-threads, CleANN demonstrated a 7–1200x throughput improvement relative to prior concurrent ANNS indexing systems, all at equivalent recall levels.
  • Update Efficiency: Unlike alternatives where update costs escalate rapidly and degrade query quality, CleANN’s local updates and deferred cleaning maintain tight bounds on latency and synchronization.

A summary table of these empirical properties:

Metric CleANN Prior Dynamic Indexes Static Indexes
Fully concurrent Yes Partially No
Throughput (relative) 7x–1200x (baseline 1x) Up to 1x High (on static data)
Recall degradation None Noticeable at scale Stable

4. Comparative Analysis and Implications

Compared to contemporary dynamic graph-based indexes (e.g., graph-based HNSW with periodic rebuilds), CleANN's design confers important practical advantages:

  • Continuous adaptation: Both link creation (via workload-awareness) and search candidate pruning (via query-adaptive consolidation) are performed incrementally and locally, sidestepping expensive global updates.
  • Minimum query quality loss: As shown in evaluation, dynamically inserted/deleted items do not degrade recall, unlike in other indexes where structural drift accumulates.
  • Efficiency under adversarial workloads: Even with adversarial insert/delete patterns or non-uniform access frequencies, CleANN's throughput and quality remain high due to lazy cleaning and on-the-fly adaptation.

This positions CleANN as an efficient solution for vector databases, recommendation engines, and federated embedding stores that demand strict consistency and low-latency under heavy workload churn.

5. System Constraints and Operational Trade-offs

CleANN’s design achieves full dynamism at high scale by making several trade-offs:

  • Tunable adaptivity vs. cleaning cadence: Parameters λ\lambda and β\beta control adaptivity of link selection and cleaning cost sensitivity. Higher values can reduce search cost at the expense of more frequent cleaning routines.
  • Locality bias: The system’s dependency on real-time access patterns may create local optima in the graph for highly skewed workloads; this suggests integration with workload prediction or periodic global rebalancing may be beneficial.
  • Semi-laziness boundaries: While deferred cleaning efficiently amortizes maintenance, extremely high churn may still necessitate background resource allocation to avoid staleness-related performance cliffs.

6. Future Directions

The CleANN approach establishes a baseline for fully dynamic, concurrent ANNS index maintenance. Suggested future work includes:

  • Integration of workload forecasting to pre-emptively optimize graph connectivity under anticipated load shifts.
  • Generalization of the semi-lazy cleaning strategy for distributed or multi-shard graph architectures.
  • Rigorous analysis of the trade-off curves among cleaning frequency, graph sparsity, and latency in various data modalities.
  • Open benchmarking against next-generation vector database workloads and hybrid index structures (e.g., tree-graph or quantization-graph hybrids).

7. Summary

CleANN defines a new standard for fully dynamic, concurrent, and workload-adaptive graph-based ANNS. By combining workload-aware linking, query-adaptive consolidation, and semi-lazy cleaning, it guarantees query quality and system throughput comparable to static indexes—even as data are continuously inserted and deleted. CleANN’s empirical superiority and generalizability make it a cornerstone system for modern, high-throughput vector data management in AI-centric infrastructure (Zhang et al., 26 Jul 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)