NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Non-Blocking Dynamic Unbounded Graphs with Worst-Case Amortized Bounds

Bapi Chatterjee, Sathya Peri, Muktikanta Sa, Komma ManognaOPODIS 2021

TL;DR

This paper introduces PANIGRAHAM, a novel non-blocking concurrent graph data structure designed for real-time analytics on dynamic graphs. It achieves significant speedups (up to 3 orders of magnitude) and drastically reduces memory footprint (up to 80x) compared to existing methods, while guaranteeing linearizability for critical graph operations like BFS, SSSP, and Betweenness Centrality.

What Problem Does This Paper Address?

Modern applications like blockchain analysis, social network tracking, and biological network modeling increasingly rely on real-time graph analytics. These applications require data structures that can efficiently handle continuous, high-speed updates (adding/removing vertices and edges) alongside complex queries. Existing frameworks often struggle with this, either by treating graphs as static snapshots, using inefficient update mechanisms, or lacking true concurrency, leading to high memory usage and slow performance. The challenge is to build a graph data structure that is both highly concurrent, supports dynamic updates efficiently, and provides strong correctness guarantees (like linearizability) without sacrificing performance, especially in resource-constrained environments.

Methods

The core of PANIGRAHAM is a novel composition of two lock-free data structures: a hash table for managing vertices and multiple lock-free binary search trees (BSTs) for managing edges associated with each vertex. This design allows for concurrent addition and removal of both vertices and edges.

Key techniques include:

  • Lock-Free Hash Table and BSTs: Leveraging existing research in lock-free data structures to enable concurrent operations without traditional locks, thus avoiding deadlocks and improving scalability.
  • Partial Snapshots and Multi-Scan/Validate: For graph queries (BFS, SSSP, BC), the system takes specialized "partial snapshots" of the graph. The multi-scan/validate technique is employed to ensure these snapshots are consistent and linearizable, even with concurrent updates.
  • Pointer Marking (Lazy Removal): A technique using bit manipulation on pointers to logically remove nodes, deferring physical removal to optimize performance.
  • Amortized Analysis: Theoretical analysis to bound the worst-case cost of operations, proving non-blocking progress and linearizability.

Datasets

The paper uses two types of datasets for evaluation:

  • Synthetic Datasets: R-MAT graphs, which generate power-law distributions of degrees, mimicking real-world graph characteristics.
  • Real-life SNAP Datasets: Including EmailEuAll, Slashdot0811, socEpinions1, and WikiVot, representing various real-world network structures.

The paper does not introduce new benchmarks but compares its performance against existing libraries on these standard datasets.

Key Insights and Ideas

  • Concurrency is Key for Dynamic Graphs: The paper strongly advocates for true concurrency in graph data structures to handle real-time updates effectively, moving beyond batch processing.
  • Composition of Lock-Free Structures: Combining lock-free hash tables and BSTs proves to be a powerful approach for building a dynamic, concurrent graph structure.
  • Lightweight Memory Footprint is Crucial: The authors highlight that for edge analytics moving closer to data sources (e.g., edge devices), minimizing memory usage is as important as speed. PANIGRAHAM's design achieves this by avoiding pessimistic memory allocation.
  • Linearizability vs. Performance Trade-off: The paper presents both a linearizable version (PG-Cn) and an inconsistent but faster version (PG-Icn), demonstrating that for some applications, a slight compromise on consistency can yield significant performance gains.
  • Non-blocking Updates are Challenging but Achievable: Proving and implementing non-blocking and linearizable operations for dynamic graphs with complex queries is a significant technical hurdle, which this paper addresses.

Key Results

  • Throughput Speedup: PANIGRAHAM achieves throughput speedups of up to three orders of magnitude compared to state-of-the-art methods like Stinger for graph analytics tasks.
  • Memory Footprint Reduction: The memory footprint is up to 80x lighter than Stinger, making it suitable for memory-constrained environments.
  • Scalability: The concurrent methods (PG-Cn and PG-Icn) demonstrate good scalability with an increasing number of threads, unlike Stinger which shows negligible scalability.
  • Performance Comparison:
    • Up to 5x better than GraphOne for BFS.
  • Up to 10x better than Ligra for BFS, SSSP, and BC.
  • 40x better than Stinger for BFS, SSSP, and BC.
  • Correctness Guarantees: The algorithms are proven to be non-blocking and linearizable.

Limitations and Future Work

  • Limitations:
    • The paper acknowledges that for smaller datasets or higher update workloads, Ligra (using CSR) can sometimes perform competitively due to its efficient cache utilization, especially when consistency requirements are relaxed.
  • Hyperthreading can sometimes lead to cache thrashing, impacting performance for very high thread counts.
  • Future Work:
    • Implementing a lock-free variant of the Compressed Sparse Row (CSR) representation to leverage its cache efficiency while maintaining concurrency.
  • Developing an amortized average-case analysis for these algorithms to provide a more realistic performance prediction.
  • Extending the framework to support other graph algorithms and analytics tasks.

Summary updated

Abstract

Today’s graph-based analytics tasks in domains such as blockchains, social networks, biological networks, and several others demand real-time data updates at high speed. The real-time updates are efficiently ingested if the data structure naturally supports dynamic addition and removal of both edges and vertices. These dynamic updates are best facilitated by concurrency in the underlying data structure. Unfortunately, the existing dynamic graph frameworks broadly refurbish the static processing models using approaches such as versioning and incremental computation. Consequently, they carry their original design traits such as high memory footprint and batch processing that do not honor the real-time changes. At the same time, multi-core processors-a natural setting for concurrent data structures-are now commonplace, and the analytics tasks are moving closer to data sources over lightweight devices. Thus, exploring a fresh design approach for real-time graph analytics is significant. This paper reports a novel concurrent graph data structure that provides breadth-first search, single-source shortest-path, and betweenness centrality with concurrent dynamic updates of both edges and vertices. We evaluate the proposed data structure theoretically - by an amortized analysis - and experimentally via a C++ implementation. The experimental results show that (a) our algorithm outperforms the current state-of-the-art by a throughput speed-up of up to three orders of magnitude in several cases, and (b) it offers up to 80x lighter memory-footprint compared to existing methods. The experiments include several counterparts: Stinger, Ligra and GraphOne. We prove that the presented concurrent algorithms are non-blocking and linearizable.
BibTeX
@inproceedings{chatterjee2021non,
  author = {Bapi Chatterjee and Sathya Peri and Muktikanta Sa and Komma Manogna},
  title = {{Non-Blocking Dynamic Unbounded Graphs with Worst-Case Amortized Bounds}},
  booktitle = {OPODIS},
  year = {2021},
  url = {https://openreview.net/forum?id=waJdgEjP8X},
}
Figure