HCT: A Hierarchical Contrastive Learning Framework for Transferable Graph Anomaly Detection

Abstract

Graph anomaly detection (GAD) aims to identify abnormal nodes that differ from the majority within a graph and has been widely applied in real-world applications, where solutions based on graph neural network (GNN) have recently achieved remarkable success. However, GNN struggles to adapt to variations in the underlying data distributions, limiting its practical applicability. Existing efforts either train separate models for each dataset, rely heavily on source data, or overlook graph heterogeneity in GAD tasks, leading to challenges in transferability and generality. Therefore, how to effectively establish the underlying normal patterns and enable anomaly detection across graphs with varying feature and structure distributions remains an under-explored problem. To tackle these challenges, this paper proposes HCT, a general GAD framework for cross-graph transfer learning. Specifically, we first introduce node-feature disparity-based ranking and feature mapping to align anomaly features across graphs. Moreover, we employ a hierarchical contrastive learning framework to capture and transfer anomaly patterns effectively. HCT extracts deep structure information from the source graph at the node, subgraph, and view levels while employing a lightweight, trainable network module in the target graph to minimize cross-graph structure differences via contrastive learning. Besides, we design a structure-enhanced regularization objective to improve model adaptation in label-scarce scenarios. Extensive experiments on four real-world datasets demonstrate the effectiveness of HCT against state-of-the-art baselines with 1.63%–8.05% average performance improvement across both settings, showcasing its strong generality and adaptability.

Cite

Text

Ye et al. "HCT: A Hierarchical Contrastive Learning Framework for Transferable Graph Anomaly Detection." European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2025. doi:10.1007/978-3-032-05962-8_11

Markdown

[Ye et al. "HCT: A Hierarchical Contrastive Learning Framework for Transferable Graph Anomaly Detection." European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2025.](https://mlanthology.org/ecmlpkdd/2025/ye2025ecmlpkdd-hct/) doi:10.1007/978-3-032-05962-8_11

BibTeX

@inproceedings{ye2025ecmlpkdd-hct,
  title     = {{HCT: A Hierarchical Contrastive Learning Framework for Transferable Graph Anomaly Detection}},
  author    = {Ye, Jiawei and Li, Hongyi and Xie, Qinlin and Liang, Sicheng and Liu, Yu and Wu, Jie},
  booktitle = {European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases},
  year      = {2025},
  pages     = {176-192},
  doi       = {10.1007/978-3-032-05962-8_11},
  url       = {https://mlanthology.org/ecmlpkdd/2025/ye2025ecmlpkdd-hct/}
}