Social robot detection method and device, medium and product
By introducing the peripheral enhanced graph neural network (PEGNN) framework in social robot detection, and using peripheral network information to enhance central node detection, the problem of neglecting social network structure analysis in the existing technology is solved, the accuracy and robustness of the detection are improved, and the security of the social network is ensured.
Patent Information
- Application Number
- CN202510295608.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-03-13
AI Technical Summary
The existing social robot detection framework based on graph structure ignores the analysis of social network structure when improving graph neural network architecture, resulting in the overall performance of detection being affected.
A peripheral enhanced graph neural network (PEGNN) framework is proposed. By constructing a social graph containing central nodes and peripheral nodes, the information in the peripheral network is used to detect central nodes, and information from central networks and peripheral networks is combined to enhance the detection effect.
It improves the accuracy and robustness of social robot detection, enhances the ability to analyze social network structure, and thus ensures the security of social networks.
Smart Images

Figure CN120216783A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network security, and in particular, to a method, device, medium and product for detecting social robots. Background Art
[0002] With the rapid development of social networks, social media platforms have become the main channels for obtaining news, interacting and expressing opinions. However, these platforms not only gather real users, but also are filled with social robots controlled by automated programs or APIs. Many robots are used to maliciously spread false information, disrupt the platform ecosystem, and pose a threat to social stability and public safety. Therefore, the detection of social robots has become an important research direction in artificial intelligence and network security, and major platforms around the world are urgently in need of efficient detection methods.
[0003] Traditional social robot detection methods mainly rely on feature engineering, extracting user metadata and tweet content for classification. However, with the development of social robot technology, traditional detection methods are gradually becoming ineffective because robots can disguise themselves by stealing real user content or mixing malicious and neutral information.
[0004] To address this challenge, researchers have introduced graph neural networks (GNNs), leveraging the differences between robots and real users in the social network structure to detect social robots. Social robots usually have sparse connections and random interactions, while human users tend to establish close connections with people with similar interests or characteristics. Graph neural networks have shown significant advantages in identifying highly disguised social robots. Researchers have improved the detection accuracy and robustness by optimizing the network of complex social networks using graph neural network technology. Recently, various novel graph neural network architectures have emerged, further mining social graph information and becoming the key technology for social robot identification.
[0005] However, the current graph-structure-based social robot detection framework focuses on improving the GNN architecture, ignoring the analysis of the social network structure, that is, ignoring the information in the peripheral network, which affects the overall performance of classification.
[0006] Based on the above problems, there is an urgent need to provide a new method for detecting social robots with a graph neural network framework to improve the accuracy and robustness of social robot detection, and thus ensure the security of social networks. Summary of the Invention
[0007] The purpose of the present application is to provide a method, device, medium and product for detecting social robots, which can improve the accuracy and robustness of social robot detection, and thus ensure the security of social networks.
[0008] To achieve the above purpose, the present application provides the following solutions:
[0009] In a first aspect, the present application provides a method for detecting social robots, and the method for detecting social robots includes:
[0010] Construct a social graph with all users in the current social network as nodes and the interactions between users as edges, where the social graph includes a central network and a peripheral network, the central network is formed by connecting central nodes, and the peripheral network is formed by connecting peripheral nodes and central nodes; the central node is a node that spreads its neighborhood as a source node; the peripheral node is a node that does not spread its neighborhood as a source node;
[0011] According to the social graph, use a peripheral-enhanced graph neural network to perform central node detection to obtain a detection result, where the detection result includes social robots or real users; the training process of the peripheral-enhanced graph neural network is as follows:
[0012] Obtain a training set, where the training set is a social graph formed by user interactions, and the social graph includes central nodes, labels corresponding to the central nodes, peripheral nodes, and labels corresponding to the peripheral nodes;
[0013] Aggregate the central nodes and peripheral nodes respectively to obtain central node features and peripheral node features, where the central node features include the structural information of the central network, and the peripheral node features include the structural information of the central network and the structural information of the peripheral network;
[0014] Determine a first classification loss according to the detection result and the corresponding label of the central node, determine a second classification loss according to the detection result and the corresponding label of the peripheral node, and determine a cross-network domain adaptation loss based on the MK-MMD loss using the central node features and the peripheral node features;
[0015] Determine the total loss according to the first classification loss, the second classification loss, and the cross-network domain adaptation loss, and optimize the peripheral-enhanced graph neural network through backpropagation to complete the training of the peripheral-enhanced graph neural network.
[0016] Optionally, the obtaining of the training set specifically includes:
[0017] Perform machine learning based on the central nodes and peripheral nodes using a weakly supervised source of features to obtain the labels corresponding to the central nodes and the labels corresponding to the peripheral nodes; the weakly supervised source of features includes: an adaptive boosting algorithm, a random forest algorithm, and a multi-layer perceptron.
[0018] Optionally, the aggregating of the central nodes and peripheral nodes respectively to obtain central node features and peripheral node features specifically includes:
[0019] Use two-layer graph aggregation layers as the encoder;
[0020] The encoder is used to aggregate the neighbor information of the central node and the peripheral nodes.
[0021] Optionally, after separately aggregating the central node and the peripheral nodes to obtain the central node feature and the peripheral node feature, the following steps are further included:
[0022] A linear layer and a softmax layer are used to transform the aggregated node features.
[0023] Optionally, the first classification loss is determined according to the detection result and the corresponding label of the central node; the second classification loss is determined according to the detection result and the corresponding label of the peripheral node; and the cross-network domain adaptation loss is determined based on the MK-MMD loss by using the central node feature and the peripheral node feature, specifically including:
[0024] Using the formula to determine the first classification loss L C ;
[0025] Using the formula to determine the second classification loss L P ;
[0026] Using the formula to determine the cross-network domain adaptation loss L DA ;
[0027] where N C is the number of central nodes, N is the number of peripheral nodes, C is the set of central nodes, P is the set of peripheral nodes, is the detection result of user i in the central network, y i is the label of user i in the central network, is the detection result of user j in the peripheral network, y j is the label of user j in the peripheral network, is to find the expectation, L is the number of kernel functions used, k l (·) is to perform mapping using the lth kernel function, represents the feature of the central node x after passing through two graph aggregation layers, c is the cross-domain central node set, which is to extract n nodes from the central node set C, p is the cross-domain peripheral node set, which is to extract n nodes from the peripheral node set P respectively, is the feature of the peripheral node y after passing through two graph aggregation layers, is the feature of the central node x′ after passing through two graph aggregation layers, is the feature of the peripheral node y′ after passing through two graph aggregation layers.
[0028] Optionally, determine the total loss according to the first classification loss, the second classification loss, and the cross-network domain adaptation loss, and optimize the peripheral enhanced graph neural network through backpropagation to complete the training of the peripheral enhanced graph neural network, specifically including:
[0029] Use the formula L T = αL C +(1 - α)L P + βL DA to determine the total loss L T ;
[0030] where α and β are weight coefficients.
[0031] In a second aspect, the present application provides a social robot detection device, and the social robot detection device includes:
[0032] A social graph construction module, configured to construct a social graph including a central node and peripheral nodes with all users in the current social network as nodes and the interactions between users as edges; the central node is the node that spreads the neighborhood as the source node; the peripheral node is the node that does not spread the neighborhood as the source node; the social graph includes: a central network connected by the central nodes and a peripheral network connected by the peripheral nodes and the central nodes;
[0033] A detection module, configured to perform central node detection according to the social graph by using a peripheral enhanced graph neural network to obtain a detection result; the detection result includes a social robot or a real user; the training process of the peripheral enhanced graph neural network is as follows:
[0034] Obtain a training set; the training set is a social graph formed by user interactions; the social graph includes: central nodes, labels corresponding to the central nodes, peripheral nodes, and labels corresponding to the peripheral nodes;
[0035] Aggregate the central nodes and the peripheral nodes respectively to obtain central node features and peripheral node features; the central node features include: the structural information of the central network; the peripheral node features include: the structural information of the central network and the structural information of the peripheral network;
[0036] Determine the first classification loss according to the detection result of the central node and the corresponding label; determine the second classification loss according to the detection result of the peripheral node and the corresponding label; and determine the cross-network domain adaptation loss based on the MK-MMD loss by using the central node features and the peripheral node features;
[0037] Determine the total loss according to the first classification loss, the second classification loss, and the cross-network domain adaptation loss, and optimize the peripheral enhanced graph neural network through backpropagation to complete the training of the peripheral enhanced graph neural network.
[0038] In a third aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the social robot detection method described above.
[0039] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the social robot detection method described above is implemented.
[0040] In a fifth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the social robot detection method described above is implemented.
[0041] According to the specific embodiments provided by the present application, the present application has the following technical effects:
[0042] The present application provides a social robot detection method, device, medium, and product, constructs a social graph including a central node and peripheral nodes, and then divides the social graph into a central layer and a peripheral layer according to the topological structure of the nodes; and uses a Peripheral Enhanced Graph Neural Network (PEGNN) to fully consider the information in the peripheral network and adjusts the existing detection task to a central node classification task; and uses three losses to extract and fuse the information in the central network and the peripheral network to enhance the central node classification effect. Finally, user social interactions are classified into robots and real users; the analysis of the social network structure in the present application can improve the accuracy and robustness of social robot detection, and thus ensure the security of the social network. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and those of ordinary skill in the art can also obtain other drawings without creative efforts based on these drawings.
[0044] Figure 1 It is a schematic flowchart of a social robot detection method in an embodiment of the present application;
[0045] Figure 2 It is a schematic diagram of the architecture of a Peripheral Enhanced Graph Neural Network. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.
[0047] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0048] In an exemplary embodiment, as Figure 1 shown, a social robot detection method is provided, and this method includes the following steps S101 to S102. Among them:
[0049] S101: Taking all users in the current social network as nodes and the interactions between users as edges, construct a social graph including a central node and peripheral nodes; the central node is the node that spreads the neighborhood as the source node; the peripheral node is the node that has not spread the neighborhood as the source node; the social graph includes: a central network connected by the central nodes and a peripheral network connected by the peripheral nodes and the central nodes;
[0050] The specific process of constructing the social graph is as follows:
[0051] S1: Select multiple seed user nodes as the initial node set;
[0052] S2: Select several nodes from them as source nodes, and use breadth-first search (BFS), random walk, or other search algorithms to expand their neighbor nodes into the node set, and establish directed edges from the source nodes to the neighbor nodes;
[0053] S3: Select several other nodes from the expanded node set as source nodes to expand adjacent nodes, and establish directed edges from the source nodes to the adjacent nodes;
[0054] S4: Repeat S3.
[0055] The nodes that have been used as source nodes and whose adjacent nodes have been expanded and merged through the search method are used as the crawled nodes; the nodes that have not been expanded as source nodes are used as the observed nodes; the crawled nodes can actively connect to other nodes and establish edges pointing to other nodes. While the observed nodes cannot actively connect to other nodes. This results in connections between the crawled nodes, connections from the crawled nodes to the observed nodes with the former pointing to the latter, and no connections between the observed nodes. This further results in a radial shape of the entire network, where the crawled nodes are located in the center and the observed nodes are located around;
[0056] According to the differences of nodes in the network structure, the crawled nodes are defined as central nodes, and the observed nodes are defined as peripheral nodes. In addition, the network formed by interconnected central nodes is called the central network, and the network formed by the central nodes connecting the peripheral nodes is defined as the peripheral network.
[0057] S102, according to the social graph, use the peripheral enhanced graph neural network to perform central node detection and obtain the detection result; the detection result includes social robots or real users;
[0058] As Figure 2 shown, the information of the central network and the peripheral network is extracted and fused through the peripheral enhanced graph neural network to enhance the classification effect of the central nodes.
[0059] The training process of the peripheral enhanced graph neural network is as follows:
[0060] S21, obtain the training set; the training set is the social graph formed by user interactions; the social graph includes: central nodes, labels corresponding to the central nodes, peripheral nodes, and labels corresponding to the peripheral nodes;
[0061] Based on the central nodes and the peripheral nodes, machine learning is performed based on the weak supervision source of features to obtain the labels corresponding to the central nodes and the labels corresponding to the peripheral nodes; the weak supervision source based on features includes: adaptive boosting algorithm, random forest algorithm, and multi-layer perceptron. The weak supervision method is used to label the peripheral nodes to solve the problem of missing labels of the peripheral nodes.
[0062] Since the dataset for the central node classification task usually lacks the labels of the peripheral nodes, it is difficult to directly calculate the classification loss of the peripheral nodes. To solve this problem, the label generation method in Twibot-22 is borrowed, and the weak supervision learning framework Snorkel is used to label the peripheral nodes and combine them with the labels of the central nodes.
[0063] First, randomly select 1000 nodes from the central nodes with existing labels and divide them into a training set and a test set according to the ratio of 8:2. On the training set, multiple weak supervision sources are used for training and evaluation on the test set. To avoid inaccurate label generation due to the graph structure differences between the central nodes and the peripheral nodes, the weak supervision source based on the graph neural network is not selected, but three commonly used weak supervision sources based on features are used for machine learning.
[0064] After generating the initial labels from the three weak supervision sources, these outputs are combined and corrected through a label network. The label network is used to evaluate the accuracy of each weak supervision source and its interdependence, and finally more reliable training labels can be generated to provide high-quality labeled data for the peripheral nodes.
[0065] S22, aggregate the central nodes and peripheral nodes respectively to obtain the central node features and peripheral node features; the central node features include: the structural information of the central network; the peripheral node features include: the structural information of the central network and the structural information of the peripheral network;
[0066] Use two-layer graph aggregation layer as the encoder; use the encoder to aggregate the neighbor information of the central nodes and peripheral nodes; the specific encoding process is as follows:
[0067] Represent the feature vector of node i as x i , and transform it with a fully connected layer as the initial feature in the GNN, that is:
[0068]
[0069] where, W I and b I are learnable parameters, and σ is the leaky-relu activation function;
[0070] After completing the preliminary encoding of the nodes, integrate the structural information of the graph into the node features, use two-layer graph aggregation layer as the encoder, and aggregate the neighbor information of each node. The graph aggregation layer used here is not limited. For example, GCN layer (formula (2)) or RGCN layer (formula (3)) can be used:
[0071]
[0072] where, in formula (2), is the feature of node i in the lth layer, is the learnable parameter for aggregating neighbor nodes in the lth layer, represents the neighbor set of node i, represents the number of neighbors of node i, is the learnable parameter of the self-loop in the lth layer. In formula (3), represents the set of edge types, represents the neighbor set of node i under the r relationship, represents the number of neighbors of node i used under the r relationship, is the learnable parameter under the r relationship in the lth layer, is the learnable parameter of the self-loop in the lth layer.
[0073] After aggregation, the central node features only contain the structural information of the central network, while the peripheral node features contain the structural information of the central network and the structural information of the peripheral network;
[0074] Use a linear layer and a softmax layer to transform the aggregated node features.
[0075]
[0076] Among them, W and b are learnable parameters, is the feature vector of user i after two-layer graph aggregation, is the predicted value (detection result) of user i, where i ∈ C ∪ P.
[0077] S23. Determine the first classification loss according to the detection result of the central node and the corresponding label; determine the second classification loss according to the detection result of the peripheral node and the corresponding label; and determine the cross-network domain adaptation loss based on the MK-MMD loss by using the central node features and the peripheral node features;
[0078] Use the formula to determine the first classification loss L C ;
[0079] Use the formula to determine the second classification loss L P ;
[0080] Use the formula to determine the cross-network domain adaptation loss L DA ;
[0081] Among them, N C is the number of central nodes, N is the number of peripheral nodes. To improve the operation efficiency of the network, randomly select N nodes from the peripheral nodes for processing. C is the central node set, P is the peripheral node set, is the detection result of user i in the central network, y i is the label of user i in the central network, is the detection result of user j in the peripheral network, y j is the label of user j in the peripheral network, is to find the expectation, L is the number of kernel functions used, k l (·) is to perform mapping using the lth kernel function, represents the feature of the central node x after passing through the two-layer graph aggregation layer. c is the cross-domain central node set, which is to extract n nodes from the central node set C. p is the cross-domain peripheral node set, which is to extract n nodes from each of the peripheral node sets P, is the feature of the peripheral node y after passing through the two-layer graph aggregation layer, is the feature of the central node x′ after passing through the two-layer graph aggregation layer, is the feature of the peripheral node y′ after passing through the two-layer graph aggregation layer.
[0082] Among them, the cross-network domain adaptation loss L DADomain adaptation is achieved by introducing the MK-MMD loss to optimize the fusion of information from two networks. MMD projects samples from two domains into the Reproducing Kernel Hilbert Space (RKHS), and uses kernel functions to calculate the distribution difference, thereby measuring the similarity. MK-MMD combines multiple kernel functions, calculates the distribution differences in multiple RKHSs respectively, and sums up the results to more accurately measure the similarity between two domains.
[0083] The kernel functions are set to Gaussian kernel functions with different bandwidths:
[0084]
[0085] where σ l is the bandwidth of the Gaussian kernel function.
[0086] S24. Determine the total loss according to the first classification loss, the second classification loss and the cross-network domain adaptation loss, and optimize the peripheral enhanced graph neural network through backpropagation to complete the training of the peripheral enhanced graph neural network.
[0087] Use the formula L T = αL C +(1 - α)L P + βL DA to determine the total loss L T ; The total loss L T significantly improves the network's performance in the central node classification task by effectively combining information from the central and peripheral networks.
[0088] where α and β are weight coefficients.
[0089] The goal of PEGNN is to effectively extract and fuse information in the central and peripheral networks to improve the detection of social robots by central nodes. The social graph formed based on user interaction is input into the PEGNN framework, and three losses are calculated to train the network.
[0090] During network training, calculate the classification loss L C through the classification results of central nodes and their corresponding labels, and calculate the classification loss L P through the classification results of peripheral nodes and their labels. In addition, calculate the cross-network domain adaptation loss L DA using the features of central nodes and peripheral nodes after two-layer graph aggregation.
[0091] Finally, the central node classification loss, the peripheral node classification loss and the cross-network domain adaptation loss are weighted and summed to form the total loss L DA and optimize the network parameters through backpropagation to achieve an improvement in overall performance.
[0092] In a specific embodiment, social robot detection experiments were conducted on the graph-based benchmark datasets, Twibot20 and Twibot22. Both of these datasets constructed directed heterogeneous social graphs, with users as nodes and social relationships between users as edges. There are two types of edges: follow and be followed. The detailed information of the two datasets is as follows:
[0093] Table 1: Statistics of Twibot-20 and Twibot-22 Datasets
[0094] Data set Number of nodes Number of edges Labeled nodes Number of robots Number of humans Twibot-20 26,292 431,267 11,826 6,589 5,237 Twibot-22 1,000,000 4,513,155 1,000,000 139,643 860,357
[0095] The original tasks of the two datasets in Table 1 were to classify labeled nodes. Based on the graph stratification theory, we analyzed and adjusted the original tasks on the datasets to perform the central node classification task to test the performance of PEGNN.
[0096] The graph stratification phenomenon on the two datasets was analyzed. Since it is impossible to directly know which nodes in each dataset are the source nodes for crawling their adjacent nodes, a simpler strategy was used to find the central nodes - taking the set of the starting nodes of all edges in the network as the central nodes. The rest are peripheral nodes. Specifically, given a graph G=(V, E), the set of central nodes is defined as:
[0097]
[0098] The remaining nodes V P = V\V C are peripheral nodes;
[0099] Table 2 counts the number of central nodes, peripheral nodes, and edges in the central and peripheral networks in the Twibot-20 and Twibot-22 datasets;
[0100] Table 2 Structure of the wiibot-20 and Twibot-22 Datasets
[0101] Data set Central node Central edge Peripheral node Peripheral edge Twibot-20 11,924 14,368 217,656 213,611 Twibot-22 10,009 220,470 989,991 3,523,164
[0102] As shown in Table 2, the number of peripheral nodes is much larger than that of central nodes, and the number of edges in the peripheral network is much larger than that in the central network. This indicates that the size of the peripheral network is much larger than that of the central network, which may contain rich information and can be used to improve the effectiveness of the central node classification task. The average degree of central nodes in Twibot-20 is 20.32, and the average degree of peripheral nodes is 0.98. The average degree of central nodes in Twibot-22 is 396.05, and the average degree of peripheral nodes is 3.56. It can be seen that the degree of peripheral nodes is much smaller than that of central nodes. That is to say, the first-order neighborhood integrity of peripheral nodes is much smaller than that of central nodes. Therefore, peripheral nodes are not suitable as detection objects.
[0103] As shown in Table 3, the Twibot-20 dataset was analyzed. The distribution of 11,826 labeled nodes on central nodes and peripheral nodes was counted.
[0104] Table 3 Distribution of Annotated Nodes in Twibot-20
[0105] Distribution type Node count Central nodes and labeled nodes 10,739 Central nodes, but not labeled nodes 1,185 Labeled nodes, but not central nodes 1,087
[0106] As shown in Table 3, central nodes highly overlap with the annotated nodes. Therefore, the original task of Twibot-20 can be regarded as a central node classification task. The experiment directly uses the original training set, validation set, and test set, and uses the remaining nodes for enhancement.
[0107] However, the remaining nodes in Twibot-20 are unlabeled. To make the experiment proceed smoothly, the above-mentioned weakly supervised network is used to train and test on the labeled nodes, and the remaining nodes are labeled with this network. The network achieved an accuracy of 93.0% on the test set.
[0108] The Twibot-22 dataset was analyzed. All nodes in Twibot-22 have labels, so the original task of Twibot-22 is to classify all nodes. The training set, validation set, and test set are divided on all nodes. To match this application, the training set, validation set, and test set are randomly re-divided on the central nodes according to the ratio of 7:2:1, and the peripheral nodes are used for enhancement.
[0109] The graph-based social bot detection method is used as the baseline model. The following baseline models are widely used in the latest social bot detection research.
[0110] GCN is a classic graph neural network model that learns node representations by aggregating the features of adjacent nodes. Specifically, GCN performs a weighted sum of the features from adjacent nodes, then processes it through a non-linear activation function and passes it to a linear layer for classification or regression tasks. Its design is simple and efficient.
[0111] GAT introduces an attention mechanism that aggregates node features by calculating attention coefficients, assigning different weights to different adjacent nodes. This attention mechanism can more flexibly capture important information in the graph structure and enable the model to better handle complex relationships in the graph. Compared with traditional GCN, GAT has a significant improvement in performance.
[0112] HGT aims to handle heterogeneous graphs and can be used to process different types of nodes and edges in the graph. HGT calculates the attention coefficients of different types of nodes and edges through a type-aware multi-head attention mechanism, thereby capturing complex relationships in the graph. HGT also introduces meta-path encoding to further improve the model's performance on heterogeneous graphs.
[0113] Simple-HGN is a heterogeneous graph neural network model with a simple structure but powerful functions. Through a simplified neighbor aggregation method, Simple-HGN effectively combines the features from different types of neighbors while sharing partial weights of different types of edges to reduce the number of parameters. The model further processes the aggregated features using a multi-layer perceptron (MLP), maintaining a low computational complexity and good performance.
[0114] BotRGCN aims to perform Twitter bot detection by constructing a heterogeneous social network graph and using RGCN. Specifically, BotRGCN constructs a heterogeneous graph by building attention relationships and uses RGCN to capture complex relationships between users.
[0115] RGT effectively simulates the heterogeneity of social networks for Twitter bot detection by using a graph transformer and a semantic attention mechanism. Specifically, RGT constructs a heterogeneous information network that takes various relationships between users as nodes and multiple relationships as edges. Then, information across users and relationships is aggregated through a relational graph transformer and a semantic attention network for heterogeneous-aware Twitter bot detection.
[0116] The performance of different social bot detection methods on TwiBot-20 and TwiBot-22 is shown in Table 4:
[0117] Table 4
[0118]
[0119]
[0120] Several representative graph-based social robot detection frameworks on Twibot-20 and Twibot-22 were evaluated, and the results are shown in Table 4, including four metrics: accuracy, F1-score, precision, and recall. The study shows that the heterogeneous graph-based social robot detection framework is generally superior to the homogeneous graph-based method. The heterogeneous graph-based framework captures more information in the social network.
[0121] Subsequently, several heterogeneous graph frameworks were enhanced with the PEGNN framework to evaluate the enhancement effect of the framework. Compared with the previous framework that only used the central network information for central node classification, PEGNN also extracts information from the peripheral network and fuses it with the information from the central network to enhance the classification of the central node. On the Twibot-20 dataset, the model enhanced with PEGNN improved by 1.35% and 1.41% on average in terms of accuracy and F1-score, and by 2.52% and 8.24% on average on the Twibot-22 dataset. In addition, PEGNN significantly improved the precision and recall of the model. These enhancements indicate that PEGNN, which introduces and integrates peripheral network information, can effectively enhance the classification performance of the model, especially in complex social networks, where it can better extract and utilize node information to improve the accuracy and comprehensiveness of detection.
[0122] Based on the same inventive concept, the embodiments of the present application also provide a social robot detection device for implementing the above-mentioned social robot detection method. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the social robot detection device provided below can refer to the limitations on the social robot detection method in the above text, and will not be repeated here.
[0123] In an exemplary embodiment, a social robot detection device is provided, including:
[0124] A social graph construction module, configured to construct a social graph including a central node and a peripheral node with all users in the current social network as nodes and the interactions between users as edges; the central node is the node that spreads the neighborhood as the source node; the peripheral node is the node that does not spread the neighborhood as the source node; the social graph includes: a central network connected by the central nodes and a peripheral network connected by the peripheral nodes and the central nodes;
[0125] A detection module, configured to perform central node detection according to the social graph by using a peripheral enhanced graph neural network to obtain a detection result; the detection result includes social robots or real users; the training process of the peripheral enhanced graph neural network is as follows:
[0126] Obtain a training set; the training set is a social graph formed by user interactions; the social graph includes: a central node, a label corresponding to the central node, peripheral nodes, and labels corresponding to the peripheral nodes;
[0127] Aggregate the central node and the peripheral nodes respectively to obtain central node features and peripheral node features; the central node features include: the structural information of the central network; the peripheral node features include: the structural information of the central network and the structural information of the peripheral network;
[0128] Determine a first classification loss according to the detection result of the central node and the corresponding label; determine a second classification loss according to the detection result of the peripheral node and the corresponding label; and determine a cross-network domain adaptation loss based on the MK-MMD loss by using the central node features and the peripheral node features;
[0129] Determine a total loss according to the first classification loss, the second classification loss, and the cross-network domain adaptation loss, and optimize the peripheral enhanced graph neural network through backpropagation to complete the training of the peripheral enhanced graph neural network.
[0130] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used for the processor to exchange information with external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a social robot detection method.
[0131] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, which, when executed by a processor, implements the steps in the above method embodiments.
[0132] In an exemplary embodiment, a computer program product is provided, including a computer program which, when executed by a processor, implements the steps in the above method embodiments.
[0133] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0134] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the above method embodiments. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0135] The databases involved in the embodiments provided in this application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in this application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0136] In this application, all actions of obtaining signals, information or data are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where it is located and obtaining the authorization given by the owner of the corresponding device.
[0137] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0138] Specific examples are used in this article to elaborate on the principles and implementation manners of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A social robot detection method, characterized in that: The social robot detection method comprises: Taking all users in the current social network as nodes and the interactions between users as edges, a social graph including a central node and peripheral nodes is constructed; the central node is a node that is a diffusion neighborhood of a source node; the peripheral node is a node that is not a diffusion neighborhood of a source node; the social graph includes: a central network obtained by connecting the central node and a peripheral network obtained by connecting the peripheral nodes to the central node; According to the social graph, a peripheral enhanced graph neural network is used to perform central node detection to obtain a detection result; the detection result includes a social robot or a real user; the training process of the peripheral enhanced graph neural network is: Obtain a training set; the training set is a social graph formed by user interaction; the social graph includes: a central node, a label corresponding to the central node, a peripheral node, and a label corresponding to the peripheral node; Aggregating the central node and the peripheral nodes respectively to obtain central node features and peripheral node features; the central node features include: structural information of the central network; the peripheral node features include: structural information of the central network and structural information of the peripheral network; Determine the first classification loss according to the detection result of the central node and the corresponding label; determine the second classification loss according to the detection result of the peripheral node and the corresponding label; and determine the cross-network domain adaptive loss based on the MK-MMD loss by using the central node features and the peripheral node features; The total loss is determined based on the first classification loss, the second classification loss, and the cross-domain adaptive loss, and the peripheral enhanced graph neural network is optimized through back propagation to complete the training of the peripheral enhanced graph neural network.
2. The social robot detection method according to claim 1, characterized in that: The obtaining of the training set specifically includes: According to the central node and the peripheral nodes, machine learning is performed based on the feature-based weak supervision source to obtain the labels corresponding to the central node and the labels corresponding to the peripheral nodes; the feature-based weak supervision sources include: adaptive boosting algorithm, random forest algorithm and multi-layer perceptron.
3. The social robot detection method according to claim 1, characterized in that: The central node and the peripheral nodes are aggregated respectively to obtain the central node features and the peripheral node features, specifically including: A two-layer graph aggregation layer is used as the encoder; The encoder is used to aggregate the neighbor information of the central node and the peripheral nodes.
4. The social robot detection method according to claim 1, characterized in that: The central node and the peripheral nodes are aggregated respectively to obtain the central node features and the peripheral node features, and then further includes: Linear layers and softmax layers are used to transform the aggregated node features.
5. The social robot detection method according to claim 1, characterized in that: The first classification loss is determined according to the detection result of the central node and the corresponding label; the second classification loss is determined according to the detection result of the peripheral node and the corresponding label; And using the central node features and peripheral node features, based on the MK-MMD loss, the cross-network domain adaptive loss is determined, including: Using the formula Determine the first classification loss L C ; Using the formula Determine the second classification loss L P ; Using the formula Determine the cross-domain adaptation loss L DA ; Among them, N C is the number of central nodes, N is the number of peripheral nodes, C is the set of central nodes, P is the set of peripheral nodes, is the detection result of user i in the central network, y i is the label of user i in the central network, is the detection result of user j in the peripheral network, y j is the label of user j in the peripheral network, To find the expectation, L is the number of kernel functions used, k l (·) is the mapping using the lth kernel function, It represents the features of the central node x after passing through two layers of graph aggregation layers. c is the cross-domain central node set, which is n nodes extracted from the central node set C. p is the cross-domain peripheral node set, which is n nodes extracted from the peripheral node set P. is the feature of the peripheral node y after passing through two layers of graph aggregation layers, is the feature of the central node x′ after passing through two layers of graph aggregation layers, It is the feature of the peripheral node y′ after passing through two graph aggregation layers.
6. The social robot detection method according to claim 5, characterized in that: The total loss is determined based on the first classification loss, the second classification loss, and the cross-domain adaptive loss, and the peripheral enhanced graph neural network is optimized through back propagation to complete the training of the peripheral enhanced graph neural network, specifically including: Using the formula L T =αL C +(1-α)L P +βL DA Determine the total loss L T ; Among them, α and β are weight coefficients.
7. A social robot detection device, characterized in that: The social robot detection device comprises: A social graph construction module is used to construct a social graph including central nodes and peripheral nodes with all users in the current social network as nodes and interactions between users as edges; the central node is a node that is a diffusion neighborhood of a source node; the peripheral node is a node that is not a diffusion neighborhood of a source node; the social graph includes: a central network obtained by connecting the central node and a peripheral network obtained by connecting the peripheral nodes to the central node; The detection module is used to detect the central node according to the social graph using a peripheral enhanced graph neural network to obtain a detection result; the detection result includes a social robot or a real user; the training process of the peripheral enhanced graph neural network is: Obtain a training set; the training set is a social graph formed by user interaction; the social graph includes: a central node, a label corresponding to the central node, a peripheral node, and a label corresponding to the peripheral node; Aggregating the central node and the peripheral nodes respectively to obtain central node features and peripheral node features; the central node features include: structural information of the central network; the peripheral node features include: structural information of the central network and structural information of the peripheral network; Determine the first classification loss according to the detection result of the central node and the corresponding label; determine the second classification loss according to the detection result of the peripheral node and the corresponding label; and determine the cross-network domain adaptive loss based on the MK-MMD loss by using the central node features and the peripheral node features; The total loss is determined based on the first classification loss, the second classification loss, and the cross-domain adaptive loss, and the peripheral enhanced graph neural network is optimized through back propagation to complete the training of the peripheral enhanced graph neural network.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the social robot detection method described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the social robot detection method described in any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the social robot detection method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Graph neural network prediction method and system for social network distribution external generalization
CN115293919A
Social robot detection system and method based on ternary graph convolutional neural network
CN116186636A
Social robot detection system and method based on graph neural network and Cutmix
CN117272090A
Method and apparatus for classifying nodes of a graph
WO2023000165A1