SubAnom: Efficient Subgraph Anomaly Detection Framework over Dynamic Graphs

Chi Zhang, Wenkai Xiang, Xingzhi Guo, Baojian Zhou, Deqing Yang

TL;DR

SUBANOM is a new framework designed to detect anomalous subgraphs in dynamic, evolving networks by leveraging the power of node embeddings. By moving beyond isolated node analysis and incorporating structural principles like triadic closure, the framework achieves significantly higher detection accuracy, outperforming state-of-the-art baselines by nearly 18% in precision on real-world network traffic data.

What Problem Does This Paper Address?

In dynamic graphs—networks like social media, financial transactions, or IP traffic that change over time—anomalies rarely happen in a vacuum. A sudden shift in a person's social status or a coordinated cyberattack typically involves a cluster of related nodes rather than a single isolated actor.

Existing methods for anomaly detection generally fall into two camps: traditional structure-based algorithms (which are often too slow for massive, fast-changing graphs) and modern representation learning methods. While the latter are efficient, they often focus on identifying individual anomalous nodes, overlooking the crucial structural information of the surrounding subgraph. The authors of SUBANOM set out to bridge this gap: How can we efficiently identify entire anomalous subgraphs in large-scale dynamic graphs using node embeddings?

Methods

The SUBANOM framework consists of three main stages:

  1. Dynamic Node Embedding: The system uses DYNPPE, an efficient algorithm that maintains personalized PageRank (PPR) vectors to generate node embeddings for each time snapshot. This allows the system to track how a node's "position" in the network changes over time.
  2. Subgraph Identification: Once a "seed" node is identified (often a high-degree node or one with a large embedding shift), the framework must decide which neighboring nodes belong to its potential anomaly subgraph. The authors propose two main strategies:
  3. $k$-hop: A standard approach exploring neighbors within $k$ steps (see Figure 2).
  4. Hybrid Triadic-Closure (Hybrid TC): A novel strategy based on the social principle that "a friend of my friend is my friend." It identifies "strong neighbors" (those forming triangles with the seed) and includes "boundary nodes" to capture how an anomaly might propagate through the local structure (see Figure 3).
  5. Score Aggregation: To determine if the identified subgraph is truly anomalous, the framework aggregates the individual anomaly scores of its nodes (calculated as the $\ell_p$-norm distance between embeddings at time $t$ and $t-1$). They tested several functions, including Mean, Sum, Max, and Median.
Fig. 1: The illustration of the SUBANOM framework: mon- itoring the social status change of Joe Biden. The left part exhibits the social graph pre-election, highlighting a subgraph associated with Joe Biden before the 2020 Election. The right part depicts an anomalous subgraph post-election, representing the transition in his social status following Election Day. SUBANOM can identify the anomalous subgraphs.

Datasets

The authors evaluated SUBANOM using the DARPA dataset, a large-scale dynamic network traffic graph.

  • Nodes: 25,525 (representing IP addresses).
  • Edges: Over 4.5 million (representing network traffic).
  • Ground Truth: 289 manually annotated anomaly snapshots, such as DDoS attacks. The study compared SUBANOM against state-of-the-art baselines like DYNANOM and DYNPPE.

Key Insights and Ideas

  • Structure Matters: The most significant "aha moment" is that considering the subgraph structure (especially via Triadic Closure) provides a much clearer signal than looking at nodes individually. The Hybrid TC strategy consistently outperformed simple $k$-hop strategies because it filters out "weak" connections that might just be noise.
  • The Power of the Median: While "Sum" or "Mean" are common for aggregation, the authors found that the Median function combined with the $\ell_2$-norm was particularly robust. It prevents a single extreme outlier from skewing the results while remaining sensitive enough to detect coordinated shifts.
  • $\ell_2$ vs. $\ell_1$: The $\ell_2$-norm (Euclidean distance) proved superior to the $\ell_1$-norm (Manhattan distance) for this task. The authors suggest this is because $\ell_2$ is more sensitive to large differences in specific vector components, which are characteristic of major structural changes in a graph.
Comparison of different subgraph identification strategies.

Key Results

  • Superior Accuracy: SUBANOM achieved a peak F1 score of 0.6679, significantly higher than the best baseline (DYNANOM at 0.5677).
  • Precision Gains: Using the Hybrid TC strategy and Median-$\ell_2$ aggregation, the framework reached a precision of 72.00% among the top 250 detected snapshots. This represents an 18.80% improvement over the standard DYNANOM approach.
  • Efficiency: Despite the added complexity of subgraph identification, the framework remains computationally efficient. The time complexity for embedding is nearly linear relative to the number of edge events, making it suitable for large-scale dynamic graphs.

Limitations and Future Work

The current SUBANOM framework is designed for "plain" dynamic graphs where only the connections change. However, many real-world networks are attributed, meaning nodes and edges have extra information (like a user's profile data or the type of network protocol used).

The authors acknowledge that extending SUBANOM to handle these dynamic attributed graphs is a vital next step. This would allow the framework to capture even more nuanced anomalies by considering changes in both the network structure and the properties of the actors within it.

Summary updated

BibTeX
@inproceedings{zhang2023subanom,
  author = {Chi Zhang and Wenkai Xiang and Xingzhi Guo and Baojian Zhou and Deqing Yang},
  title = {{SubAnom: Efficient Subgraph Anomaly Detection Framework over Dynamic Graphs}},
  booktitle = {Workshops @ ICDM},
  year = {2023},
  doi = {10.1109/icdmw60847.2023.00154},
}
Figure