Multi-mode sentiment analysis method based on multi-view interactive learning

Through the multi-perspective interactive learning method, multi-modal features are extracted and fused, which solves the problems of insufficient feature accuracy and inconsistent emotional polarity in existing multi-modal sentiment analysis, improves the accuracy and efficiency of sentiment analysis, and realizes text and complementary learning of image features.

CN118568253APending Publication Date: 2024-08-30HOHAI UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410263179.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the existing multi-modal emotion analysis technology, the accuracy of the model in extracting different modal features is insufficient, which leads to deviations in emotional features and affects the overall emotional judgment. Moreover, single-granularity characteristics are not enough to express the information in multi-modal data, resulting in emotional polarity. Inconsistent.

Method used

Using a method based on multi-view interactive learning, through single-modal feature learning, interactive learning of image and text features and feature fusion, using technologies such as memory networks and multi-layer perceptrons, text and visual features of different scales are extracted, and through the attention mechanism Establish interactive relationships between image and text features and conduct in-depth fusion to improve the accuracy of multi-modal sentiment analysis.

Benefits of technology

It improves the detection accuracy and efficiency of multi-modal sentiment analysis, reduces model complexity and deployment costs, can better capture local and non-local features, realizes complementary learning of text and image features, and improves the accuracy and efficiency of sentiment analysis. richness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568253A
    Figure CN118568253A
Patent Text Reader

Abstract

The invention discloses a multi-modal sentiment analysis method based on multi-view interactive learning, which is based on a multi-view attention network, utilizes a continuously updated memory network to obtain deep semantic features of texts and images, realizes cross-modal interaction and considers mutual enhancement between text features and image features. Various beneficial features for multi-modal sentiment analysis are captured by observing the image from multiple views. Comprising the following steps: (1) single-mode feature learning: extracting text features of different scales and visual features of multiple visual angles; (2) an interactive learning stage: carrying out interactive modeling on a cross-view dependency relationship between the image and the text by adopting an image-text interactive learning mechanism and utilizing an interactive learning mechanism of a memory network; and (3) a feature fusion stage: connecting the learned features, and performing deep fusion on the plurality of features by using a multi-layer sensor and a stack pool module. According to the method, cross-modal interaction is fully utilized, mutual enhancement between the text and the image is considered, and higher classification precision is obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a multimodal sentiment analysis method based on multi-view interactive learning, and belongs to the field of social networks. Background Art

[0002] With the continuous development of mobile Internet technology, social media has gradually become the main platform for the public to share opinions and express emotions. Analyzing the multimodal information contained in social platforms can help people understand different people's opinions and emotions on different things in a timely manner, and then help make correct decisions. Most previous studies have analyzed the emotions of a single modality, such as images or text. However, single-modal information is prone to information loss and interference from other factors. Image data and text data are complementary to a certain extent, so sentiment analysis based on the fusion of image and text modalities has gradually become a hot topic in current research. Multimodal sentiment analysis aims to determine people's emotional polarity on related topics from multimodal data such as text and images, and can be used in product marketing, public opinion monitoring, stock forecasting, and healthcare.

[0003] With the continuous development of research in the field of deep learning, a large number of innovative designs are driving the progress of multimodal sentiment analysis technology. At present, multimodal sentiment analysis has made good progress, but there is still a big gap compared with unimodal sentiment analysis. Possible reasons for this gap are: the accuracy of the model in extracting features from different modalities is not enough, resulting in bias in sentiment features, which affects the overall sentiment judgment. For example, most previous works extract single-granularity features from each mode. However, single-granularity features are not enough to express the information contained in the original multimodal data. Because features of different granularities may mean inconsistent sentiment polarity. It has been observed that multi-granularity features can help grasp local and non-local features. Taking images as an example, images can be divided into object features and scene features. Their combination makes visual cues present different receptive fields from local areas to non-local areas, which helps to fully explore multi-scale visual information. At the same time, data in text modalities can also be described at different scales to obtain richer semantic information; in addition to feature extraction, multimodal sentiment analysis also needs to establish feature associations between different modalities, which makes the multimodal sentiment analysis task more complicated. Therefore, researchers need to continuously improve features while also exploring ways to integrate different modalities in order to better model the consistency, complementarity, and differences between different modalities. Summary of the invention

[0004] Purpose of the invention: In view of the deficiencies in the prior art, the present invention proposes a multimodal sentiment analysis method based on multi-perspective interactive learning suitable for social networks, which can improve detection accuracy and efficiency while reducing model complexity and deployment costs.

[0005] Technical solution: A multimodal sentiment analysis method based on multi-perspective interactive learning. The method includes the following steps:

[0006] (1) Unimodal feature learning, extracting text features of different scales and visual features from multiple perspectives;

[0007] (2) Interactive learning of image and text features: using the interactive learning mechanism of the memory network to interactively model the cross-view dependency between images and text;

[0008] (3) In the feature fusion stage, the learned features are connected and multiple features are deeply fused using the multi-layer perceptron and stacked pooling modules.

[0009] Preferably, in step (1), extracting text features of different scales and visual features of multiple perspectives specifically comprises the following steps:

[0010] (11) Text modality feature extraction: For the preprocessed dataset, we first use the BERT pre-trained model to obtain the dynamic word vector representation of the text sequence, and then use a network that combines TextCNN and BiLSTM to extract text features. And backward LSTM processes information Concatenated, the output of text features can be expressed as:

[0011]

[0012] (12) Image modality feature learning: Use the pre-trained VGG-Object and VGG-Place to extract the object features and scene features of the image, where Image represents the image dataset, and Image = {M 0 , M 1 , …, M i , …M u-1}, the feature extraction of each image is as follows:

[0013]

[0014] where f X Visual feature extractors representing different views, represents the parameters of different feature extractors, X∈{Object,Scene}.

[0015] Preferably, in step (2), the interactive learning mechanism of the memory network is used to interactively model the cross-view dependency relationship between the image and the text, which specifically includes the following steps:

[0016] (21) Obtaining text attention: Text features and the query vector qt Input to the text memory network. Obtain the hidden representation of the text through a single-layer perceptron for each text string, and then calculate the attention weight of the text vector The weighted text vector is expressed as follows:

[0017]

[0018] (22) Obtain image attention: The extracted image features are stacked into the external image feature storage matrix X, and the image object query vector q x is input into the image storage network. For each image, the hidden representation of the image is obtained through a single-layer perceptron, and then the attention weights of the image features are calculated, and finally the weighted image vector representation is obtained as follows:

[0019]

[0020] Where X∈{Object, Scene} represents different perspectives, represents the weighted image features of the view, represents the attention weight, m j , m j ’ for different parts of different views respectively.

[0021] (23) Text-guided image attention memory network: the text vector Multiply by the value from view m i 、m i ′, and then use a single-layer perceptron to compute the hidden representation of object features and the new visual memory guided by the context:

[0022]

[0023]

[0024] The Hadamard product calculation is used to retain sufficient interactive information between text and image; the attention weights of the image features guided by the text are calculated to obtain a new weighted image feature vector:

[0025]

[0026] (24) Image-guided text attention memory network: the image feature vector Multiply by the text feature t j , using a single-layer perceptron to compute a text hidden representation guided by features from different image views as well as a new text memory:

[0027]

[0028]

[0029] Next, under the guidance of image features from different views, the attention weights of text features are calculated. Finally, a new weighted text feature vector is obtained with the assistance of image features from different perspectives:

[0030]

[0031] Therefore, in order to learn the k-th layer image feature vector guided by the text features of the memory network, the object-oriented and scene-oriented image feature-guided text representations of the previous hop are With image feature m j , m j ' Combined to obtain Similarly, to learn the text feature vector guided by the image features of the k-1th layer memory network, the image representations obtained from the object view and scene view of the previous hop are Combined with text features j Get

[0032] For the i-th instance, when k>1, the second and third parts of the deep attention memory network are expressed as:

[0033]

[0034]

[0035]

[0036]

[0037] Among them, OgT represents the text features under the guidance of object features, SgT represents the text features under the guidance of scene features, TgO and TgS represent the object features and scene features under the guidance of text features, respectively.

[0038] Preferably, in step (3), the learned features are connected, and multiple features are deeply fused using a multi-layer perceptron and a stacked pooling module. The specific steps are as follows:

[0039] (31) Connect the text features with the image features from the deep attention memory network to obtain the fused features:

[0040]

[0041] in, and Respectively represent the text features guided by object features and scene features, and They respectively represent object features and scene features guided by text features.

[0042] (32) Input the fused features into a multi-layer perceptron to learn the interaction between modal features:

[0043]

[0044] (33) Input the fused features into the softmax classifier to obtain the final label.

[0045] The beneficial effects of the present invention are as follows: the present invention alleviates the problem that single-granularity characteristics are insufficient to express the information contained in the original multimodal data and that characteristics of different granularities may lead to inconsistent sentiment polarity, and can help grasp local and non-local features, while fully mining multi-perspective visual information, and simultaneously obtaining richer semantic information; in addition, the attention memory network module improves the interaction of the two modal information, specifically, it allows text information to help image feature learning, and image information to help text feature learning, achieving complementary learning of the two types of modal information, thereby improving the results of multimodal sentiment analysis. Experiments show that compared with the current multimodal sentiment analysis method, the present invention can effectively improve the classification accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of a method flow of an embodiment of the present invention;

[0047] Figure 2 A specific flow chart of text feature extraction according to an embodiment of the present invention;

[0048] Figure 3 A schematic diagram of image feature extraction according to an embodiment of the present invention;

[0049] Figure 4 The interactive learning process of object features and text features of the embodiment of the present invention;

[0050] Figure 5 This is an interactive learning process of scene features and text features in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The present invention provides a multimodal sentiment analysis method based on multi-view interactive learning, which is applicable to text and image data of social networks. The main flow chart of the method is as follows: Figure 1 The specific steps are as follows:

[0052] Step (1) extracting text features of different scales and visual features of multiple perspectives specifically includes the following steps:

[0053] Step (11) Obtain text features: The specific process is as follows Figure 2As shown, given a picture-text pair (I i , T i ), suppose the i-th text consists of n words, then the text description is represented by T i =(t i1 , t i2 ,…,t ik ,…t in ), first use the BERT model to obtain the dynamic word vector representation of the text sequence, that is, T i =(x1,x2,…,xk,…,xn).

[0054] The n×d word vector obtained by the word embedding layer is used as the input of the convolution layer. In TextCNN, the width of the convolution kernel is consistent with the dimension of the word vector. Each row of the input vector represents a word. In the process of extracting features, the word is used as the minimum granularity of the text, and the height can be set by yourself. However, because the input is essentially a sentence, and the correlation between adjacent words in a sentence is very high, this article selects three convolution kernels of different heights to extract text features in parallel from three different angles. Each convolution kernel only performs convolution in the n direction and ignores the d direction. The activation function uses the RELU function, and the parameter padding=same to avoid the phenomenon of different output dimensions due to different window sizes during convolution. Taking a height of 2 as an example, the word vector is input into TextCNN to obtain local feature information:

[0055] T i =f(w·a i:j+n-1 +b) (1)

[0056] Where n is the number of words corresponding to the convolution kernel, w is the weight matrix, b is the bias value, T i is the output of the convolution kernel at position i in the word sequence, and f() is the activation function.

[0057] A new pooling strategy is introduced, that is, the maximum value of the one-dimensional vector output by the previous convolutional layer is selected, and the maximum pooling window size is 3, and finally the sentence representation of the same length is obtained. The feature vector obtained after the maximum pooling layer is as shown in formula (2), and the final feature vector is:

[0058]

[0059]

[0060] Then follow the above steps to get the results of different sliding windows, and then use the Concat layer to fuse the three results, and the result C is used as the input of the BiLSTM layer. BiLSTM is used to extract the temporal information of the text because it uses two LSTM networks to model in two directions. Information is processed by the forward LSTM And backward LSTM processes information In series, the output of BiLSTM can be expressed as:

[0061]

[0062] Step (12) Obtaining image features: The image size is initially adjusted to 224×224 pixels, and the pre-trained VGG-Object and VGG-Place are used to extract the object features and scene features of the image, where Image represents an image dataset, and Image = {M 0 , M 1 , …, M i , ...M u-1}, the feature extraction of each image is as shown in formula (5):

[0063]

[0064] where f X Visual feature extractors representing different views, represents the parameters of different feature extractors, X∈{Object,Scene}, and the extraction process generates l V Convolutional feature maps, each feature map is an N×N tensor. Each feature map is flattened into D V dimensional feature vector. Finally, the object features and scene features are obtained as follows:

[0065]

[0066]

[0067] here, and Represents different parts of different views.

[0068] Step (2) uses the interactive learning mechanism of the memory network to interactively model the cross-view dependency relationship between images and text. The specific interaction process is as follows: Figure 4 and Figure 5 shown.

[0069] Step (21) Text Attention Network: Text features and the query vector q t Input to the text memory network. First, the hidden representation of the text is obtained through a single layer perceptron for each text string. Then, the softmax function is used to calculate the attention weight of the text vector: Finally, the weighted text vector is expressed as follows:

[0070]

[0071] Step (22) Image Attention Network: The extracted image features are stacked into the external image feature storage matrix X, and the image object query vector q x is input to the image storage network. For each image, a single layer perceptron is used to obtain the hidden representation of the image: Here m j , m j ′ for different parts of different views respectively. Then, the softmax function is used to calculate the attention weights of the image features: Finally, the weighted image features are obtained:

[0072]

[0073] Where X∈{Object, Scene}, x∈{Object, Scene} represents different perspectives, represents the weighted image features of the view, represents the randomly initialized query vector learned during training.

[0074] Step (23) Text-guided image attention memory network: The attention memory network learns image features from different views, including object view and scene view. The main purpose is to let the text help the model learn the image feature vector and find the feature mapping of the key image. First, the text vector Multiply by the value from view m i and m i ′, and then use a single-layer perceptron to compute the context-guided object-oriented hidden representation and new visual memory:

[0075]

[0076]

[0077] Then the Hadamard product is used because it can retain enough interactive information between text and image. Secondly, the softmax function is used to calculate the attention weight of the image features guided by the text: Finally, a new weighted image feature vector is obtained:

[0078]

[0079] where X∈{Object, Scene}, x∈{Object, Scene}

[0080] Step (24) Image-guided Text Attention Memory Network: The main purpose is to let the image feature vector help the model learn the text feature vector and find the important features of the text related to the image features from different angles. The first step is to convert the image feature vector Multiply each text feature t j Then, a single-layer perceptron is used to compute the text hidden representation guided by features from different image views as well as the new text memory: Next, under the guidance of image features from different views, the softmax function is used to calculate the attention weights of text features:

[0081]

[0082] Finally, a new weighted text feature vector is obtained with the help of image features from different perspectives:

[0083]

[0084] Therefore, in order to learn the k-th layer image feature vector guided by the text features of the memory network, the object-oriented and scene-oriented image feature-guided text representations of the previous hop are With image feature m j , m j ' Combined to obtain pass Similarly, to learn the text feature vector guided by the image features of the k-1th layer memory network, the image representations obtained from the object view and scene view of the previous hop are Combined with text features j Get

[0085] For the i-th instance, when k>1, the second and third parts of the deep attention memory network are expressed as:

[0086]

[0087]

[0088]

[0089]

[0090] Among them, OgT represents the text features under the guidance of object features, SgT represents the text features under the guidance of scene features, TgO and TgS represent the object features and scene features under the guidance of text features, respectively.

[0091] In step (3), the learned features are connected and multiple features are deeply fused using multi-layer perceptron and stacked pooling modules. The specific steps are as follows:

[0092] Step (31) concatenates the text features with the image features from the deep attention memory network to obtain the fused features:

[0093]

[0094] Step (32) inputs the fused features into an MLP consisting of four stacked fully connected layers, and uses ReLU as the activation function to obtain deeply fused features and learn the interactions between modal features:

[0095]

[0096] Step (33) inputs the fused features into the softmax classifier to obtain the final label.

[0097]

[0098]

[0099] The experimental verification is as follows:

[0100] The dataset used in this embodiment is the MVSA dataset. MVSA is a Twitter image-text sentiment analysis dataset. It consists of two independent datasets, namely the MVSA-Single dataset and the MVSA-Multi dataset. Each image-text pair in the former has only one annotation, and each image-text pair in the latter is given by three annotators. The MVSA-Single dataset contains 5129 image-text pairs, and the MVSA-Multi contains 19600 image-text pairs. First, the two datasets are preprocessed, and the image-text pairs with different positive and negative polarities of the image and text annotation emotions in the MVSA-Single dataset are deleted. Among the remaining image-text pairs, if one of the emotions of the image or text is neutral, another positive or negative label is selected as the emotional label of the image-text pair, and finally 4511 valid Twitter image-text pairs are obtained. For each data in MVSA-Multi, a voting mechanism is adopted, that is, if the emotional polarity annotations given by 2 or more annotators are consistent, the data is retained, otherwise it is deleted, and finally 17505 valid image-text pairs are obtained.

[0101] This example uses Python 3.8.10 and Keras 2.2.4 development framework. The dataset is divided into training set, validation set and test set in a ratio of 8:1:1. Adam is used as the optimizer method, and the learning rate is 0.001. The number of hidden layer units of TextCNN is 512, and the kernel_size is 2, 3, and 4 respectively. The number of hidden layer units of BiLSTM is set to 128, dropout is 0.001, the batch size of MVSA-Single is 32, and the batch size of MVSA-multiple is 128. For the four stacked fully connected layers, the number of hidden layer units is 1024, 512, 512, and 512 respectively. The following are the experimental results verified on the MVSA-Single and MVSA-Multiple datasets.

[0102] Table 1 Comparison results of multi-classification methods on MVSA-Single and MVSA-Multiple datasets

[0103]

[0104] As can be seen from the chart data, the proposed method is superior to other models due to the interactive learning module and deep fusion module of the attention memory network. The attention memory network module mainly improves the interaction of the two modal information; specifically, let the text information help the image feature learning, and the image information help the text feature learning, so as to achieve the complementary learning of the two types of modal information, thereby improving the results of multimodal sentiment analysis. DSN-M and MultiSentiNet-M only consider image information to help learn text features, but ignore the auxiliary role of text in learning image features; SF-M and Co-Memory-M only use image object features, ignoring the scene features of the image, and the image scene can also reflect the user's emotions. In contrast to the method in this paper, all other multimodal methods tested only fuse the features of different modalities in series. This example uses the stacking-pooling module to deeply fuse multimodal content, thereby improving the results of multimodal sentiment analysis. Compared with several other methods, it performs better not only in terms of accuracy, but also in terms of F1 value, which proves the effectiveness of the method proposed in this paper.

[0105] The beneficial effects of the present invention are as follows: while fully mining the visual information from multiple perspectives, the present invention also describes the text modalities at different scales to obtain richer semantic information; utilizing the text-image interactive learning mechanism under multiple perspectives to establish deep associations between different modalities and obtain better classification accuracy.

[0106] The above content is a further detailed description of the present invention in combination with specific / preferred implementation methods. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

[0107] Parts of the present invention that are not described in detail belong to the well-known technologies of those skilled in the art.

Claims

1. A multimodal sentiment analysis method based on multi-view interactive learning, comprising the following steps: (1) Unimodal feature learning, extracting text features of different scales and visual features from multiple perspectives; (2) Interactive learning of image and text features: using the interactive learning mechanism of the memory network to interactively model the cross-view dependency between images and text; (3) In the feature fusion stage, the learned features are connected and multiple features are deeply fused using the multi-layer perceptron and stacked pooling modules.

2. A multimodal sentiment analysis method based on multi-view interactive learning as claimed in claim 1, characterized in that In step (1), extracting text features of different scales and visual features of multiple perspectives specifically includes the following steps: (11) Text modality feature extraction: For the preprocessed dataset, the BERT model is first used to obtain the dynamic word vector representation of the text sequence. Then, a network combining TextCNN and BiLSTM is used to extract text features. The output of the text features can be expressed as: in Represents the forward LSTM processing information, Represents the backward LSTM processing information. (12) Image modality feature learning: Use the pre-trained VGG-Object and VGG-Place to extract the object features and scene features of the image, where Image represents the image dataset, and Image = {M 0 , M 1 , …, M i , …M u-1 }, the feature extraction of each image is as follows: where f X Visual feature extractors representing different views, represents the parameters of different feature extractors, X∈{Object,Scene}.

3. A multimodal sentiment analysis method based on multi-view interactive learning as claimed in claim 1, characterized in that In step (2), the interactive learning mechanism of the memory network is used to interactively model the cross-view dependency relationship between images and texts, which specifically includes the following steps: (21) Obtaining text attention: Obtain the hidden representation of the text through a single-layer perceptron for each text string, and then calculate the attention weight of the text vector The weighted text vector is expressed as follows: (22) Obtaining image attention: For each image, the hidden representation of the image is obtained through a single-layer perceptron. Then, the attention weights of the image features are calculated. Finally, the weighted image vector representation is obtained as follows: Where X∈{Object, Scene} represents different perspectives, represents the weighted image features of the view, represents the attention weight, m j , m j ’ for different parts of different views respectively. (23) Text-guided image attention memory network: multiply the text vector by the image from view m i 、m i ′, and then use a single-layer perceptron to compute the hidden representation of object features and the new visual memory guided by the context: Calculate the attention weights of the text-guided image features to obtain a new weighted image feature vector: (24) Image-guided text attention memory network: multiply the image feature vector by each text feature t j , using a single-layer perceptron to compute a text hidden representation guided by features from different image views as well as a new text memory: Where XgT represents the image features under different views. Next, under the guidance of the image features of different views, the attention weights of the text features are calculated: Therefore, in order to learn the k-th layer image feature vector guided by the text features of the memory network, the object-oriented and scene-oriented image feature-guided text representations of the previous hop are combined with the image features m j , m j ' Combined to obtain Similarly, to learn the text feature vector guided by the image features of the k-1th memory network, the image representation obtained from the object view and scene view of the previous hop is combined with the text features to obtain 4. A multimodal sentiment analysis method based on multi-view interactive learning as claimed in claim 1, characterized in that In step (3), the learned features are connected and multiple features are deeply fused using multi-layer perceptron and stacked pooling modules. The specific steps are as follows: (31) Connect the text features with the image features of the deep attention memory network to obtain the fused features: in, and Respectively represent the text features guided by object features and scene features, and They respectively represent object features and scene features under the guidance of text features. (32) Input the fused features into a multi-layer perceptron to learn the interaction between modal features: (33) The fused features are input into the softmax classifier to obtain the final label.

Citation Information

Patent Citations

  • Aspect-level sentiment analysis method based on multi-modal data and multi-interaction memory network

    CN112559683A

  • Adaptive fusion multi-modal sentiment classification method based on attention mechanism

    CN113435496A

  • Visual question and answer method based on multi-modal depth feature fusion and model thereof

    CN114398961A

  • Aspect-level multi-modal sentiment analysis method based on collaborative attention fusion

    CN115293170A

  • Cross-modal sentiment analysis method based on attention network

    CN115982652A