Core Maintenance in Dynamic Graphs: A Parallel Approach based on Matching

Na Wang, Dongxiao Yu, Hai Jin, Qiang-Sheng Hua, Xuanhua Shi, Xia Xie

TL;DR

This paper introduces a highly efficient parallel approach for maintaining $k$-core numbers in dynamic graphs undergoing batch edge insertions or deletions. By exploiting the mathematical property that inserting or deleting a matching changes any vertex's core number by at most one, the authors design parallel algorithms that achieve up to a 1000x speedup over traditional sequential methods.

What Problem Does This Paper Address?

Graph analytics heavily relies on the concept of a $k$-core—a maximal subgraph where every vertex has at least $k$ neighbors within that subgraph. The "core number" of a vertex is the highest $k$ for which it belongs to a $k$-core, serving as a crucial metric for structural cohesiveness in social networks, biology, and web analysis.

However, real-world graphs are dynamic, constantly changing via edge insertions and deletions. Recomputing core numbers from scratch is computationally prohibitive for massive graphs. Existing "core maintenance" techniques typically handle updates one edge at a time. When a large batch of updates arrives, they process them sequentially. As illustrated below, this introduces massive overhead due to redundant vertex visitations and completely fails to utilize modern multi-core architectures.

Sequential vs. Parallel Edge Processing Overhead

Methods

The authors introduce a parallel core maintenance framework based on graph coloring and matchings:

  1. Edge Coloring: The batch of updated edges is partitioned into multiple independent sets using an edge coloring algorithm. Edges sharing the same color form a matching (meaning no two edges share a common endpoint).
  2. Parallel Processing of Matchings: The algorithm processes these matchings one by one. Crucially, within a single matching, edges can be processed in parallel. The authors prove that if the updates form a matching, the core number of any vertex can change by at most 1.
  3. Sub-batching by Core Number: Within each matching, edges are grouped by their current core number ($k$-matchings). Edges with the same core number are assigned to the same processor to minimize duplicate vertex traversal.
  4. Pruning via Superior Degree: To optimize traversal, the authors define Superior Degree (SD) and Constraint Superior Degree (CSD) metrics. These act as pruning rules, allowing the algorithm to quickly identify and skip vertices whose core numbers definitely cannot change.

Datasets

The algorithms were evaluated on two main types of graphs:

  • Real-world Graphs: Seven datasets from the Stanford Large Network Dataset Collection (SNAP), spanning social networks (LiveJournal, Youtube, Gowalla), collaboration networks (DBLP, ca-condmat), communication networks (WikiTalk), and web graphs (web-BerkStan).
  • Synthetic Graphs: Random graphs generated using three distinct models to test scalability: Erdős-Rényi (ER), Barabási-Albert (BA) preferential attachment, and R-MAT (RM) realistic social network graphs.

Key Insights and Ideas

  • The Power of Matchings: The foundational insight is that bounding the structural impact of updates enables safe parallelism. While inserting arbitrary edges can cause unpredictable, cascading changes across the entire graph, restricting updates to a matching guarantees that no vertex's core number shifts by more than $\pm 1$.
Fig. 4. A matching {< v1, v4 >,< v3, v7 >,< v2, v8 >,< v10, v12 >}and an extra edge < v10, v18 > are inserted. The core number of vertex v10 will increase by 2, from 1 to 3.
  • Eliminating Redundant Work: Sequential algorithms often re-visit the same vertices repeatedly across different edge updates. By processing independent edges simultaneously and grouping them by core number, this parallel approach avoids duplicate visitations.
  • Drastic Iteration Reduction: Instead of running $m_c$ sequential iterations (where $m_c$ is the total number of updated edges), the matching-based approach reduces the number of outer iterations to $\Delta_c + 1$, where $\Delta_c$ is the maximum number of updated edges connected to any single vertex. In real-world graphs, $\Delta_c$ is typically very small compared to the total number of updates.

Key Results

  • Massive Speedups: Compared to the state-of-the-art sequential TRAVERSAL algorithm, the proposed parallel approach consistently achieved a speedup ratio of around 100x across both incremental (insertion) and decremental (deletion) maintenance.
  • Scalability on Large Graphs: On the massive LiveJournal graph (4.0M vertices, 34.7M edges), the speedup reached up to 3 orders of magnitude (over 1000x) when handling a batch of 20,000 edge updates.
  • Parallel Efficiency: In experiments with 20,000 edge updates, almost 10,000 edges were successfully processed in parallel during the very first iteration, demonstrating high concurrency in realistic graph topologies.

Limitations and Future Work

  • Worst-Case Graph Topologies: The algorithm's performance degrades on graphs with highly uniform core distributions. For instance, in Barabási-Albert (BA) synthetic graphs where all vertices share the exact same core number, initial parallelism is poor because the algorithm defaults to using a single processor to avoid conflicts.
  • Distributed Implementation: While the paper notes that the algorithm is theoretically well-suited for distributed systems, the experimental evaluation was restricted to a single multi-core Linux machine (8 Intel Xeon CPUs, 16 concurrent threads). Testing on truly distributed, large-scale clusters remains an open direction for future work.

Summary updated

BibTeX
@article{wang2018core,
  author = {Na Wang and Dongxiao Yu and Hai Jin and Qiang-Sheng Hua and Xuanhua Shi and Xia Xie},
  title = {{Core Maintenance in Dynamic Graphs: A Parallel Approach based on Matching}},
  journal = {IEEE Trans. Parallel Distributed Syst.},
  year = {2018},
  doi = {10.1109/tpds.2018.2835441},
}
Figure