Abstract:Comment spams pose a significant threat to the reputation of e-commerce platforms. Existing methods based on graph neural networks for detecting spam comments face issues such as data sparsity, complex node relationships, and incomplete characterizations, which affect the detection performance. To address these problems, this paper proposes a graph neural network-based spam detection method, named GNNSD. The proposed method introduces a semantic-aware node enhancement mechanism to generate semantically relevant neighbors for minority class nodes to alleviate the performance decline caused by class imbalance and insufficient features. Further, GNNSD employs multi-head relation-aware attention and semantic-relation dual attention mechanisms to comprehensively capture the interaction patterns and fine-grained dependency features between nodes, and adopts cross-layer residual connection and contrastive learning strategies to enhance feature reuse and increase the discriminative power of node embeddings. Experiments were conducted on benchmark datasets, and the results show that GNNSD outperforms existing mainstream methods in terms of AUC, Micro-F1, and Macro-F1 metrics, and achieves better detection performance in the case of class imbalance.