Twitter robot detection method based on multi-modal information invariance and specific representation

By building a BotSAI model, using the method of multimodal information constant and specific representation, combined with the multi-head self-attention mechanism and multi-channel presenter, the problem of difficulty in identifying complex advanced Twitter robots in the existing technology is solved, significantly improving the detection accuracy and characteristics consistency.

CN118968365APending Publication Date: 2024-11-15YANSHAN UNIV
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411178737.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

Existing Twitter robot detection methods are difficult to effectively identify and deal with complex advanced robots, especially because they use web crawlers to obtain real user information and raise accounts, which makes camouflage more complex, and traditional methods are difficult to deal with this threat.

Method used

Using the Twitter robot detection method based on multimodal information invariant and specific representation, the robot detection model BotSAI is constructed, and features are extracted using improved metadata, text and graphical modal encoders, and feature fusion is performed by combining the multi-head self-attention mechanism. And cast features to invariant and specific subspaces through multi-channel presenters, optimizing model parameters to improve detection accuracy.

Benefits of technology

It significantly improves the accuracy of Twitter robot detection, solves the problem of imbalance between the number of robot accounts and real users and aggregation of neighbor node information, enhances the consistency and difference of multimodal user characteristics, and improves the Twitter robots and real users recognition ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968365A_ABST
    Figure CN118968365A_ABST
Patent Text Reader

Abstract

The invention discloses a Twitter robot detection method based on multi-modal information invariance and specific representation, and belongs to the field of computer graph learning and multi-modal information fusion, and the method comprises the steps: building a robot detection model BotSAI, and carrying out the optimization through a multi-task mode; extracting features through an improved mode-specific encoder based on metadata, text content and heterogeneous network topology structure information of a Twitter user; the method comprises the following steps of: performing invariant and specific representation on each modal feature vector through a multi-channel representation, learning generality in modals and highlighting characteristics among the modals, performing feature interaction by utilizing multi-head self-attention, connecting output fusion feature vectors in series, and using a constructed joint vector to detect tasks and learn model parameters. According to the method, the feature vectors rich in effective information are utilized to cope with the detection task of the social robot, and the accuracy of the detection task of the Twitter robot is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer graph learning and multimodal information fusion, and in particular to a Twitter robot detection method based on multimodal information invariance and specific representation. Background Art

[0002] As a widely used online social media platform in the world, Twitter has become an important online place for people to share interesting stories in life and discuss hot opinions. However, a large number of Twitter robot accounts controlled by automated programs are also active. These robots influence and even guide the direction of public opinion by spreading false information, interfering in elections, and conducting privacy attacks, posing a serious threat and challenge to online communities. Today's advanced robots use web crawlers to obtain descriptive information of real users to create accounts, and take measures to maintain accounts, such as following and commenting on real users, and continuously participating in the interaction of real users, in order to hide themselves and expand their influence, which makes their disguise more complicated. Traditional methods based on feature engineering and using graph neural networks alone are difficult to deal with these complex advanced robots.

[0003] Therefore, new detection methods are needed to effectively identify and counter these threats. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a Twitter robot detection method based on multimodal information invariance and specific representation, which utilizes feature vectors rich in effective information to cope with social robot detection tasks and significantly improves the accuracy of Twitter robot detection tasks.

[0005] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[0006] A Twitter robot detection method based on multimodal information invariance and specific representation includes the following steps:

[0007] Step 1, constructing a robot detection model BotSAI; the robot detection model BotSAI includes multimodal information representation learning, multimodal information invariant and specific representation, and multimodal information interactive fusion;

[0008] Step 1.1, the multimodal information representation learning includes: extracting features from metadata, text content, and heterogeneous network topology information of Twitter robot users, using an improved metadata encoder, a text modality encoder, and a graphic modality encoder, respectively, to obtain a comprehensive Twitter robot user representation from different perspectives;

[0009] Step 1.2, the invariant and specific representation of the multimodal information includes: enhancing the invariant and specific representation of the feature vectors obtained from the metadata modality, the text modality, and the graphic modality;

[0010] Step 1.3, the multimodal information interactive fusion includes: performing a multi-head self-attention mechanism on the enhanced feature vector representation, so that each feature vector can learn other cross-modal and cross-subspace representations; connecting the output fused feature vectors in series, and using the constructed joint vector for detection tasks and learning model parameters;

[0011] Step 2: Optimize the robot detection model BotSAI by end-to-end optimizing the parameters of the graphic encoder, the invariant modality encoder, and the specific modality encoder.

[0012] A further improvement of the technical solution of the present invention is that: in step 1.1, the metadata includes five numbers and three categorized metadata features based on usability and simplicity; the five numbers include the number of followers, the number of followers, the number of favorites, the number of active days and the length of the user name; the three categorized metadata features include the user name, timestamp, and default profile image;

[0013] The text content includes tweets and personal description information posted by the selected user;

[0014] The heterogeneous network topology information is a social network composed of social relationships of Twitter robot users.

[0015] A further improvement of the technical solution of the present invention is that in step 1.1, an improved metadata encoder is used to obtain a feature representation of the metadata of the Twitter robot user, specifically including:

[0016] Let m be the metadata embedding from the Twitter bot user profile v , followed by Z-Score normalization, and then applying two layers of MLP to learn user u v The characteristic representation of the metadata is Right now:

[0017]

[0018] A further improvement of the technical solution of the present invention is that in step 1.1, an improved text modality encoder is used to obtain a low-dimensional text representation of the Twitter robot user, specifically including:

[0019] Use the pre-trained model RoBERTa to encode Twitter user tweets and description information. Suppose that we will get tweets from Twitter robot user u v The features extracted from the description information are recorded as Will be from Twitter robot user u v The features extracted from the tweet information are recorded as And input them into a two-layer MLP to get user u v Low-dimensional text representation Right now:

[0020]

[0021] Where LM is the pre-trained language model encoder, t v For user u v text information, a is the ath tweet in the tweet data, b is the bth attribute in the description information, n is the total number of text contents, l a The length of the a-th input text sequence.

[0022] A further improvement of the technical solution of the present invention is that in step 1.1, an improved graph modal encoder is used to obtain the graph feature information representation of the Twitter robot user, which specifically includes the following steps:

[0023] S1.1.1, Building a heterogeneous information network:

[0024] In order to consider the diverse relationships existing in social networks, a heterogeneous information network is constructed to capture the complex social relationships between Twitter users. The initial features of Twitter users, i.e., the node information in the social relationship network graph, are constructed using user metadata, personal descriptions, and tweet data to obtain a comprehensive user node embedding. v The original feature attribute is represented as h v ,Right now:

[0025]

[0026] Where W D , b D All are learnable parameters; For user u v Feature representation of metadata; For user u v Low-dimensional text representation;

[0027] S1.1.2, Graph Node Oversampling:

[0028] Since there is an imbalance in the number of robot accounts and real user accounts in the dataset, the domain node features of the user nodes in the social graph are mapped to the feature space through a graph neural network, and oversampling is used in the feature space to generate node samples for the minority class to deal with the imbalance of the dataset;

[0029] Using 2-hop neighborhood aggregation, the information aggregated by the neighborhood is represented as q v ; Since there are robot accounts in Twitter social network that are hidden in the interaction with multiple real users, in order to prevent the robot accounts from being overly smoothed by 2-hop domain aggregation, h v and q v The connection is used as the embedding representation of the user node, namely:

[0030] x v =[q v ‖h v ]

[0031] In the formula, x v For user u v The embedded representation of h v For user u v The original feature attribute representation of ;

[0032] By connecting the original node information and the aggregated neighbor information in this way, the original node information is preserved and the embedding of these robot users is made similar to that of human nodes.

[0033] S1.1.3, use the synthetic node generator to generate minority class nodes:

[0034] The number of nodes generated by the minority class can be controlled by the oversampling scale hyperparameter ω; for the minority class user u v , let Γ(·) denote the minority class user u measured by Euclidean distance in feature space v The set of k nearest neighbors; from Γ(u v ) select one with u v A random node u with the same label w ; in u v and u w Choose a random point u on the straight line between k ; Therefore, the generated and evenly distributed minority class samples are obtained, namely:

[0035] x k =(1-δ)·x v +δ·x w

[0036] In the formula, x k To generate the embedded representation of the virtual node in the feature space; δ is a random variable that obeys a uniform distribution and ranges from 0 to 1; x k With x v 、x w Have the same label; x w For u v Embedding representation of random nodes with the same label;

[0037] S1.1.4, local relationship graph converter:

[0038] Use a GNN architecture that includes Transformers running on a heterogeneous information network to model influence heterogeneity and local relationship heterogeneity; use a multi-head attention mechanism to aggregate and calculate the influence between the central node and the neighbor nodes in the heterogeneous social relationship graph;

[0039] First, the central node features and neighbor node features After linear transformation, the query, key and value of the i-th attention head of the GNN layer l based on the relation r are expressed as,

[0040]

[0041] In the formula, and are learnable parameters; Q, K, and V are used as the query, key, and value of Transform, and then the attention score of the neighbor node to the central node is calculated based on the obtained Q, K, and V, that is,

[0042]

[0043] In the formula, is the importance score of the central node v with respect to the neighbor u under the determined relationship r, d k The dimension of the key vector, used to scale the result of the query-key dot product operation;

[0044] Then the attention scores of all neighbor nodes are normalized by softmax to obtain the attention weights, as shown below:

[0045]

[0046] In the formula, is the attention weight of the central node v about its neighbor u under the determined relationship r;

[0047] In this way, the attention weights of the central node and the neighboring nodes are obtained according to the relationship classification; the attention weight group reflects the relative importance of each neighboring node to the central node, while taking into account the heterogeneity of the local relationship between the central user node and the neighboring user nodes; the normalized attention weights are used to weighted sum the neighboring node user values ​​to obtain the output of the i-th attention head of the central node v, that is,

[0048]

[0049] In the formula, is the i-th attention head output of the central user node v in the l-th layer of the GNN;

[0050] The output of each attention head is then concatenated and mapped back to the original dimension through a linear transformation:

[0051]

[0052] In the formula, is the final representation of the central user node v, W (l),O is the learnable output linear transformation matrix of the lth layer, || is the column concatenation operation;

[0053] S1.1.5, node residuals:

[0054] In the cross-layer representation of user nodes, the residual connection in the graph neural network is introduced into the hidden representation of user nodes to ensure smooth representation learning, where β is a learnable parameter used to control the feature after multi-head attention transformation. With the original features Weighted ratio; after aggregation and updating, the final Twitter user graph information feature representation is extracted and recorded as Right now:

[0055]

[0056] Where β is a learnable parameter.

[0057] A further improvement of the technical solution of the present invention is that in step 1.2, the specific process is as follows: the vector representation of each user obtained by the metadata, text and graphic modality encoder is projected into two spaces respectively using a multi-channel representor:

[0058] First, each modal eigenvector is projected into a specific subspace to capture the unique features of each mode. The following encoding function is used:

[0059]

[0060] This method can effectively separate the unique information contained in each modality, so that the characteristics of each modality can be fully expressed in its unique feature space;

[0061] Next, each modal eigenvector is projected into the invariant subspace; the following encoding function is used:

[0062]

[0063] This constraint helps to eliminate the structural differences between different modal data, so that multimodal information can be better integrated and work together in a common feature space, thereby establishing a consistent feature representation between different modalities; the above formula E represents the feedforward neural layer, E s In and is a separate parameter assigned to each mode, E i Medium θ i Parameters are shared among the three modalities; enhanced with multi-channel representative features, a holistic view required for fusion is provided.

[0064] A further improvement of the technical solution of the present invention is that in step 1.3, it specifically includes: after obtaining the feature representation of each modality projected into a specific subspace and an invariant subspace, capturing the internal correlation between each representation through multi-head self-attention, and then connecting the obtained six transformed modality vectors for the Twitter robot detection task;

[0065] First, the matrix is ​​obtained by using the enhanced eigenvector representation after concatenated projection to the invariant subspace and the specific subspace:

[0066]

[0067] Then the query, key, and value for Attention calculation are obtained through linear transformation:

[0068]

[0069] Where W i Q , W i K and W i V as well as and As learnable parameters, the obtained query, key, and value are substituted into the attention module of the scaled dot product function to obtain the output of the i-th attention head:

[0070]

[0071] Secondly, the outputs of multiple self-attention heads are concatenated and linearly transformed to obtain the output of multi-head self-attention, namely:

[0072]

[0073] Where W o is a learnable parameter, represents the series connection and θ att = {W q ,W k ,W v ,W o};

[0074] Finally, the concatenated matrix The column vectors in construct a joint vector denoted as h out, and then use the task detection function to get the final label:

[0075]

[0076] A further improvement of the technical solution of the present invention is that in step 2, the following steps are specifically included:

[0077] S2.1, the optimization of the overall prediction structure of the model is performed by minimizing the following loss function:

[0078]

[0079] Where α, β, and γ are hyperparameters used to control the contribution weight of each component loss to the total loss; these component losses are responsible for achieving the desired subspace properties;

[0080] S2.2, similarity loss is used to characterize the invariant representation of the modality. Minimizing the similarity loss can narrow the gap in the shared representation of each modality. Using similarity loss in the invariant subspace helps to align cross-modal features. The central moment difference CMD metric is used to achieve this goal. Let X and Y be bounded random samples distributed with probability p and q in the interval [a, b]. Central moment difference regularizer CMD K An empirical estimate of the CMD metric is defined as:

[0081]

[0082] In the formula, is the expectation of the sample vector X, C k (X) = E((xE(X)) k ) is the k-th central moment of the sample vector X;

[0083] For the Twitter bot detection task, the CMD loss between the two modality-invariant representations is calculated:

[0084]

[0085] S2.3, difference loss, is used to characterize the specific representation between modalities. Minimizing the difference loss is to ensure that the modality-invariant and specific representations capture different aspects of the input and can effectively separate the unique information contained in each modality. The difference between the invariant space and the specific space feature representation is achieved by imposing soft orthogonality constraints on the two subspaces of each modality representation. In the Twitter users trained in the same batch, the matrix and matrix The unit L2 norm of the transformed zero mean, whose rows represent the hidden vectors of the graphical modality feature representation in the invariant subspace and the specific subspace and Then the orthogonality constraint of the modal vector pair is calculated as follows, and the other modes are transformed in the same way:

[0086]

[0087] In the formula, is the square of the Frobenius norm. In addition to the constraints between vectors in the invariant subspace and vectors in the specific subspace, orthogonal constraints between vectors in the modal specific subspace are added:

[0088]

[0089] S2.4, reconstruction loss, since the difference loss is enforced, there is still a risk of trivial representations learned by the modality-specific encoder; add a reconstruction loss to ensure that the hidden representation can capture the details of the respective modality; first use the decoder function Reconstruct vector x m Get vector Then calculate the vector x m and Mean square error loss, is the square of the Euclidean norm:

[0090]

[0091] S2.5, classification task loss. In order to train and optimize the robot detection model BotSAI, cross entropy loss is used to combat overfitting. The task loss function is expressed as:

[0092]

[0093] In the formula, U is all users in the training set, λ is a hyperparameter, θ represents all training parameters in the model, and y i represents the true label of user i, Represents the predicted label of user i by the BotSAI framework.

[0094] Due to the adoption of the above technical solution, the technical progress achieved by the present invention is:

[0095] 1. The present invention designs and optimizes a novel robot detection model BotSAI, and sets customized encoders for Twitter user metadata, text content, and social network topology to obtain a comprehensive representation of Twitter users, efficiently aggregate effective information of neighbors, increase the difference between robots and real users, and significantly improve the accuracy of Twitter robot detection tasks.

[0096] 2. The present invention is aimed at the graph encoder and solves the problem of imbalance between the number of robot accounts and real users and the inability to aggregate neighbor node information in detail.

[0097] 3. The present invention uses a multi-channel representor to map the feature vector obtained from the multimodal information encoder to a specific and invariant subspace for feature enhancement. This operation deepens the consistency of multimodal user features and accurately characterizes the characteristics of each modality, significantly enhancing the difference between Twitter robots and real users.

[0098] 4. The present invention introduces a multi-head self-attention mechanism to interactively fuse the vectors mapped to the invariant and specific subspaces, and finally performs the Twitter robot detection task through the fused vectors. BRIEF DESCRIPTION OF THE DRAWINGS

[0099] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work.

[0100] Figure 1 is a flowchart of a Twitter robot detection method based on multimodal information invariance and specific representation provided in an embodiment of the present invention;

[0101] Figure 2 It is a schematic diagram of a framework of a Twitter robot detection method based on multimodal information invariance and specific representation provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0102] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatus.

[0103] The present invention is further described in detail below with reference to the accompanying drawings and embodiments:

[0104] like Figure 1 As shown, a Twitter robot detection method based on multimodal information invariance and specific representation includes the following steps:

[0105] Step 1, constructing a robot detection model BotSAI; the robot detection model BotSAI includes multimodal information representation learning, multimodal information invariant and specific representation, and multimodal information interactive fusion;

[0106] Step 1.1, the multimodal information representation learning includes: extracting features from metadata, text content, and heterogeneous network topology information of Twitter robot users, using an improved metadata encoder, a text modality encoder, and a graphic modality encoder, respectively, to obtain a comprehensive Twitter robot user representation from different perspectives;

[0107] Specifically include:

[0108] Based on availability and simplicity, five numbers (number of followers, number of followings, number of favorites, number of active days, username length) and three categorical metadata features (username, timestamp, default profile image) are considered as metadata information of Twitter users. The tweets published by users and personal description information are selected as text content. The social network composed of social relations of Twitter users is taken as heterogeneous graph information. Innovative encoders are used for feature extraction for these three aspects of information.

[0109] The improved metadata encoder is used to obtain the feature representation of the metadata of Twitter robot users, which includes: embedding the metadata from the Twitter robot user profile as m v , followed by Z-Score normalization, and then applying two layers of MLP to learn user u v The characteristic representation of the metadata is Right now:

[0110]

[0111] An improved text modality encoder is used to obtain low-dimensional text representations of Twitter robot users, including:

[0112] Use the pre-trained model RoBERTa to encode Twitter user tweets and description information. Suppose that we will get tweets from Twitter robot user u v The features extracted from the description information are recorded as Will be from Twitter robot user u v The features extracted from the tweet information are recorded as And input them into a two-layer MLP to get user u v Low-dimensional text representation Right now:

[0113]

[0114] Where LM is the pre-trained language model encoder, t v For user u v text information, a is the ath tweet in the tweet data, b is the bth attribute in the description information, n is the total number of text contents, l a The length of the a-th input text sequence.

[0115] The improved graph modality encoder is used to obtain the graph feature information representation of Twitter robot users, which specifically includes the following steps:

[0116] S1.1.1, Building a heterogeneous information network:

[0117] In order to consider the diverse relationships existing in social networks, a heterogeneous information network is constructed to capture the complex social relationships between Twitter users. The initial features of Twitter users, i.e., the node information in the social relationship network graph, are constructed using user metadata, personal descriptions, and tweet data to obtain a comprehensive user node embedding. v The original feature attribute is represented as h v ,Right now:

[0118]

[0119] Where W D , b D All are learnable parameters; For user u v Feature representation of metadata; For user u v Low-dimensional text representation;

[0120] S1.1.2, Graph Node Oversampling:

[0121] Since there is an imbalance in the number of robot accounts and real user accounts in the dataset, the domain node features of the social graph user nodes are mapped to the feature space through a graph neural network, and oversampling is used in the feature space to generate node samples for the minority class to deal with the imbalance of the dataset.

[0122] First, 2-hop neighborhood aggregation is used, and the information aggregated by the neighborhood is expressed as q v Since there are robot accounts in Twitter social network that are hidden in the interaction with multiple real users, in order to prevent the robot accounts from being overly smoothed by 2-hop domain aggregation, h v and q v Concatenate as the embedding representation of the user node:

[0123] x v =[qv ‖h v ]

[0124] By connecting the original node information and the aggregated neighbor information in this way, the original node information is preserved and the embedding of these robot nodes is made similar to that of human nodes. v That is user node u v The embedded representation of .

[0125] S1.1.3, use the synthetic node generator to generate minority class nodes:

[0126] The number of nodes generated by the minority class can be controlled by the hyperparameter ω (oversampling scale). v , let Γ(·) denote the minority class u in the feature space measured by the Euclidean distance v The set of k nearest neighbors of Γ(u v ) select one with u v A random node u with the same label w . in u v and u w Choose a random point u on the straight line between k , where x k is the embedding of the generated virtual node in the feature space. δ is a random variable that follows a uniform distribution and ranges from 0 to 1. k With x v 、x w have the same label. Therefore, we get the generated and evenly distributed minority class samples, i.e.,

[0127] x k =(1-δ)·x v +δ·x w

[0128] S1.1.4, local relationship graph converter:

[0129] Influence heterogeneity, global relationship heterogeneity, and local relationship heterogeneity are widely present in Twitter social networks. RGT's semantic attention network examines the importance of each social relationship from a global perspective, and it assigns the same weight to different neighbors of Twitter users under the same social relationship. This method ignores the heterogeneity of influence of different neighbors of Twitter users under the same social relationship and cannot fully reflect the user's personality. Inspired by the success of Transformers in natural language processing, a local relationship graph transformer is proposed, which uses a GNN architecture containing Transformers running on a heterogeneous information network to model influence heterogeneity and local relationship heterogeneity. A multi-head attention mechanism is used to aggregate and calculate the influence between the central node and the neighbor nodes in the social relationship heterogeneous graph.

[0130] First, the central node features and neighbor node features After linear transformation, the query, key and value of the i-th attention head of the GNN layer l based on the relation r are expressed as,

[0131]

[0132] In the formula, and are learnable parameters. Q, K, and V are used as the query, key, and value of Transform. Then, the attention score of the neighboring nodes to the central node is calculated based on the obtained Q, K, and V, that is,

[0133]

[0134] In the formula, is the importance score of the central node v with respect to the neighbor u under the determined relationship r, d k The dimension of the key vector, used to scale the result of the query-key dot product operation.

[0135] Then, the attention scores of all neighbor nodes are softmax normalized to obtain the attention weights, as shown below:

[0136]

[0137] In the formula, is the attention weight of the central node v with respect to the neighbor u under the determined relationship r, thus obtaining the attention weights of the central node and the neighbor nodes classified by relationship. This attention weight group reflects the relative importance of each neighbor node to the central node, while taking into account the heterogeneity of the local relationship between the central user node and the neighbor user node.

[0138] Use the normalized attention weights to weight the user values ​​of neighboring nodes and get the output of the i-th attention head of the central node v, that is,

[0139]

[0140] In the formula, It is the i-th attention head output of the central user node v in the l-th layer of GNN.

[0141] Then, the output of each attention head is concatenated and mapped back to the original dimension through a linear transformation:

[0142]

[0143] In the formula, is the final representation of the central user node v, W(l),O is the learnable output linear transformation matrix of the lth layer, and || is the column concatenation operation.

[0144] S1.1.5, node residuals:

[0145] In the cross-layer representation of user nodes, the residual connection in the graph neural network is introduced into the hidden representation of user nodes to ensure smooth representation learning, where β is a learnable parameter used to control the feature after multi-head attention transformation. With the original features Weighted ratio. After aggregation and updating, the final graph feature information of Twitter robot users is extracted and recorded as Right now,

[0146]

[0147] Step 1.2, the invariant and specific representation of the multimodal information includes: enhancing the invariant and specific representation of the feature vectors obtained from the metadata modality, the text modality, and the graphic modality;

[0148] Specifically include:

[0149] The first representation is modality invariant, aiming to reduce the gap between modalities and capture the potential common features between modalities. That is, all multimodal information from Twitter users is mapped into a shared subspace with distribution alignment. Although these signals come from different sources, they reflect the common intentions and goals of users, which is the key to a comprehensive examination of the authenticity of Twitter users.

[0150] The second representation is modality-specific, and the robot detection model BotSAI learns modality-specific features that are private to each modality. Each modality has its own unique features, including user-specific style information. These specific details are usually not directly useful for robot detection and may be regarded as noise, however, they are extremely important for the robot detection task. For example, the expression style and personal interest tendencies of users in tweets need to be taken into account. Therefore, learning these modality-specific features complements the common latent features captured in the invariant space and provides a comprehensive multimodal representation of users.

[0151] The specific steps include:

[0152] In order to make full use of the multimodal information of Twitter users, inspired by the successful application of invariant subspace and specific subspace architectures in graphic classification and sentiment classification, a multi-channel representor is used to project the vector representation of each user obtained by the metadata, text and graphic modality encoder into two spaces respectively.

[0153] First, each modal eigenvector is projected into a specific subspace to capture the unique features of each mode. The following encoding function is used:

[0154]

[0155] This method can effectively separate the unique information contained in each modality, so that the characteristics of each modality can be fully expressed in its unique feature space.

[0156] Second, each modal eigenvector is projected into the invariant subspace. The following encoding function is used:

[0157]

[0158] This constraint helps eliminate the structural differences between different modal data, allowing multimodal information to better integrate and work together in a common feature space, thereby establishing consistent feature representations between different modalities. s In and is a separate parameter assigned to each mode, E i Medium θ i Parameters are shared among the three modalities. Enhanced by multi-channel representation features, it provides the holistic view required for fusion.

[0159] Step 1.3, the multimodal information interactive fusion includes: performing a multi-head self-attention mechanism on the enhanced feature vector representation, so that each feature vector can learn other cross-modal and cross-subspace representations; connecting the output fused feature vectors in series, and using the constructed joint vector for detection tasks and learning model parameters;

[0160] Specifically include:

[0161] After obtaining the feature representation of each modality projected into a specific subspace and an invariant subspace, the internal correlations between the representations are captured through multi-head self-attention, and then the six transformed modality vectors are connected for the Twitter robot detection task.

[0162] First, the matrix is ​​obtained by using the enhanced eigenvector representation after concatenated projection to the invariant subspace and the specific subspace:

[0163]

[0164] Then, the query, key, and value for Attention calculation are obtained through linear transformation:

[0165]

[0166] Where Wi Q , W i K and W i V as well as and is a learnable parameter;

[0167] Substitute the obtained query, key, and value into the attention module of the scaled dot product function to get the output of the i-th attention head:

[0168]

[0169] The outputs of multiple self-attention heads are concatenated and linearly transformed to obtain the output of multi-head self-attention, namely:

[0170]

[0171] Where W o is a learnable parameter, represents the series connection and θ att = {W q ,W k ,W v ,W o};

[0172] Finally, the concatenated matrix The column vectors in construct a joint vector denoted as h out , and then use the task detection function to get the final label:

[0173]

[0174] Step 2: Optimize the robot detection model BotSAI by end-to-end optimizing the parameters of the graphic encoder, the invariant modality encoder, and the specific modality encoder.

[0175] The specific steps include:

[0176] S2.1, the optimization of the overall prediction structure of the model is performed by minimizing the following loss function:

[0177]

[0178] Where α, β, and γ are hyperparameters that control the weight of each component loss to the total loss. These component losses are responsible for achieving the desired subspace properties.

[0179] S2.2, similarity loss is used to characterize the invariant representation of the modality. Minimizing the similarity loss can narrow the gap in the shared representation of each modality.

[0180] Using similarity loss in the invariant subspace helps align cross-modal features. The Central Moment Difference (CMD) metric is used to achieve this. CMD is an advanced distance metric that measures the difference between the distributions of two representations by calculating the sequential moment difference between them. The CMD distance decreases as the two distributions become more similar. Let X and Y be bounded random samples distributed on the interval [a, b] with probability p and q. Central Moment Difference Regularizer CMD K An empirical estimate of the CMD metric is defined as:

[0181]

[0182] In the formula, is the expectation of the sample vector X, C k (X) = E((xE(X)) k ) is the k-th central moment of the sample vector X. For the Twitter robot detection task, this paper calculates the CMD loss between the two modality-invariant representations:

[0183]

[0184] S2.3, difference loss, is used to characterize the specific representation between modalities. Minimizing the difference loss is to ensure that the modality-invariant and specific representations capture different aspects of the input and can effectively separate the unique information contained in each modality. The difference between the invariant space and the specific space feature representation is achieved by imposing soft orthogonality constraints on the two subspaces of each modality representation. In the Twitter users trained in the same batch, the matrix and matrix The unit L2 norm of the transformed zero mean, whose rows represent the hidden vectors of the graphical modality feature representation in the invariant subspace and the specific subspace and Then the orthogonality constraint of the modal vector pair is calculated as follows, and the other modes are transformed in the same way:

[0185]

[0186] In the formula, is the square of the Frobenius norm. In addition to the constraints between vectors in the invariant subspace and vectors in the specific subspace, this paper adds orthogonal constraints between vectors in the modal specific subspace:

[0187]

[0188] S2.4, Reconstruction Loss,Since the discrepancy loss is enforced, there is still a risk of trivial representations being learned by the modality-specific encoder.

[0189] A reconstruction loss is added to ensure that the hidden representation can capture the details of the respective modality. First, the decoder function Reconstruct vector x m Get vector Then calculate the vector x m and Mean square error loss, is the square of the Euclidean norm:

[0190]

[0191] S2.5, classification task loss, in order to train and optimize BotSAI, this paper uses cross entropy loss to combat overfitting. The task loss function can be expressed as:

[0192]

[0193] In the formula, U represents all users in the training set, λ is a hyperparameter, θ represents all training parameters in the model, and y i represents the true label of user i, Represents the predicted label of user i by the BotSAI framework.

[0194] In summary, the present invention constructs and optimizes a robot detection model BotSAI with multimodal user information encoding and multimodal information mapping to invariant and specific subspaces for interactive learning. Specifically, firstly, the user's metadata, text content and heterogeneous network topology information are feature extracted, and the redesigned metadata encoder, text encoder and graph encoder are used to obtain comprehensive Twitter user representations from different angles. Secondly, each part of the extracted features is mapped to the modality invariant subspace and the modality specific subspace respectively. Thirdly, a multi-head self-attention mechanism is performed on the enhanced feature vector representation, so that each vector can learn other cross-modal and cross-subspace representations. Through this fusion method, each representation can induce potential information from other representations, which has a synergistic effect on the overall Twitter robot detection task. Finally, the output fused feature vectors are connected in series, and the constructed joint vector is used for detection tasks and learning model parameters.

[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A Twitter robot detection method based on multimodal information invariance and specific representation, It is characterized in that The following steps are involved: Step 1: construct a robot detection model BotSAI that includes multimodal information representation learning, multimodal information invariant and specific representation, and multimodal information interactive fusion; Step 1.1, the multimodal information representation learning includes: extracting features from metadata, text content, and heterogeneous network topology information of Twitter robot users, using an improved metadata encoder, a text modality encoder, and a graphic modality encoder, respectively, to obtain a comprehensive Twitter robot user representation from different perspectives; Step 1.2, the invariant and specific representation of the multimodal information includes: enhancing the invariant and specific representation of the feature vectors obtained from the metadata modality, the text modality, and the graphic modality; Step 1.3, the multimodal information interactive fusion includes: performing a multi-head self-attention mechanism on the enhanced feature vector representation, so that each feature vector can learn other cross-modal and cross-subspace representations; connecting the output fused feature vectors in series, and using the constructed joint vector for detection tasks and learning model parameters; Step 2: Optimize the robot detection model BotSAI by end-to-end optimizing the parameters of the graphic encoder, the invariant modality encoder, and the specific modality encoder.

2. A Twitter robot detection method based on multimodal information invariance and specific representation according to claim 1, It is characterized in that In step 1.1, the metadata includes five numbers and three categorical metadata features based on usability and simplicity; the five numbers include the number of followers, the number of followers, the number of favorites, the number of active days, and the length of the username; the three categorical metadata features include the username, timestamp, and the default profile image; The text content includes tweets and personal description information posted by the selected user; The heterogeneous network topology information is a social network composed of social relationships of Twitter robot users.

3. A Twitter robot detection method based on multimodal information invariance and specific representation according to claim 1, It is characterized in that In step 1.1, an improved metadata encoder is used to obtain the feature representation of the Twitter robot user's metadata, including: Let m be the metadata embedding from the Twitter bot user profile v , followed by Z-Score normalization, and then applying two layers of MLP to learn user u v The characteristic representation of the metadata is Right now:

4. The Twitter robot detection method based on multimodal information invariance and specific representation according to claim 1, It is characterized in that In step 1.1, an improved text modality encoder is used to obtain a low-dimensional text representation of Twitter robot users, including: Use the pre-trained model RoBERTa to encode Twitter user tweets and description information. Suppose that we will get tweets from Twitter robot user u v The features extracted from the description information are recorded as Will be from Twitter robot user u v The features extracted from the tweet information are recorded as And input them into a two-layer MLP to get user u v Low-dimensional text representation Right now: Where LM is the pre-trained language model encoder, t v For user u v text information, a is the ath tweet in the tweet data, b is the bth attribute in the description information, n is the total number of text contents, l a The length of the a-th input text sequence.

5. The Twitter robot detection method based on multimodal information invariance and specific representation according to claim 1, It is characterized in that In step 1.1, an improved graph modality encoder is used to obtain the graph feature information representation of Twitter robot users, which specifically includes the following steps: S1.1.1, building a heterogeneous information network: In order to consider the diverse relationships existing in social networks, a heterogeneous information network is constructed to capture the complex social relationships between Twitter users. The initial features of Twitter users, i.e., the node information in the social relationship network graph, are constructed using user metadata, personal descriptions, and tweet data to obtain a comprehensive user node embedding. v The original feature attribute is represented as h v ,Right now: Where W D , b D All are learnable parameters; For user u v Feature representation of metadata; For user u v Low-dimensional text representation; S1.1.2, Graph Node Oversampling: Since there is an imbalance in the number of robot accounts and real user accounts in the dataset, the domain node features of the user nodes in the social graph are mapped to the feature space through a graph neural network, and oversampling is used in the feature space to generate node samples for the minority class to deal with the imbalance of the dataset; Using 2-hop neighborhood aggregation, the information aggregated by the neighborhood is represented as q v ; Since there are robot accounts hidden in the Twitter social network that interact with multiple real users, in order to prevent the robot accounts from being overly smoothed by 2-hop domain aggregation, h v and q v The connection is used as the embedding representation of the user node, that is: x v =[q v ‖h v ] In the formula, x v For user u v The embedded representation of h v For user u v The original feature attribute representation of ; By connecting the original node information and the aggregated neighbor information in this way, the original node information is preserved and the embedding of these robot users is made similar to that of human nodes. S1.1.3, use the synthetic node generator to generate minority class nodes: The number of nodes generated by the minority class can be controlled by the oversampling scale hyperparameter ω; for the minority class user u v , let Γ(·) denote the minority class user u measured by Euclidean distance in feature space v The set of k nearest neighbors; from Γ(u v ) select one with u v A random node u with the same label w ; in u v and u w Choose a random point u on the straight line between k ; Therefore, the generated and evenly distributed minority class samples are obtained, namely: x k =(1-δ)·x v +δ·x w In the formula, x k To generate the embedded representation of the virtual node in the feature space; δ is a random variable that follows a uniform distribution and ranges from 0 to 1; x k With x v 、x w Have the same label; x w For u v Embedding representation of random nodes with the same label; S1.1.4, local relationship graph converter: Use a GNN architecture that includes Transformers running on a heterogeneous information network to model influence heterogeneity and local relationship heterogeneity; use a multi-head attention mechanism to aggregate and calculate the influence between the central node and the neighbor nodes in the heterogeneous social relationship graph; First, the central node features and neighbor node features After linear transformation, the query, key and value of the i-th attention head of the GNN layer l based on the relation r are expressed as, In the formula, and are learnable parameters; Q, K, and V are used as the query, key, and value of Transform, and then the attention score of the neighbor node to the central node is calculated based on the obtained Q, K, and V, that is, In the formula, is the importance score of the central node v with respect to the neighbor u under the determined relationship r, d k The dimension of the key vector, used to scale the result of the query-key dot product operation; Then the attention scores of all neighbor nodes are normalized by softmax to obtain the attention weights, as shown below: In the formula, is the attention weight of the central node v about its neighbor u under the determined relationship r; In this way, the attention weights of the central node and the neighboring nodes are obtained according to the relationship classification; the attention weight group reflects the relative importance of each neighboring node to the central node, while taking into account the heterogeneity of the local relationship between the central user node and the neighboring user nodes; the normalized attention weights are used to weighted sum the neighboring node user values ​​to obtain the output of the i-th attention head of the central node v, that is, In the formula, is the i-th attention head output of the central user node v in the l-th layer of the GNN; The output of each attention head is then concatenated and mapped back to the original dimension through a linear transformation: In the formula, is the final representation of the central user node v, W (l),O is the learnable output linear transformation matrix of the lth layer, || is the column concatenation operation; S1.1.5, node residuals: In the cross-layer representation of user nodes, the residual connection in the graph neural network is introduced into the hidden representation of user nodes to ensure smooth representation learning, where β is a learnable parameter used to control the feature after multi-head attention transformation. With the original features Weighted ratio; after aggregation and updating, the final Twitter user graph information feature representation is extracted and recorded as Right now: Where β is a learnable parameter.

6. A Twitter robot detection method based on multimodal information invariance and specific representation according to claim 1, Features: In step 1.2, the specific process is as follows: the vector representation of each user obtained by the metadata, text and graphic modality encoders is projected into two spaces respectively using a multi-channel representor: First, each modal eigenvector is projected into a specific subspace to capture the unique features of each mode. The following encoding function is used: This method can effectively separate the unique information contained in each modality, so that the characteristics of each modality can be fully expressed in its unique feature space; Next, each modal eigenvector is projected into the invariant subspace; the following encoding function is used: This constraint helps to eliminate the structural differences between different modal data, so that multimodal information can be better integrated and work together in a common feature space, thereby establishing a consistent feature representation between different modalities; the above formula E represents the feedforward neural layer, E s In and is a separate parameter assigned to each mode, E i Medium θ i Parameters are shared among the three modalities; enhanced with multi-channel representative features, a holistic view required for fusion is provided.

7. The Twitter robot detection method based on multimodal information invariance and specific representation according to claim 1, Features: In step 1.3, it specifically includes: after obtaining the feature representation of each modality projected into a specific subspace and an invariant subspace, the internal correlation between each representation is captured through multi-head self-attention, and then the obtained six transformed modality vectors are connected for the Twitter robot detection task; First, the matrix is ​​obtained by using the enhanced eigenvector representation after concatenated projection to the invariant subspace and the specific subspace: Then the query, key, and value for Attention calculation are obtained through linear transformation: Where W i Q , W i K and W i V as well as and As learnable parameters, the obtained query, key, and value are substituted into the attention module of the scaled dot product function to obtain the output of the i-th attention head: Secondly, the outputs of multiple self-attention heads are concatenated and linearly transformed to obtain the output of multi-head self-attention, namely: Where W o is a learnable parameter, represents the series connection and θ att = {W q ,W k ,W v ,W o }; Finally, the concatenated matrix The column vectors in the construct a joint vector denoted as h out , and then use the task detection function to get the final label:

8. The Twitter robot detection method based on multimodal information invariance and specific representation according to claim 1, Features: In step 2, the following steps are specifically included: S2.1, the optimization of the overall prediction structure of the model is performed by minimizing the following loss function: Where α, β, and γ are hyperparameters used to control the contribution weight of each component loss to the total loss; these component losses are responsible for achieving the desired subspace properties; S2.2, similarity loss is used to characterize the invariant representation of the modality. Minimizing the similarity loss can narrow the gap in the shared representation of each modality. Using similarity loss in the invariant subspace helps to align cross-modal features. The central moment difference CMD metric is used to achieve this goal. Let X and Y be bounded random samples distributed with probability p and q in the interval [a, b]. Central moment difference regularizer CMD K An empirical estimate of the CMD metric is defined as: In the formula, is the expectation of the sample vector X, C k (X) = E((xE(X)) k ) is the k-th central moment of the sample vector X; For the Twitter bot detection task, the CMD loss between the two modality-invariant representations is calculated: S2.3, difference loss, is used to characterize the specific representation between modalities. Minimizing the difference loss is to ensure that the modality-invariant and specific representations capture different aspects of the input and can effectively separate the unique information contained in each modality. The difference between the invariant space and the specific space feature representation is achieved by imposing soft orthogonality constraints on the two subspaces of each modality representation. In the Twitter users trained in the same batch, the matrix and matrix The unit L2 norm of the transformed zero mean, whose rows represent the hidden vectors of the graphical modality feature representation in the invariant subspace and the specific subspace and Then the orthogonality constraint of the modal vector pair is calculated as follows, and the other modes are transformed in the same way: In the formula, is the square of the Frobenius norm. In addition to the constraints between vectors in the invariant subspace and vectors in the specific subspace, orthogonal constraints between vectors in the modal specific subspace are added: S2.4, reconstruction loss, since the difference loss is enforced, there is still a risk of trivial representations learned by the modality-specific encoder; add a reconstruction loss to ensure that the hidden representation can capture the details of the respective modality; first use the decoder function Reconstruct vector x m Get vector Then calculate the vector x m and Mean square error loss, is the square of the Euclidean norm: S2.5, classification task loss. In order to train and optimize the robot detection model BotSAI, cross entropy loss is used to combat overfitting. The task loss function is expressed as: In the formula, U is all users in the training set, λ is a hyperparameter, θ represents all training parameters in the model, and y i represents the true label of user i, Represents the predicted label of user i by the BotSAI framework.

Citation Information

Cited By

  • Information forgery detection method, computer equipment, storage medium and program product

    CN119397255A

  • Weak supervised learning-based interpretable multi-clustering method and system

    CN119740060A

  • Offshore wind turbine generator blade fault detection method based on multi-modal data and heterogeneous graph

    CN120100647A