Abstract
Graph Anomaly Detection (GAD) aims to identify nodes that deviate significantly from the majority in a graph, typically categorized as feature or structural anomalies. While contrastive learning has shown promise in GAD, existing methods often overlook the consistency of subgraph-level representations under structural perturbations. This paper introduces GRADATE (Graph Anomaly Detection via multi-scale contrastive learning networks with Augmented view), a novel framework that incorporates a "subgraph-subgraph" contrastive task. By generating an augmented graph view through edge modification and optimizing multi-scale contrastive losses, GRADATE captures more intrinsic graph properties. Our evaluation on six benchmark datasets shows that GRADATE consistently outperforms state-of-the-art methods, achieving significant improvements in detection accuracy.
Introduction
In graph-structured data, such as social networks or financial transaction graphs, anomalies represent critical events like fraud or system failures. These anomalies generally manifest in two forms: feature anomalies, where node attributes differ sharply from their neighbors, and structural anomalies, where nodes form unusual connectivity patterns (e.g., dense cliques in a sparse graph).
Recent advancements have utilized Contrastive Learning (CL) to learn node representations in an unsupervised manner. Standard CL approaches for GAD typically contrast a node with its local neighborhood (subgraph). However, these methods are often "sub-optimal" as they fail to account for the stability of entire neighborhoods when the graph structure is perturbed. GRADATE addresses this by introducing multi-scale contrastive tasks, specifically emphasizing the relationship between subgraphs across different views.
Methods
The GRADATE framework is built upon three pillars: graph augmentation, multi-scale contrastive learning, and a robust anomaly scoring mechanism.
Graph Augmentation
To create a secondary "augmented" view, GRADATE employs Edge Modification (EM). This process involves randomly dropping a subset of existing edges and adding an equivalent number of new edges. This structural perturbation forces the model to learn features that are invariant to noise, which is particularly effective for identifying structural anomalies.
Multi-Scale Contrastive Learning
At the heart of GRADATE is a multi-scale objective that optimizes three types of contrasts:
- Node-Subgraph Contrast: Aligns a node's embedding with its local neighborhood's representation.
- Node-Node Contrast: Ensures a node's representation remains consistent between the original and augmented views.
- Subgraph-Subgraph Contrast: This novel component compares subgraph embeddings from the original graph with their counterparts in the augmented graph. By maximizing similarity here, the model learns stable, intrinsic subgraph patterns that are characteristic of normal nodes.
Anomaly Scoring
Anomaly detection is performed through multi-round evaluations (typically 256 rounds). The final anomaly score for each node is derived from both the mean and standard deviation of scores across these rounds, ensuring the detection is not biased by a single random augmentation.
Experimental Results
GRADATE was evaluated on six benchmark datasets: airport networks (EAT, UAT), university webpages (WebKB), citation networks (Cora, Citation), and Wikipedia data (UAI2010). Anomalies were injected following standard protocols to test both feature and structural detection capabilities.
Performance Comparison
GRADATE consistently surpassed eight state-of-the-art baselines, including CoLA, ANEMONE, and DOMINANT. The model achieved notable AUC gains, ranging from 0.43% on the Citation dataset to 5.31% on UAI2010.
Key Insights
- Structural Robustness: Ablation studies confirmed that Edge Modification is superior to feature masking for GAD, highlighting the importance of structural context.
- Synergy of Scales: Combining node-level and subgraph-level information prevents the "over-smoothing" effect common in standard Graph Convolutional Networks (GCNs), allowing anomalies to remain distinct.
Conclusion
GRADATE demonstrates that multi-scale contrastive learning, particularly the inclusion of subgraph-subgraph consistency, significantly enhances graph anomaly detection. By forcing the model to recognize stable neighborhood patterns across augmented views, GRADATE effectively identifies nodes that fail to fit the underlying graph distribution. Future work will focus on reducing the computational cost of multi-round detection and exploring more advanced augmentation strategies for massive-scale graphs.
Summary updated