Abstract
Detecting anomalous behavior in dynamic networks remains a constant challenge. This problem is further exacerbated when the underlying topology of these networks is affected by individual highly-dimensional node attributes. We address this issue by tracking a network's modularity as a proxy of its community structure. We leverage Graph Neural Networks (GNNs) to estimate each snapshot's modularity. GNNs can account for both network structure and high-dimensional node attributes, providing a comprehensive approach for estimating network statistics. Our method is validated through simulations that demonstrate its ability to detect changes in highly-attributed networks by analyzing shifts in modularity. Moreover, we find our method is able to detect a real-world event within the #Iran Twitter reply network, where each node has high-dimensional textual attributes.
Introduction
Real-world networks, such as social media platforms or biological systems, are inherently dynamic. Nodes in these networks often carry high-dimensional attributes (e.g., text embeddings or sensor data) that significantly influence the network's evolution. Detecting "changepoints"—sudden or gradual structural shifts—is critical for identifying anomalies or significant events. However, traditional methods often focus exclusively on topology or use simplistic attribute models, failing to capture changes hidden in the interplay between complex connections and high-dimensional features.
This research proposes tracking modularity—a metric quantifying the strength of a network's division into communities—as a macro-level proxy for network health. By monitoring shifts in modularity, we can detect structural fracturing or blurring that signals a fundamental change in the system's state.
Methodology
The proposed framework utilizes a two-stage pipeline combining deep learning with statistical process monitoring.
Deep Modularity Networks (DMoN)
The core of the approach is a Graph Neural Network (GNN) designed to maximize spectral modularity. Unlike traditional clustering algorithms, this GNN-based approach simultaneously ingests graph structure and high-dimensional node attributes to determine optimal community assignments.
To prevent "trivial" solutions where the model collapses all nodes into a single cluster, the authors introduce the Square Root Collapse Optimizer (SRCO). This mathematical regularizer ensures the GNN learns meaningful community structures, providing a more robust estimation of modularity across snapshots.
Statistical Process Monitoring (SPM)
Once modularity is estimated for each temporal snapshot, an Exponentially Weighted Moving Average (EWMA) control chart is applied.
- Phase I: The system establishes a baseline "normal" range of modularity from a stable period.
- Phase II: New data is monitored. If the modularity score deviates beyond calculated control limits, a changepoint is flagged.
Experimental Results
Synthetic Validation
The framework was tested using a Degree Corrected Stochastic Block Model (DCSBM) to generate graphs with 1,000 nodes and 64-dimensional attributes. Four types of changes were simulated: community splitting, merging, new community emergence, and gradual attribute shifts.
As shown in the results, the method achieved a 100% detection rate for structural changes (splitting, merging, and new communities) with minimal delay. While gradual attribute changes were more challenging, they were still detected with high accuracy, albeit with a longer expected delay (~23 steps).
Real-World Case Study: #Iran Twitter Network
The model was applied to a Twitter reply network containing the #Iran hashtag from June 2022 to March 2023. Node attributes consisted of high-dimensional text embeddings from tweets generated via a Sentence-Multilingual BERT model.
The monitoring system flagged a major changepoint during the week of September 16, 2022. This date corresponds precisely with the death of Mahsa Amini, which triggered widespread protests and a massive shift in the digital landscape of the Iranian Twitter community. The detection demonstrates the model's ability to identify real-world events by processing both the content of conversations and the structure of user interactions.
Conclusion
By integrating GNN-based modularity estimation with statistical control charts, this framework provides a powerful tool for detecting changepoints in complex, attributed dynamic graphs. The introduction of the SRCO regularizer improves the stability of community detection, while the use of modularity as a proxy allows for efficient monitoring of large-scale networks. Future work will focus on dynamically discovering the optimal number of communities and incorporating temporal dependencies directly into the GNN architecture.
Summary updated