| With the development of the Internet and the continuous expansion of application scenarios for graph data,graph anomaly detection technology has gradually been given more attention and widely used to detect abnormal behavior in massive data,thus avoiding various potential risks such as fraud detection in social networks and financial risk control in transaction networks.However,traditional anomaly detection technology struggles to model complex structural and attribute information in graphs,and also faces challenges such as label imbalance,inconsistent neighboring nodes,and label scarcity in real-world scenarios.This leads to existing anomaly detection algorithms being unsatisfactory.Given the rapid development of graph contrastive learning technology in recent years,this paper explores the effectiveness of graph contrastive learning in anomaly detection tasks,and designs two models to address the above issues.The first model is a supervised anomaly detection model based on contrastive learning,named DGIAD.This model contrasts node representation with global graph representation and designs a contrastive learning loss function to address the common inconsistency problem in graph anomaly detection tasks.Furthermore,the model improves the aggregation process of graph neural networks by identifying and removing inconsistent anomalous nodes,thus enhancing the representation and detection capabilities of graph neural networks in anomaly detection tasks.The second model is a self-supervised anomaly detection model based on contrastive learning,named DGIADpre.Building upon DGIAD,this model constructs pseudo-labels through anomaly injection to achieve self-supervised training,thereby solving the problem of label scarcity or even unlabeled data in real-world scenarios.The model can further improve accuracy through pre-training and fine-tuning,and can adapt to complex and diverse data in real-world scenarios by modeling multiple normal patterns through dividing multiple subgraphs.Finally,this paper verifies the performance of the models and the role of each module through comparative experiments,ablation experiments,and fine-tuning experiments on public datasets.The results show that the proposed models demonstrate superior performance in detecting anomalous nodes,especially in real-world scenarios with label scarcity or even unlabeled data,and remain highly competitive. |