Social robot detection method and system based on hypergraph neighborhood differential feature enhancement
Patent Information
- Application Number
- CN202410104256.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-25
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2044-01-25
AI Technical Summary
[0005]本发明的目的在于解决GNN中邻域聚合期间大量类间边缘产生负面影响的问题,提出一种基于超图邻域差分特征增强的社交机器人检测方法及系统,通过构造和增强差分特征,在具有丰富类间边缘的图中实现了更好的节点表示,以获得准确的检测结果
[0050] This invention mitigates the impact of numerous inter-class edges during neighborhood aggregation in GNNs by introducing a Neighborhood Differential Enhanced Graph Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Differential Features are generated using the original features and the high-order neighborhood features. In addition, these differential features are input into the graph neural network for further enhancement. A self-attention mechanism is then used to enhance the graph convolution features. Finally, the enhanced differential features and the original features are fused together, ultimately achieving the detection of social bots.
Smart Images

Figure CN117992842B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of social robot detection technology, and specifically relates to a social robot detection method and system based on hypergraph neighborhood difference feature enhancement. Background Technology
[0002] Online social networks (OSNs) have become an indispensable part of people's lives. However, OSNs are plagued by a large number of social bots, automated programs designed to engage in advertising, topic guessing, emotional manipulation, and other malicious activities, negatively impacting real users.
[0003] Detecting social bots remains a persistent challenge due to their evolving nature. Early bot detection methods relied on extracting or designing features and training machine learning or neural network classifiers. These features covered various aspects, including the number of followers and friends, tweet frequency, and creation date. Subsequent research shifted to extracting features from bot-generated posts, thus improving detection accuracy. Recent advances in Graph Neural Networks (GNNs) offer a promising approach to improving detection efficiency by better understanding the implicit relationships between anomalous and legitimate users. GNN-based methods treat the social bot detection challenge as a node classification task, viewing social network users as nodes in a social graph. Relationships between users (e.g., followers and friends) are represented as edges in this graph. Compared to traditional feature-based methods, GNN-based methods can effectively leverage user interaction patterns, resulting in superior detection performance.
[0004] Since 2016, a new generation of social bots has emerged, blending human intervention with automated behavior. This hybrid allows them to effectively disguise themselves and evade detection by traditional classifier-based platforms, resulting in an ongoing "cat-and-mouse game." This dynamic has spurred the continuous development of innovative solutions, camouflage, and countermeasures. Recent research has revealed heterosexual camouflage behavior in social bots, where these bots deliberately follow human accounts, leading to the diffusion of inter-class boundaries in the social graph. Figure 1 As shown, inter-class edges negatively impact neighborhood aggregation in GNNs, making detection robots more challenging. Summary of the Invention
[0005] The purpose of this invention is to solve the problem of negative impact caused by a large number of inter-class edges during neighborhood aggregation in GNNs. It proposes a social robot detection method and system based on hypergraph neighborhood differential feature enhancement. By constructing and enhancing differential features, better node representation is achieved in graphs with rich inter-class edges, so as to obtain accurate detection results.
[0006] To achieve the above objectives, the present invention adopts the following technical solution:
[0007] A social robot detection method based on hypergraph neighborhood difference feature enhancement includes:
[0008] By leveraging user tweet features, the kNN algorithm is used to construct hyperedges, transforming the user social graph into a hypergraph.
[0009] Hypergraph convolution is used to extract high-order neighborhood features of social accounts;
[0010] Through the feature difference mechanism, differential features at different neighborhood scales are generated using the original features and high-order neighborhood features, and these differential features are input into the graph neural network for further enhancement.
[0011] A self-attention mechanism is used to enhance the differential features and the original features. The enhanced differential features are then fused with the original features. The fused features are input into a linear layer, and a softmax function is used to obtain the classification result.
[0012] According to the social robot detection method based on hypergraph neighborhood difference feature enhancement of the present invention, when constructing hyperedges using the kNN algorithm, tweet features are first extracted from user features, and then the T nodes with the largest cosine similarity in the k-hop neighborhood of each node are calculated. The hyperedges are used to connect the above nodes, where k and T are adjustable parameters.
[0013] According to the social robot detection method based on hypergraph neighborhood difference feature enhancement of the present invention, the hypergraph is further defined as: in Represents a set of nodes. The set of hyperedges is represented; the topology of the hypergraph is represented using the incidence matrix. express:
[0014]
[0015] node v i The degree is defined as: Super-edge e i The degree is defined as: W ∈∈ For node v ∈ The average of the T cosine similarities with the other T nodes on the hyperedge. and All are diagonal matrices.
[0016] According to the social robot detection method based on hypergraph neighborhood difference feature enhancement of the present invention, hypergraph convolution is further used to extract high-order neighborhood features of social accounts, expressed by formula (2):
[0017]
[0018] in, Represents node v i In the representation vector of layer l+1, σ represents the activation function, H i∈ H represents the element in the i-th row and ∈ column of the correlation matrix. j∈ Let i represent the element in the j-th row and ∈-th column of the correlation matrix, where i, j, and ∈ are all positive integer variables. Let represent the representation vector of the j-th node in layer l, and P represent the trainable weight matrix. U (0) =X; its matrix form is as follows:
[0019] U (l+1) =σ(HWH T U (l) P) (3)
[0020] Where H represents the hypergraph incidence matrix and W represents the hyperedge weight matrix; symmetric regularization is applied to HWH. T The matrix form is further represented as follows:
[0021] U (l+1) =σ(D -1 / 2 HWB -1 H T D -1 / 2 U (l) P) (4)
[0022] Where D and B represent the degree matrices of nodes and edges, respectively.
[0023] According to the social robot detection method based on hypergraph neighborhood differential feature enhancement of the present invention, further, differential features of different neighborhood scales are generated using the original features and high-order neighborhood features, and these differential features are input into the graph neural network for further enhancement, including:
[0024] High-order neighborhood features U are obtained using hypergraph convolution. (l) The difference feature XU is obtained by subtracting the original feature X. (l) The differential features are then fed into the GNN for further enhancement; in the GCN, the node feature matrix is represented as:
[0025] Z l =σ(D -1 / 2 AD -1 / 2 (XU (l) W l (5)
[0026] Where A represents the adjacency matrix of the graph, W l It is a learnable weight matrix.
[0027] According to the social robot detection method based on hypergraph neighborhood difference feature enhancement of the present invention, a self-attention mechanism is further employed to enhance the difference features and the original features, comprising:
[0028] Using a multi-head self-attention module to explore Z l In the interaction within the GCN, for the s-th head of the self-attention mechanism, the node feature matrix is further represented as:
[0029]
[0030] in, It is a learnable parameter matrix;
[0031] The outputs of the s attention heads obtained by concatenation are processed by a trainable transformation matrix W. O get As shown in formula (7):
[0032]
[0033] Similarly, after passing through the self-attention mechanism, X is transformed into
[0034] According to the social robot detection method based on hypergraph neighborhood difference feature enhancement of the present invention, the enhanced difference features are further... With original features The features after fusion are represented as follows:
[0035]
[0036] In the formula, · denotes element-wise multiplication, and G X and The result is obtained by calculation using formula (9):
[0037] G * = sigmod(W * (*)) (9)
[0038] In the formula, W * Let * represent the learnable parameter matrix, *∈{X,Z1,Z2,...,Z...} L}, where sigmoid represents the activation function. The fused feature Z is input into a linear layer, and then the softmax function is used to obtain the classification result.
[0039]
[0040] In the formula, W Z b represents the trainable parameter matrix.
[0041] According to the social robot detection method based on hypergraph neighborhood difference feature enhancement of the present invention, a loss function is further used to train the model. The formula is as follows:
[0042]
[0043] In the formula, Y = [y n ] represent the predicted category and the true category, respectively.
[0044] A social robot detection system based on hypergraph neighborhood difference feature enhancement is provided to implement the aforementioned social robot detection method based on hypergraph neighborhood difference feature enhancement. The system includes a hypergraph construction module, a hypergraph convolution module, a feature difference enhancement module, and a feature fusion module.
[0045] The hypergraph construction module is used to construct hyperedges using the kNN algorithm based on user tweet features, transforming the user's social graph into a hypergraph.
[0046] The Hypergraph Convolution module is used to extract high-order neighborhood features of social accounts using hypergraph convolution.
[0047] The feature difference enhancement module is used to generate difference features at different neighborhood scales using the original features and high-order neighborhood features through the feature difference mechanism, and then input these difference features into the graph neural network for further enhancement.
[0048] The feature fusion module is used to enhance the differential features and the original features using a self-attention mechanism. The enhanced differential features are then fused with the original features, and the fused features are input into a linear layer. Finally, the softmax function is used to obtain the classification result.
[0049] Compared with the prior art, the present invention has the following advantages:
[0050] This invention mitigates the impact of numerous inter-class edges during neighborhood aggregation in GNNs by introducing a Neighborhood Differential Enhanced Graph Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Neighborhood Differential Features are generated using the original features and the high-order neighborhood features. In addition, these differential features are input into the graph neural network for further enhancement. A self-attention mechanism is then used to enhance the graph convolution features. Finally, the enhanced differential features and the original features are fused together, ultimately achieving the detection of social bots.
[0051] This invention utilizes a hypergraph neural network to more effectively extract high-order neighborhood features from social graphs. By constructing and enhancing differential features, it achieves better node representation in graphs with rich inter-class edges, thereby solving the problem of opposite-sex masquerading in social robot detection and improving the accuracy of social robot detection. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 These are schematic diagrams comparing neighborhood aggregation. (a) shows the neighborhood aggregation of a traditional GNN, and (b) shows the neighborhood aggregation of the neighborhood difference enhancement graph neural network of this invention.
[0054] Figure 2 (c) is a diagram showing the difference in network structure between traditional graph neural networks (GNN) and hypergraph neural networks (HGNN). (d) is a diagram showing the topology of GNN.
[0055] Figure 3 This is a framework diagram of the social robot detection method based on hypergraph neighborhood difference feature enhancement according to an embodiment of the present invention;
[0056] Figure 4 This is a bar chart showing the impact of different training ratios on the detection performance of each model in this embodiment of the invention;
[0057] Figure 5 This is a T-SNE visualization of the feature vectors in an embodiment of the present invention. The first row in the figure describes the features directly obtained through GNN, and the second row describes the difference features.
[0058] Figure 6 This is a line graph showing the effect of parameter K on the construction of the hypergraph in an embodiment of the present invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] Although existing graph-based social bot detection methods have achieved state-of-the-art performance, social bots can still evade detection by following numerous real accounts to mimic real users. Therefore, this embodiment proposes a social bot detection method based on hypergraph neighborhood difference feature enhancement to address this issue. Figure 3 As shown, the method includes the following steps:
[0061] Step S101: Using the user's tweet features, the kNN algorithm is used to construct hyperedges, transforming the user's social graph into a hypergraph.
[0062] Step S102: Hypergraph convolution is used to extract high-order neighborhood features of social accounts.
[0063] Step S103: Through the feature difference mechanism, differential features of different neighborhood scales are generated using the original features and high-order neighborhood features, and these differential features are input into the graph neural network for further enhancement.
[0064] Step S104: A self-attention mechanism is used to enhance the differential features and the original features. The enhanced differential features are then fused with the original features. The fused features are input into a linear layer, and the softmax function is used to obtain the classification result, thus realizing the detection of the social robot.
[0065] Furthermore, when constructing hyperedges in the hypergraph using the kNN algorithm, tweet features are first extracted from user features. Then, the T nodes with the highest cosine similarity in the k-hop neighborhood of each node are calculated, and hyperedges are used to connect these nodes. k and T are adjustable parameters.
[0066] Hypergraphs can capture higher-order neighborhood relationships. Unlike simple graphs, hyperedges in a hypergraph connect two or more vertices. A hypergraph is defined as follows: in Represents a set of nodes. This represents the set of hyperedges. The topology of a hypergraph is represented using an incidence matrix. express:
[0067]
[0068] node v i The degree is defined as: Super-edge e i The degree is defined as: W ∈∈ For node v ∈ The average of the T cosine similarities with the other T nodes on the hyperedge; and All are diagonal matrices. From Figure 2As can be seen, in a graph neural network, an edge can only connect two vertices, while in a hypergraph neural network, an edge can connect multiple vertices. Hypergraphs are represented using an incidence matrix, where edges are represented by columns and vertices by rows.
[0069] In hypergraph convolution, nodes connected by shared hyperedges help enhance information propagation, and the magnitude of transmission is determined by the weights of the hyperedges. Hypergraph convolution is used to extract high-order neighborhood features of social accounts, expressed by equation (2):
[0070]
[0071] in, Represents node v i In the representation vector of layer l+1, σ represents the activation function, H i∈ H represents the element in the i-th row and ∈ column of the correlation matrix. j∈ Let i represent the element in the j-th row and ∈-th column of the correlation matrix, where i, j, and ∈ are all positive integer variables. Let represent the representation vector of the j-th node in layer l, and P represent the trainable weight matrix. U (0) =X; its matrix form is as follows:
[0072] U (l+1) =σ(HWH T U (l) P) (3)
[0073] Where H represents the hypergraph's correlation matrix and W represents the hyperedge weight matrix; since the spectrum is unrestricted, the hypergraph neighborhood feature aggregation matrix HWH T During propagation, gradient vanishing or exploding may occur. To address this issue, symmetric regularization is applied to HWH. T The matrix form is further represented as follows:
[0074] U (l+1) =σ(D -1 / 2 HWB -1 H T D -1 / 2 U (l) P) (4)
[0075] Where D and B represent the degree matrices of nodes and edges, respectively.
[0076] Feature difference enhancement includes: obtaining high-order neighborhood features U using hypergraph convolution. (l) The difference feature XU is obtained by subtracting the original feature X. (l) The differential feature is input into the GNN for further enhancement; taking GCN as the backbone network as an example, the node feature matrix is represented as follows:
[0077] Z l =σ(D -1 / 2 AD -1 / 2 (XU (l) W l (5)
[0078] Where A represents the adjacency matrix of the graph, W l It is a learnable weight matrix. For example... Figure 1 As shown, extensive social interactions between robots and humans lead to deviations in the aggregated features of social robot accounts. Aggregating differentiated features helps to preserve the original features of social robot accounts.
[0079] While graph-based representation learning can capture co-occurrence relationships between users at the feature level, it lacks the ability to delve into contextual interactions within feature dimensions. Self-attention layers have demonstrated superior performance in sequence-related tasks such as natural language processing. As shown in Equation (6), a multi-head self-attention module is employed to explore Z. l Interaction in the middle:
[0080]
[0081] Where d represents the feature dimension, and Q, K, and V represent the three matrices used to calculate the attention weights in the attention mechanism; for the s-th head in the self-attention mechanism, the node feature matrix in GCN is further represented as:
[0082]
[0083] in, It is a learnable parameter matrix.
[0084] The outputs of the s attention heads obtained by concatenation are processed by a trainable transformation matrix W. O get As shown in formula (8):
[0085]
[0086] Similarly, after passing through the self-attention mechanism, X is transformed into
[0087] like Figure 3 As shown, after two graph convolutions (with L = 2 layers), we obtain... The number of convolutions in the graph should be no less than 1. Make full use of difference features. and original features A fusion layer is used to obtain the final representation for prediction purposes.
[0088]
[0089] In the formula, · denotes element-wise multiplication, and G X and The result is obtained by calculation using formula (10):
[0090] G * = sigmod(W * (*)) (10)
[0091] In the formula, W * Let * represent the learnable parameter matrix, *∈{X,Z1,Z2,...,Z...} L}, where sigmoid represents the activation function. The fused feature Z is input into a linear layer, and then the softmax function is used to obtain the classification result.
[0092]
[0093] In the formula, W Z b represents the trainable parameter matrix.
[0094] Finally, the cross-entropy function is used as the loss function to train the model and complete the account classification. The loss function is as follows:
[0095]
[0096] In the formula, Y = [y n ] represent the predicted category and the true category, respectively.
[0097] Corresponding to the aforementioned social robot detection method based on hypergraph neighborhood difference feature enhancement, this embodiment also proposes a social robot detection system based on hypergraph neighborhood difference feature enhancement, including a hypergraph construction module, a hypergraph convolution module, a feature difference enhancement module, and a feature fusion module, wherein,
[0098] The hypergraph construction module is used to construct hyperedges using the kNN algorithm based on user tweet features, transforming the user's social graph into a hypergraph.
[0099] The Hypergraph Convolution module is used to extract high-order neighborhood features of social accounts using hypergraph convolution.
[0100] The feature difference enhancement module is used to generate differential features at different neighborhood scales using the original features and high-order neighborhood features through the feature difference mechanism, and then input these differential features into the graph neural network for further enhancement.
[0101] The feature fusion module is used to enhance the differential features and the original features using a self-attention mechanism. The enhanced differential features are then fused with the original features, and the fused features are input into a linear layer. Finally, the softmax function is used to obtain the classification result.
[0102] The superiority of this invention will be verified through experiments below.
[0103] (1) Experimental setup
[0104] 1.1 Dataset
[0105] We used three graph-structured datasets to evaluate Twitter bot detection models: Cresci-15, Twibot-20, and MGTAB. Below is a brief overview of each dataset:
[0106] Cresci-15: This dataset contains 5,301 accounts, categorized as either real human accounts or automated accounts. It provides insights into friendships and follower relationships between these accounts.
[0107] Twibot-20: This dataset contains 229,580 users and 227,979 edges. It includes 11,826 accounts categorized as either automated or real users. This dataset provides information about the friend and follower relationships among these users.
[0108] MGTAB: This dataset is significantly larger, with 410.99 million users and nearly 100 million edges, featuring seven different types of relationships. It includes 10,199 labeled users, labeled as either real individuals or machines.
[0109] We utilize all labeled users to construct user social graphs for these datasets. In Cresci-15, we combine six user attribute features: followers_count, active_days, screen_name_length, following_count, listed_count, and is_default_profile_image. Additionally, we include two 768-dimensional user description features and user tweet features extracted using RoBERTa.
[0110] For Twibot-20, 16 user attribute features are utilized, including protected, geo_enabled, verified, contributors_enabled, is_translator, is_translation_enabled, profile_background_title, profile_user_background_image, has_extended_profile, default_profile, and default_profile_image. Similar to Cresci-15, we combine two 768-dimensional user description features and user tweet features extracted using RoBERTa.
[0111] For MGTAB, we used the top 20 user attribute features with the highest information gain, and the 768-dimensional user tweet features extracted using LaBSE.
[0112] Table 1 summarizes the statistics for these datasets. We randomly partitioned all datasets in a 1:1:8 ratio as training, validation, and test sets.
[0113] Table 1: Statistics of Datasets Used
[0114]
[0115] 1.2 Baseline Method
[0116] To verify the effectiveness of our proposed NDE-GNN, we compared it with several baseline models of semi-supervised learning (APPNP, GCN, SGC, GAT, JK-Nets, LAGCN), ensemble GNNs (Boosting-GNN, AdaGCN, BGNN, RF-GNN), and competitive graph filtering methods (FAGCN, RFA-GNN, AdaGNN).
[0117] Node2Vec is a weighted random traversal method that enables trained vectors to simultaneously adhere to the premises of homogeneity and structural similarity between nodes.
[0118] APPNP is an enhanced propagation scheme based on the relationship between GCN and PageRank, utilizing personalized PageRank calculations.
[0119] GCN pioneered the application of convolution operations from image processing to graph-structured data processing. It employs a hierarchical propagation principle rooted in graph structures, facilitating the acquisition of node representations by aggregating neighboring information.
[0120] SGC: Simplifies GCN by eliminating nonlinear elements and merging cross-layer weight matrices. Achieves performance comparable to GCN with higher efficiency.
[0121] GAT: Integrates an attention mechanism into GCN to describe the similarity between nodes and their neighbors. This differentiation amplifies the contribution during feature aggregation, thereby improving model efficiency.
[0122] JK-Nets: Mitigate the oversmoothing problem in deep GNNs by flexibly aggregating different neighborhood ranges.
[0123] LA-GCN: Introduces a hierarchical attention mechanism, enabling the network to discern the importance of each layer's output in the final node representation.
[0124] Boosting-GNN is an ensemble learning method that combines GNN with Adaboost, which can enhance the performance of GNN, especially in cases of class imbalance.
[0125] AdaGCN: Proposes a novel deep graph neural network architecture similar to RNN, which effectively extracts knowledge from high-order neighbors and integrates different knowledge ranges of neighbors in a manner similar to AdaBoost.
[0126] BGNN proposes an innovative architecture for co-training GBDT and GNN, which optimizes heterogeneous features through GBDT and considers the structural properties of graphs through GNN.
[0127] FAGCN: A novel frequency-adaptive GCN with a self-gated mechanism is proposed, which can adaptively integrate different signals during message passing.
[0128] RFA-GNN: Decomposes the input graph into multiple relation graphs, and through a relation-based frequency adaptive mechanism, adaptively extracts signals of different frequencies in each corresponding relation space during message passing.
[0129] AdaGNN: Utilizes trainable filters across multiple layers to capture the varying importance of different frequency components during node representation learning. These filters cleverly capture the intrinsic differences between different feature channels, thus mitigating the problem of oversmoothing.
[0130] 1.3 Parameter Settings
[0131] The parameters used in the experiment for NDE-GNN are shown in Table 2.
[0132] Table 2: NDE-GNN Parameter Settings
[0133]
[0134]
[0135] 1.4 Evaluation Indicators
[0136] Since the number of bot and human accounts on social media is roughly equal, we use accuracy and F1 score to represent the overall performance of the classifier.
[0137] Heterogeneity score (H-score) is defined to describe heterogeneity masquerading. Inter-class edges represent edges connecting nodes of different classes, while intra-class edges represent edges connecting nodes of the same class. C++ is used. heter and C homo The H-score represents the number of inter-class edges and intra-class edges in a social graph, and is defined as follows:
[0138]
[0139] Larger H scores indicate that nodes connected by edges tend to belong to different categories. Calculating the H scores of Cresci-15, TwiBot-20, and MGTAB-22 reveals that the H scores of robot accounts gradually increase as the datasets are built, validating the heterogeneity camouflage phenomenon.
[0140] (2) Experimental Results
[0141] We conducted several experiments to evaluate NDE-GNN, primarily answering the following questions:
[0142] Q1: Can the proposed NDE-GNN outperform state-of-the-art information diffusion prediction methods? (Section 2.1).
[0143] Q2: How does NDE-GNN perform when extended to heterogeneous GNN? (Section 2.2).
[0144] Q3: How do the quantity and quality of the training set affect the predictive performance of the model? (Section 2.3).
[0145] Q4: What is the contribution of each individual module of NDE-GNN to the overall performance? (Section 2.4).
[0146] Q5: How do parameters affect the performance of NDE-GNN? (Section 2.5).
[0147] 2.1 Overall Performance
[0148] We conducted experiments on publicly available social bot detection datasets to evaluate the effectiveness of our proposed method. To minimize randomness and ensure the stability of the results, each method was evaluated five times using a different seed. We present the average test results of the baselines and NDE-GNN, as shown in Table 3. Compared to other baselines, NDE-GNN demonstrates superior performance in all scenarios.
[0149] Table 3: Average performance comparison of different social robot detection methods using GCN, SGC and GAT as backbone models.
[0150]
[0151] 2.2 Extending to Heterogeneous GNNs
[0152] In Section 2.1, the GNN model used was a homogeneous graph model, which could not distinguish between different types of edges. In this subsection, we further extend NDE-GNN to a heterogeneous GNN. We choose RGCN and RGAT, commonly used in social robot detection, as the backbone models. We treat the two types of relationships (i.e., friends and followers) as edges in the graph. The results are shown in Table 4.
[0153] Table 4: Classification performance using heterogeneous GNNs as the backbone model
[0154]
[0155]
[0156] From Table 4, we observed the following phenomena:
[0157] Because RGCN and RGAT can utilize different types of relationships, they outperform GCN and GAT. Compared to isomorphic graph models like GCN and GAT, NDE-GNN achieves higher classification accuracy by using RGCN and RGAT as its backbone model.
[0158] 2.3 Impact of Training Set Ratio
[0159] Prediction performance may be affected by the quality of the training set. In this section, we conduct comparative experiments on a robot detection dataset at different training ratios to further demonstrate the stability and effectiveness of our method. The results are as follows: Figure 4 As shown.
[0160] The performance of all models increases with the training ratio. Relying solely on hypergraph neural networks results in relatively poor performance for robot account detection, indicating that robust detection is difficult to achieve using only high-order neighborhood features. Furthermore, we observe that our method consistently performs best across different training ratio settings, demonstrating the effectiveness of incorporating neighborhood difference features.
[0161] 2.4 Ablation Study
[0162] To fully understand how different modules affect the overall learning framework and to evaluate their individual contributions to performance improvements, we created several variants of the complete NDE-GNN model. These variants are described in detail below:
[0163] NDE-GNN w / o HC: Replace hypergraph convolutional layers with graph convolutional layers.
[0164] NDE-GNN w / o SA: Eliminate self-attention mechanism.
[0165] NDE-GNN w / o DF: Remove differential features.
[0166] NDE-GNN w / o GF: The gated fusion layer is omitted, and a linear layer is used for feature fusion instead.
[0167] Table 5: Ablation Study of NDE-GNN
[0168]
[0169] The results obtained using GCN, SGC, and GAT as backbone models are shown in Table 5. Among all variants, NDE-GNN without DF exhibits the worst performance, validating the effectiveness of incorporating difference features. Furthermore, the complete NDE-GNN outperforms all variants, affirming the effectiveness of each module.
[0170] To further validate the effectiveness of the difference features, we use T-SNE to visualize the embeddings of the penultimate layer. For example... Figure 5 As shown, the results indicate that as the robot H-score in the dataset increases, there is a gradually increasing overlap between the features extracted from the graph neural networks for robot accounts and those for human accounts. Compared to the features obtained directly through GNNs, the differential features demonstrate a significant ability to distinguish between robot and human accounts.
[0171] 2.5 Parameter Sensitivity Analysis
[0172] In this section, we analyze the depth of the model and the parameter K used to construct the hypergraph.
[0173] Changing the model depth L from 1 to 4 produces the results shown in Table 6. It is worth noting that NDE-GNN exhibits superior performance when the model depth is set to 2. However, due to the inherent oversmoothing problem of GNNs, the performance of deep GNNs tends to degrade, and further increasing the depth leads to a subsequent decrease in the performance of NDE-GNN.
[0174] Table 6: Impact of Model Depth on NDE-GNN Performance
[0175]
[0176] Hypergraph construction parameters. During hypergraph construction, parameter K affects the number of nodes connected by hyperedges. By varying K from 5 to 40, as... Figure 6 As shown, the performance of NDE-GNN initially increases on all K-related datasets, then subsequently decreases. Within a certain range, as K increases, the hypergraph neural network can extract improved neighborhood representations, thus improving the performance of NDE-GNN. However, beyond a certain threshold, further increases in K lead to excessive smoothing of neighborhood features, resulting in a decline in the performance of NDE-GNN.
[0177] This invention proposes a Neighborhood Differential Augmented Graph Neighborhood ...
[0178] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0179] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0180] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0181] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A social robot detection method based on hypergraph neighborhood difference feature enhancement, characterized in that, Include: By leveraging user tweet features, the kNN algorithm is used to construct hyperedges, transforming the user social graph into a hypergraph. When constructing hyperedges using the kNN algorithm, tweet features are first extracted from user features. Then, the T nodes with the highest cosine similarity in the k-hop neighborhood of each node are calculated, and hyperedges are used to connect these nodes. k and T are adjustable parameters. Hypergraph convolution is used to extract high-order neighborhood features of social accounts; Through a feature difference mechanism, differential features at different neighborhood scales are generated using the original features and higher-order neighborhood features. These differential features are then input into a graph neural network for further enhancement, specifically including: obtaining higher-order neighborhood features using hypergraph convolution. By subtracting the original features Obtain the difference features The differential features are then fed into the GNN for further enhancement; in the GCN, the node feature matrix is represented as: Where A represents the adjacency matrix of the graph. It is a learnable weight matrix; A self-attention mechanism is employed to enhance both the differential and original features. The enhanced differential features are then fused with the original features, and the fused features are input into a linear layer. A softmax function is then used to obtain the classification result. The self-attention mechanism for enhancing the differential and original features includes: using a multi-head self-attention module to explore... In the interaction within the self-attention mechanism, for the s-th head, the node feature matrix in GCN is further represented as: ,in, , , It is a learnable parameter matrix; the outputs of the obtained s attention heads are concatenated and then transformed by a trainable transformation matrix. get The formula is expressed as: Similarly, after the self-attention mechanism, Transformed into .
2. The social robot detection method based on hypergraph neighborhood difference feature enhancement according to claim 1, characterized in that, A hypergraph is defined as: ,in Represents a set of nodes. The set of hyperedges is represented; the topology of the hypergraph is represented using the incidence matrix. express: ; node The degree is defined as: Super-edge The degree is defined as: , For nodes The average of the T cosine similarities with the other T nodes on the hyperedge. , and All are diagonal matrices.
3. The social robot detection method based on hypergraph neighborhood difference feature enhancement according to claim 2, characterized in that, Hypergraph convolution is used to extract high-order neighborhood features of social media accounts, expressed by the following formula: ,in, Represents a node The representation vector at layer l+1, This represents the activation function. Represents the i-th row of the correlation matrix. Column elements, Represents the j-th row of the correlation matrix. The elements of the column, i, j, All are positive integer variables. This represents the representation vector of the j-th node in layer l. This represents a trainable weight matrix; , Its matrix form is as follows: ,in, The incidence matrix of the hypergraph. Represents the hyperedge weight matrix; symmetric regularization is applied. The matrix form is further represented as follows: ,in, and These represent the degree matrices of the nodes and edges, respectively.
4. The social robot detection method based on hypergraph neighborhood difference feature enhancement according to claim 3, characterized in that, Enhanced difference features With original features The features after fusion are represented as follows: In the formula, · represents element-wise multiplication. and It is calculated using the following formula: In the formula, This represents the learnable parameter matrix. sigmoid represents the activation function that fuses features. Input a linear layer, and then use the softmax function to obtain the classification result: In the formula, b represents the trainable parameter matrix.
5. The social robot detection method based on hypergraph neighborhood difference feature enhancement according to claim 4, characterized in that, The model is trained using a loss function. The calculation formula is as follows: In the formula, , These represent the predicted category and the true category, respectively.
6. A social robot detection system based on hypergraph neighborhood difference feature enhancement, characterized in that, The method for detecting social robots based on hypergraph neighborhood difference feature enhancement as described in any one of claims 1 to 5 includes a hypergraph construction module, a hypergraph convolution module, a feature difference enhancement module, and a feature fusion module, wherein... The hypergraph construction module is used to construct hyperedges using the kNN algorithm based on user tweet features, transforming the user's social graph into a hypergraph. The Hypergraph Convolution module is used to extract high-order neighborhood features of social accounts using hypergraph convolution. The feature difference enhancement module is used to generate difference features at different neighborhood scales using the original features and high-order neighborhood features through the feature difference mechanism, and then input these difference features into the graph neural network for further enhancement. The feature fusion module is used to enhance the differential features and the original features using a self-attention mechanism. The enhanced differential features are then fused with the original features, and the fused features are input into a linear layer. Finally, the softmax function is used to obtain the classification result.