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

An incremental local-first community detection method for dynamic graphs

Hiroki Kanezashi, Toyotaro Suzumura

TL;DR

Researchers have developed Incremental DEMON, a method for detecting overlapping communities in dynamic graphs that is up to 100x faster than traditional batch processing. By focusing only on local changes when new edges are added, the algorithm can update community structures in massive networks (like Amazon’s product graph) in less than a second without losing accuracy.

What Problem Does This Paper Address?

Real-world networks, such as social media relationships or product co-purchases, are never static; they grow and evolve constantly. Traditional community detection algorithms are "batch-oriented," meaning they process the entire graph from scratch every time a change occurs.

For large-scale networks, this is incredibly inefficient. If a single new user joins a social network of millions, re-calculating every community is a waste of computational resources and makes real-time analysis impossible. The authors aim to bridge this gap by creating an incremental approach that only processes the parts of the graph affected by new data.

Methods

The authors built their work on DEMON (Democratic Estimate of the Neighborhood), a "local-first" algorithm known for its scalability and ability to find overlapping communities. DEMON typically operates in three steps:

  1. Ego Minus Ego Extraction: For every vertex (the "ego"), it extracts a sub-graph of its neighbors, excluding the ego itself.
  2. Label Propagation: It runs a label propagation algorithm on these sub-graphs to find local communities.
  3. Merge: It merges these small local communities into larger global ones based on an overlap threshold ($\epsilon$).

The Incremental Innovation: The authors introduced "Incremental DEMON," which modifies these three steps to handle streaming data:

  • Incremental Ego Minus Ego: Instead of re-extracting everything, the algorithm only re-constructs sub-graphs for the neighbors of a newly added vertex or edge. Incremental Ego Minus Ego logic
  • Incremental Label Propagation: Label updates are restricted to the vicinity of the new vertex, significantly reducing computation.
  • Optimized Merge Function: This is the most critical optimization. In the original DEMON, merging was an all-to-all comparison—a major bottleneck. The authors introduced a community mapping table that tracks which vertices belong to which communities. This allows the algorithm to only compare communities that actually share vertices, eliminating thousands of unnecessary comparisons. Optimized Merge using mapping tables
Incremental Ego Minus Ego logic
Optimized Merge using mapping tables

Datasets

The algorithm was evaluated using three real-world datasets of varying density and scale:

  • Congress: A dense network of legislative collaborations (536 vertices, ~14k edges).
  • IMDb: A network of actors who starred in movies together (56,542 vertices, ~185k edges).
  • Amazon: A large product co-purchase network (410,236 vertices, ~2.4M edges).

Key Insights and Ideas

  • Locality is Key: Because DEMON is "local-first," it is inherently better suited for incremental updates than global algorithms (like those based on modularity). Changes in one corner of a graph rarely affect community structures on the opposite side.
  • The Bottleneck is the Merge: The authors found that while the core graph processing was fast, the "Merge" step could take anywhere from a minute to an hour in batch mode. Their mapping table approach effectively turned a quadratic comparison problem into a much more manageable local lookup.
  • Stability: Unlike some incremental methods where results drift over time, this method produces stable results comparable to the original batch algorithm.

Key Results

The performance gains were dramatic across all datasets when adding 100 new edges:

  • Speedup: The incremental method achieved speedups of 69x to 107x compared to the original batch implementation.
  • Latency: For the massive Amazon dataset, the original algorithm took over an hour to process updates in batch mode. The incremental version handled the same updates in roughly 10 seconds.
  • Real-time Potential: For smaller updates, the incremental steps often took less than 0.1 seconds, enabling true real-time community tracking.
Execution time comparison for IMDb data

Limitations and Future Work

  • Memory Overhead: To achieve these speeds, the algorithm must store the "Ego Minus Ego" networks for all vertices in memory. For billion-scale graphs, this would require massive heap space, making it difficult to run on a single commodity machine.
  • Edge Deletion: The current evaluation focused primarily on adding edges. The authors note that while the logic for vertex/edge deletion is planned, it hasn't been fully optimized or evaluated yet.
  • Distributed Computing: The authors aim to implement a distributed version of this method to handle even larger graphs by leveraging multi-node clusters.

Summary updated

BibTeX
@inproceedings{kanezashi2016incremental,
  author = {Hiroki Kanezashi and Toyotaro Suzumura},
  title = {{An incremental local-first community detection method for dynamic graphs}},
  booktitle = {IEEE BigData},
  year = {2016},
  doi = {10.1109/bigdata.2016.7840991},
}
Figure