AnomalyGFM: Graph Foundation Model for Zero/Few-shot Anomaly Detection

📄 arXiv: 2502.09254v2 📥 PDF

作者: Hezhe Qiao, Chaoxi Niu, Ling Chen, Guansong Pang

分类: cs.LG, cs.AI

发布日期: 2025-02-13 (更新: 2025-06-01)

备注: Accepted by KDD2025


💡 一句话要点

提出AnomalyGFM,用于零/少样本图异常检测的图基础模型

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 图异常检测 图基础模型 零样本学习 少样本学习 图神经网络 表示学习

📋 核心要点

  1. 现有图模型难以泛化到图异常检测任务,无法有效捕捉不同图中的异常模式。
  2. AnomalyGFM通过预训练对齐正常和异常类原型与节点表示残差,学习图无关的判别性表示。
  3. 实验表明,AnomalyGFM在零样本和少样本图异常检测中显著优于现有方法。

📝 摘要(中文)

图异常检测(GAD)旨在识别图中与大多数节点不同的异常节点,近年来受到了广泛关注。现有的通用图模型在不同的图任务中取得了显著的成功,但难以推广到GAD任务。这种局限性源于它们难以学习广义知识,以捕捉来自不同领域的图中固有的、不频繁的、不规则的和异构的异常模式。为了应对这一挑战,我们提出了AnomalyGFM,一个面向GAD的图基础模型,它支持在不同的图数据集中进行零样本推理和少样本提示调优。一个关键的见解是,需要正常和异常类的图无关表示,以支持跨不同图的有效零/少样本GAD。因此,AnomalyGFM被预训练为将数据无关的、可学习的正常和异常类原型与节点表示残差(即节点与其邻居的表示偏差)对齐。残差特征本质上将节点信息投影到一个统一的特征空间中,在这个空间中,我们可以以一致的方式有效地衡量来自不同图的节点的异常程度。这为学习正常和异常类的图无关的、可区分的原型提供了驱动力,这些原型可以用于在新图上启用零样本GAD,包括非常大规模的图。如果新图中有少量的标记正常节点可用,AnomalyGFM可以进一步支持提示调优,以利用这些节点进行更好的适应。在11个广泛使用的具有真实异常的GAD数据集上进行的综合实验表明,在零样本和少样本GAD设置下,AnomalyGFM显著优于最先进的竞争方法。

🔬 方法详解

问题定义:图异常检测旨在识别图中与大多数节点不同的异常节点。现有通用图模型难以学习广义知识,无法有效捕捉不同图中的异常模式,导致泛化能力不足。

核心思路:AnomalyGFM的核心思路是学习图无关的正常和异常类原型表示,通过将节点表示残差(节点与其邻居的偏差)与这些原型对齐,从而在统一的特征空间中衡量节点的异常程度。这样可以实现跨图的零样本和少样本异常检测。

技术框架:AnomalyGFM的整体框架包括预训练阶段和推理/微调阶段。在预训练阶段,模型学习正常和异常类原型,并训练节点表示器以生成残差特征。在推理阶段,对于新图,可以直接使用预训练的原型进行零样本异常检测;如果存在少量标记数据,则可以进行提示调优以适应新图。

关键创新:AnomalyGFM的关键创新在于学习图无关的正常和异常类原型,并利用节点表示残差作为桥梁,将节点信息投影到统一的特征空间。这种方法使得模型能够跨不同的图进行泛化,从而实现零样本和少样本异常检测。

关键设计:AnomalyGFM使用可学习的参数化原型来表示正常和异常类。损失函数的设计旨在将正常节点的残差特征拉向正常类原型,将异常节点的残差特征推离正常类原型,并拉向异常类原型。提示调优阶段使用少量标记的正常节点来微调节点表示器,以更好地适应新图。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

AnomalyGFM在11个广泛使用的图异常检测数据集上进行了评估,实验结果表明,在零样本和少样本设置下,AnomalyGFM显著优于现有的最先进方法。具体的性能提升数据在论文中给出,证明了该模型在图异常检测任务中的有效性和优越性。

🎯 应用场景

AnomalyGFM可应用于各种图结构数据中的异常检测,例如社交网络中的欺诈检测、金融网络中的洗钱活动识别、交通网络中的异常流量检测以及生物网络中的疾病基因识别等。该模型能够有效降低对大量标注数据的依赖,具有重要的实际应用价值和潜力。

📄 摘要(原文)

Graph anomaly detection (GAD) aims to identify abnormal nodes that differ from the majority of the nodes in a graph, which has been attracting significant attention in recent years. Existing generalist graph models have achieved remarkable success in different graph tasks but struggle to generalize to the GAD task. This limitation arises from their difficulty in learning generalized knowledge for capturing the inherently infrequent, irregular and heterogeneous abnormality patterns in graphs from different domains. To address this challenge, we propose AnomalyGFM, a GAD-oriented graph foundation model that supports zero-shot inference and few-shot prompt tuning for GAD in diverse graph datasets. One key insight is that graph-agnostic representations for normal and abnormal classes are required to support effective zero/few-shot GAD across different graphs. Motivated by this, AnomalyGFM is pre-trained to align data-independent, learnable normal and abnormal class prototypes with node representation residuals (i.e., representation deviation of a node from its neighbors). The residual features essentially project the node information into a unified feature space where we can effectively measure the abnormality of nodes from different graphs in a consistent way. This provides a driving force for the learning of graph-agnostic, discriminative prototypes for the normal and abnormal classes, which can be used to enable zero-shot GAD on new graphs, including very large-scale graphs. If there are few-shot labeled normal nodes available in the new graphs, AnomalyGFM can further support prompt tuning to leverage these nodes for better adaptation. Comprehensive experiments on 11 widely-used GAD datasets with real anomalies, demonstrate that AnomalyGFM significantly outperforms state-of-the-art competing methods under both zero- and few-shot GAD settings.