Abstract
Graph Anomaly Detection (GAD) is essential for identifying malicious or irregular entities in networked data. However, existing methods for Text-Attributed Graphs (TAGs) often suffer from a disconnection between text encoding and the downstream detection task, failing to capture multi-scale structural and semantic inconsistencies. This paper introduces CMUCL (Cross-Modal and Uni-modal multi-scale Contrastive Learning), an end-to-end framework that jointly trains language models and graph neural networks. By leveraging multi-scale representations and cross-modal alignment, CMUCL achieves significant improvements in detection accuracy, including an 11.13% increase in average precision over state-of-the-art baselines.
Introduction
In real-world scenarios, graphs are frequently enriched with textual attributes—such as product descriptions in e-commerce networks or abstracts in citation graphs. Detecting anomalies in these Text-Attributed Graphs (TAGs) is critical for security and data integrity. Traditional approaches typically employ a two-stage pipeline: extracting fixed text embeddings using a pre-trained model and subsequently feeding these into a Graph Neural Network (GNN).
This decoupled approach has two major drawbacks. First, the "frozen" text encoder is task-agnostic, potentially overlooking subtle textual indicators of anomalies. Second, anomalies can manifest at different granularities—from individual nodes to broader neighborhoods—which standard single-scale methods often miss.
Methodology: The CMUCL Framework
CMUCL addresses these challenges by treating text and graph structure as complementary modalities within a unified learning objective.
Bi-Modal and Multi-Scale Learning
The framework utilizes a Transformer-based text encoder and a Graph Convolutional Network (GCN) to extract features from raw text and graph topology, respectively. Unlike previous methods, these encoders are trained jointly. To capture anomalies at various levels, CMUCL learns representations at both the node level (local features) and the context level (aggregated neighborhood features).
Contrastive Alignment
The core of CMUCL lies in its multi-scale contrastive learning strategy:
- Cross-Modal Contrastive Learning: Aligns text representations with structural representations. A mismatch between a node's textual description and its structural context (e.g., a "high-end laptop" node connected exclusively to "pet supplies") serves as a strong anomaly signal.
- Uni-Modal Contrastive Learning: Ensures internal consistency within each modality, such as semantic similarity between a node's text and its neighborhood's text.
Anomaly Score Estimation
During inference, the model employs "inconsistency mining." It calculates an anomaly score based on how much a node deviates from the learned cross-modal and multi-scale patterns. This approach effectively identifies both contextual and structural outliers.
Experimental Setup and Datasets
To evaluate CMUCL, the authors introduced 8 new TAGAD benchmarks:
- Citation Networks: Citeseer, Pubmed, ogbn-Arxiv, and CitationV8.
- E-commerce Networks: History, Children, Photo, and Computers.
These datasets vary in scale, with CitationV8 containing over 1.1 million nodes, testing the framework's scalability in large-scale environments.
Key Results
CMUCL demonstrated superior performance across all 8 datasets, outperforming 11 baseline models. On average, the framework achieved a 4.68% increase in AUC and an 11.13% increase in Average Precision (AP) compared to the next best method.
The results highlight several key insights:
- Joint Training Advantage: Fine-tuning the text encoder specifically for the GAD task is significantly more effective than using off-the-shelf embeddings.
- Scalability: CMUCL's contrastive approach is more memory-efficient than reconstruction-based models, allowing it to scale to million-node graphs without out-of-memory (OOM) errors.
- Robustness: The model is adept at catching diverse anomaly types, including those defined by attribute perturbations and structural cliques.
Conclusion and Future Work
CMUCL represents a significant step forward in TAGAD by integrating multi-modal and multi-scale learning. While the computational cost of training deep Transformers alongside GNNs is higher than shallow methods, the gains in accuracy and scalability are substantial. Future research may explore the integration of Large Language Models (LLMs) and the detection of "natural" anomalies in uncurated real-world datasets.
Summary updated