Network violence identification method based on multi-mode complete hyperbolic graph neural network
Through a multimodal fully hyperbolic graph neural network, the network brute force recognition task is processed, and features are extracted using TF-IDF and pre-trained models, and multimodal fusion is performed in combination with Lorentz transform, solving the difficulty of multimodal data processing in the existing technology. and complex structure learning problems achieve more efficient and accurate identification of cyber brute force.
Patent Information
- Application Number
- CN202410400387.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-03
- Publication Date
- 2024-11-15
AI Technical Summary
Existing cyber brute force recognition methods are difficult to effectively process multimodal data, cannot describe cyber brute force events in a complete and accurate manner, and it is difficult to learn the complex structure and hierarchical structure of data in Euclidean space, resulting in high consumption of computing resources and misjudgment. High risk.
Using a method based on multimodal fully hyperbolic graph neural network, text and image features are extracted through TF-IDF algorithm and pre-trained XLNet and ResNet models, multimodal features are fused in combination with Lorentz transform, and fully hyperbolic The graph neural network learns the correlation and hierarchy between posts and builds post association diagrams to improve recognition accuracy and efficiency.
It improves the accuracy and efficiency of the network brute force recognition model, can more accurately capture the correlation and hierarchy in multimodal data, reduces the risk of misjudgment, and improves the anti-interference and generalization capabilities of the model.
Smart Images

Figure CN118966196A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a network violence identification method, in particular to a network violence identification method based on a multimodal complete hyperbolic graph neural network, and belongs to the technical field of public opinion monitoring. Background Art
[0002] Traditional methods for identifying cyber violence are mainly based on text analysis and machine learning or deep learning methods. However, cyber violence comes in various forms, including text, pictures, videos, etc. It is difficult to fully and accurately describe a cyber violence incident using only a single modality. The use of multimodal data can comprehensively utilize multiple media contents such as text, images and videos of posts to identify cyber violence incidents. Through cross-validation of multimodal information, the multimodal cyber violence identification model can reduce the risk of misjudgment of single media content and improve the anti-interference ability of the model. Therefore, a method that can effectively process multimodal data is needed to improve the performance and accuracy of cyber violence identification. In addition, in cyber violence incidents, users' behavior is usually affected by other users. Existing methods treat posts in cyber violence incidents as isolated individuals without considering the similarity and correlation between posts. More importantly, existing methods for identifying cyber violence are all performed in Euclidean space. Once the amount of data is too large, a large amount of computing resources will be consumed. In addition, Euclidean space cannot effectively learn the complex structure in the data, especially the implicit hierarchical structure. Therefore, it is necessary to design a better multimodal cyber violence identification model to capture the correlation and hierarchy between data. Summary of the invention
[0004] In view of the multimodal characteristics of data in the task of network violence identification, the similarity and correlation between data, and the difficulty in learning complex structures such as hierarchical structures, the main purpose of the present invention is to propose a network violence identification method based on a multimodal complete hyperbolic graph neural network. Based on the complete hyperbolic graph neural network method, the complex relationship between data can be captured, and the complete hyperbolic graph neural network is used to improve the accuracy and efficiency of the network violence identification model.
[0005] The objective of the present invention is achieved through the following technical solutions:
[0006] The present invention discloses a network violence identification method based on a multimodal complete hyperbolic graph neural network. The method uses a TF-IDF algorithm to evaluate the importance of words in each post in a data set in a document collection, calculates the TF-IDF vector of each post and obtains a feature vector matrix, and uses cosine similarity to calculate the similarity score between each pair of post nodes based on the feature vector matrix. The higher the similarity score, the stronger the correlation between the two posts. Node pairs with correlation exceeding a preset threshold are connected with edges to construct a post correlation graph, so as to capture the similarity and correlation between different posts. The post text is preprocessed and segmented using a pre-trained XLNet model, and the post text is converted into an input format understood by the XLNet model. The segmented text is input into the pre-trained XLNet model and the hidden state of the last layer of the model is obtained to obtain the feature representation of the post text; the pre-trained ResNet model is used to perform image resizing, center cropping, conversion to tensor, and normalization preprocessing operations on the post image, and the pre-processed image is input into the pre-trained ResNet model to obtain the feature representation of the post image; the text features and image features of the post are fused using a multimodal feature fusion module based on Lorentz transformation, and the multimodal feature fusion module includes a feature mapping module, a center extraction module, and a Lorentz mapping module. The feature mapping module maps the text features and image features of the post in the Euclidean space to the Lorentz space based on the exponential mapping operation. The center extraction module takes the text features and image features of the post as input, calculates the center features of the text features and image features in the Lorentz model, and uses this as the multimodal feature of the post. The Lorentz feature mapping module is based on the Lorentz linear layer, which realizes the mapping of the multimodal features of the post to the lower-dimensional Lorentz space, thereby obtaining a richer and more comprehensive feature representation, and improving the feature quality and expression ability after multimodal fusion; the multimodal features of the post in the lower-dimensional Lorentz space are used as the features of the nodes in the post association graph, and are input into the complete hyperbolic graph neural network to capture the implicit hierarchical structure in the data and learn the hyperbolic feature representation of the post. The complete hyperbolic graph neural network includes a feature transformation module and a neighborhood aggregation module. The feature transformation module is responsible for transforming, activating and normalizing the multimodal post features. The neighborhood aggregation module aggregates the information of each multimodal post node in the post association graph with the information of its neighboring nodes, thereby updating the node's own representation and realizing information transfer through the interaction between nodes in the post association graph; the multimodal post node features learned by the complete hyperbolic graph neural network are input into the network violence identifier, and the predicted label of each multimodal post is output, that is, network violence identification is realized based on the multimodal complete hyperbolic graph neural network.
[0007] The present invention discloses a method for identifying network violence based on a multimodal complete hyperbolic graph neural network, comprising the following steps:
[0008] Step 1: Perform preprocessing operations on the text data of each post in the dataset to remove special characters, punctuation marks, stop words, and numbers to clean and standardize the text. Build a vocabulary based on the preprocessed text data, which contains all unique words that appear in the text data. For each text sample, calculate the number of times each word appears in the sample or calculate the word frequency TF using the standardized word frequency calculation method that divides the number of occurrences of each word by the total number of words in the sample. Calculate the inverse document frequency IDF of each word by calculating the inverse of the number of documents in which the word appears in the entire corpus to measure the importance of the word in the document collection. Multiply the word frequency and the inverse document frequency to obtain the TF-IDF feature vector v tf And get the eigenvector matrix F tf Based on the feature vector matrix, the cosine similarity is used to calculate the similarity score between each pair of post nodes. The higher the similarity score, the stronger the correlation between the two posts. The node pairs whose correlation exceeds the preset threshold are connected with edges to construct a post correlation graph, so as to capture the similarity and correlation between different posts.
[0009] Step 2: Use the pre-trained XLNet model to pre-process and segment the post text, and convert the post text into an input format that the model can understand. Input the segmented text into the pre-trained XLNet model and obtain the hidden state of the last layer of the model to obtain the feature representation of the post text; use the pre-trained ResNet model to perform image resizing, center cropping, conversion to tensor, and normalization pre-processing operations on the post image, and input the pre-processed image into the pre-trained ResNet model to obtain the feature representation of the post image; use the multimodal feature fusion module based on Lorentz transformation to fuse the text features and image features of the post. The multimodal feature fusion module includes a feature mapping module, a center extraction module, and a Lorentz mapping module. The feature mapping module maps the text features and image features of the post in the Euclidean space to the Lorentz space based on the exponential mapping operation. The center extraction module takes the text features and image features of the post as input, calculates the center features of the text features and image features in the Lorentz model, and uses this as the multimodal feature of the post. The Lorentz feature mapping module is based on the Lorentz linear layer, which realizes the mapping of the multimodal features of the post to the lower-dimensional Lorentz space, thereby obtaining a richer and more comprehensive feature representation and improving the feature quality and expression ability after multimodal fusion.
[0010] Step 2.1: Extract post text features using the pre-trained XLNet model. m} represents the collection of post texts, where w i Represents a post text; T = {t1, t2, ..., t m} represents the corresponding text feature, that is, feature t i Corresponding text w i , according to formula (1) text feature t i It can be obtained through the pre-trained XLNet model:
[0011] T={t1,t2,...,t m}=XLNet(W) (1)
[0012] Step 2.2: Use the pre-trained ResNet model to extract post image features. m} represents the set of images corresponding to the post text, where i i Represents a picture in a post; V = {v1, v2, ..., v m} represents the corresponding image feature, that is, feature v i Corresponding image i i , according to formula (2) the image feature v i Can be obtained through the pre-trained ResNet model:
[0013] V={v1,v2,...,v m}=ResNet(I) (2)
[0014] Step 2.3: A multimodal feature fusion module based on Lorentz transform is used to fuse the text features and image features of the post. The multimodal feature fusion module includes a feature mapping module, a center extraction module and a Lorentz feature mapping module.
[0015] Step 2.3.1: The feature mapping module maps the text features and image features of the post in the Euclidean space to the Lorentz space based on the exponential mapping operation, as shown in equations (3) and (4):
[0016]
[0017]
[0018] Here, exp0(·) refers to the exponential mapping operation in the Lorentz model, which can transfer points in Euclidean space to hyperbolic space, and M T and M V The feature mapping matrices representing the text features and image features of the post in Euclidean space, and denote the text features and image features of posts in Lorentz space respectively.
[0019] Step 2.3.2: The center extraction module takes the text features and image features of the post as input and calculates the center features u of the text features and image features in the Lorenz model fused , which is used as the multimodal feature of the post, as shown in formula (5):
[0020] u fused =Centroid({t,v},{w1,w2}) (5)
[0021] Among them, t and v correspond to and In the example, Centroid(·) represents the center extraction operation based on the squared Lorentz distance, and {w1,w2} represents the weights corresponding to the text features and image features of the post. For the Lorentz model with a curvature of -c (c>0), the center extraction operation of k modal features is shown in formula (6):
[0022]
[0023] Among them, {w1,w2,...,w k} represents the weights corresponding to different modal features, represents the norm operation under the Lorentz model.
[0024] Step 2.3.3: The Lorentz feature mapping module maps the multimodal features of the post to the lower-dimensional Lorentz space based on the Lorentz linear layer, thereby obtaining a richer and more comprehensive feature representation and improving the feature quality and expression ability after multimodal fusion. As shown in formula (7), the Lorentz feature mapping module learns the transformation matrix Implementing multimodal features of posts fused Mapping to a lower-dimensional Lorentz space:
[0025]
[0026] in, represents the multimodal post features after mapping, d represents the dimension of the lower dimensional Lorentz space, and These are all learnable parameters.
[0027] Step 3: The multimodal features of posts in the lower-dimensional Lorentz space are used as the features of nodes in the post association graph, and are input into the complete hyperbolic graph neural network to capture the implicit hierarchical structure in the data and learn the hyperbolic feature representation of posts. The complete hyperbolic graph neural network includes a feature transformation module and a neighborhood aggregation module. The feature transformation module is responsible for transforming, activating and normalizing the multimodal post features. The neighborhood aggregation module aggregates the information of each multimodal post node in the post association graph with the information of its neighbor nodes, thereby updating the representation of the node itself and realizing information transfer through the interaction between nodes in the post association graph.
[0028] Step 3.1: Feature transformation module, which implements the transformation, activation and normalization of multimodal post features according to formula (8):
[0029]
[0030] Where ψ(·) represents the activation and normalization operation shown in equation (9):
[0031]
[0032] Among them, σ(·) represents the sigmoid function, b and b′ are bias terms, γ>0 represents the scaling parameter, and h(·) represents the activation function.
[0033] Step 3.2: The neighborhood aggregation module uses an attention-based aggregation mechanism to capture the structure and characteristics of the neighborhood, aggregates the information of each multimodal post node in the post association graph with the information of its neighbor nodes, and updates the representation of the node itself, realizing information transfer through the interaction between nodes in the post association graph. Given a query set Key Collection and a collection of values Using q i and k j The weight w is calculated by the squared Lorentz distance between ij , as shown in formula (10):
[0034]
[0035] Among them, D sql (·) represents the squared Lorentz distance under the Lorentz model, and d represents the dimension of the Lorentz space. Based on the Centroid (·) operation in step 2.3.2, the points in the hyperbolic space are aggregated, as shown in formula (11):
[0036]
[0037] The above process can be abstractly described by formula (12):
[0038]
[0039] in, Represents the feature transformation layers corresponding to query, key, and value respectively.
[0040] By considering multiple layers, the overall architecture of the complete hyperbolic graph neural network can be expressed as:
[0041]
[0042] in, represents the hyperbolic post feature of multimodal post node i in layer l, Represents the set of neighbors of multimodal post node i.
[0043] Step 4: Logarithmically map the node features output by the last layer of the complete hyperbolic graph neural network to the tangent space, and then pass it through a fully connected layer and use softmax as the activation function to obtain the probability matrix of each post node corresponding to each label According to the probability matrix The maximum probability value in , outputs the predicted label result y corresponding to the current post.
[0044] The probability matrix of each post node corresponding to each tag As shown in formula (14):
[0045]
[0046] in, represents the multimodal post node features of the Lth layer of the complete hyperbolic graph neural network, and FC(·) represents the fully connected layer.
[0047] Step 5: For the multimodal complete hyperbolic graph neural network constructed in steps 3 and 4, configure the parameters required for model training, set the learning rate, batch size, weight initialization method, optimization method, and number of iterations; use the post association graph constructed based on the multimodal cyber violence post dataset in step 1, and use the cross entropy loss function to train the multimodal hyperbolic graph neural network for cyber violence identification. The nonlinear relationship between the multimodal posts and their corresponding labels is constructed through the trained multimodal complete hyperbolic graph neural network. The nonlinear relationship can better handle complex patterns, nonlinear data, and multimodal data, improve the generalization ability of the multimodal hyperbolic graph neural network model, and generate richer and deeper information representation.
[0048] The cross entropy loss function is shown in formula (15):
[0049]
[0050] in, represents the predicted probability of the nth post, Y n Represents the true label of the nth post.
[0051] Step 6: Input the features of each multimodal post to be identified into the trained multimodal complete hyperbolic graph neural network model, and output the predicted label of each post; use the output predicted label result as the category corresponding to the current post to identify whether the current multimodal post is cyber violence. The fusion of multimodal features and the introduction of hyperbolic space enable the model to extract associations and rich semantic representations in multimodal data, and capture the implicit hierarchical structure in the data, improving the accuracy and efficiency of cyber violence identification.
[0052] Step 7: Apply the trained multimodal complete hyperbolic graph neural network model obtained in the first six steps to the field of social network analysis to solve related technical problems.
[0053] The relevant technical issues mentioned include social media analysis, malicious user identification, and video content review.
[0054] The model is applied to social media analysis to analyze multimodal data such as text, images, and videos on social media to detect the spread of cyber violence. By learning the correlation between multimodal data, the model can extract rich feature representations to assist in the identification of cyber violence.
[0055] The model is applied to malicious user identification. The model is used to analyze users' multimodal behavioral data, such as text, social network relationships, images or videos posted by users, etc., to identify malicious users and propagators of online violent speech. The model can capture the behavioral patterns and characteristics of malicious users and assist the platform in detecting and preventing malicious users.
[0056] The model is applied to video content review. The model is used to analyze the multimodal data of the video, such as audio, images, text descriptions, etc., to conduct content review and network violence information. By learning the association between multimodal data, the model can identify and filter network violence speech, low-quality or illegal content.
[0057] Beneficial effects:
[0058] 1. The present invention discloses a method for identifying network violence based on a multimodal complete hyperbolic graph neural network. The method utilizes the natural advantages of hyperbolic space in capturing data hierarchical structures to construct a complete hyperbolic graph neural network model for identifying network violence. The method effectively integrates multimodal post data by propagating and fusing post node information on a post association graph in hyperbolic space. The method realizes the complete hyperbolicization of the graph neural network based on the Lorentz transformation, further exploits the excellent representation capability of the hyperbolic space, and improves the performance of the model.
[0059] 2. The present invention discloses a method for identifying online violence based on a multimodal complete hyperbolic graph neural network, which fuses the text features and image features of a post based on the Lorentz transformation. It can effectively process multimodal features with nonlinear relationships, reveal the similarities, differences and correlations between features of different modalities, and help to deeply understand the structure and characteristics of multimodal data.
[0060] 3. The present invention discloses a method for identifying cyber violence based on a multimodal complete hyperbolic graph neural network, which uses a pre-trained XLNet model to extract text features of posts. The XLNet model uses a self-attention mechanism and can model each position in a text sequence to capture long-distance dependencies. XLNet can better understand the contextual information between texts, which is very helpful for understanding the complex semantics and relationships in post texts. Unlike traditional natural language processing models (such as BERT) that only consider the left or right context, XLNet can use both the left and right context information by using a permutation invariance training objective, which helps to more fully understand text features and is very beneficial for semantic understanding and contextual reasoning in cyber violence identification.
[0061] 4. The present invention discloses a method for identifying cyber violence based on a multimodal complete hyperbolic graph neural network, which uses a pre-trained ResNet model to extract the image features of posts. By introducing residual connections, the gradient vanishing and gradient exploding problems during deep network training are solved, so that ResNet can build a very deep network structure and extract more layers of image features. The deep network structure helps the model learn richer and more abstract representations, which is more effective for complex image feature extraction tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 The present invention discloses a flow chart of a multimodal complete hyperbolic graph neural network method for identifying network violence.
[0063] Figure 2 Schematic diagram of the system framework in an embodiment of the present invention.
[0064] Figure 3 It is a schematic diagram of the mapping operation mentioned in the embodiment of the present invention. DETAILED DESCRIPTION
[0065] The present invention will be described in detail below in conjunction with the accompanying drawings and embodiments, and the technical problems solved by the technical solution of the present invention and the beneficial effects will be discussed. It should be noted that the described embodiments are intended to facilitate the understanding of the present invention and do not have any limiting effect on the present invention.
[0066] Example 1
[0067] like Figure 1 As shown, the present embodiment discloses a method for identifying network violence based on a multimodal complete hyperbolic graph neural network, and the specific implementation steps are as follows:
[0068] Step 1: 9,830 relevant online violence posts were collected on the Weibo platform, each of which contained two modal information: text and image. The text data of each post in the dataset was preprocessed to remove special characters, punctuation marks, stop words, and numbers to clean and standardize the text. A vocabulary was constructed based on the preprocessed text data, which contains all unique words that appear in the text data. For each text sample, the number of times each word appears in the sample is calculated or the word frequency TF is calculated using the standardized word frequency calculation method that divides the number of occurrences of each word by the total number of words in the sample. The inverse document frequency IDF of each word is calculated by calculating the inverse of the number of documents in which the word appears in the entire corpus to measure the importance of the word in the document collection. Multiply the word frequency and the inverse document frequency to obtain the TF-IDF feature vector v. tf And get the eigenvector matrix F tf Based on the feature vector matrix, the cosine similarity is used to calculate the similarity score between each pair of post nodes. The higher the similarity score, the stronger the correlation between the two posts. The node pairs with correlation exceeding the threshold of 0.3 are connected with edges to construct the post correlation graph, and the adjacency matrix A of the post correlation graph is obtained. 9830×9830 , to capture the similarity and relevance between different posts. i,j There are only two values, 0 or 1. i,j =0 means there is no edge connection between node i and node j; A i,j =1 means there is an edge connection between node i and node j.
[0069] Step 2: Use the pre-trained XLNet model to pre-process and segment the post text, and convert the post text into an input format that the model can understand. Input the segmented text into the pre-trained XLNet model and obtain the hidden state of the last layer of the model to obtain the feature representation of the post text; use the pre-trained ResNet model to perform image resizing, center cropping, conversion to tensor, and normalization pre-processing operations on the post image, and input the pre-processed image into the pre-trained ResNet model to obtain the feature representation of the post image; use the multimodal feature fusion module based on Lorentz transformation to fuse the text features and image features of the post. The multimodal feature fusion module includes a feature mapping module, a center extraction module, and a Lorentz mapping module. The feature mapping module maps the text features and image features of the post in the Euclidean space to the Lorentz space based on the exponential mapping operation. The center extraction module takes the text features and image features of the post as input, calculates the center features of the text features and image features in the Lorentz model, and uses this as the multimodal feature of the post. The Lorentz feature mapping module is based on the Lorentz linear layer, which realizes the mapping of the multimodal features of the post to the lower-dimensional Lorentz space, thereby obtaining a richer and more comprehensive feature representation and improving the feature quality and expression ability after multimodal fusion.
[0070] Step 2.1: Extract post text features using the pre-trained XLNet model. m} represents the collection of post texts, where w i Represents a post text; T = {t1, t2, ..., t m} represents the corresponding text feature, that is, feature t i Corresponding text w i , the feature dimension is 768, according to formula (16) the text feature t i It can be obtained through the pre-trained XLNet model:
[0071] T={t1,t2,...,t m}=XLNet(W) (16)
[0072] Step 2.2: Use the pre-trained ResNet model to extract post image features. m} represents the set of images corresponding to the post text, where i i Represents a picture in a post; V = {v1, v2, ..., v m} represents the corresponding image feature, that is, feature v i Corresponding image i i , the feature dimension is 768, according to formula (17) the image feature v iIt can be obtained through the pre-trained ResNet model:
[0073] V={v1,v2,...,v m}=ResNet(I) (17)
[0074] Step 2.3: A multimodal feature fusion module based on Lorentz transform is used to fuse the text features and image features of the post. The multimodal feature fusion module includes a feature mapping module, a center extraction module and a Lorentz feature mapping module.
[0075] Step 2.3.1: The feature mapping module maps the text features and image features of the post in the Euclidean space to the Lorentz space based on the exponential mapping operation, as shown in equations (18) and (19):
[0076]
[0077]
[0078] Here, exp0(·) refers to the exponential mapping operation in the Lorentz model, which can transfer points in Euclidean space to hyperbolic space, and M T and M V The feature mapping matrices representing the text features and image features of the post in Euclidean space, and denote the text features and image features of posts in Lorentz space respectively.
[0079] Step 2.3.2: The center extraction module takes the text features and image features of the post as input and calculates the center features u of the text features and image features in the Lorenz model fused , which is used as the multimodal feature of the post, as shown in formula (20):
[0080] u fused =Centroid({t,v},{0.5,0.5}) (20)
[0081] Among them, t and v correspond to and In the example, Centroid(·) represents the center extraction operation based on the squared Lorentz distance, and {0.5, 0.5} represents the weights corresponding to the text features and image features of the post. For the Lorentz model with a curvature of -c (c>0), the center extraction operation of k modal features is shown in formula (21):
[0082]
[0083] Among them, {w1,w2,...,wk} represents the weights corresponding to different modal features, represents the norm operation under the Lorentz model.
[0084] Step 2.3.3: The Lorentz feature mapping module realizes the mapping of the multimodal features of the post to the lower-dimensional Lorentz space based on the Lorentz linear layer, thereby obtaining a richer and more comprehensive feature representation and improving the feature quality and expression ability after multimodal fusion. As shown in formula (22), the Lorentz feature mapping module learns the transformation matrix Implementing multimodal features of posts fused Mapping to a lower-dimensional Lorentz space:
[0085]
[0086] in, represents the multimodal post features after mapping, d = 3 represents the dimension of the lower dimensional Lorentz space, and These are all learnable parameters.
[0087] Step 3: If Figure 2 As shown in the figure, the multimodal features of posts in the lower dimensional Lorentz space are used as the features of nodes in the post association graph, and are input into the complete hyperbolic graph neural network to capture the implicit hierarchical structure in the data and learn the hyperbolic feature representation of posts. The complete hyperbolic graph neural network includes a feature transformation module and a neighborhood aggregation module. The feature transformation module is responsible for transforming, activating and normalizing the multimodal post features. The neighborhood aggregation module aggregates the information of each multimodal post node in the post association graph with the information of its neighbor nodes, thereby updating the representation of the node itself and realizing information transfer through the interaction between nodes in the post association graph.
[0088] Step 3.1: Feature transformation module, which implements the transformation, activation and normalization operations of multimodal post features according to formula (23):
[0089]
[0090] where ψ(·) represents the activation and normalization operation shown in equation (24):
[0091]
[0092] Among them, σ(·) represents the sigmoid function, b and b′ are bias terms, γ>0 represents the scaling parameter, and h(·) represents the activation function.
[0093] Step 3.2: The neighborhood aggregation module uses an attention-based aggregation mechanism to capture the structure and characteristics of the neighborhood, aggregates the information of each multimodal post node in the post association graph with the information of its neighbor nodes, and updates the representation of the node itself, realizing information transfer through the interaction between nodes in the post association graph. Given a query set Key Collection and a collection of values Using q i and k j The weight w is calculated by the squared Lorentz distance between ij , as shown in formula (25):
[0094]
[0095] Among them, D sql (·) represents the squared Lorentz distance under the Lorentz model, and d = 3 represents the dimension of the Lorentz space. Based on the Centroid (·) operation in step 2.3.2, the points in the hyperbolic space are aggregated, as shown in formula (26):
[0096]
[0097] The above process can be abstractly described by formula (27):
[0098]
[0099] in, Represents the feature transformation layers corresponding to query, key, and value respectively.
[0100] By considering multiple layers, the overall architecture of the complete hyperbolic graph neural network can be expressed as:
[0101]
[0102] in, represents the hyperbolic post feature of multimodal post node i in layer l, Represents the set of neighbors of multimodal post node i.
[0103] Step 4: Logarithmically map the node features output by the last layer of the complete hyperbolic graph neural network to the tangent space, and then pass it through a fully connected layer and use softmax as the activation function to obtain the probability matrix of each post node corresponding to each label According to the probability matrix The maximum probability value in , outputs the predicted label result y corresponding to the current post.
[0104] The probability matrix of each post node corresponding to each tag As shown in formula (29):
[0105]
[0106] in, represents the multimodal post node features of the Lth layer (L=3) of the complete hyperbolic graph neural network, and FC(·) represents the fully connected layer.
[0107] Step 5: For the multimodal complete hyperbolic graph neural network constructed in steps 3 and 4, configure the parameters required for model training, set the learning rate to 0.0006, the maximum number of iterations to 500, and use the Radam optimizer to optimize the parameters; use the post association graph constructed based on the multimodal cyber violence post dataset in step 1, and use the cross entropy loss function to train the multimodal hyperbolic graph neural network for cyber violence identification. The cross entropy loss function is shown in formula (30):
[0108]
[0109] in, represents the predicted probability of the nth post, Y n represents the true label of the nth post, N = 9830. The nonlinear relationship between the multimodal posts and their corresponding labels is constructed by the trained multimodal complete hyperbolic graph neural network, and the nonlinear relationship can better process complex patterns, nonlinear data and multimodal data, improve the generalization ability of the multimodal hyperbolic graph neural network model, and generate richer and deeper information representation.
[0110] Therefore, the network violence identification method based on the multimodal complete hyperbolic graph neural network disclosed in this embodiment uses the correlation between posts to construct the graph and considers the multimodal characteristics of the posts. In addition, the hyperbolic space with a natural advantage in processing hierarchical structure data is used for the graph neural network, and the network violence is identified through the network violence identifier. Through the comprehensive application of the above methods, the robustness and accuracy of the model are improved.
[0111] The specific description above further illustrates the purpose, technical solutions and beneficial effects of the invention in detail. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for identifying network violence based on a multimodal complete hyperbolic graph neural network, characterized by: The following steps are included: Step 1: Perform preprocessing operations on the text data of each post in the dataset to remove special characters, punctuation marks, stop words, and numbers to clean and standardize the text; Build a vocabulary based on the preprocessed text data, which contains all the unique words that appear in the text data; for each text sample, calculate the number of times each word appears in the sample or calculate the word frequency TF using the standardized word frequency calculation method that divides the number of occurrences of each word by the total number of words in the sample; Calculate the inverse document frequency (IDF) of each word by calculating the inverse of the number of documents in which the word appears in the entire corpus, which measures the importance of the word in the document collection; multiply the word frequency and the inverse document frequency to obtain the TF-IDF feature vector v tf And get the eigenvector matrix F tf , based on the feature vector matrix, the cosine similarity is used to calculate the similarity score between each pair of post nodes. The higher the similarity score, the stronger the correlation between the two posts. The node pairs whose correlation exceeds the preset threshold are connected with edges to construct a post correlation graph, so as to capture the similarity and correlation between different posts. Step 2: Use the pre-trained XLNet model to pre-process and segment the post text, and convert the post text into an input format that the model can understand; input the segmented text into the pre-trained XLNet model and obtain the hidden state of the last layer of the model to obtain the feature representation of the post text; use the pre-trained ResNet model to perform pre-processing operations on the post image, such as image resizing, center cropping, conversion to tensor, and normalization, and input the pre-processed image into the pre-trained ResNet model to obtain the feature representation of the post image; use the multimodal feature fusion model based on Lorentz transform to obtain the feature representation of the post image. The block fuses the text features and image features of the post. The multimodal feature fusion module includes a feature mapping module, a center extraction module and a Lorentz mapping module. The feature mapping module maps the text features and image features of the post in the Euclidean space to the Lorentz space based on the exponential mapping operation. The center extraction module takes the text features and image features of the post as input, calculates the center features of the text features and image features in the Lorentz model, and uses them as the multimodal features of the post. The Lorentz feature mapping module realizes the mapping of the multimodal features of the post to the lower-dimensional Lorentz space based on the Lorentz linear layer. Step 3: The multimodal features of posts in the lower-dimensional Lorentz space are used as the features of nodes in the post association graph, and are input into the complete hyperbolic graph neural network to capture the implicit hierarchical structure in the data and learn the hyperbolic feature representation of posts; the complete hyperbolic graph neural network includes a feature transformation module and a neighborhood aggregation module; The feature transformation module is responsible for transforming, activating and normalizing the multimodal post features; the neighborhood aggregation module aggregates the information of each multimodal post node in the post association graph with the information of its neighbor nodes, thereby updating the representation of the node itself and realizing information transfer through the interaction between nodes in the post association graph; Step 4: Logarithmically map the node features output by the last layer of the complete hyperbolic graph neural network to the tangent space, and then pass it through a fully connected layer and use softmax as the activation function to obtain the probability matrix of each post node corresponding to each label According to the probability matrix The maximum probability value in the output, output the predicted label result y corresponding to the current post; Step 5: For the multimodal complete hyperbolic graph neural network constructed in steps 3 and 4, configure the parameters required for model training, set the learning rate, batch size, weight initialization method, optimization method, and number of iterations; use the post association graph constructed based on the multimodal cyber violence post dataset in step 1, and use the cross entropy loss function to train the multimodal hyperbolic graph neural network for cyber violence identification; construct a nonlinear relationship between multimodal posts and their corresponding labels through the trained multimodal complete hyperbolic graph neural network, improve the generalization ability of the multimodal hyperbolic graph neural network model, and generate richer and deeper information representation; Step 6: Input the features of each multimodal post to be identified into the trained multimodal complete hyperbolic graph neural network model, and output the predicted label of each post; use the output predicted label result as the category corresponding to the current post to identify whether the current multimodal post is cyber violence; The fusion of multimodal features and the introduction of hyperbolic space enable the model to extract associations and rich semantic representations in multimodal data and capture the implicit hierarchical structure in the data, thereby improving the accuracy and efficiency of cyber violence identification.
2. A method for identifying network violence based on a multimodal complete hyperbolic graph neural network as claimed in claim 1, characterized in that: It also includes step seven: applying the trained multimodal complete hyperbolic graph neural network model obtained in the first six steps to the field of social network analysis to solve related technical problems; The relevant technical issues mentioned include social media analysis, malicious user identification, and video content review; The model is applied to social media analysis to analyze multimodal data on social media to detect the spread of online violence. By learning the correlation between multimodal data, the model can extract rich feature representations to assist in the identification of online violence. The model is applied to malicious user identification. The model is used to analyze users' multimodal behavior data to identify malicious users and propagators of online violent speech. The model can capture the behavior patterns and characteristics of malicious users and assist the platform in detecting and preventing malicious users. The model is applied to video content review. The model is used to analyze the multimodal data of the video to conduct content review and online violence information; By learning the correlation between multimodal data, the model is able to identify and filter online violent speech, low-quality or illegal content.
3. A method for identifying network violence based on a multimodal complete hyperbolic graph neural network as claimed in claim 1 or 2, characterized in that: The implementation method of step 2 is: Step 2.1: Use the pre-trained XLNet model to extract post text features; use W = {w1,w2,...,w m } represents the collection of post texts, where w i Represents a post text; T = {t1, t2, ..., t m } represents the corresponding text feature, that is, feature t i Corresponding text w i , according to formula (1) text feature t i It can be obtained through the pre-trained XLNet model: T={t1,t2,...,t m }=XLNet(W) (1) Step 2.2: Use the pre-trained ResNet model to extract post image features; use I = {i1,i2,...,i m } represents the set of images corresponding to the post text, where i i Represents a picture in a post; V = {v1, v2, ..., v m } represents the corresponding image feature, that is, feature v i Corresponding image i i , according to formula (2) the image feature v i Can be obtained through the pre-trained ResNet model: V={v1,v2,...,v m }=ResNet(I) (2) Step 2.3: A multimodal feature fusion module based on Lorentz transform is used to fuse the text features and image features of the post, where the multimodal feature fusion module includes a feature mapping module, a center extraction module and a Lorentz feature mapping module; Step 2.3.1: The feature mapping module maps the text features and image features of the post in the Euclidean space to the Lorentz space based on the exponential mapping operation, as shown in equations (3) and (4): Here, exp0(·) refers to the exponential mapping operation in the Lorentz model, which can transfer points in Euclidean space to hyperbolic space, and M T and M V The feature mapping matrices representing the text features and image features of the post in Euclidean space, and denote the text features and image features of posts in Lorentz space respectively; Step 2.3.2: The center extraction module takes the text features and image features of the post as input and calculates the center features u of the text features and image features in the Lorenz model fused , which is used as the multimodal feature of the post, as shown in formula (5): u fused =Centroid({t,v},{w1,w2}) (5) Among them, t and v correspond to and In the example, Centroid(·) represents the center extraction operation based on the squared Lorentz distance, and {w1,w2} represents the weights corresponding to the text features and image features of the post. For the Lorentz model with a curvature of -c (c>0), the center extraction operation of k modal features is shown in formula (6): Among them, {w1,w2,...,w k } represents the weights corresponding to different modal features, represents the norm operation under the Lorentz model; Step 2.3.3: The Lorentz feature mapping module maps the multimodal features of the post to the lower-dimensional Lorentz space based on the Lorentz linear layer, thereby obtaining a richer and more comprehensive feature representation and improving the feature quality and expression ability after multimodal fusion. As shown in formula (7), the Lorentz feature mapping module learns the transformation matrix Implementing multimodal features of posts fused Mapping to a lower-dimensional Lorentz space: in, represents the multimodal post features after mapping, d represents the dimension of the lower dimensional Lorentz space, and These are all learnable parameters.
4. A method for identifying network violence based on a multimodal complete hyperbolic graph neural network as claimed in claim 3, characterized in that: The implementation method of step three is: Step 3.1: Feature transformation module, which implements the transformation, activation and normalization operations of multimodal post features according to formula (8): Where ψ(·) represents the activation and normalization operation shown in equation (9): Where σ(·) represents the sigmoid function, b and b′ are bias terms, γ>0 represents the scaling parameter, and h(·) represents the activation function; Step 3.2: The neighborhood aggregation module uses an attention-based aggregation mechanism to capture the structure and characteristics of the neighborhood, aggregates the information of each multimodal post node in the post association graph with the information of its neighbor nodes, thereby updating the representation of the node itself and realizing information transfer through the interaction between nodes in the post association graph; given a query set Key Collection and a collection of values Using q i and k j The weight w is calculated by the squared Lorentz distance between ij , as shown in formula (10): Among them, D sql (·) represents the squared Lorentz distance under the Lorentz model, and d represents the dimension of the Lorentz space. Based on the Centroid(·) operation in step 2.3.2, the points in the hyperbolic space are aggregated, as shown in formula (11): The above process can be abstractly described by formula (12): in, Represents the feature transformation layers corresponding to query, key and value respectively; By considering multiple layers, the overall architecture of the complete hyperbolic graph neural network is expressed as: in, represents the hyperbolic post feature of multimodal post node i in layer l, Represents the set of neighbors of multimodal post node i.
5. A method for identifying network violence based on a multimodal complete hyperbolic graph neural network as claimed in claim 4, characterized in that: In step four, The probability matrix of each post node corresponding to each tag As shown in formula (14): in, represents the multimodal post node features of the Lth layer of the complete hyperbolic graph neural network, and FC(·) represents the fully connected layer.
6. A method for identifying network violence based on a multimodal complete hyperbolic graph neural network as claimed in claim 5, characterized in that: In step five, The cross entropy loss function is shown in formula (15): in, represents the predicted probability of the nth post, Y n Represents the true label of the nth post.
Citation Information
Cited By
Graph structure data processing method and device, equipment, storage medium and program product
CN120804501A
