CuckooGraph: A Scalable and Space-Time Efficient Data Structure for Large-Scale Dynamic Graphs

Zhuochen Fan, Yalun Cai, Zirui Liu, Jiarui Guo, Xin Fan, Tong Yang, Bin Cui

TL;DR

CuckooGraph is a novel hash-array-based data structure designed to handle massive, rapidly changing graphs with unprecedented speed and memory efficiency. By combining adaptive space transformations with a "Denylist" for hash collisions, it achieves up to 33× higher insertion throughput and 133× faster queries than state-of-the-art competitors like Spruce, all while using significantly less memory.

What Problem Does This Paper Address?

Modern big data applications—from fraud detection to social network analysis—rely on graphs that are both enormous and highly dynamic. Existing storage solutions typically fall into two camps, both of which struggle with the "triple threat" of fast updates, massive scale, and complex query patterns:

  1. Adjacency Lists: Intuitive and easy to update, but they are "pointer-intensive." This leads to fragmented memory, poor cache locality, and significant space overhead as the graph grows.
  2. Compressed Sparse Row (CSR): Highly compact and fast for traversals, but inherently static. Updating a CSR structure often requires a complete, computationally expensive rebuild.

Furthermore, real-world graphs follow a power-law distribution, meaning a few "celebrity" nodes have massive degrees while most nodes have very few connections. This imbalance creates performance bottlenecks that traditional structures fail to address simultaneously.

Methods

CuckooGraph moves away from pointers and static arrays in favor of a hierarchical, hash-based approach. Its architecture is built on two core pillars:

1. TRANSFORMATION (Adaptive Resizing)

The structure starts with a Large Cuckoo Hash Table (L-CHT). Each bucket in this table is split into two parts: one for the source node $u$ and another for its neighbors $v$.

  • Low-degree nodes: Neighbors are stored directly in small slots within the bucket.
  • High-degree nodes: As a node gains more neighbors, CuckooGraph triggers a "transformation." It merges those small slots into pointers that lead to Small Cuckoo Hash Tables (S-CHTs). These S-CHTs can themselves expand or contract based on the number of incoming edges.

This allows the system to remain memory-efficient for the majority of low-degree nodes while scaling seamlessly for high-degree hubs.

Data structure and examples of CuckooGraph.

2. DENYLIST (Collision Management)

Cuckoo hashing is known for high load rates but can suffer from "kick-out" cycles where items fail to find a home after too many swaps. Instead of forcing a massive, slow table expansion every time a collision occurs, CuckooGraph uses a Denylist (DL). Failed items are temporarily stored in the DL and are only re-integrated into the main hash tables during the next scheduled expansion. This keeps insertion speeds consistently high.

Datasets

The authors evaluated CuckooGraph against seven diverse datasets to ensure robustness across different graph topologies:

  • CAIDA: IP network traces (highly dynamic).
  • NotreDame: A web graph of hyperlinks.
  • StackOverflow & WikiTalk: Communication and interaction networks.
  • Weibo: A massive social network dataset.
  • Synthetic Graphs: Both "Dense" and "Sparse" benchmarks to test edge cases.

Key Insights and Ideas

  • Cache Locality is King: By using hash arrays instead of linked lists, CuckooGraph ensures that related data is stored more contiguously in memory. This drastically reduces "cache misses," which are the primary killer of performance in graph processing.
  • The "Celebrity" Problem: The hierarchical L-CHT/S-CHT design specifically targets the power-law distribution of graphs. It provides $O(1)$ access time for edges regardless of whether a node has two neighbors or two million.
  • Lazy Expansion: The Denylist acts as a safety valve. It allows the system to tolerate high load factors (up to 90%+) without the performance cliff usually associated with hash table collisions.

Key Results

CuckooGraph was compared against top-tier competitors like Spruce, LiveGraph, and Sortledton. The results were dominant across the board:

  • Throughput: On average, CuckooGraph's insertion throughput is 32.66× faster than Spruce. Its query throughput is a staggering 133.62× faster.
  • Memory Efficiency: It uses roughly 68% of the memory required by Spruce.
  • Graph Analytics: In practical tasks like Breadth-First Search (BFS) and Single-Source Shortest Paths (SSSP), CuckooGraph outperformed Spruce by factors of 0.73× to 168.45× depending on the task.
  • Real-world Integration: The authors successfully integrated CuckooGraph into Redis and Neo4j, proving it can serve as a high-performance plug-in for existing database ecosystems.
Tuning experiments for parameter d, showing optimal throughput and memory usage.

Limitations and Future Work

While CuckooGraph excels at edge updates and queries, the current paper focuses primarily on the core data structure's efficiency. The authors note that:

  • Duplicate Edges: While an "extended version" for duplicate edges is mentioned, the primary focus is on simple graphs.
  • Advanced Filtering: They identify "VEND" (a technique for filtering no-result edges) as an orthogonal work that could be integrated in the future to further accelerate queries in extremely sparse graphs.
  • Concurrency: While the structure is fast, the paper does not deeply explore multi-threaded locking strategies for massive parallel writes, which is a common requirement for enterprise-grade graph databases.

Summary updated

BibTeX
@inproceedings{fan2025cuckoograph,
  author = {Zhuochen Fan and Yalun Cai and Zirui Liu and Jiarui Guo and Xin Fan and Tong Yang and Bin Cui},
  title = {{CuckooGraph: A Scalable and Space-Time Efficient Data Structure for Large-Scale Dynamic Graphs}},
  booktitle = {ICDE},
  year = {2025},
  doi = {10.1109/icde65448.2025.00099},
}
Figure