TERGAD: Structure-Aware Text-Enhanced Representations for Graph Anomaly Detection

Wen Shi, Zhe Wang, Huafei Huang, Qing Qing, Ziqi Xu, Qixin Zhang, Xikun Zhang, Renqiang Luo, Feng Xia · 2026

Read TERGAD: Structure-Aware Text-Enhanced Representations for Graph Anomaly Detection by Wen Shi, Zhe Wang, Huafei Huang, Qing Qing, Ziqi Xu, Qixin Zhang, Xikun Zhang, Renqiang Luo, Feng Xia (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-19738.txt.

Introduction

Shi and team present TERGAD, a framework enriching structural meaning for graph anomaly detection using language reasoning. Existing text-rich approaches feed raw textual traits into vectors yet neglect structure, missing outliers where content clashes with topological role. TERGAD translates node properties into natural language stories, turned by a language model into meaning vectors. These fuse with raw node traits through a gated decoder that rebuilds graph structure and node traits. The anomaly score follows from total rebuild error, and six real sets show it beats rivals.

Catalog record

CREATORWen Shi, Zhe Wang, Huafei Huang, Qing Qing, Ziqi Xu, Qixin Zhang, Xikun Zhang, Renqiang Luo, Feng Xia
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE70616
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.19738

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

TERGAD: Structure-Aware Text-Enhanced Representations for Graph Anomaly Detection Wen Shi, Zhe Wang, Huafei Huang, Qing Qing, Ziqi Xu, Qixin Zhang, Xikun Zhang, Renqiang Luo, Feng Xia Abstract 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 . I Introduction Graph Anomaly Detection (GAD) aims to identify atypical graph objects, such as nodes, edges, or substructures, that deviate significantly from majority patterns in graph databases [ 33 ] . This task has become indispensable in high-stakes domains, including financial fraud prevention [ 14 ] , cyber intrusion detection [ 29 ] , and social network spam filtering [ 25 ] . The growing interconnectedness of real-world data and rapid advancements in graph data mining have significantly boosted interest in GAD over the past decade [ 15 ] . A key shift has been the transition from reliance on human expertise to traditional machine learning, and more recently, to sophisticated deep learning techniques [ 6 ] . These deep learning approaches enhance detection performance by learning complex, non-linear patterns directly from massive datasets through end-to-end data processing pipelines without manual feature engineering [ 16 ] . In many real-world scenarios, however, graphs are “text-poor” or purely structural, consisting only of nodes and edges without rich descriptive attributes. This lack of explicit semantic information poses a significant challenge, as anomalous nodes often hide within subtle structural patterns that are difficult to distinguish using numerical features alone [ 24 , 12 ] . Reconstruction-based analysis has become a common approach for detecting these anomalies, identifying nodes that the model fails to reconstruct accurately from learned representations. However, existing methods often struggle to interpret the functional meaning of a node’s position within the data representation pipeline, as they rely on raw adjacency matrices or basic degree statistics [ 30 ] . This limitation stems from an inability to translate abstract topological patterns into semantically rich representations that provide a higher-level understanding of node behavior. For example, a node with a high clustering coefficient might be a normal hub in one community but a malicious bridge in another, a nuance that numerical feature engineering pipelines often miss. To overcome the sparsity of node attributes, we explore the potential of transforming structural patterns into text-rich representations via Large Language Models (LLMs) as a data augmentation strategy [ 11 ] . A growing paradigm involves converting graph topology into natural language descriptions, allowing the model to leverage the vast reasoning capabilities of LLMs for structural understanding. For instance, recent works have attempted to prompt LLMs to produce explanations or labels based on graph connectivity [ 8 , 7 ] . These approaches demonstrate promising results in tasks that benefit from natural language reasoning and external knowledge integration [ 13 ] . However, standard Graph2Text methods suffer from critical limitations, such as requiring LLMs to infer implicit structures from long, sequential text descriptions. Furthermore, these methods often produce excessively long sequences that exceed the practical context windows of most LLMs, making them unscalable for large-scale graph data. Moreover, most current methods lack an explicit mechanism to balance these newly generated semantic priors with the original structural properties of the graph within a unified feature integration framework. To further investigate the direct applicability of LLMs in this domain, we conducted a preliminary study evaluating vanilla LLMs on the GAD task. The results (in Fig. 1 ) reveal their zero-shot performance significantly lags behind GCN-based GAD models, suggesting that LLMs struggle to inherently grasp the underlying structural anomalies without specialized adaptation. These findings underscore the non-trivial nature of effectively leveraging LLMs for graph anomaly detection and motivate the need for a more integrated semantic-structural approach. Fig. 1 : Performance comparison between DOMINANT, a traditional GCN-based method, and four representative LLMs. The significant performance gap motivates the need for the integrated semantic-structural approach in LLM-based GAD. Addressing these gaps leads to a fundamental question: Can we effectively empower structural graph learning by synthesizing text-rich representations through LLMs? Answering this question requires overcoming several technical hurdles regarding efficiency and integration. First, we must determine how to effectively translate abstract graph topology into semantically rich yet computationally efficient textual descriptions within a structured data transformation pipeline. Second, it is crucial to integrate these LLM-derived semantic insights with specialized graph learning models in a complementary manner. Third, we need to design a framework that jointly optimizes both the synthesized semantic consistency and the native structural information for the anomaly detection task. Effectively balancing these multi-modal signals is essential for capturing the subtle deviations that characterize sophisticated anomalies in otherwise attribute-poor networks. Our work addresses these challenges by establishing a vital connection between raw structural information and LLM-based semantic understandings within a unified data processing framework. We propose TERGAD , a novel framework for structure-aware T ext- E nhanced R epresentations for G raph A nomaly D etection, which establishes a vital connection between raw structural information and LLM-based semantic reasoning. Specifically, our framework enriches the representation of each node by generating natural language descriptions that articulate its unique structural role within the network. This is achieved through carefully designed templates that translate complex topological metrics, such as centrality and community membership, into concise and interpretable textual roles. A gated dual-branch autoencoder then adaptively fuses these synthesized semantic embeddings with the original structural features through a learnable gating mechanism. This architecture jointly reconstructs both the synthesized semantic descriptions and the underlying graph structure, with anomaly scores reflecting deviations in both domains. Our main contributions are summarized as follows: • Constructing Text-Rich Graphs for Anomaly Detection. We propose TERGAD, a framework that addresses attribute sparsity by integrating explicit structural semantics derived from LLMs through a systematic semantic enrichment pipeline. By translating topology into natural language, we transform purely structural graphs into text-rich representations for more robust detection. • Semantic-Guided Graph Encoding and Adaptive Fusion. We introduce a structured template-based approach to encode topological roles via LLMs, followed by an adaptive fusion mechanism. This allows the model to selectively integrate high-level semantic priors with raw structural data based

Read the complete text