EAGLE: Contrastive Learning for Efficient Graph Anomaly Detection

Jing Ren, Mingliang Hou, Zhixuan Liu, Xiaomei BaiarXiv 2025 · DOI

Abstract

Graph Anomaly Detection (GAD) is a critical task in identifying irregular patterns within complex networks. However, existing methods often struggle with the semantic complexity of heterogeneous graphs and the high computational demands of deep learning architectures. This paper presents EAGLE (Efficient Anomaly detection model on heterogeneous Graphs via contrastive LEarning), an unsupervised framework that leverages meta-path contrastive learning and graph autoencoders. EAGLE achieves state-of-the-art performance with significantly reduced latency, making it viable for real-time applications on edge devices.

Introduction

Real-world networks, such as social media platforms or citation databases, are inherently heterogeneous, consisting of multiple node and edge types (e.g., authors, papers, venues). Detecting anomalies in these "haystacks"—such as fraudulent accounts or cyber-attacks—requires capturing both global structural patterns and local semantic contexts. Current deep learning approaches for GAD face three primary challenges: handling heterogeneous semantics, maintaining computational efficiency for real-time use, and operating without labeled training data.

Methodology

The EAGLE framework addresses these challenges through a multi-stage unsupervised learning process that focuses on the relationship between a node and its local environment.

Meta-Path Contrastive Learning

To capture the rich semantics of heterogeneous graphs, EAGLE utilizes "meta-paths" (sequences of node types, such as Author-Paper-Author). The model performs contrastive learning by creating positive samples (nodes within their true meta-path context) and negative samples (nodes paired with incorrect contexts). A discriminator is trained to distinguish between these pairs, effectively learning what constitutes a "normal" local context.

Graph Autoencoder (GAE)

Simultaneously, EAGLE employs a Graph Autoencoder architecture. A Graph Convolutional Network (GCN) encoder compresses node attributes and graph structure into low-dimensional embeddings. The decoder then attempts to reconstruct the original data. Anomalous nodes typically exhibit higher reconstruction errors because they deviate from the learned "normal" patterns of the majority.

The EAGLE framework architecture, illustrating the integration of contrastive pre-training and graph autoencoders.

Anomaly Score Calculation

The final anomaly score is a hybrid metric. It combines the reconstruction error from the GAE (indicating structural or attribute outliers) with the discriminator's score (indicating a lack of fit within the local meta-path context). This dual-focus allows EAGLE to detect subtle contextual anomalies that global models might overlook.

Experimental Evaluation

The performance of EAGLE was evaluated using three prominent real-world heterogeneous datasets: DBLP, Aminer, and Yelp. These datasets vary in their node and edge compositions, providing a robust testing ground for the framework.

Summary of the DBLP, Aminer, and Yelp datasets used for evaluation.

To simulate real-world conditions where labels are scarce, the researchers injected contextual anomalies by swapping the features of normal nodes with those of distant, dissimilar neighbors, testing the model's ability to identify nodes that are "weird" relative to their surroundings.

Results and Discussion

EAGLE demonstrated superior performance across all benchmarks, consistently achieving AUC (Area Under the Curve) scores between 0.95 and 0.98. Notably, EAGLE outperformed established baselines such as AnomalyDAE and HeGAN. Ablation studies confirmed that the contrastive pre-training step is vital; without it, AUC dropped significantly, proving that learning local context is key to the model's success.

Efficiency is where EAGLE truly excels. On the DBLP dataset, EAGLE completed the detection task in just 0.098 seconds. In comparison, competing deep learning models required over a second, and some adversarial models took over ten minutes. This efficiency is largely attributed to EAGLE's two-step approach (pre-training then fine-tuning), which allows it to learn transferable knowledge quickly.

Conclusion

EAGLE represents a significant advancement in efficient graph anomaly detection. By focusing on meta-path contexts and utilizing a lightweight autoencoder, it provides a scalable solution for complex networks. Future research will explore extending EAGLE to dynamic, time-evolving graphs and automating the selection of optimal meta-paths for diverse datasets.

Summary updated

BibTeX
@misc{ren2025eagle,
  author = {Jing Ren and Mingliang Hou and Zhixuan Liu and Xiaomei Bai},
  title = {{EAGLE: Contrastive Learning for Efficient Graph Anomaly Detection}},
  year = {2025},
  eprint = {2505.07508},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.07508},
}
Figure