A multi-label emoticon prediction method integrating sentiment distribution
By constructing the multi-label emoticon prediction model EIFEP, combined with the emoticon emotion distribution knowledge base and the co-occurrence pattern similarity matrix, the problem of insufficient discrimination of emoticon embedding representations in the existing technology has been solved, and the multi-label emoticon prediction model has been significantly improved. performance and accuracy.
Patent Information
- Application Number
- CN202410923927.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2044-07-11
AI Technical Summary
Existing emoticon prediction models use word embedding methods to map emoticons into a low-dimensional semantic space, which lacks direct correlation with emotions and does not consider the co-occurrence patterns of emoticons in the target data set, resulting in insufficient discrimination of emoticon embedding representations. , it is difficult to effectively improve the performance of multi-label emoticon prediction models.
Construct a multi-label emoticon prediction model EIFEP, using the pre-trained BERT model and multi-layer graph convolution network, combined with the emoticon emotion distribution knowledge base and co-occurrence pattern similarity matrix, and embedding information through the emoticon embedding attention mechanism and fully connected layer Fusion,generates high-quality emoticon embedding representations.
Effectively improves the performance of the multi-label emoticon prediction model. By considering the expression degree and co-occurrence patterns of emoticons on different emotions, it enhances the distinction and relevance of emoticon embedding representations, and improves the capture of user emotions and intentions. ability.
Smart Images

Figure CN118445628B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of emotion fusion, and in particular to a multi-label emoticon prediction method that integrates emotion distribution. Background Art
[0002] With the rise of social media, emojis, as a visual symbolic language, play an important role in emotional expression and visual enhancement, and have been widely used in people's daily communication; the emoji prediction task aims to predict the most relevant emoji for a given text; in recent years, the widespread use of emojis has been accompanied by the emergence of tens of thousands of emojis. A certain emotion can be expressed by multiple emojis with similar meanings, and an emoji can also express multiple subtle emotions at the same time; in addition, most of the early studies used single-label emoji prediction. In practical applications, users' emotions and intentions are often complex and changeable, and a single emoji is difficult to fully and accurately express the user's emotional state; therefore, predicting multi-label emojis is of great significance for capturing users' emotions and intentions.
[0003] However, most existing emoji prediction models use word embedding methods to represent emojis and map emojis into a low-dimensional semantic space. This traditional emoji embedding representation lacks direct correlation with emotions and does not consider the co-occurrence patterns of emojis in the target dataset, resulting in insufficient discriminative emotional information contained in the learned emoji embedding representation. Therefore, how to construct an effective emoji embedding representation is crucial to improving the performance of multi-label emoji prediction models. Summary of the invention
[0004] In view of the deficiencies in the prior art, the present invention provides a multi-label emoticon prediction method integrating emotion distribution, which aims to solve the problems in the background technology.
[0005] To achieve the above object, the present invention provides the following technical solution: a multi-label emoticon prediction method integrating emotion distribution, comprising the following steps:
[0006] Step S1: construct an emoji dataset, which contains a number of tweets, each of which contains at least one emoji tag symbol; divide the emoji dataset into a training set: a validation set: a test set in a ratio of 8:1:1;
[0007] Step S2: Define the emoji dataset; suppose the emoji dataset is ,in, represents the text, that is, the tweets in the emoji dataset, Emoji labels representing text, The tweets in the text or emoji dataset are represented as , No. The emoji labels of the text are represented as ;in, Indicates the first words; is the number of emoji labels;
[0008] Step S3: construct a multi-label emoji prediction model EIFEP; the multi-label emoji prediction model EIFEP consists of a text semantics module, an emoji information module and an information fusion prediction module; the text semantics module adopts a pre-trained BERT model; the emoji information module adopts a multi-layer graph convolutional network; the information fusion prediction module consists of an emoji embedding attention mechanism and a fully connected layer;
[0009] Step S4: Input into the pre-trained BERT model and output text semantic representation ;
[0010] Step S5: Extract the emotion distribution representations of 30 emoji labels corresponding to the Mu-Emoji emoji dataset from the pre-trained emoji emotion distribution knowledge base as emoji embedding representations to obtain the emoji emotion distribution representations directly associated with the target emotion; use the emoji co-occurrence matrix to obtain the joint probability similarity matrix, and then calculate the Pearson correlation coefficient between the joint probability vectors of the emojis, that is, the row vectors of the joint probability similarity matrix, to obtain the emoji co-occurrence pattern similarity matrix ; The emotional distribution representation of emojis directly associated with the target emotion and the emoji co-occurrence pattern similarity matrix The emoji information module is input separately, and a multi-layer graph convolutional network is used to fuse the emoji emotion distribution representation directly related to the target emotion and the emoji co-occurrence pattern similarity matrix , using emoji embedding representation to form an emoji embedding representation matrix, and using a multi-layer graph convolutional network to update the emoji embedding representation matrix based on the calculated emoji co-occurrence pattern similarity matrix;
[0011] Step S6: Represent text semantically The emoticon embedding representation is input into the information fusion prediction module, and the emoticon embedding attention mechanism is used to represent the text semantics. It interacts with the emoji embedding representation to obtain the emoji vector representation based on the text semantic representation connection, and finally combines the emoji vector representation with the text semantic representation to achieve multi-label emoji prediction.
[0012] Furthermore, the pre-trained emoji emotion distribution knowledge base is obtained by performing emotion prediction tasks on the SemEval2018 dataset through the pre-trained BERT model to obtain soft labels, and the soft labels are used to construct an emotion distribution representation of 203 emojis directly related to the target emotions. The soft labels are the predicted probability distribution of each text in the SemEval2018 dataset; wherein, the emoji emotion distribution representation is an 11-dimensional vector, which respectively represents the expression degree of anger, expectation, disgust, fear, happiness, love, positivity, negativity, sadness, surprise and trust.
[0013] Furthermore, the specific process of step S5 is: modeling the co-occurrence rule of emoticons in the form of joint probability, that is, To indicate the emoticons and emoticons The probability of co-occurrence; the co-occurrence matrix of emojis is obtained by counting the number of co-occurrences of emoji pairs in the statistical data set , and The co-occurrence times of , represents a set of real numbers; the joint probability similarity matrix obtained by using the emoticon co-occurrence matrix is expressed as:
[0014] ;
[0015] In the formula, represents the number of tweets in the training set, express and Probability of co-occurrence;
[0016] The Pearson correlation coefficient is calculated between the joint probability vectors of the emoticons, that is, the row vectors of the joint probability similarity matrix, to obtain the emoticon co-occurrence pattern similarity matrix , expressed as:
[0017] ;
[0018] In the formula, express and The similarity of co-occurrence patterns between them; Indicates the range of categories of emoji labels; represents the joint probability similarity matrix Line The value of the column; represents the joint probability similarity matrix The average value of the row; represents the joint probability similarity matrix Line The value of the column; represents the joint probability similarity matrix The average value of the row;
[0019] The emotional distribution representation of emojis directly associated with the target emotion is used as the emoji embedding representation, and the emoji embedding representation is used to form an emoji embedding representation matrix. According to the calculated emoji co-occurrence pattern similarity matrix, a multi-layer graph convolutional network is used to embed the emoji representation matrix Updated to ,in, Represents the first layer of a multi-layer graph convolutional network layer; Represents the multi-layer graph convolutional network The emoji embedding representation dimension of the layer output; Represents the multi-layer graph convolutional network The emoji embedding representation dimension of the layer output; the specific process is expressed as:
[0020] ;
[0021] In the formula, Represents the mapping relationship learned by a multi-layer graph convolutional network.
[0022] Furthermore, the It is expressed as:
[0023] ;
[0024] In the formula, It is a multi-layer graph convolutional network. The weight matrix of the layer, is the normalized emoji co-occurrence pattern similarity matrix , Represents a nonlinear operation, using the LeakyReLU function.
[0025] Furthermore, the specific process of step S6 is: interacting the emoticon embedding representation matrix with the text semantic representation to obtain the emoticon embedding representation based on the text semantic representation connection, specifically:
[0026] Representing text semantically As the query Query of the emoji embedding attention mechanism, the emoji embedding representation matrix As the key Key and value Value; query Query, key Key and value Value are respectively combined with the three parameter matrices to be trained , , Dot product to get the query vector , key matrix and the value matrix :
[0027] ;
[0028] Will and Perform inner product operation and use softmax activation function for normalization to get the attention score corresponding to each emoji embedding representation. Perform inner product operations to obtain emoji embedding representations based on text semantic representation connections , expressed as:
[0029] ;
[0030] In the formula, is the dimension of the vector; Represents the key matrix The transpose of
[0031] Embedding emojis based on text semantic representation Semantic representation of text Splicing to get information fusion representation ; Make predictions through the fully connected layer and use the sigmoid activation function to output the prediction results ;
[0032] ;
[0033] ;
[0034] In the formula, Represents a trainable weight parameter matrix The transpose of
[0035] Finally, the binary cross entropy loss function is used to calculate the loss of multi-label classification :
[0036] ;
[0037] In the formula, is the true label value, is the predicted probability value.
[0038] Furthermore, the specific process of step S4 is: using the word vector encoding layer of the pre-trained BERT model to Each word in is converted into a word vector, and we get The embedding The embedding of is output by the encoder of the pre-trained BERT model The hidden state representation of The hidden state representation of contains special tags [CLS], special tags [MASK], special tags [SEP], special tags [CLS] contains The text semantic information is specially marked [ CLS] The hidden state of As the output of the text semantics module, that is, the text semantic representation , expressed as:
[0039] H i = δ bert { CLS + X i +[ SEP ]} ;
[0040] In the formula, Represents the semantic representation of the i-th text; Represents the encoder of the pre-trained BERT model.
[0041] Furthermore, the specific process of step S1 is: the Mu-Emoji dataset is processed to obtain an emoticon dataset; the process of processing the Mu-Emoji dataset is:
[0042] Replace the web links and email addresses in tweets with " <url> ”、" <email>" in the form of;
[0043] Remove line breaks and stop words from tweets;
[0044] Expand and annotate tweets’ emoji tags;
[0045] Recover and annotate extended words in tweets;
[0046] Discard and annotate repeated punctuation in tweets;
[0047] Replace the facial expressions in tweets with corresponding emotional words;
[0048] Perform part-of-speech restoration, expand abbreviations, and convert to lowercase for all English words in tweets;
[0049] Tweets with less than 5 minimum semantic unit tokens are discarded; the minimum semantic unit tokens include a word, a phrase, a punctuation mark, and a character.
[0050] Furthermore, before the multi-label emoji prediction model EIFEP processes the text, it is first trained; specifically, the multi-label emoji prediction model EIFEP is trained in an unsupervised manner for 32 epochs using the training set, the learning rate is set to 1e-3, the multi-label emoji prediction model EIFEP is optimized using the Adam optimizer, and an early stopping strategy is adopted, and the tolerance is set to 4 rounds; after all the training is completed, the parameters of the optimal multi-label emoji prediction model EIFEP are saved, and finally the multi-label emoji prediction model EIFEP with the optimal parameters is predicted and evaluated on the test set.
[0051] Furthermore, in step S3, the text semantics module and the emoticon information module are in a parallel structure, and the outputs of the text semantics module and the emoticon information module interact in the information fusion prediction module.
[0052] Compared with the existing technology, the present invention has the following beneficial effects:
[0053] (1) The present invention extracts the embedded representation of emoticons based on the emoticon emotion distribution knowledge base, taking into account the degree of expression of emoticons in different emotions, and effectively solves the problem of insufficient discriminative emotional information contained in the embedded representation of emoticons.
[0054] (2) The present invention constructs an emoticon co-occurrence pattern similarity matrix in a data-driven manner and defines the correlation between labels through the co-occurrence patterns of emoticons in the target dataset, which is conducive to strengthening the correlation between the emoticon emotion distribution representation and the target dataset.
[0055] (3) The present invention adopts a multi-layer graph convolutional network to fuse the emotional distribution and co-occurrence pattern information of emojis, and designs an emoji representation with enhanced emoji correlation information in the target dataset, which effectively improves the performance of the multi-label emoji prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 It is a schematic diagram of the structure of the multi-label emoticon prediction model EIFEP of the present invention.
[0057] Figure 2 A flow chart is constructed for the pre-trained emoticon emotion distribution knowledge base of the present invention. DETAILED DESCRIPTION
[0058] The present invention provides a technical solution: a multi-label emoticon prediction method integrating emotion distribution, comprising the following steps:
[0059] Step S1: Construct an emoji dataset, which contains several tweets, and each tweet contains at least one emoji tag symbol.
[0060] The specific process of step S1 is as follows: the Mu-Emoji dataset is processed to obtain an emoji dataset; the Mu-Emoji dataset contains 583,048 tweets and 30 emoji tags; each tweet contains at least one emoji tag, there are 455,537 tweets with multiple emoji tags, and there are 127,511 tweets with a single emoji tag; the process of processing the Mu-Emoji dataset is as follows:
[0061] 1. Replace the web links, email addresses, etc. in the tweets with " <url> ”、" <email>" in the form of;
[0062] 2. Remove line breaks and stop words from tweets;
[0063] 3. Expand and annotate the emoji tags in the tweet, for example, convert "#ilikedogs" to " <hashtag> I like dogs< / hashtag> ”;
[0064] 4. Recover and annotate extended words in tweets, such as converting "suuuucks" to "sucks <elongated>”;
[0065] 5. Discard and mark repeated punctuation marks in tweets, for example, mark "!!!" as "! <repeated>”;
[0066] 6. Replace the facial expressions in the tweets with corresponding emotional words, for example, replace " "Convert to" <happy>”;
[0067] 7. Perform part-of-speech restoration, expand abbreviations, and convert to lowercase for all English words in the tweets;
[0068] 8. Discard tweets with less than 5 minimum semantic units (tokens); the minimum semantic unit (token) can usually be a word, a phrase, a punctuation mark, a character, etc. in a tweet; only keep tweets with a minimum number of tokens greater than or equal to 5, and discard tweets with a minimum number of tokens less than 5. The purpose of this approach is to filter out tweets that are too short or meaningless, thereby improving data quality.
[0069] After processing, 526,993 tweets were retained, and the emoji dataset was divided into training set: validation set: test set in a ratio of 8:1:1 using the Iterative Stratification method.
[0070] Step S2: Define the emoji dataset; suppose the emoji dataset is ,in, represents the text, that is, the tweets in the emoji dataset, Emoji labels representing text, A text (a tweet in the emoji dataset) is represented as , No. The emoji labels of the text are represented as ;in, Indicates the first words; is the number of emoji labels; for each ,predict One or more emojis in .
[0071] Step S3: Figure 1 As shown, a multi-label emoji prediction model EIFEP is constructed; the multi-label emoji prediction model EIFEP consists of a text semantics module, an emoji information module and an information fusion prediction module, wherein the text semantics module and the emoji information module are in parallel structure, and the outputs of the text semantics module and the emoji information module interact in the information fusion prediction module; the text semantics module adopts a pre-trained BERT model; the emoji information module adopts a multi-layer graph convolutional network; the information fusion prediction module consists of an emoji embedding attention mechanism and a fully connected layer.
[0072] Step S4: Input into the pre-trained BERT model, and use the word vector encoding layer of the pre-trained BERT model to Each word in is converted into a word vector, and we get The embedding of The embedding of is output by the encoder of the pre-trained BERT model The hidden state representation of The hidden state representation includes special tags [CLS], special tags [MASK], special tags [SEP], and special tags [CLS] includes the entire The text semantic information, so the special mark [ CLS] The hidden state of As the output of the text semantics module, that is, the text semantic representation ; can be expressed as:
[0073] H i = δ bert { CLS + X i +[ SEP ]} (1);
[0074] In the formula, Represents the semantic representation of the i-th text; Represents the encoder of the pre-trained BERT model;
[0075] Step S5: Extract the emotion distribution representations of 30 emoji labels corresponding to the Mu-Emoji emoji dataset from the pre-trained emoji emotion distribution knowledge base as emoji embedding representations to obtain the emoji emotion distribution representations directly associated with the target emotion; use the emoji co-occurrence matrix to obtain the joint probability similarity matrix, and then calculate the Pearson correlation coefficient between the joint probability vectors of the emojis (row vectors of the joint probability similarity matrix) to obtain the emoji co-occurrence pattern similarity matrix ; The emotional distribution representation of emojis directly associated with the target emotion and the emoji co-occurrence pattern similarity matrix The emoji information module is input separately, and a multi-layer graph convolutional network is used to fuse the emoji emotion distribution representation directly related to the target emotion and the emoji co-occurrence pattern similarity matrix. , the emoji embedding representation is used to form an emoji embedding representation matrix. According to the calculated emoji co-occurrence pattern similarity matrix, a multi-layer graph convolutional network is used to update the emoji embedding representation matrix to enhance the emoji embedding representation and capture the correlation between emojis.
[0076] like Figure 2 As shown in the figure, the pre-trained emoji emotion distribution knowledge base is obtained by performing emotion prediction tasks on the SemEval2018 dataset through the pre-trained BERT model to obtain soft labels, and the soft labels are used to construct the emotion distribution representation of 203 emojis directly related to the target emotion. The soft labels are the predicted probability distribution of each text in the SemEval2018 dataset; among them, the emoji emotion distribution representation is an 11-dimensional vector, which respectively represents the expression degree of anger, expectation, disgust, fear, joy, love, optimism, pessimism, sadness, surprise and trust.
[0077] In order to capture the correlation between emoticons, the co-occurrence pattern of emoticons is firstly modeled in the form of joint probability, that is, To express the emoticons and emoticons The probability of co-occurrence is obtained by counting the number of co-occurrences of emoji pairs in the statistical data set to obtain the emoji co-occurrence matrix , and The co-occurrence times of , represents a set of real numbers, and the emoticon co-occurrence matrix is used to obtain the joint probability similarity matrix, as shown in formula (2):
[0078] (2);
[0079] In the formula, represents the number of tweets in the training set, express and The probability of co-occurrence.
[0080] However, the joint probability similarity matrix may have two limitations. On the one hand, due to the imbalance of dataset labels, the joint probability is difficult to accurately capture the relationship between rare and common labels. On the other hand, the range of the joint probability correlation matrix is [0,1], which can only express the positive correlation and irrelevance between emoticons, but cannot effectively reveal the relationship between happiness and sadness. and sad The relationship is completely opposite (i.e. negative correlation) in terms of emotional expression.
[0081] In order to overcome the limitations of the joint probability similarity matrix, the present invention calculates the Pearson correlation coefficient between the joint probability vectors of the emoticons (the row vectors of the joint probability similarity matrix) and obtains the emoticon co-occurrence pattern similarity matrix , calculated as shown in formula (3):
[0082] (3);
[0083] In the formula, express and The similarity of the co-occurrence patterns between them. The larger the value, the more common the combination of the two is or they can replace each other. When the value is negative, it means that the two are negatively correlated and will not replace each other or appear at the same time in most cases. The range of the number of categories of emoji labels is [1, C], where is 30; Represents the value of the i-th row and k-th column in the joint probability similarity matrix, specifically the emoji and The probability of emoticons appearing together; represents the joint probability similarity matrix The average value of the row, specifically the average probability of the i-th emoji co-occurring with all other emojis; Represents the value of the jth row and kth column in the joint probability similarity matrix, specifically the emoji and The probability of emoticons appearing together; represents the average value of the jth row in the joint probability similarity matrix, specifically the The average probability of an emoji co-occurring with all other emojis.
[0084] The emotional distribution representation of emojis directly associated with the target emotion is used as the emoji embedding representation, and the emoji embedding representation is used to form an emoji embedding representation matrix. According to the calculated emoji co-occurrence pattern similarity matrix, a multi-layer graph convolutional network is used to embed the emoji representation matrix (composed of 30 emoji embedding representations (dimension d)) Updated to ,in, Represents the first layer of a multi-layer graph convolutional network layer; Represents the multi-layer graph convolutional network The emoji embedding representation dimension of the layer output; Represents the multi-layer graph convolutional network The emoji embedding representation dimension of the layer output; the specific process is shown in formula (4):
[0085] (4);
[0086] In the formula, Represents the mapping relationship learned by the multi-layer graph convolutional network, which is specifically expanded as shown in formula (5);
[0087] Specifically, It can be expressed as:
[0088] (5);
[0089] In the formula, It is a multi-layer graph convolutional network. The weight matrix of the layer, is the normalized emoji co-occurrence pattern similarity matrix , Represents a nonlinear operation, using LeakyReLU.
[0090] Step S6: Represent text semantically and the emoji embedding representation matrix Input into the information fusion prediction module, and use the emoticon embedding attention mechanism to represent the text semantics and the emoji embedding representation matrix The two methods interact to obtain emoji vector representation based on the text semantic representation, and finally combine the emoji vector representation with the text semantic representation to achieve multi-label emoji prediction.
[0091] In order to further strengthen the semantic connection between emoji tags, the emoji embedding representation matrix is interacted with the text semantic representation to capture the unique meaning of emojis in tweets, thereby obtaining the emoji embedding representation based on the text semantic representation connection;
[0092] Representing text semantically As the query of the emoji embedding attention mechanism, the emoji embedding representation matrix As the key and value, the query, key and value are respectively associated with the three parameter matrices to be trained , , Dot product to get the query vector , key matrix and the value matrix :
[0093] (6);
[0094] Will and Perform inner product operation and use softmax activation function for normalization to get the attention score corresponding to each emoji embedding representation. Perform inner product operations to obtain emoji embedding representations based on text semantic representation connections , expressed as:
[0095] (7);
[0096] In the formula, is the dimension of the vector, The main purpose is to prevent the inner product value from increasing as the dimension of the vector increases, thereby stabilizing the gradient; Represents the key matrix The transpose of .
[0097] Embedding emojis based on text semantic representation Semantic representation of text Splicing to get information fusion representation , predict through the fully connected layer, and use the sigmoid activation function to output the prediction result ;
[0098] (8);
[0099] (9);
[0100] In the formula, Represents a trainable weight parameter matrix The transpose of
[0101] Finally, the binary cross entropy loss function is used to calculate the loss of multi-label classification :
[0102] (10);
[0103] In the formula, is the true label value, is the predicted probability value.
[0104] Among them, the multi-label emoji prediction model EIFEP needs to be trained before processing text; specifically, the multi-label emoji prediction model EIFEP is trained in an unsupervised manner for 32 epochs using the training set, and the learning rate is set to 1e-3. The multi-label emoji prediction model EIFEP is optimized using the Adam optimizer, and the early stopping strategy is adopted, and the early stopping patience is set to 4 to avoid overfitting; after all the training is completed, the parameters of the optimal multi-label emoji prediction model EIFEP are saved, and finally the multi-label emoji prediction model EIFEP with the optimal parameters is predicted and evaluated on the test set.
[0105] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.< / happy> < / repeated> < / elongated> < / email> < / url> < / email> < / url>
Claims
1. A multi-label emoticon prediction method integrating emotion distribution, characterized in that: The steps include: Step S1: construct an emoji dataset, which contains a number of tweets, each of which contains at least one emoji tag symbol; divide the emoji dataset into a training set: a validation set: a test set in a ratio of 8:1:1; Step S2: Define the emoji dataset; suppose the emoji dataset is ,in, represents the text, that is, the tweets in the emoji dataset, Emoji labels representing text, The tweets in the text or emoji dataset are represented as , No. The emoji labels of the text are represented as ;in, Indicates the first words; is the number of emoji labels; Step S3: construct a multi-label emoji prediction model EIFEP; the multi-label emoji prediction model EIFEP consists of a text semantics module, an emoji information module and an information fusion prediction module; the text semantics module adopts a pre-trained BERT model; the emoji information module adopts a multi-layer graph convolutional network; the information fusion prediction module consists of an emoji embedding attention mechanism and a fully connected layer; Step S4: Input into the pre-trained BERT model and output text semantic representation ; Step S5: Extract the emotion distribution representations of 30 emoji labels corresponding to the Mu-Emoji emoji dataset from the pre-trained emoji emotion distribution knowledge base as emoji embedding representations to obtain the emoji emotion distribution representations directly associated with the target emotion; use the emoji co-occurrence matrix to obtain the joint probability similarity matrix, and then calculate the Pearson correlation coefficient between the joint probability vectors of the emojis, that is, the row vectors of the joint probability similarity matrix, to obtain the emoji co-occurrence pattern similarity matrix ; The emotional distribution representation of emojis directly associated with the target emotion and the emoji co-occurrence pattern similarity matrix The emoji information module is input separately, and a multi-layer graph convolutional network is used to fuse the emoji emotion distribution representation directly related to the target emotion and the emoji co-occurrence pattern similarity matrix. , using emoji embedding representation to form an emoji embedding representation matrix, and using a multi-layer graph convolutional network to update the emoji embedding representation matrix based on the calculated emoji co-occurrence pattern similarity matrix; Step S6: Represent text semantically The emoticon embedding representation is input into the information fusion prediction module, and the emoticon embedding attention mechanism is used to represent the text semantics. Interact with the emoji embedding representation to obtain an emoji vector representation based on the text semantic representation. Finally, the emoji vector representation is combined with the text semantic representation to achieve multi-label emoji prediction. The specific process of step S5 is: modeling the co-occurrence pattern of emoticons in the form of joint probability, that is, To express the emoticons and emoticons The probability of co-occurrence; the co-occurrence matrix of emojis is obtained by counting the number of co-occurrences of emoji pairs in the statistical data set , and The co-occurrence times of , represents a set of real numbers; the joint probability similarity matrix obtained by using the emoticon co-occurrence matrix is expressed as: ; In the formula, represents the number of tweets in the training set, express and Probability of co-occurrence; The Pearson correlation coefficient is calculated between the joint probability vectors of the emoticons, that is, the row vectors of the joint probability similarity matrix, to obtain the emoticon co-occurrence pattern similarity matrix , expressed as: ; In the formula, express and The similarity of co-occurrence patterns between them; Indicates the range of categories of emoji labels; represents the joint probability similarity matrix Line The value of the column; represents the joint probability similarity matrix The average value of the row; represents the joint probability similarity matrix Line The value of the column; represents the joint probability similarity matrix The average value of the row; The emotional distribution representation of emojis directly associated with the target emotion is used as the emoji embedding representation, and the emoji embedding representation is used to form an emoji embedding representation matrix. According to the calculated emoji co-occurrence pattern similarity matrix, a multi-layer graph convolutional network is used to embed the emoji representation matrix Updated to ,in, Represents the first layer of a multi-layer graph convolutional network layer; Represents the multi-layer graph convolutional network The emoji embedding representation dimension of the layer output; Represents the multi-layer graph convolutional network The emoji embedding representation dimension of the layer output; the specific process is expressed as: ; In the formula, Represents the mapping relationship learned by the multi-layer graph convolutional network; Said It is expressed as: ; In the formula, It is a multi-layer graph convolutional network. The weight matrix of the layer, is the normalized emoji co-occurrence pattern similarity matrix , Represents a nonlinear operation, using the LeakyReLU function.
2. The multi-label emoticon prediction method integrating emotion distribution according to claim 1, characterized in that: The pre-trained emoji emotion distribution knowledge base is obtained by performing emotion prediction tasks on the SemEval2018 dataset through the pre-trained BERT model to obtain soft labels, and the soft labels are used to construct 203 emoji emotion distribution representations directly associated with the target emotions. The soft labels are the predicted probability distribution of each text in the SemEval2018 dataset; wherein, the emoji emotion distribution representation is an 11-dimensional vector, which respectively represents the expression degree of anger, expectation, disgust, fear, happiness, love, positivity, negativity, sadness, surprise and trust.
3. The multi-label emoticon prediction method integrating emotion distribution according to claim 2, characterized in that: The specific process of step S6 is: interacting the emoticon embedding representation matrix with the text semantic representation to obtain the emoticon embedding representation based on the text semantic representation connection, specifically: Representing text semantically As the query Query of the emoji embedding attention mechanism, the emoji embedding representation matrix As the key Key and value Value; query Query, key Key and value Value are respectively combined with the three parameter matrices to be trained , , Dot product to get the query vector , key matrix and the value matrix : ; Will and Perform inner product operation and use softmax activation function for normalization to get the attention score corresponding to each emoji embedding representation. Perform inner product operations to obtain emoji embedding representations based on text semantic representation connections , expressed as: ; In the formula, is the dimension of the vector; Represents the key matrix The transpose of Embedding emojis based on text semantic representation Semantic representation of text Splicing to get information fusion representation ; Make predictions through the fully connected layer and use the sigmoid activation function to output the prediction results ; ; ; In the formula, Represents a trainable weight parameter matrix The transpose of Finally, the binary cross entropy loss function is used to calculate the loss of multi-label classification : ; In the formula, is the true label value, is the predicted probability value.
4. The multi-label emoticon prediction method integrating emotion distribution according to claim 3 is characterized in that: The specific process of step S4 is: use the word vector encoding layer of the pre-trained BERT model to Each word in is converted into a word vector, and we get The embedding The embedding of is output by the encoder of the pre-trained BERT model The hidden state representation of The hidden state representation of contains special tags [CLS], special tags [MASK], special tags [SEP], special tags [CLS] contains The text semantic information will be specially marked The hidden state As the output of the text semantics module, that is, the text semantic representation , expressed as: ; In the formula, Represents the semantic representation of the i-th text; Represents the encoder of the pre-trained BERT model.
5. The multi-label emoticon prediction method integrating emotion distribution according to claim 4 is characterized in that: The specific process of step S1 is: after processing the Mu-Emoji dataset, an emoji dataset is obtained; the process of processing the Mu-Emoji dataset is: Replace web links and email addresses in tweets with " <url> ”、" <email> " in the form of;< / email> < / url> Remove line breaks and stop words from tweets; Expand and annotate emoji tags in tweets; Recover and annotate extended words in tweets; Repeated punctuation marks in tweets were discarded and annotated; Replace the facial expressions in tweets with corresponding emotional words; Perform part-of-speech restoration, expand abbreviations, and convert to lowercase for all English words in tweets; Tweets with less than 5 minimum semantic unit tokens are discarded; the minimum semantic unit tokens include a word, a phrase, a punctuation mark, and a character.
6. The multi-label emoticon prediction method integrating emotion distribution according to claim 5, characterized in that: Before the multi-label emoji prediction model EIFEP processes the text, it is first trained; specifically, the multi-label emoji prediction model EIFEP is trained in an unsupervised manner for 32 epochs using the training set, and the learning rate is set to 1e-3. The multi-label emoji prediction model EIFEP is optimized using the Adam optimizer, and an early stopping strategy is adopted, and the tolerance is set to 4 rounds; after all the training is completed, the parameters of the optimal multi-label emoji prediction model EIFEP are saved, and finally, the multi-label emoji prediction model EIFEP with the optimal parameters is predicted and evaluated on the test set.
7. The multi-label emoticon prediction method integrating emotion distribution according to claim 6 is characterized in that: In step S3, the text semantics module and the emoticon information module are in a parallel structure, and the outputs of the text semantics module and the emoticon information module interact in the information fusion prediction module.
