Explainable social robot detection method, apparatus, device and storage medium
By performing domain aggregation and feature contribution calculation in the social graph, the problem of poor interpretability of social robot detection models is solved, and users' understanding and trust in the detection process and results are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT COMP NETWORK & INFORMATION SECURITY MANAGEMENT CENT
- Filing Date
- 2023-05-12
- Publication Date
- 2026-05-01
AI Technical Summary
Existing social robot detection models, such as the GCN model, lack interpretability, making it difficult to explain the contribution of individual features to the prediction results and the correlation between nodes, which makes it difficult for users to understand the detection process and results.
By obtaining the node feature vectors and edge weights of each user node in the social graph, we perform domain aggregation to obtain the embedding vectors of the nodes to be explained. We then use a pre-trained social bot detection model to predict the probability that a node is a social bot. By combining the calculation of node contribution and feature contribution, we improve the interpretability of the model.
This enables the interpretability of social robot detection results, making the detection process easier for users to understand and increasing their trust in the results.
Smart Images

Figure CN116992300B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, specifically to an interpretable social robot detection method, apparatus, device, and storage medium. Background Technology
[0002] With the development of technology, botnets have emerged for malicious activities such as manipulating public opinion and spreading false information. A botnet consists of multiple zombie accounts controlled by social bots, which are programs that can simulate real user behavior patterns. These social bots typically use highly similar behavioral patterns, coordinating their actions within the same timeframe, such as forwarding, liking, and commenting, to conceal the identity of the zombie accounts and thus carry out malicious acts. On social media platforms, a large number of accounts exhibiting highly similar behavior may indicate the existence of a botnet, even if there is no obvious connection between these accounts.
[0003] Currently, Graph Convolutional Neural Networks (GCNs) are gradually becoming the mainstream technology in the field of social bot detection. Specifically, by constructing a graph model of a social media platform, representing social media platform accounts as nodes, and establishing relationships between nodes, the GCN model is used to analyze the relationships and features between nodes for bot detection. The GCN model is a black-box model based on deep learning, which learns node feature representations through multiple layers of nonlinear transformations.
[0004] With the development of artificial intelligence technology, the interpretability of machine learning models is becoming increasingly important to assist humans in understanding and interpreting the decision-making process and results of machine learning models. However, the interpretability of GCN models is relatively poor. Since the feature representation of each node in a graph model is composed of the feature representations of its neighboring nodes, it is difficult to explain the contribution of a single feature to the prediction of the node to be explained, and it is also difficult to explain the contribution of other nodes to the prediction of the node to be explained. Summary of the Invention
[0005] At least one embodiment of this disclosure provides an interpretable method, apparatus, device, and storage medium for detecting social robots.
[0006] In a first aspect, embodiments of this disclosure propose an interpretable social robot detection method, the method comprising:
[0007] Obtain the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes;
[0008] For any node to be explained, determine each neighboring node adjacent to the node to be explained, and perform neighborhood aggregation based on the node feature vector of each neighboring node and the weight of the edge formed between each neighboring node and the node to be explained to obtain the embedding vector of the node to be explained.
[0009] Based on the embedding vector of the node to be explained, the first probability that the node to be explained is a social robot is predicted by a pre-trained social robot detection model.
[0010] Based on the first probability, determine the node contribution of any user node in the social graph to the prediction result of the node to be explained, and the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained.
[0011] In some embodiments, neighborhood aggregation is performed based on the node feature vectors of each neighboring node and the weights of the edges formed between each neighboring node and the node to be explained to obtain the embedding vector of the node to be explained, including:
[0012] The weighted feature vector is obtained by weighting and summing the node feature vectors of each neighbor node and the weights of the edges formed between each neighbor node and the node to be explained.
[0013] Based on the weight matrix obtained through pre-training, a nonlinear feature transformation is performed on the weighted feature vector to obtain the embedding vector of the node to be explained.
[0014] In some embodiments, based on a first probability, determining the node contribution of any user node in the social graph to the prediction result of the node to be explained, and the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained, includes:
[0015] Based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph, an unexplained subgraph including the node to be explained is constructed; and based on the unexplained subgraph, the social robot detection model and the first probability, the node contribution of any user node in the unexplained subgraph to the prediction result of the node to be explained is determined.
[0016] And / or,
[0017] Perturb any feature in the embedding vector of the node to be explained to obtain the corresponding perturbation vector; based on the perturbation vector, the social robot detection model and the first probability, determine the feature contribution of any feature to the prediction result of the node to be explained.
[0018] In some embodiments, an interpretable subgraph including the node to be interpreted is constructed based on the embedding vector of the node to be interpreted and the node feature vector of any user node in the social graph; including:
[0019] Based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph, determine the node similarity between the node to be explained and any user node in the social graph.
[0020] User nodes with a node similarity greater than a preset similarity threshold are added to the subgraph to be explained, which includes the node to be explained.
[0021] In some embodiments, based on the subgraph to be explained, the social robot detection model, and a first probability, the node contribution of any user node in the subgraph to be explained to the prediction result of the node to be explained is determined, including:
[0022] For any user node in the subgraph to be explained, the user node is removed from the subgraph to be explained, and the subgraph to be explained after removing the user node is processed by the social robot detection model to predict the second probability that the node to be explained is a social robot; based on the second probability and the first probability, the node contribution of the user node to the prediction result of the node to be explained is determined.
[0023] In some embodiments, perturbing any feature in the embedding vector of the node to be explained to obtain the corresponding perturbation vector includes:
[0024] For any feature in the embedding vector of the node to be explained, the value of the feature is perturbed to zero, while keeping the values of other features in the embedding vector unchanged, thus obtaining the corresponding perturbation vector.
[0025] In some embodiments, based on the perturbation vector, the social robot detection model, and the first probability, the feature contribution of any feature to the prediction result of the node to be explained is determined, including:
[0026] For any feature in the embedding vector of the node to be explained, the perturbation vector corresponding to any feature is processed based on the social robot detection model to predict the third probability that the node to be explained is a social robot; based on the third probability and the first probability, the feature contribution of any feature to the prediction result of the node to be explained is determined.
[0027] Secondly, embodiments of this disclosure also propose an interpretable social robot detection device, the device comprising:
[0028] The acquisition unit is used to acquire the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes.
[0029] The determining unit is used to determine each neighboring node adjacent to any node to be explained, and to perform neighborhood aggregation based on the node feature vectors of each neighboring node and the weights of the edges formed between each neighboring node and the node to be explained, so as to obtain the embedding vector of the node to be explained.
[0030] The prediction unit is used to predict the first probability that the node to be explained is a social robot based on the embedding vector of the node to be explained by a pre-trained social robot detection model.
[0031] The interpretation unit is used to determine, based on a first probability, the node contribution of any user node in the social graph to the prediction result of the node to be interpreted, and the feature contribution of any feature in the embedding vector of the node to be interpreted to the prediction result of the node to be interpreted.
[0032] Thirdly, embodiments of this disclosure also propose an electronic device, which includes a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of the interpretable social robot detection method as described in the first aspect.
[0033] Fourthly, embodiments of this disclosure also provide a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instructions that cause a computer to perform the steps of the interpretable social robot detection method as described in the first aspect.
[0034] Fifthly, embodiments of this disclosure also provide a computer program product, wherein the computer program product includes a computer program stored in a computer-readable storage medium, and at least one processor of a computer reads from and executes the computer program from the computer-readable storage medium, causing the computer to perform the steps of the interpretable social robot detection method as described in the first aspect.
[0035] As can be seen, in at least one embodiment of this disclosure, by obtaining the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes, for the node to be explained, the embedding vector of the node to be explained is obtained through domain aggregation. Then, the embedding vector of the node to be explained is processed by the social robot detection model to predict the first probability that the node to be explained is a social robot. Based on the first probability, the node contribution of any user node in the social graph to the prediction result of the node to be explained can be determined, which represents the degree of influence of any user node in the social graph on the prediction result of the node to be explained. Furthermore, the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained can be determined, which represents the degree of influence of any feature on the prediction result of the node to be explained. This solves the problem of poor interpretability in social robot detection, makes it easier for users to understand the reasoning process of social robot detection, and increases their trust in the social robot detection results. Attached Figure Description
[0036] To more clearly illustrate the technical solutions of the embodiments of this disclosure, 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 this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings.
[0037] Figure 1 A flowchart illustrating an interpretable social robot detection method provided in this embodiment of the disclosure;
[0038] Figure 2 A schematic diagram of a process for determining node contribution is provided in an embodiment of this disclosure;
[0039] Figure 3 A schematic diagram of a process for determining feature contribution is provided in an embodiment of this disclosure;
[0040] Figure 4 A schematic diagram of an interpretable social robot detection device provided in an embodiment of this disclosure;
[0041] Figure 5 This is an exemplary block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0042] To better understand the above-described objectives, features, and advantages of this disclosure, the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It is to be understood that the described embodiments are only some, not all, of the embodiments of this disclosure. The specific embodiments described herein are merely for explaining this disclosure and are not intended to limit it. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure are within the scope of protection of this disclosure.
[0043] It should be noted that in this article, relational terms such as “first” and “second” are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0044] Currently, social robot detection models typically employ the Generative Networking (GCN) model. GCN is a deep learning model designed for processing graph data, capable of tasks such as node classification, graph classification, and link prediction within graph structures. The GCN model learns node feature representations through multiple layers of non-linear transformations. In each layer of the GCN model, the features of each node are updated as a weighted sum of the features of its neighboring nodes, where the weights are determined by the edge weights and normalization coefficients between nodes. This operation can be viewed as aggregating information from neighboring nodes and applying it to the current node through weights, resulting in a richer node feature representation.
[0045] Currently, interpretability methods for machine learning models include importance analysis and local interpretability methods. Importance analysis is typically used to interpret feature-based machine learning models, such as decision trees and random forests. It usually calculates the importance of each feature in the model's predictions, thus explaining the model's prediction results. Local interpretability methods, on the other hand, are typically used to explain the prediction results of individual samples in the model. These methods can improve the interpretability of the model by displaying the confidence level of the prediction results, the importance level of each feature, and the explanation of the model's prediction results.
[0046] However, current interpretability methods for machine learning models can usually only extract features from a limited set of features, such as text content and user activities, and cannot fully describe the behavioral patterns of social bots and the relationships between accounts, thus limiting their expressive and generalization abilities.
[0047] To address the poor interpretability of social bot detection, this disclosure provides an interpretable social bot detection method, apparatus, device, or storage medium. It interprets the prediction results of a social bot detection model (e.g., a GCN model) by obtaining the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes. For the node to be interpreted, an embedding vector is obtained through domain aggregation. The embedding vector is then processed by the social bot detection model to predict a first probability that the node is a social bot. Based on this first probability, the node contribution of any user node in the social graph to the prediction result of the node to be interpreted can be determined, representing the degree of influence of any user node on the prediction result of the node to be interpreted. Furthermore, the feature contribution of any feature in the embedding vector of the node to be interpreted can be determined, representing the degree of influence of any feature on the prediction result of the node to be interpreted. This addresses the poor interpretability of social bot detection, making it easier for users to understand the reasoning process of social bot detection and increasing their trust in the detection results.
[0048] Figure 1 This is a flowchart illustrating an interpretable social robot detection method provided in this embodiment. The subject of this interpretable social robot detection method is an electronic device, including but not limited to smartphones, PDAs, tablets, wearable devices with displays, desktops, laptops, all-in-ones, smart home devices, servers, etc. The server can be a standalone server or a cluster of multiple servers, and can include servers built locally and servers hosted in the cloud.
[0049] like Figure 1 As shown, this interpretable social robot detection method may include, but is not limited to, steps 101 to 104:
[0050] In step 101, the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes are obtained.
[0051] In this embodiment, each user account in the social media network is denoted as a user node, and the relationships between different user nodes are represented by edges. The social media network is then converted into graph data, where nodes are user nodes and edges represent the weights of the relationships between different user nodes. Therefore, the graph representation is completed by combining the features of the social account dataset, using an undirected weighted graph to represent the dataset G = (V, E), where G represents a graph, V is the set of nodes in the graph, and E is the set of edge weights in the graph. This paper does not impose specific restrictions on the node encoding and relationship construction methods. For example, at least one of the following features can be used to encode nodes: number of followers, number of follows, number of tweets, number of public lists to which this user belongs, number of followers / followers, whether verified, whether there is a description, whether the default image is used, whether there is an address, whether there is a nickname, number of times mentioned, whether the description has a Uniform Resource Locator (URL), nickname length, and number of tweet hashtags. The weighting of edges between social media accounts primarily considers factors such as follow relationships and whether posts are mutually @mentioned. If accounts interact, their weights are increased to varying degrees: the initial weight is 0; if there's a follow relationship, the weight increases by 1; if they mutually follow each other, the weight increases by another 1, resulting in a weight of 2; if one account @mentions the other, the weight increases by 1; if they mutually @mention each other, the weight increases by another 1. The resulting social media account node is represented as V = [v1, v2, ..., v...]. n The weight of an edge is represented as E = [e1, e2, ..., e] m ], where n represents the number of nodes and m represents the number of edges.
[0052] In step 102, for any node to be explained, each neighboring node adjacent to the node to be explained is determined, and the neighborhood is aggregated based on the node feature vector of each neighboring node and the weight of the edge formed between each neighboring node and the node to be explained to obtain the embedding vector of the node to be explained.
[0053] In this embodiment, for any node v1 to be explained, all neighboring nodes adjacent to v1 can be determined. Then, the node feature vectors of each neighboring node and the weights of the edges formed between each neighboring node and the node to be explained are weighted and summed to achieve feature propagation, resulting in a weighted feature vector containing neighborhood information: h1 = ∑ t e t ×v t , where t is the set of neighboring nodes of the node to be explained v1; thus, based on the pre-trained weight matrix, a nonlinear feature transformation is performed on the weighted feature vector. The nonlinear feature transformation refers to transforming the weighted feature vector through a nonlinear activation function (such as ReLU) and a learnable weight matrix to obtain the embedding vector of the node to be explained.
[0054] For example, if the node to be explained is v1, and the neighboring nodes adjacent to v1 are v2 and v3, and the weight of the adjacent edge between v1 and v2 is e2, and the weight of the adjacent edge between v1 and v3 is e3, then feature propagation is first performed. Specifically, the node feature vectors of each neighboring node and the weights of the edges formed between each neighboring node and the node to be explained are weighted and summed to obtain a weighted feature vector: h1 = e2*v2 + e3*v3. Then, nonlinear feature transformation is performed. Specifically, based on the pre-trained weight matrix W, a nonlinear feature transformation is performed on the weighted feature vector: v'1 = ReLU(W*h1), where v'1 is the embedding vector of the node to be explained.
[0055] In step 103, based on the embedding vector of the node to be explained, the first probability that the node to be explained is a social robot is predicted by a pre-trained social robot detection model.
[0056] In this embodiment, the embedding vector of the node to be explained, the node feature vectors of each neighboring node, and the weights of the edges formed between the node to be explained and each neighboring node are processed based on a pre-trained social robot detection model to predict the first probability P(v1) that the node to be explained is a social robot.
[0057] The pre-trained social robot detection model is a GCN model, which has a multi-layer structure, with each layer consisting of a weight matrix W and an activation function f. For each unlabeled node i (i.e., an undetected node without a label), the softmax function is used to calculate its predicted label y. i=softmax(h L[i] ), where h L[i] The hidden representation of the Lth layer of the GCN model can be calculated as follows: h L+1 =f(A*h L *W L ), where A is the adjacency matrix, W L is the weight matrix of the Lth layer of the GCN model, and f is the activation function.
[0058] Suppose we have a graph G containing N user nodes, where the true label of user node i is y. i For the node classification task, the goal is to predict the label of a user node using the node feature vectors in G. There are two categories of labels: labels for social bots and labels for non-social bots.
[0059] Training can be performed by calculating the loss function of the labeled nodes. Here, we use the loss function that minimizes the cross-entropy: L = -sum(y true *log(y pred ), where y true It is the true label vector, y pred This is the predicted label vector. Training is complete when the predicted label is the same as the true label, or when the predicted label converges to the true label. The input to the trained social robot detection model is a graph, and the output is the predicted probability that each node in the graph is a social robot.
[0060] In step 104, based on the first probability, the node contribution of any user node in the social graph to the prediction result of the node to be explained, and the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained are determined.
[0061] In this embodiment, an unexplained subgraph including the unexplained node is constructed based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph; and based on the unexplained subgraph, the social robot detection model, and the first probability, the node contribution of any user node in the unexplained subgraph to the prediction result of the unexplained node is determined.
[0062] Specifically, based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph, the node similarity between the node to be explained and any user node in the social graph is determined. User nodes with a node similarity greater than a preset similarity threshold are added to the subgraph to be explained, which includes the node to be explained. For any user node in the subgraph to be explained, the user node is removed from the subgraph, and the subgraph to be explained after removing the user node is processed by a social robot detection model to predict a second probability that the node to be explained is a social robot. Based on the second probability and the first probability, the node contribution of the user node to the prediction result of the node to be explained is determined.
[0063] For example, node similarity can be calculated using various methods. Node similarity is a function that measures the degree of vector similarity between two nodes in a complex network. It is usually related to the neighbor structure and attributes of the node to be explained. Methods for calculating node similarity include, but are not limited to, distance-based methods, graph-based methods, information-theoretic methods, and mutual information-based methods. The specific processing procedures of these methods are mature technologies in this field and will not be elaborated further. The subgraph to be explained initially only includes the node to be explained. As node similarity is calculated, user nodes are gradually added to the subgraph. The node similarity between the added user nodes and the node to be explained is greater than a preset similarity threshold. After constructing the subgraph to be explained, assuming there are k nodes in the subgraph to be explained, k < n, where n is the number of nodes in the social graph, node v is selected from the subgraph to be explained. i ,≠1 Delete, and then use the GCN model to predict the node to be explained v1, to obtain the second probability P(v) that the node to be explained is a social robot. i Then, based on the first probability P(v1) and the second probability P(v) of the node to be explained being a social robot, i ), determine the node v to be deleted i The node contribution of the prediction result for explaining node v1 is σ. i =sigmoid(P(v i Repeat this process until the node contribution of the k nodes in the subgraph to be explained to the prediction results of the node to be explained is calculated. The larger the node contribution, the greater the influence of that node on the prediction results of the node to be explained.
[0064] In this embodiment, any feature in the embedding vector of the node to be explained is perturbed to obtain the corresponding perturbation vector; based on the perturbation vector, the social robot detection model and the first probability, the feature contribution of any feature to the prediction result of the node to be explained is determined.
[0065] Specifically, for any feature in the embedding vector of the node to be explained, the value of the feature is perturbed to zero, while keeping the values of other features in the embedding vector unchanged, resulting in a corresponding perturbation vector. For any feature in the embedding vector of the node to be explained, the perturbation vector corresponding to that feature is processed based on the social robot detection model to predict the third probability that the node to be explained is a social robot. Based on the third probability and the first probability, the feature contribution of any feature to the prediction result of the node to be explained is determined.
[0066] For example, for the node to be explained, v1, assuming its embedding vector is an m-dimensional vector, a certain dimension feature j is selected for perturbation and set to 0, resulting in the corresponding perturbation vector. Then, the GCN model is used to predict the node to be explained, obtaining the third probability P(v1) that the node to be explained is a social robot. j Then, based on the first probability P(v1) and the third probability P(v) of the node to be explained being a social robot, j The node contribution of the deleted feature j to the prediction result of the node to be explained, v1, is determined to be μ. j =sigmoid(P(v j Repeat this process until the m-dimensional feature of the node to be explained, v1, is calculated as the feature contribution of the node to be explained to the prediction result of the node to be explained. The larger the feature contribution, the greater the influence of the feature on the prediction result of the node to be explained.
[0067] As can be seen, this embodiment of the present disclosure obtains the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes. For the node to be explained, it obtains the embedding vector of the node to be explained through domain aggregation. Then, it processes the embedding vector of the node to be explained through a social robot detection model to predict the first probability that the node to be explained is a social robot. Based on the first probability, the node contribution of any user node in the social graph to the prediction result of the node to be explained can be determined, which represents the degree of influence of any user node in the social graph on the prediction result of the node to be explained. Furthermore, the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained can be determined, which represents the degree of influence of any feature on the prediction result of the node to be explained. This solves the problem of poor interpretability in social robot detection, makes it easier for users to understand the reasoning process of social robot detection, and increases their trust in the social robot detection results.
[0068] Based on the above embodiments, Figure 2 A flowchart illustrating the determination of node contribution provided in this embodiment includes steps 201 to 207:
[0069] 201. Social graph representation.
[0070] In this embodiment, each user account in the social media network is represented as a user node, and the relationships between different user nodes are represented by edges. The social media network is then converted into graph data, where nodes are user nodes and edges represent the weights of the relationships between different user nodes. Therefore, the graph representation is completed by combining the features of the social account dataset, using an undirected weighted graph to represent the dataset G = (V, E), where G represents a graph, V is the set of nodes in the graph, and E is the set of edge weights in the graph.
[0071] 202. Domain Aggregation.
[0072] In this embodiment, domain aggregation includes feature propagation and nonlinear feature transformation. For example, if the node to be explained is v1, and the neighboring nodes adjacent to v1 are v2 and v3, and the weight of the adjacent edge between v1 and v2 is e2, and the weight of the adjacent edge between v1 and v3 is e3, then feature propagation is performed first. Specifically, the node feature vectors of each neighboring node and the weights of the edges formed between each neighboring node and the node to be explained are weighted and summed to obtain a weighted feature vector: h1 = e2*v2 + e3*v3; then nonlinear feature transformation is performed. Specifically, based on the pre-trained weight matrix W, a nonlinear feature transformation is performed on the weighted feature vector: v'1 = ReLU(W*h1), where v'1 is the embedding vector of the node to be explained, and the weight matrix W is obtained during the training of the GCN model.
[0073] 203. Predict the first probability.
[0074] The pre-trained social robot detection model processes the embedding vector of the node to be explained, the node feature vectors of each neighboring node, and the weights of the edges formed between the node to be explained and each neighboring node to predict the first probability P(v1) that the node to be explained is a social robot.
[0075] 204. Calculate node similarity.
[0076] In this embodiment, the node similarity between the node to be explained and any user node in the social graph is determined based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph. Node similarity can be calculated using various methods. Node similarity is a function that measures the degree of vector similarity between two nodes in a complex network, and it is usually related to the neighbor structure and attributes of the node to be explained. Methods for calculating node similarity include, but are not limited to, distance-based methods, graph structure-based methods, information theory-based methods, and mutual information-based methods. The specific processing procedures of these methods are mature technologies in this field and will not be elaborated further.
[0077] 205. Construct the subgraph to be explained.
[0078] In this embodiment, the subgraph to be explained initially only includes nodes to be explained. As node similarity is calculated, user nodes are gradually added to the subgraph to be explained. The node similarity between the added user nodes and the nodes to be explained is greater than a preset similarity threshold.
[0079] 206. Calculate the contribution of the deleted node.
[0080] In this embodiment, after constructing the subgraph to be explained, it is assumed that there are k nodes in the subgraph to be explained, k < n, where n is the number of nodes in the social graph. Node v on the subgraph to be explained is then selected. i If i≠1, delete the node and then use the GCN model to predict the node to be explained, obtaining the second probability P(v1) that the node to be explained is a social robot. i Then, based on the first probability P(v1) and the second probability P(v) of the node to be explained being a social robot, i ), determine the node v to be deleted i The node contribution of the prediction result for explaining node v1 is σ. i =sigmoid(P(v i )-P(v1)). Repeat this process until the node contribution of the k nodes in the subgraph to be explained to the prediction results of the node to be explained is calculated. The larger the node contribution, the greater the influence of the node on the prediction results of the node to be explained.
[0081] 207. Generate interpretable subgraphs.
[0082] In this embodiment, an interpretable subgraph is generated, showing the node contributions of different nodes to the prediction results of the node to be explained. This interpretable subgraph reflects the contribution of neighboring nodes to detecting the node to be explained as a robot account. For example, if the contribution of robot accounts among the neighboring nodes is high, the probability of the predicted result of the node to be explained being a robot account is higher; conversely, the probability of the predicted result of the node to be explained being a non-robot account is higher.
[0083] Based on the above embodiments, Figure 3 A flowchart illustrating the determination of feature contribution as provided in this embodiment includes steps 301 to 306:
[0084] 301. Social graph representation.
[0085] In this embodiment, each user account in the social media network is represented as a user node, and the relationships between different user nodes are represented by edges. The social media network is then converted into graph data, where nodes are user nodes and edges represent the weights of the relationships between different user nodes. Therefore, the graph representation is completed by combining the features of the social account dataset, using an undirected weighted graph to represent the dataset G = (V, E), where G represents a graph, V is the set of nodes in the graph, and E is the set of edge weights in the graph.
[0086] 302. Domain Aggregation.
[0087] In this embodiment, the domain aggregation includes feature propagation and nonlinear feature transformation. For example, if the node to be explained is v1, and the neighboring nodes adjacent to v1 are v2 and v3, and the weight of the adjacent edge between v1 and v2 is e2, and the weight of the adjacent edge between v1 and v3 is e3, then feature propagation is performed first. Specifically, the node feature vectors of each neighboring node and the weights of the edges formed between each neighboring node and the node to be explained are weighted and summed to obtain a weighted feature vector: h1 = e2*v2 + e3*v3; then nonlinear feature transformation is performed. Specifically, based on the pre-trained weight matrix W, a nonlinear feature transformation is performed on the weighted feature vector: v'1 = ReLU(W*h1), where v'1 is the embedding vector of the node to be explained.
[0088] 303. Predict the first probability.
[0089] The pre-trained social robot detection model processes the embedding vector of the node to be explained, the node feature vectors of each neighboring node, and the weights of the edges formed between the node to be explained and each neighboring node to predict the first probability P(v1) that the node to be explained is a social robot.
[0090] 304. Characteristics of the nodes to be explained during the disturbance.
[0091] In this embodiment, for any feature in the embedding vector of the node to be explained, the value of the feature is perturbed to zero, while keeping the values of other features in the embedding vector unchanged, thus obtaining the corresponding perturbation vector. For example, for the node v1 to be explained, assuming that the embedding vector of v1 is an m-dimensional vector, a certain dimension feature j is selected for perturbation and set to 0, thus obtaining the corresponding perturbation vector.
[0092] 305. Calculate the feature contribution.
[0093] In this embodiment, for the node to be explained, v1, assuming that the embedding vector of v1 is an m-dimensional vector, a certain dimension feature j is selected for perturbation and set to 0 to obtain the corresponding perturbation vector. Then, the GCN model is used to predict the node to be explained, and the third probability P(v1) that the node to be explained is a social robot is obtained.j Then, based on the first probability P(v1) and the third probability P(v) of the node to be explained being a social robot, j The node contribution of the deleted feature j to the prediction result of the node to be explained, v1, is determined to be μ. j =sigmoid(P(v j )-P(v1)). Repeat this process until the feature contribution of the m-dimensional features of the node to be explained to the prediction result of the node to be explained is calculated.
[0094] 306. Output feature contribution sequence.
[0095] In this embodiment, the feature contribution of the m-dimensional feature of the node to be explained v1 to the prediction result of the node to be explained is calculated, and a feature contribution sequence is obtained. The larger the feature contribution, the higher the influence of the feature on the prediction result of the node to be explained.
[0096] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art will understand that the embodiments of this disclosure are not limited to the described order of actions, because according to the embodiments of this disclosure, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art will understand that the embodiments described in the specification are all optional embodiments.
[0097] Figure 4 This diagram illustrates an interpretable social robot detection device provided in an embodiment of this disclosure. This device can be applied to electronic devices, including but not limited to smartphones, PDAs, tablets, wearable devices with displays, desktop computers, laptops, all-in-one computers, smart home devices, and servers. The server can be a standalone server or a cluster of multiple servers, and can include locally located servers and cloud-based servers. The interpretable social robot detection device provided in this disclosure can execute the processing flows provided in various embodiments of the interpretable social robot detection method, such as... Figure 4 As shown, the interpretable social robot detection device includes, but is not limited to: an acquisition unit 401, a determination unit 402, a prediction unit 403, and an interpretation unit 404. The functions of each unit are described below:
[0098] The acquisition unit 401 is used to acquire the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes.
[0099] The determining unit 402 is used to determine each neighboring node adjacent to any node to be explained, and to perform neighborhood aggregation based on the node feature vector of each neighboring node and the weight of the edge formed between each neighboring node and the node to be explained, so as to obtain the embedding vector of the node to be explained.
[0100] Prediction unit 403 is used to predict the first probability that the node to be explained is a social robot based on the embedding vector of the node to be explained by a pre-trained social robot detection model.
[0101] The interpretation unit 404 is used to determine, based on a first probability, the node contribution of any user node in the social graph to the prediction result of the node to be interpreted, and the feature contribution of any feature in the embedding vector of the node to be interpreted to the prediction result of the node to be interpreted.
[0102] In some embodiments, the determining unit 402 is configured to:
[0103] The weighted feature vector is obtained by weighting and summing the node feature vectors of each neighbor node and the weights of the edges formed between each neighbor node and the node to be explained.
[0104] Based on the weight matrix obtained through pre-training, a nonlinear feature transformation is performed on the weighted feature vector to obtain the embedding vector of the node to be explained.
[0105] In some embodiments, the interpretation unit 404 includes:
[0106] The graph interpretation module is used to construct an interpretation subgraph including the node to be interpreted based on the embedding vector of the node to be interpreted and the node feature vector of any user node in the social graph; and based on the interpretation subgraph, the social robot detection model and the first probability, to determine the node contribution of any user node in the interpretation subgraph to the prediction result of the node to be interpreted.
[0107] And / or,
[0108] The feature interpretation module is used to perturb any feature in the embedding vector of the node to be interpreted to obtain the corresponding perturbation vector; based on the perturbation vector, the social robot detection model and the first probability, the feature contribution of any feature to the prediction result of the node to be interpreted is determined.
[0109] In some embodiments, the graph interpretation module constructs a subgraph to be interpreted, including the node to be interpreted, based on the embedding vector of the node to be interpreted and the node feature vector of any user node in the social graph, including:
[0110] Based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph, determine the node similarity between the node to be explained and any user node in the social graph.
[0111] User nodes with a node similarity greater than a preset similarity threshold are added to the subgraph to be explained, which includes the node to be explained.
[0112] In some embodiments, the graph interpretation module determines the node contribution of any user node in the subgraph to be interpreted to the prediction result of the node to be interpreted, based on the subgraph to be interpreted, the social robot detection model, and a first probability, including:
[0113] For any user node in the subgraph to be explained, the user node is removed from the subgraph to be explained, and the subgraph to be explained after removing the user node is processed by the social robot detection model to predict the second probability that the node to be explained is a social robot; based on the second probability and the first probability, the node contribution of the user node to the prediction result of the node to be explained is determined.
[0114] In some embodiments, the feature interpretation module perturbs any feature in the embedding vector of the node to be interpreted to obtain the corresponding perturbation vector, including:
[0115] For any feature in the embedding vector of the node to be explained, the value of the feature is perturbed to zero, while keeping the values of other features in the embedding vector unchanged, thus obtaining the corresponding perturbation vector.
[0116] In some embodiments, the feature interpretation module determines the feature contribution of any feature to the prediction result of the node to be interpreted based on the perturbation vector, the social robot detection model, and the first probability, including:
[0117] For any feature in the embedding vector of the node to be explained, the perturbation vector corresponding to any feature is processed based on the social robot detection model to predict the third probability that the node to be explained is a social robot; based on the third probability and the first probability, the feature contribution of any feature to the prediction result of the node to be explained is determined.
[0118] As can be seen, in at least one embodiment of the interpretable social robot detection device disclosed herein, by obtaining the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes, for the node to be explained, the embedding vector of the node to be explained is obtained through domain aggregation, and then the embedding vector of the node to be explained is processed by the social robot detection model to predict the first probability that the node to be explained is a social robot; thereby, based on the first probability, the node contribution of any user node in the social graph to the prediction result of the node to be explained can be determined, representing the degree of influence of any user node in the social graph on the prediction result of the node to be explained, and the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained can be determined, representing the degree of influence of any feature on the prediction result of the node to be explained, thus solving the problem of poor interpretability in social robot detection, making it easier for users to understand the reasoning process of social robot detection, and increasing the trust in the social robot detection results.
[0119] Figure 5 This is an exemplary block diagram of an electronic device provided in an embodiment of this disclosure. Figure 5 As shown, the electronic device includes a memory 501, a processor 502, and a computer program stored on the memory 501. It is understood that the memory 501 in this embodiment may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory.
[0120] In some implementations, memory 501 stores elements such as executable modules or data structures, or subsets thereof, or extended sets thereof: operating systems and applications.
[0121] The operating system includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic tasks and handle hardware-based tasks. The application programs include various applications, such as media players and browsers, used to implement various application tasks. The program implementing the interpretable social robot detection method provided in this disclosure can be included in the application programs.
[0122] In this embodiment of the disclosure, at least one processor 502 executes the steps of various embodiments of the interpretable social robot detection method provided in this disclosure by calling a program or instruction stored in at least one memory 501, specifically, a program or instruction stored in an application.
[0123] The interpretable social robot detection method provided in this disclosure can be applied to, or implemented by, processor 502. Processor 502 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the hardware of processor 502 or by instructions in software form. Processor 502 can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor.
[0124] The steps of the interpretable social robot detection method provided in this disclosure can be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 501, and processor 502 reads the information in memory 501 and combines it with hardware to complete the steps of the method.
[0125] This disclosure also proposes a computer-readable storage medium storing a program or instructions that cause a computer to perform steps as described in the embodiments of the interpretable social robot detection method, which will not be repeated here to avoid repetition. The computer-readable storage medium may be a non-transitory computer-readable storage medium.
[0126] This disclosure also proposes a computer program product comprising a computer program stored in a computer-readable storage medium, which may be a non-transitory computer-readable storage medium. At least one processor of a computer reads and executes the computer program from the computer-readable storage medium, causing the computer to perform steps as described in various embodiments of the interpretable social robot detection method, which will not be repeated here to avoid repetition.
[0127] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0128] Those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of this disclosure and form different embodiments.
[0129] Those skilled in the art will understand that the descriptions of the various embodiments have different focuses, and for parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and all such modifications and variations fall within the scope defined by the appended claims.
Claims
1. An interpretable method for detecting social bots, the method comprising: Obtain the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes; For any node to be explained, determine each neighboring node adjacent to the node to be explained, and perform neighborhood aggregation based on the node feature vector of each neighboring node and the weight of the edge formed between each neighboring node and the node to be explained to obtain the embedding vector of the node to be explained. Based on the embedding vector of the node to be explained, a first probability that the node to be explained is a social robot is predicted by a pre-trained social robot detection model. Based on the first probability, determine the node contribution of any user node in the social graph to the prediction result of the node to be explained, and the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained. The step of determining the node contribution of any user node in the social graph to the prediction result of the node to be explained, and the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained, based on the first probability, includes: Based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph, an unexplained subgraph including the node to be explained is constructed; and based on the unexplained subgraph, the social robot detection model and the first probability, the node contribution of any user node in the unexplained subgraph to the prediction result of the node to be explained is determined. and, Perturb any feature in the embedding vector of the node to be explained to obtain the corresponding perturbation vector; based on the perturbation vector, the social robot detection model, and the first probability, determine the feature contribution of the any feature to the prediction result of the node to be explained; The step of determining the node contribution of any user node in the subgraph to be explained to the prediction result of the node to be explained, based on the subgraph to be explained, the social robot detection model, and the first probability, includes: For any user node in the subgraph to be explained, the user node is deleted from the subgraph to be explained, and the subgraph to be explained after deleting the user node is processed by the social robot detection model to predict a second probability that the node to be explained is a social robot; based on the second probability and the first probability, the node contribution of the user node to the prediction result of the node to be explained is determined. The step of determining the feature contribution of any feature to the prediction result of the node to be explained, based on the perturbation vector, the social robot detection model, and the first probability, includes: Any feature in the embedding vector of the node to be explained is processed by the perturbation vector corresponding to the feature based on the social robot detection model to predict the third probability that the node to be explained is a social robot; based on the third probability and the first probability, the feature contribution of the feature to the prediction result of the node to be explained is determined.
2. The method according to claim 1, wherein, The embedding vector of the node to be explained is obtained by performing neighborhood aggregation based on the node feature vectors of each neighboring node and the weights of the edges formed between each neighboring node and the node to be explained, including: The weighted feature vector is obtained by weighting and summing the node feature vectors of each neighboring node and the weights of the edges formed between each neighboring node and the node to be explained. Based on the weight matrix obtained through pre-training, a nonlinear feature transformation is performed on the weighted feature vector to obtain the embedding vector of the node to be explained.
3. The method according to claim 1, wherein, The process of constructing an unexplained subgraph, including the unexplained node, based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph, includes: Based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph, determine the node similarity between the node to be explained and any user node in the social graph; User nodes with a node similarity greater than a preset similarity threshold are added to the subgraph to be explained, which includes the node to be explained.
4. The method according to claim 1, wherein, The perturbation of any feature in the embedding vector of the node to be explained yields the corresponding perturbation vector, including: For any feature in the embedding vector of the node to be explained, the value of the feature is perturbed to zero, while keeping the values of other features in the embedding vector unchanged, to obtain the corresponding perturbation vector.
5. An interpretable social robot detection device, the device comprising: The acquisition unit is used to acquire the node feature vectors of each user node in the social graph and the weights of the edges formed between different user nodes. The determining unit is used to determine each neighboring node adjacent to any node to be explained, and to perform neighborhood aggregation based on the node feature vector of each neighboring node and the weight of the edge formed between each neighboring node and the node to be explained, so as to obtain the embedding vector of the node to be explained. The prediction unit is used to predict the first probability that the node to be explained is a social robot based on the embedding vector of the node to be explained by a pre-trained social robot detection model. An interpretation unit is configured to determine, based on the first probability, the node contribution of any user node in the social graph to the prediction result of the node to be interpreted, and the feature contribution of any feature in the embedding vector of the node to be interpreted to the prediction result of the node to be interpreted. The step of determining the node contribution of any user node in the social graph to the prediction result of the node to be explained, and the feature contribution of any feature in the embedding vector of the node to be explained to the prediction result of the node to be explained, based on the first probability, includes: Based on the embedding vector of the node to be explained and the node feature vector of any user node in the social graph, an unexplained subgraph including the node to be explained is constructed; and based on the unexplained subgraph, the social robot detection model and the first probability, the node contribution of any user node in the unexplained subgraph to the prediction result of the node to be explained is determined. and, Perturb any feature in the embedding vector of the node to be explained to obtain the corresponding perturbation vector; based on the perturbation vector, the social robot detection model, and the first probability, determine the feature contribution of the any feature to the prediction result of the node to be explained; The step of determining the node contribution of any user node in the subgraph to be explained to the prediction result of the node to be explained, based on the subgraph to be explained, the social robot detection model, and the first probability, includes: For any user node in the subgraph to be explained, the user node is deleted from the subgraph to be explained, and the subgraph to be explained after deleting the user node is processed by the social robot detection model to predict a second probability that the node to be explained is a social robot; based on the second probability and the first probability, the node contribution of the user node to the prediction result of the node to be explained is determined. The step of determining the feature contribution of any feature to the prediction result of the node to be explained, based on the perturbation vector, the social robot detection model, and the first probability, includes: Any feature in the embedding vector of the node to be explained is processed by the perturbation vector corresponding to the feature based on the social robot detection model to predict the third probability that the node to be explained is a social robot; based on the third probability and the first probability, the feature contribution of the feature to the prediction result of the node to be explained is determined.
6. An electronic device, wherein, The system includes a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of the interpretable social robot detection method as described in any one of claims 1 to 5.
7. A computer-readable storage medium, wherein, The computer-readable storage medium stores a program or instructions that cause a computer to perform the steps of the interpretable social robot detection method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for explaining recommendation result and electronic device
CN110110139A
Social robot detection method based on multi-relational graph convolutional network
CN115952343A