Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism

The multi-modal sentiment analysis method through dynamic enhancement and gating mechanism solves the problems of modal information redundancy and uneven distribution in Mongolian text sentiment classification, improves the accuracy and efficiency of sentiment analysis, and achieves higher classification results.

CN118551041APending Publication Date: 2024-08-27INNER MONGOLIA UNIV OF TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311151922.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-07
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing multi-modal sentiment analysis models fail to effectively consider the uneven distribution of emotional information in different modalities, resulting in the accuracy and efficiency of sentiment classification of Mongolian texts that need to be improved, especially in low-resource language environments. Correlation between modalities is weak and redundancy may exist.

Method used

A Mongolian multi-modal sentiment analysis method based on dynamic enhancement and gating mechanisms is adopted. By extracting feature vectors of text and image modalities, and using dynamic enhancement methods to fuse cross-modal emotional context information, the redundant effects are peeled off, and the gating mechanism Select characteristic information for sentiment classification.

Benefits of technology

The accuracy of multi-modal sentiment analysis in Mongolian is improved. Through the combination of dynamic enhancement and gating mechanism, more discriminative emotional attributes and higher classification results are obtained, the redundancy of modal information is reduced, and the Model accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551041A
    Figure CN118551041A
Patent Text Reader

Abstract

The invention discloses a Mongolian multi-modal sentiment analysis method based on dynamic enhancement and a gating mechanism, and the method comprises the steps: respectively extracting the feature vectors of a text mode and an image mode from a Mongolian multi-modal sentiment analysis corpus; performing feature fusion on the feature vectors of the text modality and the image modality, and dynamically enhancing the context information of the image modality emotion by means of the text modality; and performing sentiment classification. According to the method, a dynamic enhancement method is utilized to act on a text mode and an image mode respectively, and a cross-mode emotion context coefficient is applied to processing an original single mode, so that emotion attributes with higher discrimination can be obtained; and a gating mechanism is utilized, so that the model obtains cross-modal information with stronger characteristics so as to obtain a better classification result, and finally, the model precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of artificial intelligence, relates to sentiment analysis in natural language processing, and particularly to a Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism. Background Art

[0002] Traditional unimodal data contains very little information and is emotionally ambiguous. In the absence of other modal supplements, it is difficult for the model to judge its emotional tendency. Multimodal data contains not only single modal sequence information, but also modal complementary information, so that the model can effectively use complementary information to eliminate semantic ambiguity. Multimodal sentiment analysis requires not only modeling of the text modality to obtain text representation, but also modeling of the image and speech modalities to obtain image and speech representations, and further fusion of multiple modal representations. Existing multimodal fusion representations do not take into account the uneven distribution of emotional information in different modalities, and therefore cannot be better integrated.

[0003] In particular, for Mongolian low-resource languages, there is less existing data, the correlation between modalities is weak, and there may be redundancy. All of the above means that the accuracy and efficiency of existing sentiment classification models when used for Mongolian text sentiment classification need to be improved. Summary of the invention

[0004] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism, which can consider the context of Mongolian and the mutual complementation of sentiment judgment information of various modal features, reduce the redundancy of modal information, and thus improve the accuracy of Mongolian multimodal sentiment analysis.

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

[0006] The Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism includes the following steps:

[0007] Step 1: extract feature vectors of text modality and image modality respectively for Mongolian multimodal sentiment analysis corpus;

[0008] Step 2, performing feature fusion on the feature vectors of the text modality and the image modality, and dynamically enhancing the context information of the image modality emotion with the help of the text modality;

[0009] Step 3: perform sentiment classification.

[0010] Compared with the prior art, the present invention constructs a Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism. The dynamic enhancement method is used to act on the text modality and image modality respectively, and the cross-modal sentiment context coefficient is applied to process the original single modality, which helps to obtain more discriminative sentiment attributes. Specifically, a large coefficient can highlight the influence of the sentiment attributes related to the image modality and the text, and a small coefficient attempts to strip off the influence of the redundancy of the other modality. And by using the gating mechanism, the model obtains more characteristic cross-modal information to obtain more accurate classification results, which ultimately improves the model accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a flow chart of the system implementation of the present invention.

[0012] Figure 2 This is a schematic diagram of CNN.

[0013] Figure 3 This is a schematic diagram of BiGRU. DETAILED DESCRIPTION

[0014] The embodiments of the present invention are described in detail below with reference to the accompanying drawings and examples.

[0015] The present invention provides a Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism, such as Figure 1 As shown, it mainly includes the following steps:

[0016] Step 1: Build or obtain Mongolian multimodal sentiment analysis corpus

[0017] The Mongolian multimodal sentiment analysis corpus of the present invention can adopt an existing data set, which includes data of text modality and image modality. The text modality and the image modality complement each other and jointly reflect the sentiment polarity.

[0018] The second step is to extract the unimodal feature vector.

[0019] The unimodal feature vector of the present invention is mainly a feature vector of the text modality and a feature vector of the image modality. Before extracting the feature vector, in order to extract the feature vector of the text modality, it is necessary to perform data preprocessing on the Mongolian multimodal sentiment analysis corpus, remove the symbols and link information that affect the sentiment judgment through preprocessing, use the byte pair encoding technology to perform segmentation operation on the Mongolian text, obtain the token sequence, preprocess the token sequence, and obtain the word vector.

[0020] The present invention specifically performs segmentation operation on Mongolian corpus and then generates word vectors. For example, the segmentation operation of Mongolian corpus can generally be implemented by using byte pair encoding (BPE), which is relatively mature.

[0021] For the segmented corpus, word vectors can be generated based on the GloVe model, and its objective function J(W) can be expressed as:

[0022] J(W)=f(X ij )(W i T W j -logX ij ) 2

[0023] Where W is the word vector matrix, W∈R |V|*d , |V| represents the number of words, d represents the dimension of word vector; X ij represents the number of times the jth word appears in the context of the ith word, W i represents the i-th word w i The word vector, W j represents the jth word w j The word vector of f(X ij ) is a weight term used to remove low-frequency noise, and its expression is as follows:

[0024]

[0025] Among them, X max For X i The maximum value in X i Indicates that i The number of times all words appear in the context of , α can generally be taken as 3 / 4. In the above example, sending the aforementioned Mongolian into Glove will generate a four-dimensional word vector.

[0026] Then, the pre-trained CNN can be used to generate static word embeddings of the text modality, that is, the feature vector of the text modality is represented as Where k is the length of the text and d is the dimension of the feature vector. The structure of CNN is as follows Figure 2 shown.

[0027] For the image modality, BiGRU is used to extract all candidate regions from the input image, and the 36 regions with the highest confidence are retained, which are the feature vectors of the image modality, denoted as E i ={e i1 , e i2 , ..., e i36}, in order to be consistent with the text representation, a linear transformation layer is used to transform E i Projected onto the d-dimensional vector, The structure of BiGRU is as follows Figure 3 shown.

[0028] Step 3: Perform multimodal feature fusion on the feature vectors of text modality and image modality, and dynamically enhance the contextual information of image modality emotion with the help of text modality.

[0029] In this step, the text mode is first taken as the dominant mode, and E t and E i Mapped to the same feature space, the softmax function is introduced to analyze and obtain the cross-modal emotional context coefficient. Then, taking the image modality as the dominant modality, E i and E t Mapped to the same feature space, the softmax function is introduced to analyze and obtain the cross-modal sentiment context coefficient.

[0030] Specifically, when the text mode is the dominant mode, the mapping process undergoes multiple iterations, and the formula is as follows:

[0031]

[0032]

[0033] In the first iteration, E t and E i Mapping to the cross-modal fusion space i , e t Finally, the softmax function is introduced to analyze e i , e t , get the cross-modal sentiment context information coefficient of the first iteration Among them (e i , e t ) refers to the element e of the image modality i and the text modal element e t The similarity between them. Applying the cross-modal sentiment context coefficient to process the original image modality helps to obtain more discriminative image sentiment attributes. Specifically, a large coefficient can highlight the influence of the sentiment attributes related to the image modality and the text, and a small coefficient tries to strip away the influence of the image modality redundancy.

[0034] Then, the next iteration is based on the output of the previous iteration Dynamically update the cross-modal fusion space i , e t That is to say, the output of the previous iteration is used to construct a new cross-modal fusion space e for the output of the next iteration. i-1 , e t , until the number of iterations N is reached m , thus obtaining a more compact cross-modal fusion space. For example, take N m =16.

[0035] When the image modality is the dominant modality, the mapping process undergoes multiple iterations, and the formula is as follows:

[0036]

[0037]

[0038] Similarly, in the first iteration, E t and E i Mapping to the cross-modal fusion space t , e i Finally, the softmax function is introduced to analyze e t , e i , get the cross-modal sentiment context information coefficient of the first iteration Among them (e t , e i ) refers to the element e of the text modal t and the element e of the image modal i The similarity between them. Applying the cross-modal sentiment context coefficient to process the original text modality helps to obtain more discriminative image sentiment attributes. Specifically, a large coefficient can highlight the influence of the sentiment attributes related to the image modality and the text, and a small coefficient tries to strip away the influence of the image modality redundancy.

[0039] Then, the next iteration is based on the output of the previous iteration Dynamically update the cross-modal fusion space t , e i That is to say, the output of the previous iteration is used to construct a new cross-modal fusion space e for the output of the next iteration. t-1 , e i , until the number of iterations N is reached m , thus obtaining a more compact cross-modal fusion space. Here we still take N m =16.

[0040] Step 4: In order to obtain a more accurate bimodal sentiment representation from the bimodal matrix, this step uses a gating mechanism module to select effective and concise bimodal sentiment knowledge, and its calculation expression is as follows:

[0041]

[0042]

[0043] Among them, σ is the sigmoid activation function, g s Select the gate for the dual mode, h s is the matrix after dual-modal fusion, W TM is a linear matrix.

[0044] Step 5: Perform sentiment classification.

[0045] In this step, softmax is used to transform the matrix h after bimodal fusion. s Perform sentiment classification and obtain the sentiment classification result, which is expressed as:

[0046]

[0047] where z i is the output value of the i-th node, z c is the output value of the cth node, that is, the corresponding sentiment classification label; C is the number of output nodes, that is, the number of classification categories. The Softmax function is used to convert the output values ​​of multiple classifications into a probability distribution ranging from [0, 1] and 1. The node here refers to the matrix after the above bimodal fusion as input.

[0048] In the example of the present invention, according to the concatenated matrix [[0.082, 0, 0.071, 0.018], [0.022, 0, 0.02, 0.029]], the final output is [0.132282730.119814120.130835590.12408186], which correspond to the probability distribution of the four emotional states of like, hate, sad and confused. After this experiment, it can be seen that the emotion of this sentence is finally classified as like.

Claims

1. A Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism, characterized in that: The steps include: Step 1: extract feature vectors of text modality and image modality respectively for Mongolian multimodal sentiment analysis corpus; Step 2, performing feature fusion on the feature vectors of the text modality and the image modality, and dynamically enhancing the context information of the image modality emotion with the help of the text modality; Step 3: perform sentiment classification.

2. The Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism according to claim 1 is characterized in that: In the step 1, before extracting the feature vector, data preprocessing is performed on the Mongolian multimodal sentiment analysis corpus, symbols and link information that affect sentiment judgment are removed through preprocessing, byte pair encoding technology is used to segment the Mongolian text to obtain a token sequence, and the token sequence is preprocessed to obtain a word vector.

3. The Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism according to claim 1 is characterized in that: In step 1, a pre-trained CNN is used to generate a static word embedding of the text modality, that is, a feature vector of the text modality, which is expressed as Where k is the length of the text and d is the dimension of the feature vector; Use BiGRU to extract all candidate regions from the input image and retain the 36 regions with the highest confidence, which are the feature vectors of the image modality, denoted as E i ={e i1 , e i2 ,…,e i36 }, use the linear transformation layer to transform E i Projected onto the d-dimensional vector, 4. The Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism according to claim 3 is characterized in that: In step 2, firstly, the text mode is used as the dominant mode, and E t and E i Mapped to the same feature space, the softmax function is introduced to analyze and obtain the cross-modal emotional context coefficient; then, the image modality is taken as the dominant modality and E i and E t Mapped to the same feature space, the softmax function is introduced to analyze and obtain the cross-modal sentiment context coefficient.

5. The Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism according to claim 4 is characterized in that: When the text mode is the dominant mode, the mapping process goes through multiple iterations, and the formula is as follows: In the first iteration, E t and E i Mapping to the cross-modal fusion space i ,e t Finally, the softmax function is introduced to analyze e i ,e t , get the cross-modal sentiment context information coefficient of the first iteration The next iteration is based on the output of the previous iteration Dynamically update the cross-modal fusion space i ,e t That is, the output of the previous iteration is used to construct a new cross-modal fusion space e for the output of the next iteration. i-1 ,e t , until the number of iterations N is reached m ; When the image modality is the dominant modality, the mapping process undergoes multiple iterations, and the formula is as follows: In the first iteration, E t and E i Mapping to the cross-modal fusion space t ,e i Finally, the softmax function is introduced to analyze e t ,e i , get the cross-modal sentiment context information coefficient of the first iteration The next iteration is based on the output of the previous iteration Dynamically update the cross-modal fusion space t ,e i That is, the output of the previous iteration is used to construct a new cross-modal fusion space e for the output of the next iteration. t-1 ,e i , until the number of iterations N is reached m .

6. The Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism according to claim 5 is characterized in that: In step 3, the gating mechanism module is used to select effective and concise bimodal sentiment knowledge, and its calculation expression is as follows: Among them, σ is the sigmoid activation function, g s Select the gate for the dual mode, h s is the matrix after dual-modal fusion, W TM is a linear matrix.

7. The Mongolian multimodal sentiment analysis method based on dynamic enhancement and gating mechanism according to claim 1 or 6, characterized in that: Use softmax to perform sentiment classification on the matrix after bimodal fusion to obtain the sentiment classification result, and convert the output value of the multi-classification into a probability distribution ranging from [0, 1] and 1.

Citation Information

Cited By

  • Mongolian multi-modal sentiment analysis method based on cross-modal information enhancement and fusion

    CN121524685A

  • Mongolian multi-modal sentiment analysis method based on cross-modal information enhancement and fusion

    CN121524685B