做图异常检测的研究者终于有了一个能同时利用结构语义和文本特征的框架——TERGAD 用 LLM 把拓扑信息翻译成自然语言,比纯数值特征更易捕捉异常模式,建议做 GAD 的团队直接跑一下开源代码。
TERGAD 是一种新型图异常检测框架,通过大语言模型将节点拓扑属性转化为自然语言描述,生成高维语义嵌入,再与原始节点特征自适应融合。该方法解决了现有文本增强方法忽略节点结构上下文的问题,能检测由内容与拓扑不一致导致的复杂异常。在六个真实数据集上,TERGAD 持续优于现有基线,消融实验验证了结构语义引导和门控融合机制的有效性。代码已开源。
TERGAD: Structure-Aware Text-Enhanced Representations for Graph Anomaly Detection
Graph Anomaly Detection (GAD) aims to identify atypical graph entities, such as nodes, edges, or substructures, that deviate significantly from the majority. While existing text-rich approaches typically integrate structural context into the data representation pipeline using raw textual features, they often neglect the structural context of nodes. This limitation hinders their ability to detect sophisticated anomalies arising from inconsistencies between a node's inherent content and its topological role. To bridge this gap, we propose TERGAD (Structure-aware Text-enhanced Representations for Graph Anomaly Detection), A novel data augmentation framework that enriches structural semantics for GAD via the semantic reasoning capabilities of Large Language Models (LLMs). Specifically, TERGAD translates node-level topological properties into descriptive natural language narratives, which are subsequently processed by an LLM to derive high-level semantic embeddings. These embeddings are then adaptively fused with original node attributes through a gated dual-branch autoencoder to jointly reconstruct both graph structure and node features. The anomaly score is computed based on the integrated reconstruction error, effectively capturing deviations in both observable attributes and LLM-informed semantic expectations. Extensive experiments on six real-world datasets demonstrate that TERGAD consistently outperforms state-of-the-art baselines. Furthermore, our ablation studies validate the indispensable role of structural semantic guidance and the efficacy of the gated fusion mechanism. Code is available at https://github.com/Kantorakitty/TERGAD-main.