NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Normality Learning-based Graph Anomaly Detection via Multi-Scale Contrastive Learning

Jingcan Duan, Pei Zhang, Siwei Wang, Jingtao Hu, Hu Jin, Jiaxin Zhang, Haifang Zhou, Xinwang Liu · DOI

Introduction

Graph Anomaly Detection (GAD) is a critical task in data mining, focused on identifying nodes that deviate significantly from the majority. Applications range from detecting fraudulent accounts in social networks to identifying intruders in computer systems. However, a fundamental challenge persists in unsupervised GAD: most models are trained on the entire dataset, which inherently includes the anomalies they are meant to detect. This "training pollution" skews the model's internal representation of what constitutes a "normal" node, leading to overlapping anomaly scores and reduced detection accuracy.

To overcome this, the authors introduce NLGAD (Normality Learning-based Graph Anomaly Detection). This framework shifts the paradigm from general representation learning to explicitly mastering the "pattern of normality" through a two-phase training process.

Methodology

NLGAD operates through three integrated modules designed to isolate and learn from reliable normal data.

1. Multi-Scale Contrastive Initialization

The process begins with a multi-scale contrastive learning backbone. To capture the full spectrum of anomalies, the model evaluates the graph at two levels:

  • Subgraph-Node (SN) Contrast: Measures how well a node fits into its local neighborhood, primarily targeting structural anomalies (e.g., unusual connection patterns).
  • Node-Node (NN) Contrast: Compares a node's features against others in the graph, targeting contextual anomalies (e.g., nodes with outlier attributes).

2. Hybrid Normality Selection

Because the initial model is untrained, its early anomaly scores cannot be fully trusted. NLGAD employs a Hybrid Strategy to identify a clean "normality pool":

  • Dynamic Strategy: A tangent-based speed function is used to gradually add nodes with the lowest anomaly scores to the pool as training progresses. This mathematical "speed control" prevents early, unreliable estimates from polluting the pool.
  • Percent Strategy: Finally, the model selects the most reliable $K$ percent of these nodes to receive "normal" pseudo-labels.

3. Normality Learning (Refinement)

In the final phase, the model is essentially reset and retrained exclusively on the reliable normal nodes identified in the previous step. By focusing purely on the majority pattern, the model becomes an expert at recognizing standard behavior. During inference, any deviation from this refined "normal" pattern results in a high anomaly score, creating a sharp distinction between standard nodes and outliers.

Experimental Results

The authors evaluated NLGAD against eight state-of-the-art competitors (including CoLA, ANEMONE, and SL-GAD) across six benchmark datasets: Cora, CiteSeer, DBLP, Citation, ACM, and UAI2010. To rigorously test the model, they injected both contextual anomalies (attribute swaps) and structural anomalies (clique injections).

Key Performance Metrics

NLGAD consistently outperformed existing methods, showing significant improvements in Area Under the Curve (AUC):

  • UAI2010: Achieved a 5.89% AUC gain over the previous best-performing method.
  • Citation Dataset: Achieved a 3.40% AUC gain.

Insights from Ablation

The researchers confirmed that the "Normal-only" training (NT) approach produces a much wider gap between normal and anomalous score distributions than training on "All" data (AT). Furthermore, ablation studies demonstrated that both the dynamic selection strategy and the retraining phase are essential; removing either component resulted in a measurable performance decline.

Conclusion and Future Work

NLGAD demonstrates that explicitly learning the pattern of normality is a highly effective strategy for unsupervised graph anomaly detection. By filtering out anomalies during the training process, the model avoids the "low-pass filter" effect of standard Graph Convolutional Networks, which often smooths out anomalies and makes them harder to detect.

While highly effective, the authors note that the model's sensitivity to hyperparameters (such as the selection percentage $K$) and the computational overhead of two-phase training are areas for future optimization. Future research may explore more complex selection strategies and methods to scale the framework for massive, billion-node graphs.

Summary updated

BibTeX
@inproceedings{duan2023normality,
  author = {Jingcan Duan and Pei Zhang and Siwei Wang and Jingtao Hu and Hu Jin and Jiaxin Zhang and Haifang Zhou and Xinwang Liu},
  title = {{Normality Learning-based Graph Anomaly Detection via Multi-Scale Contrastive Learning}},
  booktitle = {ACM Multimedia},
  year = {2023},
  doi = {10.1145/3581783.3612064},
}
Figure