Multimodal sentiment analysis method based on multi-view bipolar similarity fusion network
Through the multi-view bipolar similarity fusion network, combined with cross-modal bipolar similarity calculation and visual-related text representation modules, the problem of over-one-sided image understanding in multi-modal emotional analysis is solved and multi-modal emotional analysis is improved. The recognition accuracy achieves a more comprehensive integration of image and text features.
Patent Information
- Application Number
- CN202410099960.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-24
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-01-24
AI Technical Summary
Existing multi-modal emotion analysis models only use a single perspective to understand images during the visual feature extraction process, resulting in an overly one-sided understanding of images and too much focus on the guiding role of entity features while ignoring the interaction between other features, affecting multi-modality Recognition accuracy of sentiment analysis.
Using a bipolar similarity fusion network based on multi-viewpoints, by building a cross-modal bipolar similarity calculation module and a visually related text representation module, object-oriented and scene-oriented image features are extracted, and combined with text features for multi-modal representation fusion , using a low-rank bilinear pooling operator model to capture feature interaction information and improve the accuracy of multi-modal features.
Achieve a more comprehensive understanding of images, improve the recognition accuracy of multi-modal sentiment analysis of images and texts, and effectively utilize the positive and non-positive correlation information between text and image modalities through the application of multi-perspective processing and attention mechanisms. , improving the performance of the model.
Smart Images

Figure CN117933265B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of multimodal sentiment analysis, and in particular to a multimodal sentiment analysis method based on a multi-perspective bipolar similarity fusion network. Background Art
[0002] In entity-level multimodal sentiment analysis, entity features play an important role. Entities act as guides in the entire feature fusion process, guiding other modal features to mine effective information. Therefore, when designing a model, more attention should be paid to the interaction between entity features and other features.
[0003] Existing models use entity guidance to generate text features and visual features. The former uses a low-rank bilinear pooling operator model to obtain guidance information, and the latter uses a transformer encoder as a guide. In addition, the visual features are filtered through a deep filter to remove the noise in the visual features.
[0004] However, in the process of visual feature extraction, existing models only understand images from one perspective, which may lead to an overly one-sided understanding of the image, and thus some images with rich content will lose some information. In addition, existing models focus on the guiding role of entity features, while neglecting the interaction between other features.
[0005] To sum up, the existing multimodal sentiment analysis has too one-sided understanding of images, which affects the recognition accuracy of multimodal sentiment analysis. It is urgent to propose a multimodal sentiment analysis method based on a multi-perspective bipolar similarity fusion network to improve the recognition accuracy of multimodal sentiment analysis. Summary of the invention
[0006] To solve the above problems, the present invention provides a multimodal sentiment analysis method based on a multi-perspective bipolar similarity fusion network, which is used to fully understand images and improve the recognition accuracy of multimodal sentiment analysis of images and texts.
[0007] In order to achieve the above object, the technical solution of the present invention is as follows: a multimodal sentiment analysis method based on a multi-perspective bipolar similarity fusion network comprises the following steps:
[0008] S1: Input the context content and entity content into the pre-trained model BERT to obtain the text context feature H c and entity feature H e ;
[0009] S2: Extract object-oriented image features H o , and scene-oriented image features H s ;
[0010] S3: Construct a cross-modal bipolar similarity calculation module, and obtain the visual feature H through the cross-modal bipolar similarity calculation module visual ;
[0011] S4: Construct a visual-related text representation module and obtain the text feature H through the visual-related text representation module text ;
[0012] S5: Construct a multimodal representation module and obtain the multimodal feature H through the multimodal representation module. final ;
[0013] S6: Use a nonlinear transformation layer and a softmax classifier to calculate the multimodal feature H final The emotional probability value is calculated as follows:
[0014] p(y|H final )=softmax(w T H finat +b)
[0015] Among them, W T and b are weight matrices and bias terms respectively, y is the sentiment label predicted by the model, and p(y|H final ) is the multimodal feature H final The sentiment probability value of the sentiment label y.
[0016] Further, extract the object-oriented image features H o , the steps are as follows:
[0017] S211: Use Faster R-CNN to extract visual features of each region;
[0018] S212: Selecting a candidate box with the highest confidence in the extracted image as a content representation of the image object;
[0019] S213: Use the average pooled convolution feature as the feature vector of the region;
[0020] S214: Use nonlinear transformation to align the image object features to the text features, which is specifically expressed as follows:
[0021] o=Faster RCNN(X)
[0022] H o =W o o
[0023] Among them, W o is a learnable parameter; thus, the object-oriented image feature H is obtained o .
[0024] Furthermore, the scene-oriented image features H are extracted s , the steps are as follows:
[0025] S221: Use the VGG model to extract visual features of each region;
[0026] S222: Selecting a candidate box with the highest confidence in the extracted image as a content representation of the image object;
[0027] S223: Use the average pooled convolution feature as the feature vector of the region;
[0028] S224: Use nonlinear transformation to transform the scene image features into the semantic space of text features, which is specifically expressed as follows:
[0029] s=VGG(X)
[0030] H S =W s s
[0031] Among them, W s is a learnable parameter; thus, the scene-oriented image feature H is obtained s .
[0032] Furthermore, the cross-modal bipolar similarity calculation module obtains the visual feature H visual , the steps are as follows:
[0033] S301: Obtain similarity matrix S∈R by calculation m*n , where m and n represent the number of scene features and text context features, respectively;
[0034] S302: Calculate the positive similarity score, perform softmax calculation on the positive similarity score to obtain the positive text context features and positive image scene features The calculation process is as follows:
[0035]
[0036]
[0037] S303: Calculate the negative similarity score, and calculate the negative text context features through the negative similarity matrix and negative image scene features The calculation process is as follows:
[0038]
[0039] Where C is an arbitrary constant;
[0040] S304: Use the fully connected layer to aggregate the positive and negative features to obtain the final bipolar context feature and bipolar scene features The calculation process is as follows:
[0041]
[0042] Among them, W c and W s All of them are learnable parameters, b c and b s are two bias terms;
[0043] S305: Bipolar scene features and image object features H o Splice to get the final visual feature H visual :
[0044]
[0045] Further, the similarity score is calculated as:
[0046] Addition calculation: S = W s tanh(H s +H c )
[0047] Or scale the dot product calculation:
[0048] Among them, W s It is a learnable parameter, d represents the number of dimensions, the i-th row in the similarity matrix S represents the similarity score between the i-th image scene feature and all text context features, and the j-th column represents the similarity score between the j-th text context feature and all image scene features.
[0049] Furthermore, the visual-related text representation module obtains the text feature H text , the steps are as follows:
[0050] S401: Take the entity feature as the query vector, the text context feature as the query vector and the content vector, calculate the attention vector through the transformer encoder, and obtain the entity-guided text context feature H ec ;
[0051] S402: Take the image object feature as the query vector, the text context feature as the query vector and the content vector, calculate the attention vector through the transformer encoder, and obtain the text context feature H guided by the image object oc ;
[0052] S403: Entity-guided text context feature Hec , image object guided text context feature H oc , entity feature H e and bipolar context features Concatenate to get the final text feature H text :
[0053]
[0054] Furthermore, the multimodal representation module obtains the multimodal feature H final , the steps are as follows:
[0055] S501: Use a low-rank bilinear pooling operator model to capture the interaction information between the final features:
[0056]
[0057] Among them, W t , W v and P T is a learnable parameter, b f is the bias term, σ is the nonlinear transformation function tan h, Represents the multiplication of corresponding elements between matrices;
[0058] S502: Splice the text features and visual features into the interactive information to obtain the final multimodal features:
[0059]
[0060] Further, a neural network model of a multimodal sentiment analysis method based on a multi-perspective bipolar similarity fusion network according to any one of claims 1 to 7 is constructed, and the neural network model is trained:
[0061] The cross entropy with L2 regularization is used as the loss function to train the model, which is specifically expressed as follows:
[0062]
[0063] in, represents the actual label of the experimental text, i represents the i-th sample of the total training samples, j is the number of sentiment categories, and the value is set to 3, corresponding to positive, negative and neutral; p is the sentiment label analyzed by the model; λ is the L2 regularization coefficient; θ represents the parameter set.
[0064] The above scheme has the following beneficial effects:
[0065] The present invention uses pre-trained BERT, Faster R-CNN and VGG pre-trained models when initializing word embedding vectors, which enable the vectors to be well initialized. Secondly, multi-perspective processing can mine more hidden and effective information from images. Then, the support of the attention mechanism allows more attention to useful information. Finally, the bipolar similarity matrix can enable the model to better utilize the positive and negative correlation information between text and image modalities. Compared with the prior art, it fully understands the image and improves the recognition accuracy of multimodal sentiment analysis of images and texts.
[0066] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] Figure 1 This is a structural schematic diagram of the MBSM-FN model of an embodiment of the multimodal sentiment analysis method based on a multi-perspective bipolar similarity fusion network of the present invention. DETAILED DESCRIPTION
[0068] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0069] The following is further described in detail through specific implementation methods:
[0070] Implementation example Figure 1 As shown: A multimodal sentiment analysis method based on a multi-perspective bipolar similarity fusion network includes the following steps:
[0071] S1: Use the BERT encoder to embed the text content, input the context content and entity content into the pre-trained model BERT, and obtain the text context feature H c and entity feature H e .
[0072] S2: Extract object-oriented image features H o , and scene-oriented image features H s .
[0073] The objects in the image can express certain emotional content, and the scenes in the image can also reflect emotions. For example, two smiling faces can express happy and positive emotional polarity to people, while gloomy weather can express repressed and negative emotional polarity to people. They reflect emotions from two perspectives: objects and scenes. Therefore, this embodiment extracts image features from two perspectives, objects and scenes, respectively, to obtain more comprehensive emotional information.
[0074] (1) Extracting object-oriented image features H o , the steps are as follows:
[0075] S211: Use Faster R-CNN to extract visual features of each region; Faster R-CNN is a typical representative of object detection models, which is trained on the Visual Genomes dataset.
[0076] S212: Selecting a candidate box with the highest confidence in the extracted image as a content representation of the image object;
[0077] S213: Use the average pooled convolution feature as the feature vector of the region;
[0078] S214: Since the image object features and the text features are not in the same semantic space, a nonlinear transformation is used to align the image object features to the text features, which is specifically expressed as follows:
[0079] o=Faster RCNN(X)
[0080] H0=W o o
[0081] Among them, W o is a learnable parameter; thus, the object-oriented image feature H is obtained o .
[0082] (2) Extracting scene-oriented image features H s , the steps are as follows:
[0083] S221: Use the VGG model to extract visual features of each region; the VGG model is a deep convolutional neural network trained on the Places 365 dataset, which contains approximately 1.8 million images of 365 scenes. The number of images in each scene ranges from 3,000 to 5,000. The images in the dataset are annotated with scene semantic categories.
[0084] The subsequent steps are similar to the object-oriented image feature extraction process:
[0085] S222: Selecting a candidate box with the highest confidence in the extracted image as a content representation of the image object;
[0086] S223: Use the average pooled convolution feature as the feature vector of the region;
[0087] S224: Use nonlinear transformation to transform the scene image features into the semantic space of text features, which is specifically expressed as follows:
[0088] s=VGG(X)
[0089] H. S W s s
[0090] Among them, W s is a learnable parameter; thus, the scene-oriented image feature H is obtained s .
[0091] S3: Construct a cross-modal bipolar similarity calculation module, and obtain the visual feature H through the cross-modal bipolar similarity calculation module visual .
[0092] Since some images and text contents are not always consistent or positively correlated, the most important information in the text may not appear in the image. For example, "In order to avoid being disturbed by my family, I plan to move out and rent a house" is paired with a picture of a person clapping and cheering. The most important information in the text part, that is, "renting a house to avoid being disturbed by my family", is not reflected in the image. If the calculation method described above is used, the image content will be largely ignored. However, this ignored information is also useful. Therefore, in addition to the positive correlation similarity calculation, it is also necessary to further calculate the negative correlation similarity on this basis.
[0093] Therefore, this embodiment constructs a cross-modal bipolar similarity calculation module, which is intended to calculate the positive and negative similarities between all features of one modality and all features of another modality. The purpose of positive similarity calculation is to find out the features that are positively correlated between different modalities, while negative similarity calculation is to calculate different or opposite information between them.
[0094] Thus, the cross-modal bipolar similarity calculation module obtains the visual feature H visual , the steps are as follows:
[0095] S301: Obtain similarity matrix S∈R by calculation m*n , where m and n represent the number of scene features and text context features, respectively;
[0096] There are two ways to calculate the similarity score:
[0097] Addition calculation: S = W s tanh(H s +Hc )
[0098] Scaled dot product calculation:
[0099] Among them, W s It is a learnable parameter, d represents the number of dimensions, the i-th row in the similarity matrix S represents the similarity score between the i-th image scene feature and all text context features, and the j-th column represents the similarity score between the j-th text context feature and all image scene features. The similarity matrix S is a positive similarity matrix, which is used to obtain the positive similarity score between the image scene feature and the text context feature.
[0100] S302: Calculate the positive similarity score, perform softmax calculation on the positive similarity score to obtain the positive text context features and positive image scene features The calculation process is as follows:
[0101]
[0102] S303: Calculate the negative similarity score. First, multiply the positive similarity matrix by a negative constant to obtain the negative similarity matrix. Then, calculate the negative text context features through the negative similarity matrix. and negative image scene features The calculation process is as follows:
[0103]
[0104] Where C is an arbitrary constant;
[0105] S304: Use the fully connected layer to aggregate the positive and negative features to obtain the final bipolar context feature and bipolar scene features The calculation process is as follows:
[0106]
[0107] Among them, W c and W s All of them are learnable parameters, b c and b s are two bias terms;
[0108] S305: Bipolar scene features and image object features H o Splice to get the final visual feature H visual :
[0109]
[0110] S4: Construct a visual-related text representation module and obtain the text feature H through the visual-related text representation module text .
[0111] The purpose of the visual-related text representation module is to generate the final high-level feature representation of the text based on the visual-related features and entity features. This feature fully learns the deep interaction information between them in the process of fusion with other features. The text content contains rich emotional information, but if all words are treated equally and paid equal attention to them, or if the importance of words is simply judged based on the distance between them and the entity words, the important emotional information contained in the text content may be ignored, and in some cases, the emotional information may even be misjudged. This will lead to a decrease in performance.
[0112] Therefore, the reasonable use of other features will determine the final performance. In entity-level sentiment analysis, since the ultimate goal is to analyze the emotional polarity of the entity, all non-entity content serves it, so it is necessary to use entity features to effectively guide text context features to mine their own effective information. At the same time, image object features cannot be ignored. Objects in images also contain rich emotional information. A happy smiling face makes people feel happy, and an injured kitten makes people feel sad. Therefore, it is also necessary to reasonably use the object features in the image.
[0113] Thus, the visual-related text representation module obtains the text feature H text , the steps are as follows:
[0114] S401: Take the entity feature as the query vector, the text context feature as the query vector and the content vector, calculate the attention vector through the transformer encoder, and obtain the entity-guided text context feature H ec ;
[0115] Specifically, first, the transformer encoder is used to assign attention weights. The entity features are used as query vectors, and the text context features are used as query vectors and content vectors. The calculation process of the i-th attention head is as follows:
[0116]
[0117] Among them, W Qi , W Ki and W Vi It is a learnable parameter.
[0118] Then, the outputs of the m attention mechanisms are aggregated through a fully connected layer, and a residual connection is used to obtain the entity-guided visual feature output. The calculation process is as follows:
[0119] SATT(H e , H c )=W ec [ATT1(H e , H c ), …, ATT m (H e , H c )] T
[0120] F(H e , H c )=FFN(LN(H e +SATT(H e , H c )))
[0121] T(H e , H c )=LN(H e +F(H e , H c ))
[0122] Among them, W ec It is a learnable parameter, LN is a normalization layer, and FFN is a feed-forward network.
[0123] Stack the transformer encoder in 2 layers and take the output of the last layer as the result to obtain the entity-guided text context feature H ec :
[0124] H ec =T ×2 (H e , H c )
[0125] S402: Take the image object feature as the query vector, the text context feature as the query vector and the content vector, calculate the attention vector through the transformer encoder, and obtain the text context feature H guided by the image object oc ; Image object guided text context feature H oc Specific acquisition method and entity-guided text context feature H ec The specific acquisition method is similar.
[0126] S403: Entity-guided text context feature H ec , image object guided text context feature H oc , entity feature H e and bipolar context features Concatenate to get the final text feature H text :
[0127]
[0128] S5: Construct a multimodal representation module and obtain the multimodal feature H through the multimodal representation module. final .
[0129] The multimodal representation module uses the obtained visual features H visual and text features H text The final multimodal features are obtained for the final sentiment classification.
[0130] Specifically, the multimodal representation module obtains the multimodal feature H final , the steps are as follows:
[0131] S501: Use a low-rank bilinear pooling operator model to capture the interaction information between the final features:
[0132]
[0133] Among them, W t , W v and P T is a learnable parameter, b f is the bias term, σ is the nonlinear transformation function tan h, Represents the multiplication of corresponding elements between matrices;
[0134] S502: In order to avoid loss of original information during the fusion process, text features and visual features are spliced into the interactive information to obtain the final multimodal features:
[0135]
[0136] S6: Use a nonlinear transformation layer and a softmax classifier to calculate the multimodal feature H final The emotional probability value is calculated as follows:
[0137] p(y|H finol )=softmax(W T H final +b)
[0138] Among them, W T and b are weight matrices and bias terms respectively, y is the sentiment label predicted by the model, and p(y|H final ) is the multimodal feature H final The sentiment probability value of the sentiment label y.
[0139] In addition, a neural network model based on the multi-modal sentiment analysis method based on the multi-view bipolar similarity fusion network is constructed to obtain a multi-view bipolar similarity matrix fusion network (MBSM-FN). The model generally consists of the following three parts:
[0140] The first component is the visual-related text representation module. This module encodes the text context and entities through BERT. Then, it guides the entity features and image object features to generate vectors with attention weights. At the same time, the text context features are bipolarly fused with the image scene features, and the obtained bipolar context features are aggregated with the vectors with attention weights to obtain the final text features. The second component is the text-related visual representation module. This module obtains image object and scene features through Faster R-CNN and VGG models respectively. Then, the image scene features and text context features are bipolarly fused to obtain bipolar scene features, which are then fused with the image object features to obtain the final visual features. The third component is the multimodal representation module. This module fuses the text features obtained from the first two components with the visual features and outputs multimodal features for sentiment classification.
[0141] Then, the loss function is used to optimize the objective function in the neural network model, which represents the difference between the model's predicted value and the actual value. The smaller the loss function, the more accurate the model's prediction and the better the model's performance. The purpose of training a neural network is to reduce the loss function.
[0142] For MBSM-FN, the cross entropy with L2 regularization is used as the loss function to train the model, which is specifically expressed as follows:
[0143]
[0144] in, represents the actual label of the experimental text, i represents the i-th sample of the total training samples, j is the number of sentiment categories, and the value is set to 3, corresponding to positive, negative and neutral; p is the sentiment label analyzed by the model; λ is the L2 regularization coefficient; θ represents the parameter set.
[0145] The experimental analysis of MBSM-FN is as follows:
[0146] (1) Experimental environment and parameter settings
[0147] The experimental environment is a 64-bit Ubuntu operating system, the graphics card uses NVIDIA's RTX 3090 and turns on GPU acceleration, the memory size is 64G, and the Intel (R) Core (TM) i5-12600KF CPU. The network model is built using the python programming language and the pytorch deep learning framework. This embodiment uses the pre-trained model BERT to initialize the word embedding vectors of the text context content and entity content, and sets the dimension of the initialized word embedding vector to 768. Each BERT model contains 12 transformer encoders. During the training process, the BERT model is fine-tuned. For the overall model, the learning rate is set to 5×10-5, the batch size is 32, and the L2 regularization loss parameter is 1×10-5. In addition, except for the pre-trained model, the parameter initialization operations for other models follow the uniform distribution of U (-0.15, 0.15). At the same time, in order to avoid overfitting, the dropout parameter value is set to 0.2. The experiment uses the Adam algorithm as the gradient descent algorithm and sets the maximum number of training cycles to 100. When the loss function value does not decrease for 10 consecutive times, the training will be terminated early.
[0148] (2) Baseline Model
[0149] In order to better demonstrate the effectiveness of the method of this embodiment in multimodal sentiment analysis, the experimental part selects some highly competitive baseline models for comparison, including unimodal models and multimodal models. In order to ensure accuracy as much as possible, all models try to use the same parameter configuration and experimental environment. In order to verify the complementarity between different modalities, the following unimodal baseline methods are selected:
[0150] Object: Object-oriented sentiment analysis method. Specifically, after obtaining the image object features, it is used for sentiment classification.
[0151] Scene: A scene-oriented sentiment analysis model. Specifically, after obtaining the image scene features, it is used for sentiment classification.
[0152] Object+Scene: A scene+object oriented sentiment analysis method.
[0153] MGAN: A high-performance sentiment analysis method. The model designs a multi-granularity attention network to integrate targets and text contexts of different granularities.
[0154] SA-ASBA: A network model whose main body is composed of attention mechanism. This model proposes a synthetic attention mechanism and uses extreme gradient boosting algorithm to improve the performance of the model.
[0155] MBSM-FN-Non-Visual: This is a cut-down version of the method proposed in this example. It removes the visual related processing flow and only leaves the text part. Specifically, the text context feature H c and entity feature H e Input into the transformer encoder, and the final output vector is used for the final classification.
[0156] At the same time, this embodiment also selects some multimodal methods. Some of these methods are variants of the unimodal baseline method for performance comparison. The descriptions of these models are as follows:
[0157] Res-MGAN-TFN: A variant model of MGAN. The text and visual features of Res-MGAN are fused using the Tensor Fusion Network (TFN), and the resulting matrix is input into the sentiment analysis subnet for final classification.
[0158] CMCN: A hierarchical fusion cross-modal complementary network model. The model is designed as a multi-layer fusion structure. At the same time, the model also uses the title features obtained by the image title generation method, and uses cosine similarity to calculate the similarity between the text and it, so as to guide the allocation of image attention weights in the future. Finally, all data are fused and classified.
[0159] ModalNet: A multimodal approach to aspect-level sentiment classification based on attention mechanism. The model deeply integrates entity and text context as well as image content through multiple layers of attention. The unimodal data is then fused and classified by fusion discriminant matrix.
[0160] CGAFT: A transformer-based multimodal sentiment analysis method. The model designs an adaptive fine-tuning network to adaptively adjust the parameters in the pre-trained model, and then fuses and classifies images and texts through transformers.
[0161] (3) Comparison of multimodal sentiment analysis models
[0162] The model MBSM-FN proposed in this embodiment is used to conduct comparative experiments with other baseline models. The experimental data sets still use TWI1 and TWI2 introduced above. In addition, the accuracy (abbreviated as Acc in the table) and F1 score (abbreviated as Mac-F1 in the table) are used to evaluate the model. The specific experimental results are shown in Table 1.
[0163] It can be observed from the table that the overall performance of the image modality is relatively low. Among them, the performance gap between object-oriented sentiment analysis and scene-oriented sentiment analysis is not large. However, combining object features and scene features for comprehensive analysis will improve performance, but the scope of improvement is still limited.
[0164] For the text modality, the MGAN model has good performance. This is because the model designs a deep structure for deeper interaction, which enables the model to learn more implicit information. At the same time, the model also applies the attention mechanism to enable the model to allocate greater attention to useful information. In addition, the SA-ASBA model further improves the performance compared with the MGAN model. The model designs a synthetic attention mechanism to learn the important parts of the text context and entities in the comments, so as to obtain well-trained vectors. In addition, the model also uses the extreme gradient boosting algorithm to improve the prediction accuracy of the model. Finally, the text sentiment analysis model MBSM-FN-Non-Visual, which lacks visual feature assistance, has a slight improvement in performance compared with the SA-ASBA model, which is mainly due to the BERT pre-trained model trained from a large amount of data and the powerful learning ability of the transformer encoder. The former enables the model to obtain well-initialized word vectors, and the latter enables entity features to guide text context features well. This method proves that entity features play an important guiding role in the learning process, and the reasonable use of entity features will bring performance improvements.
[0165] Table 1 Comparison results with the baseline model
[0166]
[0167] In addition, it can be clearly seen that the performance of multimodal methods is generally higher than that of unimodal methods, which shows that the interactivity between different modalities and the complementarity of information can bring about performance improvements.
[0168] Res-MGAN-TFN has little improvement over its base model MGAN, and is even slightly lower than MGAN in some performance scores. This is because the model simply introduces visual features and does not perform in-depth processing on them, so there is a lot of noise in the visual features, which has a certain degree of impact on the performance.
[0169] CMCN has a significant performance improvement, mainly due to its multi-layer fusion structure. The addition of title information also provides useful information for the final sentiment classification.
[0170] The CGAFT model outperforms the CMCN model because its adaptive fine-tuning network can automatically adjust the parameters of the feature extractor so that each feature generated by the feature extractor can better adapt to the current task, and this process is parallel. However, since the impact of entity features on classification tasks is not considered, the performance improvement of this model is still limited.
[0171] For the ModalNet model, this method uses a deeper attention layer to learn more deep information from text and images. Then, the fusion discriminant matrix is used to fuse the single-modal features to obtain a multi-modal feature representation, which contains the interactive information between multiple modalities. Therefore, the performance of this model is higher than all the previous models.
[0172] Finally, the model proposed in this embodiment has two variant methods, MBSM-FN (Add) and MBSM-FN (Dot), which use addition calculation and scaled dot product calculation as similarity calculation methods respectively. At the same time, in order to ensure the effectiveness of the experiment, the other components of the two variant methods are the same. From the experimental results, it can be seen that their performance in the two data sets is not much different. But overall, MBSM-FN (Dot) is slightly better than MBSM-FN (Add), indicating that the similarity calculation method has little effect on the overall performance.
[0173] In addition, the complete model proposed in this embodiment outperforms all baseline methods in all numerical aspects. This is first of all due to the use of pre-trained BERT, Faster R-CNN and VGG pre-trained models when initializing word embedding vectors, which enable the vectors to be well initialized. Secondly, multi-perspective processing can mine more hidden and effective information from images. Then, the support of the attention mechanism allows more attention to useful information. Finally, the bipolar similarity matrix enables the model to better utilize the positive and non-positive correlation information between text and image modalities. This proves the effectiveness of the complete model MBSM-FN in multimodal sentiment analysis.
[0174] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.
Claims
1. A multimodal sentiment analysis method based on a multi-view bipolar similarity fusion network, characterized in that: The steps include: S1: Input the context content and entity content into the pre-trained model BERT to obtain the text context feature H c and entity feature H e ; S2: Extract object-oriented image features H o , and scene-oriented image features H s ; S3: Construct a cross-modal bipolar similarity calculation module, and obtain the visual feature H through the cross-modal bipolar similarity calculation module visual ; S4: Construct a visual-related text representation module and obtain the text feature H through the visual-related text representation module text ; S5: Construct a multimodal representation module and obtain the multimodal feature H through the multimodal representation module. final ; S6: Use a nonlinear transformation layer and a softmax classifier to calculate the multimodal feature H final The emotional probability value is calculated as follows: p(y|H final )=softmax(W T H final +b) Among them, W T and b are weight matrices and bias terms respectively, y is the sentiment label predicted by the model, and p(y|H final ) is the multimodal feature H final The sentiment probability value of the sentiment label y.
2. The multimodal sentiment analysis method based on multi-view bipolar similarity fusion network according to claim 1 is characterized in that: Extract object-oriented image features H o , the steps are as follows: S211: Use Faster R-CNN to extract visual features of each region; S212: Selecting a candidate box with the highest confidence in the extracted image as a content representation of the image object; S213: Use the average pooled convolution feature as the feature vector of the region; S214: Use nonlinear transformation to align the image object features to the text features, which is specifically expressed as follows: o=Faster RCNN(X) A o =W o o Among them, W o is a learnable parameter; thus, the object-oriented image feature H is obtained o .
3. The multimodal sentiment analysis method based on multi-view bipolar similarity fusion network according to claim 1 is characterized in that: Extract scene-oriented image features H s , the steps are as follows: S221: Use the VGG model to extract visual features of each region; S222: Selecting a candidate box with the highest confidence in the extracted image as a content representation of the image object; S223: Use the average pooled convolution feature as the feature vector of the region; S224: Use nonlinear transformation to transform the scene image features into the semantic space of text features, which is specifically expressed as follows: s=VGG(X) H s =W s s Among them, W s is a learnable parameter; thus, the scene-oriented image feature H is obtained s .
4. The multimodal sentiment analysis method based on multi-view bipolar similarity fusion network according to claim 1 is characterized in that: The cross-modal bipolar similarity calculation module obtains the visual feature H visual , the steps are as follows: S301: Obtain similarity matrix S∈R by calculation m*n , where m and n represent the number of scene features and text context features, respectively; S302: Calculate the positive similarity score, perform softmax calculation on the positive similarity score to obtain the positive text context features and positive image scene features The calculation process is as follows: S303: Calculate the negative similarity score, and calculate the negative text context features through the negative similarity matrix and negative image scene features The calculation process is as follows: Where C is an arbitrary constant; S304: Use the fully connected layer to aggregate the positive and negative features to obtain the final bipolar context feature and bipolar scene features The calculation process is as follows: Among them, W c and W s All of them are learnable parameters, b c and b s are two bias terms; S305: Bipolar scene features and image object features H o Splice to get the final visual feature H visual :
5. The multimodal sentiment analysis method based on multi-view bipolar similarity fusion network according to claim 4 is characterized in that: The similarity score is calculated as: Addition calculation: S = W s tanh(H s +H c ) Or scale the dot product calculation: Among them, W s It is a learnable parameter, d represents the number of dimensions, the i-th row in the similarity matrix S represents the similarity score between the i-th image scene feature and all text context features, and the j-th column represents the similarity score between the j-th text context feature and all image scene features.
6. According to the multi-modal sentiment analysis method based on multi-view bipolar similarity fusion network of claim 4, the visual related text representation module obtains the text feature H text , the steps are as follows: S401: Take the entity feature as the query vector, the text context feature as the query vector and the content vector, calculate the attention vector through the transformer encoder, and obtain the entity-guided text context feature H ec ; S402: Take the image object feature as the query vector, the text context feature as the query vector and the content vector, calculate the attention vector through the transformer encoder, and obtain the text context feature H guided by the image object oc ; S403: Entity-guided text context feature H ec , image object guided text context feature H oc , entity feature H e and bipolar context features Concatenate to get the final text feature H text :
7. The multimodal sentiment analysis method based on multi-view bipolar similarity fusion network according to claim 4 is characterized in that: The multimodal representation module obtains the multimodal feature H final , the steps are as follows: S501: Use a low-rank bilinear pooling operator model to capture the interaction information between the final features: Among them, W t , W v and P T is a learnable parameter, b f is the bias term, σ is the nonlinear transformation function tan h, Represents the multiplication of corresponding elements between matrices; S502: Splice the text features and visual features into the interactive information to obtain the final multimodal features:
8. The multimodal sentiment analysis method based on a multi-view bipolar similarity fusion network according to any one of claims 1 to 7, characterized in that: Construct a neural network model of a multimodal sentiment analysis method based on a multi-view bipolar similarity fusion network as described in any one of claims 1 to 7, and train the neural network model: The cross entropy with L2 regularization is used as the loss function to train the model, which is specifically expressed as follows: in, represents the actual label of the experimental text, i represents the i-th sample of the total training samples, j is the number of sentiment categories, and the value is set to 3, corresponding to positive, negative and neutral; p is the sentiment label analyzed by the model; λ is the L2 regularization coefficient; θ represents the parameter set.
