Abstract
Community structure is a fundamental feature of networks, characterized by dense internal connections and sparse external ones. While modularity-based algorithms are effective for static networks, their high computational complexity makes them unsuitable for real-time tracking in dynamic environments. This paper proposes a simple yet efficient incremental algorithm for tracking community structures. By utilizing a two-step approach—initialization followed by localized incremental updates—the algorithm achieves significant speedups while maintaining high modularity. Experimental results on real-world datasets, including the Enron Email network, demonstrate that this approach outperforms traditional static methods like the CNM algorithm in both speed and quality.
Introduction
Real-world networks, such as social media interactions or communication logs, are inherently dynamic. Traditional community detection methods often rely on "snapshots," re-running static algorithms from scratch as the network evolves. This approach is computationally prohibitive for high-velocity data streams and fails to capture the fine-grained evolution of communities. To address this, we present an incremental algorithm designed to update community assignments in real-time as individual edges are added to the network.
Methodology
The proposed algorithm follows a two-step process:
- Initialization: An initial community structure is established using the Blondel et al. (BGL) algorithm on a starting snapshot of the network.
- Incremental Updating: As new edges arrive, they are classified into four categories, each triggering a specific, low-complexity update strategy aimed at maximizing modularity ($Q$).
The Four Edge Types
The core of the algorithm lies in how it handles the arrival of a new edge $(i, j)$:
- Inner Community Edge: Both nodes $i$ and $j$ belong to the same community. The structure remains unchanged as modularity naturally increases.
- Cross Community Edge: Nodes $i$ and $j$ belong to different communities. The algorithm calculates the potential modularity gain from merging these two communities. If the gain is positive, they are merged.
- Half-New Edge: One node is new to the network. The new node is assigned to the existing node's community.
- New Edge: Both nodes are new. A new community is created for this pair.
The computational complexity for most updates is $O(1)$, with occasional $O(S)$ costs for merges (where $S$ is community size). Statistical analysis shows that merges occur in less than 1% of cases, allowing the overall performance to remain extremely high.
Experimental Results
The algorithm was tested on several real-world datasets, most notably the Enron Email dataset, to evaluate its speed and accuracy.
Performance and Speed
On the Enron dataset, the incremental algorithm processed 90,000 new edges in just 0.205 seconds. For comparison, the BGL algorithm took 24 seconds for a single snapshot, and the CNM algorithm required 712 seconds. This represents an orders-of-magnitude improvement in processing speed, enabling true real-time tracking.
Quality and Granularity
While incremental updates can lead to slight modularity decay over time, the loss is minimal (approx. 6% after doubling network size). The algorithm consistently outperformed the CNM method in modularity quality. Furthermore, the incremental nature allows for high-resolution tracking of community evolution, such as the exact moment two groups merge or a new member joins.
Conclusion
This incremental approach provides a viable solution for real-time community tracking in large-scale dynamic networks. By focusing on local updates rather than global re-optimization, it achieves exceptional speed without significant sacrifices in community quality. Future work will focus on incorporating edge deletions and reducing the dependency on the initial partition quality.
Summary updated