Abstract
Graph anomaly detection (GAD) is crucial in applications like fraud detection and cybersecurity. Despite recent advancements using graph neural networks (GNNs), two major challenges persist. At the model level, most methods adopt a transductive learning paradigm, which assumes static graph structures, making them unsuitable for dynamic, evolving networks. At the data level, the extreme class imbalance, where anomalous nodes are rare, leads to biased models that fail to generalize to unseen anomalies. These challenges are interdependent: static transductive frameworks limit effective data augmentation, while imbalance exacerbates model distortion in inductive learning settings. To address these challenges, we propose a novel data-centric framework that integrates dynamic graph modeling with balanced anomaly synthesis. Our framework features: (1) a discrete ego-graph diffusion model, which captures the local topology of anomalies to generate ego-graphs aligned with anomalous structural distribution, and (2) a curriculum anomaly augmentation mechanism, which dynamically adjusts synthetic data generation during training, focusing on underrepresented anomaly patterns to improve detection and generalization. Experiments on five datasets demonstrate the effectiveness of our framework.
Introduction
Graph Anomaly Detection (GAD) is a critical task for identifying malicious actors, such as fraudsters or hackers, within networked data. However, current Graph Neural Network (GNN) approaches are often hampered by two significant, intertwined issues. First, most models are transductive, meaning they are tied to a static graph snapshot and require retraining when new nodes appear. Second, real-world graphs suffer from extreme class imbalance, where anomalies often constitute less than 1% of the data. This scarcity makes it difficult for inductive models to learn generalizable patterns for unseen nodes.
The BAED Framework
To overcome these hurdles, we introduce the Balanced Anomaly-guided Ego-graph Diffusion (BAED) framework. BAED shifts the focus from model-centric tweaks to a data-centric pipeline that dynamically generates high-fidelity anomalous samples during training.
Discrete Ego-graph Diffusion
Generating entire large-scale graphs is computationally expensive and often loses the subtle local structural details that characterize anomalies. BAED instead focuses on generating ego-graphs—the immediate neighborhood of a node. It utilizes a discrete diffusion process that manipulates the adjacency matrix to create realistic local topologies.
Anomaly-Guided Generation and Curriculum Augmentation
Anomalies are often multimodal; for instance, a botnet behaves differently than a single compromised account. BAED uses a Graph Isomorphism Network (GIN) to encode known anomalies into guidance embeddings, steering the diffusion model toward specific anomalous patterns.
Crucially, BAED employs a curriculum anomaly augmentation strategy. By monitoring the anomaly detector's real-time training loss, the framework identifies which types of anomalies the model finds most difficult. It then dynamically increases the generation of these specific "hard" examples, ensuring the model's decision boundary is robust across the entire distribution of anomalies.
Experimental Evaluation
We evaluated BAED across five large-scale, real-world datasets with varying degrees of imbalance: Dgraph (finance), T-Finance (transactions), Photo (Amazon co-purchase), Reddit (social), and Elliptic (Bitcoin).
Key Results
- State-of-the-Art Performance: BAED consistently outperformed existing generative baselines like AEGIS and GGAD.
- Significant Gains on Sparse Data: On the T-Finance dataset, BAED improved the AUROC of a standard BWGNN model from 0.208 to 0.909, demonstrating its power in extremely imbalanced settings.
- Robustness and Efficiency: BAED improved performance even on noisy datasets like Elliptic, where other methods failed. Furthermore, its targeted generation process achieved a ~28% runtime reduction compared to other diffusion-based competitors.
Conclusion
BAED addresses the core challenges of inductive graph anomaly detection by combining local topology generation with an adaptive curriculum. By focusing on ego-graphs and using model feedback to guide data synthesis, BAED provides a robust solution for detecting rare anomalies in dynamic, evolving networks. Future work will explore extending this framework to generate feature-based anomalies and scaling it for ultra-fast streaming applications.
Summary updated