Cyberbullying user classification-oriented graph neural network classification method and system
Patent Information
- Application Number
- CN202510178777.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2026-08-18
AI Technical Summary
[0006]第二,很多基于矩阵分析和基于随机游走的模型无法利用节点特征进行角色分类
[0057] 1. This invention achieves higher accuracy in role classification tasks in social network graph datasets by introducing a cyberbullying user classification model;
Smart Images

Figure CN122594904A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a graph neural network classification method and system for classifying cyberbullying users. Background Technology
[0002] Cyberbullying refers to attacks, insults, threats, or harassment against individuals or groups online. With the widespread use of the internet, cyberbullying incidents are on the rise, causing serious negative impacts on individuals and society. Therefore, effectively responding to cyberbullying and analyzing and identifying user roles has become an urgent task in today's digital society.
[0003] In the analysis of key roles in cyberbullying incidents, different key roles exhibit different behavioral patterns and have varying degrees of influence. Understanding these characteristics can help social media platforms and law enforcement agencies take better measures to reduce the occurrence of cyberbullying incidents.
[0004] This invention aims to solve the problem of classifying cyberbullying roles in social networks. While existing graph neural network models perform well in this task, many current graph neural network models suffer from the following problems:
[0005] First, current technologies primarily employ transductive learning. The model requires all nodes present during training to exist, and cannot generalize to previously unseen nodes. However, for tasks like classifying cyberbullying users, the model often cannot know the entire social network graph structure in advance and train based on that structure. Cyberbullying user nodes in real-world social networks are unknown during training, requiring the model to have the ability to predict or infer from unseen samples.
[0006] Second, many models based on matrix analysis and random walks fail to utilize node features for role classification. These methods primarily rely on the topological structure of the graph, neglecting the inherent features of the nodes themselves. However, in social networks, node features (such as user profiles and posting history) often contain rich semantic information, significantly improving classification accuracy. Especially in tasks involving classifying cyberbullying users, node features frequently provide information on behavioral patterns and content relevance, crucial for accurately identifying nodes with specific behavioral characteristics. Therefore, models solely relying on graph structure have limitations in this task.
[0007] Third, most research focuses on ordinary graph datasets, with relatively few applications to social network datasets. In social networks, the semantic information of nodes and edges is complex and diverse. Especially in the task of classifying the roles of cyberbullying users, these users often exhibit specific interaction patterns and language usage characteristics, features not commonly found in traditional datasets. Therefore, existing methods are insufficient when dealing with social network data, which is characterized by high noise and dynamic changes. To address this issue, research needs to better design models to handle social network graph datasets and adapt to dynamic network environments.
[0008] Therefore, this invention aims to apply graph neural network technology from deep learning to classify cyberbullying users on social networks, in order to address the current challenges in this task. By leveraging the effective modeling and feature extraction capabilities of graph neural networks for social network graph data, this invention investigates how to accurately characterize and classify the roles of cyberbullying users on social networks, thereby providing technical support for the governance of cyberbullying in social networks. Summary of the Invention
[0009] To address the shortcomings of existing technologies, the purpose of this invention is to provide a graph neural network classification method and system for classifying cyberbullying users.
[0010] A graph neural network classification method for classifying cyberbullying users, provided by the present invention, includes:
[0011] Step S1: Construct a classification model for cyberbullying users;
[0012] Step S2: Obtain multi-source fused node attribute features based on multimodal information through fusion processing methods;
[0013] Step S3: Based on the multi-source fusion node attribute features and the topological information of users in the social network, classify cyberbullying users using the constructed cyberbullying user classification model;
[0014] The cyberbullying user classification model integrates the GAT graph neural network model and the GIN graph neural network model. It extracts the convolutional layers from the GAT and GIN graph neural networks to construct a network structure information extraction module and a node embedding and update module. Through the constructed network structure information extraction module and node embedding and update module, it jointly models the node features and graph structure information of the input graph, gradually extracts the deep semantic features of the nodes in the network, and classifies the network nodes based on the extracted deep semantic features of the nodes in the network.
[0015] The multimodal information includes: user tweets, user descriptions, user behavior, and the social impact of network structure.
[0016] Preferably, the cyberbullying user classification model includes: a GAT graph neural network model and a GIN graph neural network model;
[0017] The GIN graph neural network model includes a network structure information extraction module based on convolutional layers;
[0018] The GAT graph neural network model includes a node embedding and update module built based on convolutional layers;
[0019] The network structure information extraction module based on convolutional layers constructs a node feature representation that can capture the network topology by iteratively aggregating neighbor node information.
[0020] The node embedding update module built on convolutional layers uses a dynamic attention mechanism to assign different weight coefficients to each node and its neighboring nodes. The different weight coefficients reflect the importance of each neighboring node to the target node in the cyberbullying scenario, and capture the interaction between different roles in the social network.
[0021] Preferably, the network structure information extraction module based on convolutional layers includes: for the initial multi-source fusion node attribute features, aggregating the neighbor node attribute features of the target node and combining them with the target node attribute features, and then learning and mapping the combined features through a multilayer perceptron (MLP) to obtain an updated node embedding; treating the updated node embedding as the initial node attribute features, repeating the process until the k-layer iteration ends to obtain the updated node embedding, and outputting the node feature set;
[0022]
[0023] Where 1+∈ is the coefficient, which is different for each level, ∈ k represents the coefficient of the k-th layer; MLP represents the multilayer perceptron; N(v) represents the set of adjacent nodes of node v.
[0024] Preferably, the GIN network layer includes: using a single-layer GIN as a network structure information extraction layer, with the MLP dimension set to [n,n,n], where n is the input dimension of node attributes.
[0025] Preferably, the updated node embedding passes through a ReLU activation layer and a Dropout layer in sequence before entering a node embedding update layer constructed based on a convolutional layer.
[0026] Preferably, the node embedding update layer based on the convolutional layer includes: generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads; concatenating the K independent node embeddings to obtain the current node embedding; forming a node embedding matrix based on the current node embedding; outputting a node embedding vector with a dimension equal to the number of node classifications through a single-head attention mechanism; and generating a one-hot vector by applying a Softmax activation function to the current node embedding vector to obtain the node classification result.
[0027] Preferably, the step of generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads includes:
[0028]
[0029] Where W represents the linearly varying weight matrix, a T This represents the attention mapping mechanism, which is also a linear transformation. LeakyReLU represents the LeakyReLU non-linear activation function. The softmax value represents the graph attention coefficient between nodes i and j. j This indicates that the attention coefficients calculated using the softmax function for all neighboring nodes j of node i are standardized, and N i Let i represent the set of adjacent nodes of node i.
[0030] Preferably, the step of concatenating the K independent node embeddings to obtain the output current node embedding includes:
[0031]
[0032] in, This indicates that the embeddings of K independent nodes are concatenated to obtain the current node embedding. `Concat` represents the concatenation operation. Represents node vectors The node embedding is obtained after the k-th attention head update.
[0033] A graph neural network classification system for classifying cyberbullying users, provided by the present invention, includes:
[0034] Module M1: Construct a classification model for cyberbullying users;
[0035] Module M2: Based on multimodal information, multi-source fused node attribute features are obtained through fusion processing methods;
[0036] Module M3: Based on the multi-source fusion node attribute features and the topological information of users in social networks, it classifies cyberbullying users using the constructed cyberbullying user classification model;
[0037] The cyberbullying user classification model integrates the GAT graph neural network model and the GIN graph neural network model. It extracts the convolutional layers from the GAT and GIN graph neural networks to construct a network structure information extraction module and a node embedding and update module. Through the constructed network structure information extraction module and node embedding and update module, it jointly models the node features and graph structure information of the input graph, gradually extracts the deep semantic features of the nodes in the network, and classifies the network nodes based on the extracted deep semantic features of the nodes in the network.
[0038] The multimodal information includes: user tweets, user descriptions, user behavior, and the social impact of network structure.
[0039] Preferably, the cyberbullying user classification model includes: a GAT graph neural network model and a GIN graph neural network model;
[0040] The GIN graph neural network model includes a network structure information extraction module based on convolutional layers;
[0041] The GAT graph neural network model includes a node embedding and update module built based on convolutional layers;
[0042] The network structure information extraction module based on convolutional layers constructs a node feature representation that can capture the network topology by iteratively aggregating neighbor node information.
[0043] The node embedding update module built on convolutional layers uses a dynamic attention mechanism to assign different weight coefficients to each node and its neighboring nodes. The different weight coefficients assigned reflect the importance of each neighboring node to the target node in the cyberbullying scenario, and capture the interaction between different roles in the social network.
[0044] The network structure information extraction module based on convolutional layers includes: for the initial multi-source fusion node attribute features, aggregating the neighbor node attribute features of the target node and combining them with the target node attribute features, and then learning and mapping the combined features through a multilayer perceptron (MLP) to obtain the updated node embedding; treating the updated node embedding as the initial node attribute features, repeating the process until the k-layer iteration ends to obtain the updated node embedding, and outputting the node feature set;
[0045]
[0046] Where 1+∈ is the coefficient, which is different for each level, ∈ kRepresents the coefficients of the k-th layer; MLP stands for Multilayer Perceptron; N(v) represents the set of adjacent nodes of node v;
[0047] The GIN network layer includes: using a single-layer GIN as the network structure information extraction layer, with the MLP dimension set to [n,n,n], where n is the input dimension of node attributes;
[0048] The updated node embeddings pass through a ReLU activation layer and a Dropout layer in sequence, and then enter a node embedding update layer built based on convolutional layers.
[0049] The node embedding update layer based on convolutional layers includes: generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads; concatenating the K independent node embeddings to obtain the current node embedding; forming a node embedding matrix based on the current node embeddings; outputting a node embedding vector with a dimension equal to the number of node classifications through a single-head attention mechanism; and generating a one-hot vector by applying a Softmax activation function to the current node embedding vector to obtain the node classification result.
[0050] The process of generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads includes: Each independent node embedding representation includes:
[0051]
[0052] Where W represents the linearly varying weight matrix, a T This represents the attention mapping mechanism, which is also a linear transformation. LeakyReLU represents the LeakyReLU non-linear activation function. The softmax value represents the graph attention coefficient between nodes i and j. j This indicates that the attention coefficients calculated using the softmax function for all neighboring nodes j of node i are standardized, and N i Represents the set of adjacent nodes of node i;
[0053] The step of concatenating the embeddings of K independent nodes to obtain the current node embedding includes:
[0054]
[0055] in, This indicates that the embeddings of K independent nodes are concatenated to obtain the current node embedding. `Concat` represents the concatenation operation. Represents node vectors The node embedding is obtained after the k-th attention head update.
[0056] Compared with the prior art, the present invention has the following beneficial effects:
[0057] 1. This invention achieves higher accuracy in role classification tasks in social network graph datasets by introducing a cyberbullying user classification model;
[0058] 2. The model proposed in this invention has achieved good performance in the social network user role classification task. In the experiment, it has improved compared with other models on multiple datasets. Specifically, on the Facebookpagepage, Cora and Citeseer datasets, it has improved the micro-F1 score by 0.021, 0.009 and 0.014 respectively compared with the best comparison model, which verifies the effectiveness of the model.
[0059] 3. Through ablation experiments, this invention further confirms that the network structure information extraction module based on graph isomorphic network GIN, the node embedding and update module based on graph attention network GAT, and the improvement of the static attention problem of GAT model all play a key role in improving model performance. Attached Figure Description
[0060] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0061] Figure 1 A schematic diagram of a graph neural network classification system for classifying cyberbullying users.
[0062] Figure 2 A diagram showing the overall structure of a classification model for cyberbullying users.
[0063] Figure 3 This is a diagram of the GIN graph neural network model structure.
[0064] Figure 4 This is a diagram of the GAT graph attention network structure.
[0065] Figure 5 This is a schematic diagram illustrating the calculation of the attention coefficient in the improved GAT graph. Detailed Implementation
[0066] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0067] Example 1
[0068] A graph neural network classification method for classifying cyberbullying users, provided by the present invention, includes:
[0069] Step S1: Construct a classification model for cyberbullying users;
[0070] Step S2: Obtain multi-source fused node attribute features based on multimodal information through fusion processing methods;
[0071] Step S3: Based on the multi-source fusion node attribute features and the topological information of users in the social network, classify cyberbullying users using the constructed cyberbullying user classification model;
[0072] The cyberbullying user classification model integrates the GAT graph neural network model and the GIN graph neural network model. It extracts the convolutional layers from the GAT and GIN graph neural networks to construct a network structure information extraction module and a node embedding and update module. Through the constructed network structure information extraction module and node embedding and update module, it jointly models the node features and graph structure information of the input graph, gradually extracts the deep semantic features of the nodes in the network, and classifies the network nodes based on the extracted deep semantic features of the nodes in the network.
[0073] The multimodal information includes: user tweets, user descriptions, user behavior, and the social impact of network structure.
[0074] Specifically, the cyberbullying user classification model includes: the GAT graph neural network model and the GIN graph neural network model;
[0075] The GIN graph neural network model includes a network structure information extraction module based on convolutional layers;
[0076] The GAT graph neural network model includes a node embedding and update module built based on convolutional layers;
[0077] The network structure information extraction module based on convolutional layers constructs a node feature representation that can capture the network topology by iteratively aggregating neighbor node information.
[0078] The node embedding update module built on convolutional layers uses a dynamic attention mechanism to assign different weight coefficients to each node and its neighboring nodes. The different weight coefficients reflect the importance of each neighboring node to the target node in the cyberbullying scenario, and capture the interaction between different roles in the social network.
[0079] Specifically, the network structure information extraction module based on convolutional layers includes: for the initial multi-source fusion node attribute features, aggregating the neighbor node attribute features of the target node and combining them with the target node attribute features, and then learning and mapping the combined features through a multilayer perceptron (MLP) to obtain the updated node embedding; treating the updated node embedding as the initial node attribute features, repeating the process until the k-layer iteration ends to obtain the updated node embedding, and outputting the node feature set;
[0080]
[0081] Where 1+∈ is the coefficient, which is different for each level, ∈ k represents the coefficient of the k-th layer; MLP represents the multilayer perceptron; N(v) represents the set of adjacent nodes of node v.
[0082] Specifically, the GIN network layer includes: using a single-layer GIN as the network structure information extraction layer, with the MLP dimension set to [n,n,n], where n is the input dimension of node attributes.
[0083] Specifically, the updated node embeddings pass through a ReLU activation layer and a Dropout layer in sequence before entering a node embedding update layer built on a convolutional layer.
[0084] Specifically, the node embedding update layer based on the convolutional layer includes: generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads; concatenating the K independent node embeddings to obtain the current node embedding; forming a node embedding matrix based on the current node embedding; outputting a node embedding vector with a dimension equal to the number of node classifications through a single-head attention mechanism; and generating a one-hot vector by applying the current node embedding vector to the Softmax activation function to obtain the node classification result.
[0085] Specifically, the step of generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads includes:
[0086]
[0087] Where W represents the linearly varying weight matrix, a T This represents the attention mapping mechanism, which is also a linear transformation. LeakyReLU represents the LeakyReLU non-linear activation function. The softmax value represents the graph attention coefficient between nodes i and j. jThis indicates that the attention coefficients calculated using the softmax function for all neighboring nodes j of node i are standardized, and N i Let i represent the set of adjacent nodes of node i.
[0088] Specifically, concatenating the K independent node embeddings to obtain the output current node embedding includes:
[0089]
[0090] in, This indicates that the embeddings of K independent nodes are concatenated to obtain the current node embedding. `Concat` represents the concatenation operation. Represents node vectors The node embedding is obtained after the k-th attention head update.
[0091] The present invention also provides a graph neural network classification system for classifying cyberbullying users. The graph neural network classification system for classifying cyberbullying users can be implemented by executing the process steps of the graph neural network classification method for classifying cyberbullying users. That is, those skilled in the art can understand the graph neural network classification method for classifying cyberbullying users as a preferred embodiment of the graph neural network classification system for classifying cyberbullying users.
[0092] Example 2
[0093] Example 2 is a preferred example of Example 1.
[0094] To address the challenges of classifying the roles of cyberbullying users in social networks, this invention provides a graph neural network classification method and system for classifying cyberbullying users. It utilizes graph neural network technology to model and classify nodes in complex social networks, providing social platforms with accurate user behavior analysis and support for cyberbullying governance. Specifically, by training a graph neural network model for cyberbullying scenarios using relevant data, it achieves accurate classification of the roles users play in cyberbullying.
[0095] In practical applications, this invention can be used for user behavior monitoring and early warning systems on social media platforms. For example, in social media platforms, user interaction patterns and posted content often exhibit strong graph structure characteristics. This invention, by combining node features and graph structure information from social network data with a deep learning model, can quickly identify cyberbullying users and their behavioral patterns. For instance, through model analysis, attacker nodes, attacked nodes, and potential propagator nodes that play a dominant role in cyberbullying incidents can be identified.
[0096] like Figure 1The diagram shows the overall framework of a graph neural network classification system for classifying cyberbullying users. The left side of the diagram outlines the main sources of input data, including the topology of social networks (such as the relationship network between users), user tweets (reflecting content semantics), user descriptions (reflecting basic user information), user behavior (interaction patterns, such as likes, comments, and reposts), and the social influence of the network structure. This multimodal information is fused to form node attribute features, which are then input into the graph neural network for modeling.
[0097] The middle part is the core structure of the cyberbullying user classification model. The cyberbullying user classification model is based on graph neural networks and integrates the ideas of GAT and GIN graph neural network models. It extracts the convolutional layers in each model to construct a network structure information extraction module and a node embedding and update module. Through multiple network layers (as shown in the figure, a hierarchical superposition structure), it jointly models the node features and graph structure information of the input graph, and gradually extracts the deep semantic features of the nodes in the network.
[0098] The right side shows the model's output. By classifying user nodes in social networks, the model can identify different roles in cyberbullying incidents (assuming four main roles: victim, perpetrator, bot, and online trolls), thus providing technical support for the identification and governance of cyberbullying in social networks.
[0099] Specifically, in order to solve the task of classifying users who engage in cyberbullying in social networks, this invention constructs a graph neural network model for cyberbullying scenarios. By integrating the ideas of GAT and GIN graph neural network models, it extracts the convolutional layers from each model to construct a network structure information extraction module and a node embedding and update module, thereby improving the ability to capture the behavioral features of the users and demonstrating stronger classification performance.
[0100] The overall structure of the graph neural network model for cyberbullying scenarios is as follows: Figure 2 As shown, the model consists of two modules, each containing a three-layer graph neural network, designed to accurately classify different cyberbullying roles on social networks.
[0101] First, the node attribute matrix X and network topology information are input into a network structure information extraction module based on graph isomorphic networks (GIN). This module consists of a GIN network layer and aims to extract complex topological information from social networks while preserving node features, thereby helping to identify the interaction patterns of roles in cyberbullying incidents. This capability is crucial for identifying different roles in cyberbullying scenarios because the distribution of adjacent nodes in the network structure often reflects the interaction patterns between roles.
[0102] Next, the updated node embeddings are activated by a ReLU function and then pass through a Dropout layer before entering the node embedding update module based on a Graph Attention Network (GAT). This module consists of two graph attention layers. The first layer contains eight attention heads to enhance node representation capabilities and help capture subtle differences between different roles in social networks. The second layer contains one attention head, primarily used for dimensionality changes, and serves as the output layer. By dynamically assigning weights to neighboring nodes using the attention mechanism, the target node can more accurately aggregate the attribute information of its neighbors, effectively capturing the relationship strength and behavioral patterns between different cyberbullying roles, and providing accurate node representations for subsequent cyberbullying role classification.
[0103] In the initial layer of the model, this invention selects Graph Isomorphism Network (GIN) as the network structure information extraction module, aiming to enhance the network structure representation capability of node embedding by introducing topological information, especially to help identify the interaction and behavior patterns of different cyberbullying roles.
[0104] GIN is constructed based on the Weisfeiler-Lehman test, a method for determining graph isomorphism widely used in graph neural networks to extract graph structure information. In social networks, the Weisfeiler-Lehman test helps models better understand the complex relationships between different users (such as attackers, victims, and bystanders). As an iterative local label update algorithm, the Weisfeiler-Lehman test encodes the graph's topology into a comparable representation by continuously updating node labels and graph structure information. Through this encoding method, the Weisfeiler-Lehman test can not only capture the local features of nodes but also reveal the interaction patterns between roles in cyberbullying incidents, thus supporting classification tasks.
[0105] In WL-test, each node is first assigned an initial label, typically its degree. Then, the label information of each node's neighbors is collected iteratively and integrated into the node's own label. This process iterates continuously, updating the node's label in each iteration, until the maximum number of iterations is reached or the node's label stops changing.
[0106] Through this iterative approach, WL-test can effectively capture the local structural information of a graph and encode it into node labels. Then, by comparing the node label sequences of two graphs, it can determine whether they are isomorphic.
[0107] Consider any two non-isomorphic graphs (G1, G2). If there exists a graph neural network... By mapping these two graphs to different graph embedding spaces, their non-isomorphism can also be determined based on the results of the Weisfeiler-Lehman isomorphism test.
[0108] This indicates that, in graph isomorphism problems, the theoretical upper limit of graph classification performance of graph neural networks is equivalent to that of the WL-test. Therefore, the goal of constructing graph neural networks is to make their node classification performance approach the WL-test level.
[0109] Based on this observation, GIN proposed the following theory:
[0110] set up It is a graph neural network. For two graphs G1 and G2 that are determined to be non-isomorphic by the Weisfeiler-Lehman isomorphism test, with a sufficient number of graph neural network layers, if the following two conditions are met, these two graphs can be mapped to different graph embedding spaces by the graph neural network:
[0111] (a) The aggregation operation involves iteratively aggregating and updating node features. The functions f and φ in the aggregation operation must be injective and operate on multiple sets. The aggregation operation formula is shown below:
[0112]
[0113] Here, φ represents the aggregation operation function, used to update the embedding or feature of node v at the k-th layer. This represents the embedding or feature of node v at the k-th layer. This represents the embedding or feature of node v at the (k-1)th layer. This represents the embedding or feature aggregation of node v's neighbor node u at layer k-1.
[0114] (b) The graph-level output operation operates on the multiset of node features {h(v k The expression :v∈v} must also be injective.
[0115] In summary, the model needs to construct an injective function. After constructing the core injective function form of this model, a multilayer perceptron (MLP) is used to fit and learn the functions f and φ mentioned above. An MLP is used to fit the function because it can approximately fit any function and has the ability to learn injective functions. Therefore, the GIN node embedding update formula after combining with the MLP is:
[0116]
[0117] In the formula, 1+∈ represents the coefficients, which differ for each level. kThis represents the coefficients of the k-th layer. MLP stands for Multilayer Perceptron.
[0118] The node feature extraction process based on GIN is as follows: Figure 3 As shown, the core idea is to construct a node feature representation that captures the network topology by iteratively aggregating neighbor node information. The left side shows the initial node features; each aggregation involves combining the neighbor features with the target node's own features. The second step involves learning and mapping the aggregated features using a Multilayer Perceptron (MLP). MLP, as a general-purpose nonlinear function approximation tool, is used to fit the desired injective function. As the number of layers increases, GIN aggregates information from more distant neighbors layer by layer, gradually enhancing the node's feature representation. The right side shows the final node feature representation; after multilayer aggregation, it not only retains the initial content information but also embeds rich neighborhood structure information.
[0119] In the model for classifying online bullying characters on social networks, Genetic Injection (GIN) is used to construct a network structure information extraction layer. It ensures that node features retain not only content information but also rich network structure information by fitting injective functions. GIN fits graph data by stacking convolutional layers, but this module also needs to be connected to other modules, so a trade-off was made when selecting the number of convolutional layers. Each additional convolutional layer allows nodes to aggregate information from more distant neighbors, thereby enhancing character recognition capabilities. However, too many convolutional layers may lead to information averaging, reducing classification performance.
[0120] After numerous experiments, this invention determined that a single-layer GIN should be used as the network structure information extraction layer, with the MLP dimension set to [n,n,n] (where n is the input dimension of node attributes). This design can fully utilize the injective function fitting characteristics of GIN to extract network topology information around nodes, while avoiding the information averaging problem caused by too many convolutional layers, thus improving the accuracy and efficiency of cyberbullying role classification.
[0121] After the network structure information extraction module based on Graph Isomorphic Network (GIN) has been used, the node embeddings have been updated and contain richer network topology information, which can better capture the interaction patterns of roles in social networks. However, in order to further improve the adaptability of these node embeddings to the classification of cyberbullying roles, this invention introduces a node embedding update module based on Graph Attention Network (GAT).
[0122] In this module, GAT uses a dynamic attention mechanism to assign different weights to each node and its neighbors. These weights reflect the importance of each neighboring node to the target node in a cyberbullying scenario, enabling the model to accurately capture the complex interactions between different roles in social networks. For example, strong interactions between attackers and victims may receive higher weights, while the influence of bystanders is relatively weaker. In this way, the model can more effectively aggregate important attribute information between nodes, thereby improving the accuracy of cyberbullying role classification.
[0123] The introduction of the GAT model significantly enhances the representational power of node embeddings. This representation not only better captures the role relationships in social networks but also more accurately reflects the roles of different characters in cyberbullying incidents. Ultimately, this improvement substantially increases the accuracy of the classification model in identifying different cyberbullying roles (attackers, victims, bystanders, etc.), facilitating more refined analysis and intervention of cyberbullying behavior in social networks.
[0124] For Graph Attention Networks (GAT), the input to each layer is a set of node features, represented as... in N is the number of nodes, and F is the number of input features for each node. After processing, a new set of node embeddings is generated, which may have different output dimensions F', denoted as... in In the task of classifying cyberbullying roles, to ensure that the model can accurately capture the feature information of different roles and transform it into a higher-level feature representation, a learnable linear transformation needs to be introduced at the model input. This process allows the model to more effectively encode the initial features of cyberbullying participants (such as attackers, victims, bystanders, etc.), making it more accurate in subsequent classifications.
[0125] Building upon this, GAT utilizes a self-attention mechanism to operate on nodes and their neighbors, a crucial step in classifying cyberbullying roles. This mechanism assesses the interaction relationships between roles by calculating attention coefficients between nodes. Particularly important in complex social network environments, dynamically identifying which neighboring nodes contribute to the behavior and role assessment of specific cyberbullying characters is critical. These attention coefficients are calculated using a mapping function to measure the degree of association between different nodes, thus providing a more accurate node representation for cyberbullying role classification tasks.
[0126] The formula for the attention mapping mechanism is shown below:
[0127] a:R F′ ×R F′ →R(3)
[0128] F' is the output dimension of node embedding, and R is the real number space.
[0129] This process ensures that each pair of nodes receives appropriate attention and weight allocation in the cyberbullying role classification task, thereby better capturing structural information in social networks, especially the complex interactions between different roles. Therefore, after completing the linear transformation W, an attention mapping function is used on the feature representation of each node to effectively calculate the attention coefficients between two nodes. These coefficients measure the strength of the association between a node (e.g., attacker) and its neighboring nodes (e.g., victim or bystander), helping the model to more accurately understand the relationships between roles and thus improving the accuracy of cyberbullying role classification. The formula is as follows:
[0130]
[0131] This calculates an attention coefficient e for each pair of nodes i and j. ij This is used to measure the importance of node j to node i.
[0132] In the most general form of the model, each node computes attention coefficients with all other nodes, meaning that the connection information between nodes is completely ignored. To incorporate graph structure into the mechanism, the GAT model injects graph structure by performing masked attention; the model only computes attention for nodes j∈N. i Attention coefficient e ij , where N i Let N be a neighborhood of node i in the graph. Through experiments with the GAT model, the GAT model selects the first-order neighbors of node i (including i itself) as the set of nodes N for calculating the attention coefficient. i .
[0133] Meanwhile, to ensure the comparability of attention coefficients across different nodes, the Graph Attention Network (GAT) model introduces a softmax function in the social network cyberbullying role classification task, standardizing the attention coefficients calculated for all neighboring nodes j of node i. This standardization allows the model to fairly measure the strength of relationships between different roles. For example, in cyberbullying scenarios, the interaction between attackers and victims may be given higher weight, while the influence of bystanders may be relatively lower. By introducing the softmax function, the model can dynamically adjust the weight distribution among different nodes, ensuring that the relationships between roles are accurately modeled and represented, thereby improving the overall accuracy of cyberbullying role classification.
[0134]
[0135] This process ensures that the attention coefficient of each node is between 0 and 1, and the sum of all attention coefficients is 1. The purpose of this is to maintain the relative relationship between nodes.
[0136] The GAT model sets the attention mechanism 'a' to be a single-layer feedforward neural network consisting of a weight vector. We then parameterize the function and apply the LeakyReLU nonlinear activation function.
[0137] After full expansion, the expression for calculating the attention mechanism coefficients is:
[0138]
[0139] After obtaining the attention coefficients between each pair of nodes, the model uses these coefficients as weights for node aggregation, calculating a linear combination of the embeddings between the target node and other nodes in its neighborhood. This process can be viewed as the aggregation of information between the target node and its neighboring nodes, where the embeddings of each neighboring node are weighted according to their importance to generate the final embedding representation of the target node.
[0140] This attention-based convergence mechanism allows the model to focus more on information from neighboring nodes that are more important in classifying cyberbullying roles, such as the attacker's influence on the victim or the bystander's role and reaction. By emphasizing the information from these key nodes, the model can better capture local features in the social network graph structure, thereby improving the classification accuracy of different cyberbullying roles. The formula for linear combination aggregation is shown below:
[0141]
[0142] Furthermore, to further enhance the model's expressive power and learning performance, the GAT model introduces a multi-head attention mechanism. This mechanism sets up multiple attention heads, each independently calculating attention weights, and concatenating their outputs to obtain richer node representations.
[0143]
[0144] Concat is a concatenation operation. Pointer node vector The node embedding is obtained after the k-th attention head update.
[0145] The updated node embeddings are combined to form a node embedding matrix, which is then input into the next layer of this module, which is also the last layer of the model.
[0146] The final layer, serving as the output layer, uses only a single-head attention mechanism. This means each node's embedding is updated using only one attention head. The main purpose of this step is to change the dimensionality, ensuring the module's output dimension equals the number of node classifications. The updated node embedding vectors are then activated by the Softmax function to generate one-hot vectors, yielding the node classification results.
[0147] In the context of classifying cyberbullying roles, this approach not only enhances the model's ability to capture complex relationships between different roles, but also improves the model's adaptability to dynamic changes in social networks.
[0148] Specifically, the introduction of multi-head attention mechanisms aims to stabilize the self-attention learning process and reduce information loss that may result from a single attention head. By processing multiple attention heads in parallel, the model can analyze the relationships between nodes from different perspectives, thereby gaining a more comprehensive understanding of interaction patterns in social networks.
[0149] The GAT model demonstrates excellent performance in aggregating neighborhood node information through its attention mechanism, particularly in identifying the complex relationships between different cyberbullying roles in social networks. However, the GAT model suffers from a "static attention problem" in its application of the attention mechanism. This problem may negatively impact tasks related to classifying cyberbullying roles in social networks.
[0150] The static attention problem refers to the model's overly fixed attention weights allocated between different nodes, failing to adjust to the dynamic changes in role relationships within a cyberbullying incident. This means that as role behaviors and interaction patterns change within social networks (e.g., switching between attacker, victim, or bystander roles or changing contexts), the model fails to adapt flexibly, limiting the effectiveness of node embedding updates and thus impacting the accurate classification of cyberbullying roles. This problem is particularly problematic in complex graph structures, such as social networks where node interactions are frequent and relationships are dynamically changing; this issue can weaken the model's performance, preventing it from fully capturing the constantly evolving interaction patterns between roles.
[0151] To address this issue, the LeakyReLU activation function, which was originally executed last, is placed between the two linear operations, a and W. This prevents the two linear layers from collapsing into one, thus avoiding the monotonicity of subsequent operations. Intuitively, the linear transformation a cannot be decomposed into [a1|a2] combined with the linear transformation W.
[0152] This invention also employs this method to improve the node embedding update module of the model, enabling this module to possess a dynamic attention mechanism that effectively captures the relationship strength and behavioral patterns between different cyberbullying characters.
[0153] The formula for calculating the reconstructed graph attention coefficient is shown below:
[0154]
[0155] Due to the current lack of graph datasets related to cyberbullying in academia, the experimental part uses the social network graph dataset, which is currently the mainstream validation dataset for graph neural networks, to test the model performance and verify the effectiveness of this approach.
[0156] The application of social network graph datasets has received widespread attention in academia, especially in the study of cyberbullying behavior on social networks, where they can effectively reveal interaction patterns among users. However, due to user privacy concerns, publicly available social network graph datasets are very limited. Therefore, this invention selects five representative datasets to evaluate the performance of the model on the task of classifying cyberbullying roles on social networks.
[0157] Among these datasets, the Facebook PagePage and GitHub datasets are typical social network datasets, reflecting the connections between users, which are highly correlated with the interaction patterns of cyberbullying roles. By conducting experiments on these two datasets, this study can more accurately evaluate the model's performance in identifying and classifying cyberbullying roles (such as attackers, victims, and bystanders) in social networks. These two datasets provide important evidence for analyzing the behavioral patterns of different roles in social networks and help to further verify the model's practical application effectiveness.
[0158] On the other hand, the Cora, Citeseer, and PubMed datasets belong to the citation network datasets. Although they are not social network datasets, they are widely used in academic research for node classification tasks in graph neural networks. They do not directly reflect the role interactions in social networks, but as reference datasets, they provide strong experimental evidence for evaluating the node classification performance of models and help verify the applicability and generality of models on different graph structures.
[0159] Table 1. Parameter statistics of graph datasets with node attributes.
[0160]
[0161]
[0162] Table 2 shows the test results of the social network cyberbullying role classification model constructed in this study and other comparative models on five datasets. The data in the table are the average Micro-F1 scores and their standard deviations obtained by the model independently training and testing under 100 different random seeds. The five datasets are divided into training and test sets in an 8:2 ratio.
[0163] As shown in the table, the model proposed in this study achieved the highest Micro-F1 scores on both the Facebook PagePage and GitHub social network datasets, significantly outperforming other comparative models. This indicates that the model has outstanding performance in the social network cyberbullying role classification task, especially in identifying and distinguishing different roles such as attackers, victims, and bystanders, demonstrating its strong classification ability and adaptability. This result proves that the proposed model can better capture the interaction patterns between different roles when dealing with complex social network data, showing a clear advantage over other models.
[0164] In the three citation network datasets Cora, Citeseer, and PubMed, the research model also outperformed the comparison model on the Cora and Citeseer datasets, demonstrating its broad applicability in node classification tasks.
[0165] Table 2 Experimental Results
[0166]
[0167] Example 3
[0168] Example 3 is a preferred example of Example 1.
[0169] In this embodiment, a graph neural network alternative based on spectral domain features is proposed.
[0170] In this embodiment, the model primarily extracts network topology information using spatial domain methods (GIN and GAT). However, spectral domain-based graph neural networks (such as ChebNet or GCN) also provide an alternative approach.
[0171] In addition to using spectral domain models alone, spectral domain features can be combined with GIN or GAT to design a hybrid feature extraction module. This approach can effectively fuse global and local information, improving the classification performance of the model under complex network structures.
[0172] Example 4
[0173] Example 4 is a preferred example of Example 1.
[0174] This embodiment introduces an alternative to dynamic graph learning;
[0175] The topology of social networks often changes dynamically over time, especially in cases of cyberbullying, where interaction patterns between roles adjust according to the context. Therefore, alternative dynamic graph learning methods can be considered, such as the DySAT (Dynamic Self-Attention Network) model, which is based on dynamic graph neural networks.
[0176] DySAT can capture the changing representations of nodes in social networks over time. By dynamically modeling the changing behavior of neighboring nodes, the model can more accurately describe the complex interactions in cyberbullying scenarios, especially its sensitivity to dynamic role switching.
[0177] Additionally, time-series analysis modules, such as LSTM or Transformer, can be introduced into dynamic graphs to incorporate temporal behavioral changes into the node embedding update process. This approach requires the graph dataset to be dynamic, containing multiple static graph snapshots. At each time point t, existing models extract node features using graph neural networks (such as GAT). The time series analysis module can directly receive these node features as input to model the dynamic behavior changes of nodes over time:
[0178] Embed each node Combining time points into a sequence Inputting the data into an LSTM or Transformer captures the temporal dependencies of a character's dynamic behavior to predict future node attributes. To make more accurate judgments.
[0179] This approach provides another technical path for modeling the dynamic characteristics of cyberbullying events.
[0180] Example 5
[0181] Example 5 is a preferred example of Example 1.
[0182] In this embodiment, alternative attention mechanisms are considered;
[0183] By leveraging GAT's self-attention mechanism, its dynamics significantly enhance the representational power of node embeddings, but further exploration of different types of attention mechanisms is possible.
[0184] A multi-scale attention mechanism is introduced, which can capture the feature information of adjacent nodes within different scale ranges. It is suitable for analyzing scenarios where there are multi-level dependencies between cyberbullying roles.
[0185] By applying a global attention model, through a global attention mechanism (such as the Transformer architecture), the model can directly focus on the interaction patterns of key roles in the entire network and identify cyberbullying roles from a global perspective.
[0186] Example 6
[0187] Example 6 is a preferred example of Example 1.
[0188] In this embodiment, an adaptive module selection mechanism is introduced;
[0189] Design an adaptive mechanism that combines modules through adjustable connection methods to optimize the model structure for different scenarios. Automatically select suitable module combinations based on data characteristics to maximize classification performance.
[0190] Those skilled in the art will understand that, in addition to implementing the system, apparatus, and their modules provided by this invention in purely computer-readable program code, the same program can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, the system, apparatus, and their modules provided by this invention can be considered a hardware component, and the modules included therein for implementing various programs can also be considered structures within the hardware component; alternatively, modules for implementing various functions can be considered both software programs implementing the method and structures within the hardware component.
[0191] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A graph neural network classification method for classifying cyberbullying users, characterized in that, include: Step S1: Construct a classification model for cyberbullying users; Step S2: Obtain multi-source fused node attribute features based on multimodal information through fusion processing methods; Step S3: Based on the multi-source fusion node attribute features and the topological information of users in the social network, classify cyberbullying users using the constructed cyberbullying user classification model; The cyberbullying user classification model integrates the GAT graph neural network model and the GIN graph neural network model. It extracts the convolutional layers from the GAT and GIN graph neural networks to construct a network structure information extraction module and a node embedding and update module. Through the constructed network structure information extraction module and node embedding and update module, it jointly models the node features and graph structure information of the input graph, gradually extracts the deep semantic features of the nodes in the network, and classifies the network nodes based on the extracted deep semantic features of the nodes in the network. The multimodal information includes: user tweets, user descriptions, user behavior, and the social impact of network structure.
2. The graph neural network classification method for classifying cyberbullying users according to claim 1, characterized in that, The cyberbullying user classification model includes: the GAT graph neural network model and the GIN graph neural network model; The GIN graph neural network model includes a network structure information extraction module based on convolutional layers; The GAT graph neural network model includes a node embedding and update module built based on convolutional layers; The network structure information extraction module based on convolutional layers constructs a node feature representation that can capture the network topology by iteratively aggregating neighbor node information. The node embedding update module built on convolutional layers uses a dynamic attention mechanism to assign different weight coefficients to each node and its neighboring nodes. The different weight coefficients reflect the importance of each neighboring node to the target node in the cyberbullying scenario, and capture the interaction between different roles in the social network.
3. The graph neural network classification method for classifying cyberbullying users according to claim 2, characterized in that, The network structure information extraction module based on convolutional layers includes: for the initial multi-source fusion node attribute features, aggregating the neighbor node attribute features of the target node and combining them with the target node attribute features, and then learning and mapping the combined features through a multilayer perceptron (MLP) to obtain the updated node embedding; treating the updated node embedding as the initial node attribute features, repeating the process until the k-layer iteration ends to obtain the updated node embedding, and outputting the node feature set; Where 1+∈ is the coefficient, which is different for each level, ∈ k represents the coefficient of the k-th layer; MLP represents the multilayer perceptron; N(v) represents the set of adjacent nodes of node v.
4. The graph neural network classification method for classifying cyberbullying users according to claim 3, characterized in that, The GIN network layer includes: using a single-layer GIN as the network structure information extraction layer, with the MLP dimension set to [n,n,n], where n is the input dimension of node attributes.
5. The graph neural network classification method for classifying cyberbullying users according to claim 3, characterized in that, The updated node embeddings pass through a ReLU activation layer and a Dropout layer in sequence before entering a node embedding update layer built on a convolutional layer.
6. The graph neural network classification method for classifying cyberbullying users according to claim 2, characterized in that, The node embedding update layer based on convolutional layers includes: generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads; concatenating the K independent node embeddings to obtain the current node embedding; forming a node embedding matrix based on the current node embeddings; outputting a node embedding vector with a dimension equal to the number of node classifications through a single-head attention mechanism; and generating a one-hot vector by applying a Softmax activation function to the current node embedding vector to obtain the node classification result.
7. The graph neural network classification method for classifying cyberbullying users according to claim 6, characterized in that, The process of generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads includes: Each independent node embedding representation includes: Where W represents the linearly varying weight matrix, a T This represents the attention mapping mechanism, which is also a linear transformation. LeakyReLU represents the LeakyReLU non-linear activation function. The softmax value represents the graph attention coefficient between nodes i and j. j This indicates that the attention coefficients calculated using the softmax function for all neighboring nodes j of node i are standardized, and N i Let i represent the set of adjacent nodes of node i.
8. The graph neural network classification method for classifying cyberbullying users according to claim 6, characterized in that, The step of concatenating the embeddings of K independent nodes to obtain the current node embedding includes: in, This indicates that the embeddings of K independent nodes are concatenated to obtain the current node embedding. `Concat` represents the concatenation operation. Represents node vectors The node embedding is obtained after the k-th attention head update.
9. A graph neural network classification system for classifying cyberbullying users, characterized in that, include: Module M1: Construct a classification model for cyberbullying users; Module M2: Based on multimodal information, multi-source fused node attribute features are obtained through fusion processing methods; Module M3: Based on the multi-source fusion node attribute features and the topological information of users in social networks, it classifies cyberbullying users using the constructed cyberbullying user classification model; The cyberbullying user classification model integrates the GAT graph neural network model and the GIN graph neural network model. It extracts the convolutional layers from the GAT and GIN graph neural networks to construct a network structure information extraction module and a node embedding and update module. Through the constructed network structure information extraction module and node embedding and update module, it jointly models the node features and graph structure information of the input graph, gradually extracts the deep semantic features of the nodes in the network, and classifies the network nodes based on the extracted deep semantic features of the nodes in the network. The multimodal information includes: user tweets, user descriptions, user behavior, and the social impact of network structure.
10. The graph neural network classification system for classifying cyberbullying users according to claim 9, characterized in that, The cyberbullying user classification model includes: the GAT graph neural network model and the GIN graph neural network model; The GIN graph neural network model includes a network structure information extraction module based on convolutional layers; The GAT graph neural network model includes a node embedding and update module built based on convolutional layers; The network structure information extraction module based on convolutional layers constructs a node feature representation that can capture the network topology by iteratively aggregating neighbor node information. The node embedding update module built on convolutional layers uses a dynamic attention mechanism to assign different weight coefficients to each node and its neighboring nodes. The different weight coefficients assigned reflect the importance of each neighboring node to the target node in the cyberbullying scenario, and capture the interaction between different roles in the social network. The network structure information extraction module based on convolutional layers includes: for the initial multi-source fusion node attribute features, aggregating the neighbor node attribute features of the target node and combining them with the target node attribute features, and then learning and mapping the combined features through a multilayer perceptron (MLP) to obtain the updated node embedding; treating the updated node embedding as the initial node attribute features, repeating the process until the k-layer iteration ends to obtain the updated node embedding, and outputting the node feature set; Where 1+∈ is the coefficient, which is different for each level, ∈ k Represents the coefficients of the k-th layer; MLP stands for Multilayer Perceptron; N(v) represents the set of adjacent nodes of node v; The GIN network layer includes: using a single-layer GIN as the network structure information extraction layer, with the MLP dimension set to [n,n,n], where n is the input dimension of node attributes; The updated node embeddings pass through a ReLU activation layer and a Dropout layer in sequence, and then enter a node embedding update layer built based on convolutional layers. The node embedding update layer based on convolutional layers includes: generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads; concatenating the K independent node embeddings to obtain the current node embedding; forming a node embedding matrix based on the current node embeddings; outputting a node embedding vector with a dimension equal to the number of node classifications through a single-head attention mechanism; and generating a one-hot vector by applying a Softmax activation function to the current node embedding vector to obtain the node classification result. The process of generating K independent node embedding representations for each user node attribute feature in the social network using K independent attention heads includes: Each independent node embedding representation includes: Where W represents the linearly varying weight matrix, a T This represents the attention mapping mechanism, which is also a linear transformation. LeakyReLU represents the LeakyReLU non-linear activation function. The softmax value represents the graph attention coefficient between nodes i and j. j This indicates that the attention coefficients calculated using the softmax function for all neighboring nodes j of node i are standardized, and N i Represents the set of adjacent nodes of node i; The step of concatenating the embeddings of K independent nodes to obtain the current node embedding includes: in, This indicates that the embeddings of K independent nodes are concatenated to obtain the current node embedding. `Concat` represents the concatenation operation. Represents node vectors The node embedding is obtained after the k-th attention head update.