AddGraph: Anomaly Detection in Dynamic Graph Using Attention-based Temporal GCN

Li Zheng, Zhenpeng Li, Jian Li, Zhao Li, Jun Gao

Introduction

In the rapidly evolving landscape of digital interactions, graphs serve as a fundamental representation of complex systems, from social networks to e-commerce platforms. However, these graphs are rarely static; they are dynamic streams of interactions that evolve over time. Detecting anomalous behavior—such as bot activity, click farms, or fraudulent transactions—within these dynamic structures is a critical challenge. AddGraph is an end-to-end framework designed to address this by simultaneously analyzing structural, content, and temporal features to identify suspicious edges, even in the absence of extensive labeled training data.

The Challenge of Dynamic Anomaly Detection

Detecting anomalies in dynamic graphs is complicated by several factors:

  1. Flexibility of Anomalies: Malicious actors often mimic normal behavior, acting out only in short, dense bursts or hiding their structural patterns within massive datasets.
  2. Multidimensionality: Effective detection requires a holistic view of node content (who they are), graph structure (who they interact with), and temporal dynamics (when they act). Most existing methods focus on only a subset of these dimensions.
  3. Label Scarcity: Real-world data often lacks "ground truth" labels for anomalies, making traditional supervised learning approaches impractical.

Methods: The Temporal GCN Architecture

AddGraph introduces a "Temporal GCN" architecture that processes graph data as a sequence of snapshots. The framework is built upon three primary pillars:

  • Structural & Content Encoding (GCN): An $L$-layered Graph Convolutional Network generates node embeddings, capturing local neighborhood structures and available node attributes.
  • Short-term Dynamics (Contextual Attention): To capture sudden behavioral shifts, AddGraph employs a Contextual Attention-based Model (CAB). This module examines a sliding window of recent hidden states, using an attention mechanism to weigh the relevance of previous time steps to the current state.
  • Long-term Patterns (GRU): The outputs from the GCN and the attention module are integrated into a Gated Recurrent Unit (GRU). This allows the model to maintain a long-term memory of node behavior, facilitating the detection of deviations from historical norms.
The AddGraph architecture integrates GCN for structural encoding, a contextual attention mechanism for short-term dynamics, and GRU for long-term temporal patterns.

To facilitate unsupervised training, the authors utilize selective negative sampling. Assuming early data is predominantly normal, the model generates synthetic "fake" edges and optimizes a Margin Loss function. The selective sampling process discards "easy" normal pairs, focusing the training on more challenging, ambiguous cases to ensure model stability.

Experimental Setup and Datasets

The performance of AddGraph was evaluated on two real-world datasets with injected synthetic anomalies at 1%, 5%, and 10% proportions:

  • UCI Message: A directed network representing message exchanges between students at UC Irvine.
  • Digg: A response network from the social news site Digg, where edges represent user replies. These datasets provide a rigorous testing ground for the model's ability to handle temporal evolution and varying scales of interaction.

Key Results and Insights

AddGraph demonstrates significant improvements over state-of-the-art baselines, including NetWalk, CM-Sketch, and GOutlier.

  • Superior Accuracy: On the Digg dataset, AddGraph achieved an AUC (Area Under the Curve) exceeding 0.83, marking a 10%+ improvement over existing methods.
  • Temporal Stability: Unlike many competitors whose performance degrades as graph complexity increases, AddGraph maintains high and stable AUC scores across multiple time snapshots.
AddGraph consistently outperforms baseline methods across multiple snapshots on both the UCI Message and Digg datasets, demonstrating its robustness in dynamic environments.

Beyond raw performance, several key insights emerged:

  • The Power of Attention: The inclusion of an attention layer over a sliding window allows the model to detect sudden bursts of activity that might be smoothed over by a standard RNN/GRU.
  • Structural Propagation: By leveraging GCNs, the model can propagate anomaly probabilities through the network, identifying not just individual suspicious nodes but also anomalous clusters.
  • Optimal GCN Depth: Experimental results indicated that 2-3 GCN layers are optimal. Deeper networks often lead to "over-smoothing," where node embeddings become too similar to distinguish anomalies effectively.

Limitations and Future Directions

While AddGraph sets a new benchmark for dynamic anomaly detection, certain challenges remain. The model experienced a performance dip during massive influxes of new nodes (the "cold start" problem), suggesting a need for more robust handling of entirely new entities. Additionally, the computational complexity of combining GCN, Attention, and GRU poses challenges for real-time application on "web-scale" graphs with billions of edges. Future work may focus on integrating richer node metadata and optimizing the architecture for even greater scalability.

Summary updated

BibTeX
@inproceedings{zheng2019addgraph,
  author = {Li Zheng and Zhenpeng Li and Jian Li and Zhao Li and Jun Gao},
  title = {{AddGraph: Anomaly Detection in Dynamic Graph Using Attention-based Temporal GCN}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.24963/ijcai.2019/614},
}
Figure