Multi-modal sentiment analysis method based on mixed contrast learning and multi-task learning

This multimodal sentiment analysis method, which combines contrastive learning and multi-task learning, addresses the problem of insufficient single-modal feature learning in multimodal sentiment analysis, thereby improving the effectiveness and accuracy of multimodal sentiment analysis in the absence of single-modal annotations.

CN118940206BActive Publication Date: 2026-11-24CHONGQING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410944141.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2026-11-24
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

Existing multimodal sentiment analysis methods struggle to effectively learn unimodal features and optimize multimodal feature representations in the absence of unimodal annotations, resulting in insufficient validity of sentiment analysis results.

Method used

A multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning is adopted. Through a single-peak feature extraction module, a single-peak feature enhancement module, a sparse phase-controlled transformer, a feature fusion module, and a single-modal label generation module, combined with unsupervised and supervised contrastive learning, the multimodal feature representation and single-modal label generation are optimized.

Benefits of technology

In the absence of single-modal annotations, it significantly improves the recognition ability of single-modal features, enhances the fusion representation ability of multimodal features, and improves the effectiveness and accuracy of multimodal sentiment analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940206B_ABST
    Figure CN118940206B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of multimodal sentiment analysis technology, specifically involving a multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning. This method first optimizes unimodal features extracted from a pre-trained model using a unimodal feature enhancement module (UFEM), and then uses these optimized features to jointly train multimodal and unimodal tasks. Furthermore, this method employs a hybrid contrastive learning strategy to facilitate the learning of multimodal data representations, enhancing the representational capability of multimodal fusion through unsupervised contrastive learning and improving model performance in the absence of unimodal annotations through supervised contrastive learning. Finally, based on the characteristics of unsupervised contrastive learning, this method proposes a novel unimodal label generation module (ULGM), which can stably generate unimodal labels within a short training period. This method can better learn unimodal feature representations and optimize multimodal feature representations, thereby improving the effectiveness of multimodal sentiment analysis results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of multimodal sentiment analysis technology, and particularly relates to a multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning. Background Technology

[0002] Multimodal Sentiment Analysis (MSA) is a method for sentiment analysis based on multiple modalities of data (such as text, images, and speech). It aims to help people understand human emotional expression more comprehensively and accurately judge emotional states.

[0003] Multimodal sentiment analysis (MSA) has received widespread attention in recent years. Compared to traditional unimodal sentiment analysis methods, MSA has demonstrated significant advantages in robustness, especially in achieving breakthroughs in processing social media data. With the explosive growth of user-generated content, MSA has been widely applied in various fields, including but not limited to social media monitoring, customer service, and video content transcription. This analytical method, by integrating information from different modalities, such as text, audio, and visual data, can more comprehensively capture and analyze users' emotional states, thereby improving the accuracy and reliability of sentiment recognition.

[0004] Currently, the focus of multimodal sentiment analysis research is on how to effectively learn joint representations. Researchers have evolved from tensor-based methods to attention-based methods, continuously striving to design modules capable of capturing cross-modal information interactions and utilizing multimodal representations to train models. However, relying solely on multimodal representations to train models often leads to suboptimal performance. This is mainly because the MSA benchmark dataset lacks unimodal annotations, making it difficult for models to capture unimodal-specific information. Uniform multimodal labels are not always suitable for unimodal learning, limiting the model's ability to deeply understand each unimodality. To address this issue, researchers have made numerous attempts. Yu et al. proposed Self-MM, the core of which is calculating the distance between the modality representation and the class centroid, a metric positively correlated with the model output. Meanwhile, Han et al. proposed the MMIM method, enhancing multimodal fusion by increasing mutual information between unimodal representations and fusing shared information between embeddings and unimodal representations. Furthermore, Yewon et al. proposed SUGRM, using recalibration information to generate unimodal annotations with dynamically adjusted features. Although the above methods have achieved some success, the learning of unimodal features and the optimization of multimodal features are still not ideal in the absence of unimodal annotations, resulting in the need to improve the effectiveness of multimodal sentiment analysis results.

[0005] Therefore, how to better learn unimodal feature representations and optimize multimodal feature representations to improve the effectiveness of multimodal sentiment analysis results has become an urgent problem to be solved. Summary of the Invention

[0006] To address the shortcomings of the existing technologies, this invention provides a multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning, which can better learn single-modal feature representations and optimize multimodal feature representations, thereby improving the effectiveness of multimodal sentiment analysis results.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0008] A multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning includes the following steps:

[0009] S1. Construct a multimodal sentiment analysis model to generate multimodal predicted labels.

[0010] The multimodal sentiment analysis model includes a single-peak feature extraction module, a single-peak feature enhancement module (UFEM), a sparse phase-controlled transformer (SPT), a feature fusion module, a multimodal label prediction module, and a single-modal label generation module (ULGM).

[0011] The single-peak feature extraction module is used for multimodal information based on input I s Extracting various modal features Where s∈{t, a, v}, t represents the text modality, a represents the audio modality, and v represents the visual modality;

[0012] The Single-Peak Feature Enhancement Module (UFEM) is used to enhance various modal features. Enhancement is performed to obtain the corresponding modal enhancement features. Sparse phase-controlled transformers (SPTs) are used to enhance features from various modes. The final feature representations of each modality are extracted from the data, thus obtaining the final features of each modality. The feature fusion module is used to process the final features of each modality. By fusing the features, multimodal features are obtained. The multimodal label prediction module is used for multimodal feature-based prediction. Obtain multimodal predicted labels

[0013] The Unimodal Tag Generation Module (ULGM) is used for multimodal feature-based tag generation. Single-mode features And manually set multimodal labels y m Generate labels for each single modality y s Among them, each single-modal feature From various modal features It is obtained by mapping to the common semantic feature space;

[0014] S2. Based on multi-task learning and hybrid contrastive learning, the multimodal sentiment analysis model constructed in S1 is trained;

[0015] Multi-task learning includes multimodal labeling based on manually labeled y. m and multimodal prediction labels Multimodal learning, and the generation of unimodal labels y based on ULGM. s and corresponding single-mode prediction labels Single-modal learning;

[0016] Hybrid contrastive learning includes enhancing the representational capabilities of multimodal fusion through unsupervised contrastive learning and improving the model's performance in the absence of unimodal annotations through supervised contrastive learning;

[0017] S3. In actual work, multi-source information, including text information, sound information and visual information, is input into the multimodal sentiment analysis model trained in S2 to obtain the corresponding multimodal predicted labels, which are then used for the corresponding multimodal sentiment analysis work.

[0018] Compared with the prior art, the present invention has the following beneficial effects:

[0019] 1. The multimodal sentiment analysis model constructed in this method enhances the identification of salient features through UFEM in the case of missing single-modal annotations, and enhances features from each modality through Sparse Phase Transformer (SPT). The final feature representations of each modality are extracted from the data, thus obtaining the final features of each modality. This setup effectively improves the representation learning of single-modal features.

[0020] 2. When training the multimodal sentiment analysis model, this method uses a hybrid contrastive learning strategy, which can deeply explore the integrated multimodal features and the intrinsic relationship between each single modal feature and sentiment label.

[0021] 3. When training a multimodal sentiment analysis model, this method uses a hybrid contrastive learning strategy to promote the learning of multimodal data representations. Unsupervised contrastive learning enhances the representational ability of multimodal fusion, while supervised contrastive learning improves the model's performance in the absence of unimodal annotations.

[0022] 4. This method proposes a single-modal label generation module ULGM, which can achieve stable generation of single-modal labels within a short training period, thereby ensuring the effectiveness of training multimodal sentiment analysis models.

[0023] In summary, this method can better learn unimodal feature representations and optimize multimodal feature representations, thereby improving the effectiveness of multimodal sentiment analysis results.

[0024] Preferably, the working process of the single-peak feature enhancement module UFEM includes:

[0025] First, for various modal features Perform global average pooling to obtain channel-level statistics, which are then used as the compressed feature S. s :

[0026]

[0027] Among them, l s It is the sequence length, d s It is the feature dimension of modality; d = 1, 2, ..., ds;

[0028] Then, compress the feature S s Connected and fed into a series of fully connected networks and ReLU to obtain the global multimodal embedding S. g :

[0029] S g =ReLU(W z [S t S a S v ]+b z );

[0030] Among them, W z b represents the weight matrix of a fully connected network. z For bias terms in fully connected networks;

[0031] Then, embed the global multimodal mode into S. g The input is processed through the attention mechanism module CBAM to obtain enhanced features.

[0032] Then, the dimensions of each original modality feature are recovered through a fully connected layer:

[0033]

[0034] Among them, W s and b s These represent the weight matrix and bias term of a fully connected network, respectively.

[0035] Finally, gating mechanisms are used to analyze various modal features. Recalibrate to obtain the corresponding modal enhancement features.

[0036] Where σ represents the sigmoid function, This represents element-wise multiplication.

[0037] This setup ensures that important features receive more attention during feature importance adjustment. UFEM introduces the CBAM attention mechanism module into the processing of multimodal features, which can effectively enhance feature representation.

[0038] Preferably, the attention mechanism module CBAM includes a channel attention module and a spatial attention module; the attention mechanism module CBAM performs global multimodal embedding S g The processing steps include:

[0039] First, in the attention module, S is processed using average pooling and max pooling. g The vectors are compressed into two one-dimensional vectors, then passed through a shared multilayer perceptron (MLP), and finally normalized to the [0, 1] interval using the sigmoid function to obtain M. CAM :

[0040] M CAM =σ(MLP(AvgPool(S) g ))+MLP(MaxPool(S g )));

[0041] Where σ represents the sigmoid function; AvgPool represents average pooling; and MaxPool represents max pooling.

[0042] Subsequently, in the spatial attention module, average pooling and max pooling are performed again to aggregate feature information, and a two-dimensional spatial attention map M is generated through a 7×7 convolutional layer. SAM :

[0043] M SAM =σ(f 7×7 ([AvgPool(M CAM MaxPool(M) CAM )]));

[0044] Among them, f 7×7 This represents a 7×7 convolutional layer;

[0045] Then, the weighted enhanced features are obtained.

[0046]

[0047] in, This represents element-wise multiplication.

[0048] In this way, after processing by the channel attention module and spatial attention module of CBAM, the focus on key features can be effectively enhanced, thereby ensuring the quality of subsequent results. The effectiveness.

[0049] Preferably, the final characteristics of each mode are obtained by Sparse Phase-Controlled Transformer (SPT) processing. The expression is:

[0050]

[0051] Where, θ spt These are the learnable parameters of SPT;

[0052] The feature fusion module performs final feature processing for each modality. Multimodal features are obtained by fusion. The expression is:

[0053]

[0054] in, These represent the final feature vectors for text, audio, and visual modalities, respectively. and These are the corresponding fusion weight matrix and bias terms;

[0055] The multimodal label prediction module is based on multimodal features. Obtain multimodal predicted labels The expression is:

[0056]

[0057] in, and These represent the corresponding weight matrix and bias term, respectively.

[0058] In this way, in multimodal tasks, SPT extracts the final feature representations of different modalities from the data, concatenates the final feature vectors of each modality, and maps them to a lower-dimensional space through linear transformation. This ensures that the obtained multimodal features are consistent. This ensures the effectiveness of multimodal learning.

[0059] Preferably, in the multi-task learning of S2, the single-modal prediction label in single-modal learning... The generation process includes:

[0060] First, various modal features Mapping to the common semantic feature space Obtain the features of each single mode

[0061] in, The weight matrix is ​​the weight matrix of the common semantic feature space; For the bias term in the common semantic feature space;

[0062] Subsequently, for each single-modal feature Each modality is further processed through its own independent fully connected layer network to obtain the sentiment prediction output.

[0063]

[0064] in, This is the weight matrix of the fully connected layer network; This is the bias term for the fully connected layer network.

[0065] This ensures the effectiveness of single-modal learning.

[0066] Preferably, in the hybrid contrastive learning of S2, the loss function for unsupervised contrastive learning is:

[0067]

[0068] In the formula, These represent text modal features. Audio modal features and visual modal features With multimodal features Comparative learning loss between;

[0069] Single modal features With multimodal features Comparative learning loss The formula for calculation is:

[0070]

[0071] In the formula, N is the number of samples in the batch; This represents the average cross-entropy of the entire dataset; j represents the j-th sample in the batch.

[0072]

[0073] in,

[0074] In the formula, Represents a parameter Neural networks, used to extract from generate The prediction; ||·||2 represents L2 normalization.

[0075] Thus, the function Corr, which combines normalized predicted and true vectors, is used to measure... and The correlation between them can effectively establish the fusion features Tracing back to each single-modal input Valid mapping.

[0076] Preferably, in the hybrid contrastive learning of S2, the loss function of supervised contrastive learning is... The formula for calculation is:

[0077]

[0078] in,

[0079]

[0080] In the formula, Represents the index of a batch of samples; τ∈R + This represents the temperature coefficient used to control the distance between samples; P(i) = I j=i -{i} represents the number of samples that have the same sentiment category as i but do not include i itself; A(i) = I - {i} represents the number of samples in a batch excluding i itself; Z i It is a fusion feature representation, Z p It is a feature representation of a single modality.

[0081] In this way, multimodal sentiment analysis models can capture the potential semantic associations between different modalities related to specific sentiment categories, and can still complete effective sentiment recognition tasks by combining information from multiple modalities even in the absence of fine-grained annotations for single modalities.

[0082] Preferably, when training the multimodal sentiment analysis model in S2, the overall loss function is... The expression is:

[0083]

[0084] In the formula, λ0, λ1 and λ2 are the corresponding weights;

[0085]

[0086] In the formula, N is the number of training samples; denoted as the weight of the i-th sample in the auxiliary task s; tanh represents the tangent function; the auxiliary task s consists of three independent unimodal tasks, corresponding to text, audio, and visual modal tasks, respectively.

[0087] This balances the contributions of different loss terms to model optimization, ensuring the effectiveness of model training.

[0088] Preferably, the unimodal tag generation module ULGM generates a unimodal tag y. s The expression is:

[0089]

[0090] In the formula, express and The distance between the corresponding tags in the tag space;

[0091] direction indicates Compared to The direction of offset;

[0092]

[0093] The maximum distance within the pre-defined unsupervised contrastive learning space;

[0094] In the unsupervised contrastive learning space and The distance between them;

[0095] α is the label space weight coefficient; β is the unsupervised contrastive learning space weight coefficient.

[0096] Preferably, the formula for calculating direction is:

[0097]

[0098] in,

[0099] In the formula, ||·|| represents L2 normalization; It represents the average value of positively labeled multimodal features in the common semantic feature space; It represents the average value of the negatively labeled multimodal features in the common semantic feature space;

[0100] The formula for calculation is:

[0101]

[0102] In the formula, for and Distance in the common semantic feature space; The maximum distance within the pre-defined public semantic feature space; This represents the distance between the positive and negative label value ranges in the label space.

[0103] The formula for calculation is:

[0104]

[0105] This is the maximum distance within the pre-defined public semantic feature space.

[0106] Thus, by combining multimodal label information and the inherent representational characteristics of different modalities, accurate labels for each independent modality are generated. First, in the common semantic feature space, the distance between two features is proportional to the distance between corresponding labels in the label space. Building upon this, our method proposes an unsupervised contrastive learning space (UCL Space). In the UCL Space, data from different modalities are mapped to a shared representation space; data from the same modality are grouped closer together, while data from different modalities are grouped further apart. The unimodal label y is determined by measuring the distance from the multimodal features to each unimodal feature. s Relative multimodal label y m The deviation amount (focusing on the magnitude and direction of the deviation).

[0107] Preferably, the single-peak feature extraction module includes a text feature sub-modality, an audio feature sub-module, and a visual feature sub-module; the text feature sub-modality is used to extract text modal features from text modal information; the audio feature sub-module is used to extract audio modal features from audio modal information; and the visual feature sub-module is used to extract visual modal features from visual modal information.

[0108] This ensures that the single-peak feature extraction module can extract multimodal information I s Extracting various modal features The effectiveness. Attached Figure Description

[0109] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0110] Figure 1 This is a flowchart of the method;

[0111] Figure 2 This is a schematic diagram illustrating the architecture and training process of a multimodal sentiment analysis model.

[0112] Figure 3 This is a schematic diagram of the common semantic feature space, label space, and unsupervised contrastive learning space in Example 1;

[0113] Figure 4In Example 1, in the common semantic feature space, modal representation is relative to that with positive labels. and negative labels A schematic diagram illustrating the location of the average value of the multimodal representation;

[0114] Figure 5 This is a schematic diagram of the t-SNE visualization results output by the model when HCL is used or not in Example 2.

[0115] Figure 6 This is a schematic diagram of the distribution update process of single-modal labels on the CMU-MOSI dataset in Example 2;

[0116] Figure 7 This is a schematic diagram showing the fit between the multimodal labels generated by each model in Example 2 and the real labels. Detailed Implementation

[0117] The following detailed explanation illustrates the specific implementation methods:

[0118] Example 1

[0119] like Figure 1 , Figure 2 As shown, this embodiment discloses a multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning, including the following steps:

[0120] S1. Construct a multimodal sentiment analysis model to generate multimodal predicted labels. Figure 2 The solid line portion in the diagram represents the workflow of the multimodal sentiment analysis model. Figure 2 The combination of the dashed and solid lines forms a schematic diagram of the training of the multimodal sentiment analysis model.

[0121] The multimodal sentiment analysis model includes a single-peak feature extraction module, a single-peak feature enhancement module (UFEM), a sparse phase-controlled transformer (SPT), a feature fusion module, a multimodal label prediction module, and a single-modal label generation module (ULGM).

[0122] The single-peak feature extraction module is used for multimodal information based on input I s Extracting various modal features Where s∈{t, a, v}, t represents the text modality, a represents the audio modality, and v represents the visual modality.

[0123] The single-peak feature extraction module includes a text feature submodal, an audio feature submodule, and a visual feature submodule. The text feature submodal is used to extract text modal features from text modal information; the audio feature submodule is used to extract audio modal features from audio modal information; and the visual feature submodule is used to extract visual modal features from visual modal information. Specifically, the text feature submodal uses the BERT model proposed by Devlin et al.; the audio feature submodule uses the COVAREP system developed by Degottex et al.; and the visual feature submodule uses the FACET tool provided by iMotions.

[0124] The Single-Peak Feature Enhancement Module (UFEM) is used to enhance various modal features. Enhancement is performed to obtain the corresponding modal enhancement features.

[0125] In practice, the working process of the single-peak feature enhancement module UFEM includes:

[0126] First, for various modal features Perform global average pooling to obtain channel-level statistics, which are then used as the compressed feature S. s :

[0127]

[0128] Among them, l s It is the sequence length, d s It is the feature dimension of modality; d = 1, 2, ..., ds;

[0129] Then, compress the feature S s Connected and fed into a series of fully connected networks and ReLU to obtain the global multimodal embedding S. g :

[0130] S g =ReLU(W z [S t S a S v ]+b z );

[0131] Among them, W z b represents the weight matrix of a fully connected network. z For bias terms in fully connected networks;

[0132] Then, embed the global multimodal mode into S. g The input is processed through the attention mechanism module CBAM to obtain enhanced features. Specifically, the attention mechanism module CBAM includes a channel attention module and a spatial attention module; the attention mechanism module CBAM handles global multimodal embeddings S g The processing steps include:

[0133] First, in the attention module, S is processed using average pooling and max pooling. g The vectors are compressed into two one-dimensional vectors, then passed through a shared multilayer perceptron (MLP), and finally normalized to the [0, 1] interval using the sigmoid function to obtain M. CAM :

[0134] M CAM =σ(MLP(AvgPool(S) g ))+MLP(MaxPool(S g )));

[0135] Where σ represents the sigmoid function; AvgPool represents average pooling; and MaxPool represents max pooling.

[0136] Subsequently, in the spatial attention module, average pooling and max pooling are performed again to aggregate feature information, and a two-dimensional spatial attention map M is generated through a 7×7 convolutional layer. SAM :

[0137] M SAM =σ(f 7×7 ([AvgPool(M CAM MaxPool(M) CAM )]));

[0138] Among them, f 7×7 This represents a 7×7 convolutional layer;

[0139] Then, the weighted enhanced features are obtained.

[0140]

[0141] in, This represents element-wise multiplication.

[0142] In this way, after processing by the channel attention module and spatial attention module of CBAM, the focus on key features can be effectively enhanced, thereby ensuring the quality of subsequent results. The effectiveness.

[0143] Then, the dimensions of each original modality feature are recovered through a fully connected layer:

[0144]

[0145] Among them, W s and b s These represent the weight matrix and bias term of a fully connected network, respectively.

[0146] Finally, gating mechanisms are used to analyze various modal features. Recalibrate to obtain the corresponding modal enhancement features.

[0147] Where σ represents the sigmoid function, This represents element-wise multiplication.

[0148] Sparse phase-controlled transformers (SPTs) are used to enhance features from various modes. The final feature representations of each modality are extracted from the data, thus obtaining the final features of each modality. The feature fusion module is used to process the final features of each modality. By fusing the features, multimodal features are obtained. The multimodal label prediction module is used for multimodal feature-based prediction. Obtain multimodal predicted labels

[0149] In practice, the Sparse Phase-Controlled Transformer (SPT) process yields the final characteristics of each mode. The expression is:

[0150]

[0151] Where, θ sp t is a learnable parameter of SPT;

[0152] The feature fusion module performs final feature processing for each modality. Multimodal features are obtained by fusion. The expression is:

[0153]

[0154] in, These represent the final feature vectors for text, audio, and visual modalities, respectively. and These are the corresponding fusion weight matrix and bias terms;

[0155] The multimodal label prediction module is based on multimodal features. Obtain multimodal predicted labels The expression is:

[0156]

[0157] in, and These represent the corresponding weight matrix and bias term, respectively.

[0158] In this way, in multimodal tasks, SPT extracts the final feature representations of different modalities from the data, concatenates the final feature vectors of each modality, and maps them to a lower-dimensional space through linear transformation. This ensures that the obtained multimodal features are consistent. This ensures the effectiveness of multimodal learning.

[0159] The Unimodal Tag Generation Module (ULGM) is used for multimodal feature-based tag generation. Single-mode features And manually set multimodal labels y m Generate labels for each single modality y s Among them, each single-modal feature From various modal features It is obtained by mapping to the common semantic feature space.

[0160] The goal of ULGM is to combine multimodal label information with the intrinsic representational characteristics of different modalities to generate accurate labels for each independent modality. The ULGM design in this method is an extension and optimization of the work of Yewon et al. Yewon et al.'s design philosophy is that in a common semantic feature space, the distance between two features is proportional to the distance between corresponding labels in the label space. Building upon this, and combining the characteristics of UCL, this method proposes the Unsupervised Contrastive Learning Space (UCL Space). In the UCL Space, data from different modalities are mapped to a shared representation space, with data from the same modality grouped closer together, while data from different modalities are placed further apart.

[0161] Figure 3 A schematic diagram of these three feature spaces is shown. The design of ULGM relies on two key assumptions and mechanisms:

[0162] 1) Consistency between the common semantic feature space and the label space: fusing modal features With single-modal features Distance between It should be the distance between the tags corresponding to these two modalities in the tag space. Proportional.

[0163] 2) Correlation between common semantic feature space and unsupervised contrastive learning: distance within the feature space Fusion modality features as demonstrated in contrastive learning with unsupervised learning and single-modal features relative positions Matching.

[0164] In summary, ULGM's design philosophy can be summarized as follows:

[0165]

[0166] Where s∈{t, a, v}. The proposed ULGM method determines the unimodal label y by measuring the distance from multimodal features to each unimodal feature. s Relative multimodal label y m The deviation amount. In this deviation calculation process, two core elements are emphasized: the magnitude and direction of the deviation.

[0167] When calculating the offset, a proportional relationship was established between the maximum distance within the common semantic feature space and the value range within the label space. Taking the CMU-MOSI and -MOSEI datasets as examples, the value range of their multimodal labels is -3 to +3. This means that when the label is... and Between multimodal features, the corresponding distance should be equal to the maximum distance within the common semantic feature space. Therefore, for any vector whose distance exceeds this maximum distance... Cut it to The value of, i.e. Thus obtain The calculation formula is as follows:

[0168]

[0169] in, and They are and The average value, ||·|| is the L2 normalization. Based on the previously explained concepts and mentioned viewpoints, consider the following relationship, from which we can obtain the value from the multimodal label y. m To single-modal label y s Offset magnitude:

[0170]

[0171] Furthermore, under the current conditions, the single-modal label y s The calculation formula is:

[0172]

[0173] For the results of unsupervised contrastive learning, due to their broad scope, it is necessary to define a maximum distance that remains consistent with the previous settings. Therefore, we set... In order to establish and y s y m Consider the following two relationships between them:

[0174]

[0175] Based on the above relationships, the single-modal label y under this condition can be obtained by equal-weighted summation. s :

[0176]

[0177] To determine the direction of the offset, the spatial position of the unimodal feature relative to the multimodal feature is first analyzed. This process first involves obtaining the positive annotations. and negative comments The average value of the multimodal features is used as a reference. Then, referring to this reference, the multimodal features and unimodal features are located in the feature space, specifically as follows: Figure 4 As shown. By calculating various modal representations (e.g. )arrive and The L2 distance can be used to deduce and determine the direction of the offset:

[0178] The formula for calculating direction is:

[0179]

[0180] in,

[0181] In the formula, ||·|| represents L2 normalization; It represents the average value of positively labeled multimodal features in the common semantic feature space; It represents the average value of the negatively labeled multimodal features in the common semantic feature space.

[0182] The ULGM single-modal tag generation module generates single-modal tags. s The expression is:

[0183]

[0184] In the formula, express and The distance between the corresponding tags in the tag space;

[0185] direction indicates Compared to The direction of offset;

[0186]

[0187] The maximum distance within the pre-defined unsupervised contrastive learning space;

[0188] In the unsupervised contrastive learning space and The distance between them;

[0189] α is the label space weight coefficient; β is the unsupervised contrastive learning space weight coefficient.

[0190] The formula for calculation is:

[0191]

[0192] In the formula, for and Distance in the common semantic feature space; The maximum distance within the pre-defined public semantic feature space; This represents the distance between the positive and negative label value ranges in the label space.

[0193] The formula for calculation is:

[0194]

[0195] This is the maximum distance within the pre-defined public semantic feature space.

[0196]

[0197] ||·|| represents L2 normalization; For the positive label value range within the common semantic feature space, It represents the negative label value range within the common semantic feature space.

[0198] Thus, by combining multimodal label information and the inherent representational characteristics of different modalities, accurate labels for each independent modality are generated. First, in the common semantic feature space, the distance between two features is proportional to the distance between corresponding labels in the label space. Building upon this, our method proposes an unsupervised contrastive learning space (UCL Space). In the UCL Space, data from different modalities are mapped to a shared representation space; data from the same modality are grouped closer together, while data from different modalities are grouped further apart. The unimodal label y is determined by measuring the distance from the multimodal features to each unimodal feature. s Relative multimodal label y m The deviation amount (focusing on the magnitude and direction of the deviation).

[0199] S2. Based on multi-task learning and hybrid contrastive learning, the multimodal sentiment analysis model constructed in S1 is trained;

[0200] Multi-task learning includes multimodal labeling based on manually labeled y. m and multimodal prediction labels Multimodal learning, and the generation of unimodal labels y based on ULGM. s and corresponding single-mode prediction labels The method employs a joint learning strategy, combining manually labeled multimodal tags y. This strategy enhances the representational power of multimodal fusion through unsupervised contrastive learning and improves model performance in the absence of single-modal annotations through supervised contrastive learning. m And ULGM automatically generated single-modal tag y s The system jointly trains a multimodal learning subtask and three unimodal learning subtasks that are only relevant during the training phase. It should be noted that these unimodal learning tasks only exist during the training phase; after joint training is completed, they are used... As the final output.

[0201] In practical implementation, single-modal prediction labels in single-modal learning The generation process includes:

[0202] First, various modal features Mapping to the common semantic feature space Obtain the features of each single mode

[0203] in, The weight matrix is ​​the weight matrix of the common semantic feature space; For the bias term in the common semantic feature space;

[0204] Subsequently, for each single-modal feature Each modality is further processed through its own independent fully connected layer network to obtain the sentiment prediction output.

[0205]

[0206] in, This is the weight matrix of the fully connected layer network; This is the bias term for the fully connected layer network.

[0207] The loss function for unsupervised contrastive learning is:

[0208]

[0209] In the formula, These represent text modal features. Audio modal features and visual modal features With multimodal features Comparative learning loss between;

[0210] Single modal features With multimodal features Comparative learning loss The formula for calculation is:

[0211]

[0212] In the formula, N is the number of samples in the batch; This represents the average cross-entropy of the entire dataset; j represents the j-th sample in the batch.

[0213]

[0214] in,

[0215] In the formula, Represents a parameter Neural networks, used to extract from generate The prediction; ||·||2 represents L2 normalization.

[0216] While SPT successfully enhances the expressiveness of fused features, it doesn't delve into the intrinsic connections between individual modal features and fused features. Therefore, this method introduces Unsupervised Contrastive Learning (UCL) to strengthen these connections and further optimize the quality of fused features. The goal of this method is to maximize the mutual information between fused features and each individual modal input. Through iterative optimization, the network can effectively transition from each independent modality to fused features. Given that Self-HCL has already achieved multimodal fusion results using the SPT network... However, a system based on fusion characteristics has not yet been established. Tracing back to each single-modal input Effective mapping. Therefore, this method uses the function Corr with normalized predicted vectors and true vectors to measure the effectiveness of the mapping. and The correlation between them can effectively establish the fusion features Tracing back to each single-modal input Valid mapping.

[0217] Loss function for supervised contrastive learning The formula for calculation is:

[0218]

[0219] in,

[0220]

[0221] In the formula, Represents the index of a batch of samples; τ∈R + This represents the temperature coefficient used to control the distance between samples; P(i) = I j=i -{i} represents the number of samples that have the same sentiment category as i but do not include i itself; A(i) = I - {i} represents the number of samples in a batch excluding i itself; Z i It is a fusion feature representation, Z p It is a feature representation of a single modality.

[0222] Thus, Supervised Contrastive Learning (SCL) assumes that the model focuses on certain key labels and fully utilizes label information, treating all samples with the same label within a batch as positive samples and samples with different labels as negative samples. Especially when dealing with datasets like CMU-MOSI and CMU-MOSEI, which only label multimodal features but not single-modal features, SCL cleverly leverages label information to achieve efficient feature learning and representation enhancement. Specifically, the model first encodes the different modal features (e.g., text, audio, visual) corresponding to samples within each batch into consistent high-dimensional vectors. Embeddings of samples with the same label will move closer together during the contrastive learning process, while samples with different labels will move further apart. This allows Self-HCL to capture the potential semantic associations between different modalities related to specific sentiment categories and, even in the absence of fine-grained single-modal annotations, can still combine multiple modalities to complete effective sentiment recognition tasks.

[0223] When training a multimodal sentiment analysis model, the overall loss function The expression is:

[0224]

[0225] In the formula, λ0, λ1 and λ2 are the corresponding weights;

[0226]

[0227] In the formula, N is the number of training samples; denoted as the weight of the i-th sample in the auxiliary task s; tanh represents the tangent function; the auxiliary task s consists of three independent unimodal tasks, corresponding to text, audio, and visual modal tasks, respectively.

[0228] This balances the contributions of different loss terms to model optimization, ensuring the effectiveness of model training.

[0229] S3. In actual work, multi-source information, including text information, sound information and visual information, is input into the multimodal sentiment analysis model trained in S2 to obtain the corresponding multimodal predicted labels, which are then used for the corresponding multimodal sentiment analysis work.

[0230] This method constructs a novel multimodal sentiment analysis model. In the absence of unimodal annotations, it enhances the identification of salient features through Unified Front-of-Face (UFEM) and optimizes features using gating mechanisms and element-wise multiplication, effectively improving the representation learning of unimodal features. This method proposes a hybrid contrastive learning strategy to deeply explore the fused multimodal features and the intrinsic relationships between each unimodal feature and sentiment tags. Furthermore, when training the multimodal sentiment analysis model, this method uses a hybrid contrastive learning strategy to promote the learning of multimodal data representations. Unsupervised contrastive learning enhances the representational capability of multimodal fusion, while supervised contrastive learning improves the model's performance in the absence of unimodal annotations. In addition, this method proposes an improved unimodal tag generation module, ULGM, which reveals deep relationships between different modalities and optimizes the spatial distribution of modal features by constructing a new unsupervised contrastive learning space, thereby achieving stable generation of unimodal tags within a shorter training period. In summary, this method can better learn unimodal feature representations and optimize multimodal feature representations, thereby improving the effectiveness of multimodal sentiment analysis results.

[0231] Example 2

[0232] To better illustrate the effectiveness of the multimodal sentiment analysis model in this method, the following experimental verification is conducted.

[0233] Dataset

[0234] The experiments were conducted on two benchmark multimodal sentiment analysis datasets: CMU-MOSI and CMU-MOSEI, the composition of which is shown in Table 1.

[0235] Table 1: Dataset Distribution of CMU-MOSI and CMU-MOSEI

[0236]

[0237] CMU-MOSI: The CMU-MOSI dataset is a popular English MSA benchmark dataset. It is a collection of YouTube monologues in which speakers express their opinions on a variety of topics, such as movies. CMU-MOSI contains 2,199 segment-level video clips from 93 videos, including 89 speakers. Each video clip is individually labeled with a sentiment intensity value ranging from -3 (extremely negative) to +3 (strongly positive).

[0238] CMU-MOSEI: The CMU-MOSEI dataset is the next-generation dataset of CMU-MOSI. Compared to CMU-MOSI, it has more training samples, a wider range of speakers, and video topics. CMU-MOSEI contains 23,453 manually annotated sentence-level video clips from 1,000 different speakers, covering 250 different topics.

[0239] Experimental baseline

[0240] To fully guarantee the effectiveness of Self-HCL, a fair comparison was made between baseline and state-of-the-art methods in multimodal sentiment analysis.

[0241] TFN: TFN decomposes unimodal data into tensors through triple Cartesian product and then fuses these tensors by calculating their outer product.

[0242] LMF: LMF decomposes a stack of high-order tensors into multiple low-rank factors and efficiently fuses them based on these factors.

[0243] RAVEN: A recurrent attentional variant embedding network models non-linguistic sequences and dynamically transforms word representations based on non-linguistic cues.

[0244] MulT: MulT constructs an architecture with independent single-mode and cross-mode transformer networks and uses an attention mechanism to complete the fusion process.

[0245] MISA: MISA projects features into two independent spaces with specific constraints and then fuses these features.

[0246] Self-MM: Self-MM assigns a single-peaked training task with automatically generated labels to each modality, aiming to adjust gradient backpropagation.

[0247] MMIM: MMIM improves multimodal fusion by maximizing hierarchical mutual information.

[0248] MAG-BERT: BERT's multimodal adaptive gate design incorporates an alignment gate that is inserted into the original BERT model to improve the fusion process.

[0249] SUGRM: SUGRM uses recalibrated information to generate single-peak annotations with dynamically adjusted features.

[0250] Implementation details

[0251] Experimental Details: The proposed model was implemented using the PyTorch framework. During model training, the Adam optimizer was employed, and an early stopping policy with 8 epochs was implemented to monitor model performance. A random search was performed to find the optimal combination of hyperparameters. Table 2 shows the detailed configuration of the CMU-MOSI and CMU-MOSEI datasets. All training and testing were performed on a single NVIDIA GeForce RTX 3060Ti GPU. For fair comparison, the model of our method (Self-HCL) and three state-of-the-art methods (Self-MM, MMIM, SUGRM) were run five times, and the average performance is reported. The model performance report is based on the average score of five runs on the test set.

[0252] Evaluation Metrics. Following previous research (Self-MM), experimental results are reported in two forms: classification and regression. For classification, the weighted F1 score (F1-Score) and binary classification accuracy (Acc2) are reported. Specifically, for the MOSI and MOSEI datasets, Acc2 and F1-Score are calculated in two ways: negative / non-negative (without excluding zero) and negative / positive (excluding zero). For regression, the mean absolute error (MAE) and Pearson correlation (Corr) are reported. Except for MAE, higher values ​​indicate better performance for all metrics.

[0253] Table 2: Main hyperparameters used in the two datasets

[0254]

[0255] Analysis of Experimental Results

[0256] Quantitative results

[0257] Tables 3 and 4 present the comparative results of multimodal sentiment analysis on the CMU-MOSI and CMU-MOSEI datasets. These datasets can be categorized into aligned and unaligned types based on their characteristics. Generally, models trained on aligned datasets exhibit better performance. In this study, the unaligned dataset was selected to train the model of our proposed method. In this experiment, firstly, significant improvements were achieved on all evaluation metrics compared to unaligned models (TFN and LMF). Even when compared to aligned models (RAVEN, MulT, MISA, and MAG-BERT), our method achieved competitive results. Furthermore, the three best baselines, Self-MM, MMIM, and SUGRM, were reproduced under the same conditions. It was found that our model outperformed them in most evaluations. Specifically, on the CMU-MOSI dataset, only MMIM outperformed the model that outperformed our method on the MAE evaluation metric. This is because MMIM uses a historical data memory mechanism for entropy estimation, ensuring the stability and accuracy of the training process. On the CMU-MOSEI dataset, the model using this method successfully outperformed all baseline metrics, achieving the best performance.

[0258] Table 3: Experimental results on the CMU-MOSI dataset

[0259]

[0260] In Table 3, marked as The model representation is derived from MMIM, and is labeled as The models are represented as derived from SUGRM. All models marked with an asterisk (*) were reproduced under identical conditions for fair comparison. In the Acc-2 and F1-Score metrics, the left side of the " / " represents "negative / non-negative," and the right side represents "negative / positive." For all metrics except MAE, higher values ​​indicate better performance. Bold numbers represent the best performance.

[0261] Table 4: Experimental results on the CMU-MOSEI dataset.

[0262]

[0263]

[0264] In Table 4, marked as The model representation is derived from MMIM, and is labeled as The model representations are derived from SUGRM. All models marked with an asterisk (*) were reproduced under identical conditions for fair comparison. In the Acc-2 and F1-Score metrics, the left side of the " / " represents "negative / non-negative," and the right side represents "negative / positive." For all metrics except MAE, higher values ​​indicate better performance. Bold numbers represent the best performance.

[0265] ablation experiment

[0266] Unimodal Task Analysis. To explore the contribution of unimodal tasks to the model (Self-HCL) of this method, experiments were conducted using different combinations of unimodal tasks, as shown in Tables 5 and 6.

[0267] Table 5: Ablation study of the unimodal task advantage using the unaligned dataset CMU-MOSI

[0268]

[0269] In Table 5, bold numbers indicate best performance. M, T, A, and V represent multimodal, text, audio, and vision tasks, respectively.

[0270] Table 6: Ablation study of the unimodal task advantage using the unaligned dataset CMU-MOSEI

[0271]

[0272] In Table 6, M, T, A, and V represent multimodal, text, audio, and visual tasks, respectively. For all metrics except MAE, higher values ​​indicate better performance. Bold numbers represent optimal performance.

[0273] Overall, incorporating unimodal tasks improved the model's overall performance. In the CMU-MOSI dataset, the model showed performance improvements after incorporating any single modality task. Notably, "M,A,T" and "M,V,T" demonstrated superior performance compared to "M,A,V". Similar results were observed in the CMU-MOSEI dataset. In conclusion, unimodal tasks have a positive impact on improving model performance, with text and audio modal tasks showing particularly significant contributions.

[0274] UFEM was used to evaluate its effectiveness in enhancing unimodal features, and ablation experiments were conducted. The baseline model SUGRM was modified by removing its Modality Recalibration Module (MRM) and embedding UFEM for feature enhancement, while keeping other modules unchanged. The same modification was applied to the Self-HCL model to compare the performance differences between UFEM and MRM. Table 7 shows the performance comparison results of the two models on the unaligned datasets CMU-MOSI and CMU-MOSEI.

[0275] Table 7: Ablation studies of UFEM on the unaligned dataset CMU-MOSI

[0276]

[0277] In Table 7, for all metrics except MAE, higher values ​​indicate better performance. Bold numbers represent best performance, and underlined numbers indicate performance improvements compared to the baseline model.

[0278] As shown in Table 7, the performance of the model using the MRM method generally declines. In contrast, the performance of the SUGRM model using the UFEM strategy proposed in this method shows a significant overall improvement. This demonstrates the effectiveness of UFEM.

[0279] To investigate the impact of Hybrid Contrastive Learning (HCL) on model performance, an ablation study was conducted on the unaligned dataset CMU-MOSI. Since HCL incorporates both unsupervised contrastive learning (UCL) and supervised contrastive learning (SCL) mechanisms, the ablation design is as follows:

[0280] Remove UCL: Remove only unsupervised contrastive learning from Self-HCL, while keeping the other parts unchanged.

[0281] Remove SCL: Remove only supervised contrastive learning from Self-HCL, while keeping the other parts unchanged.

[0282] Table 8 details the results of this ablation experiment.

[0283] Table 8: Ablation study of HCL on the unaligned dataset CMU-MOSI

[0284]

[0285] In Table 8, for all metrics except MAE, higher values ​​indicate better performance. Bold numbers represent optimal performance.

[0286] The observations revealed a slight decrease in all metrics when UCL was removed, indicating that UCL has a positive impact on improving model accuracy, F1 score, and Corr, and also contributes to reducing MAE. A similar trend was observed when SCL was removed, thus confirming the effectiveness of HCL in improving the model's performance on complex sentiment analysis tasks.

[0287] The unique feature of the proposed ULGM in this method lies in the introduction of a novel unsupervised contrastive learning space, a characteristic lacking in the baseline model SUGRM. Therefore, instead of directly applying ULGM to SUGRM, this method conducts ablation experiments within the Self-HCL framework, specifically setting ULGM as follows: ours This represents the use of the ULGM proposed in Self-HCL while ensuring that the configuration of all other components remains unchanged. As a contrast, ULGM... SUGRM This indicates that the ULGM proposed by SUGRM is used in Self-HCL, while keeping other components constant. Table 9 shows the results of the two processing methods on the CMU-MOSI dataset.

[0288] Table 9: Ablation study of ULGM on the unaligned dataset CMU-MOSI

[0289]

[0290] In Table 9, for all metrics except MAE, higher values ​​indicate better performance. Bold numbers represent optimal performance.

[0291] As can be seen from the data, in the CMU-MOSI dataset, using ULGM SUGRM After applying the proposed method, all performance metrics of the model declined to varying degrees. Specifically, Acc-2 decreased by 0.27, F1-Score and Corr decreased by 0.31 and 0.012 respectively, while MAE increased by 0.07. This result strongly demonstrates the effectiveness and advancement of the proposed ULGM method.

[0292] Case Analysis

[0293] HCL is used for qualitative analysis of Hybrid Contrast Learning (HCL). t-SNE is used to visualize the initial distribution of the data and the hidden layer states after HCL optimization. For example... Figure 5As shown, data without HCL exhibits a random distribution, lacking clear boundaries or clustering tendencies. Conversely, after applying HCL, the correlation between data points is optimized, with data points of the same category clustering into a tight structure, and the separation between different categories is improved, demonstrating stronger structure and identifiability. This demonstrates the crucial role of HCL in model learning efficiency, strengthening feature fusion and contrastive learning, and using multimodal label information to guide model training. However, some data points may still be misclassified, possibly due to factors such as noise interference, modality mismatch, and sample complexity. Despite these issues, overall, HCL improves the model's representation and classification performance for multimodal data. This suggests that we need to further optimize model learning strategies to reduce misclassification.

[0294] ULGM. To evaluate the performance of ULGM, experiments were conducted on the CMU-MOSI dataset. Figure 6 The study demonstrates the trajectory of unimodal labels gradually converging to a stable state as the number of training iterations increases. After approximately 12 training epochs, the unimodal label distribution generated by ULGM exhibits significant stability. Furthermore, to quantitatively evaluate the quality of the multimodal labels generated by our proposed method, comparisons were made with two baseline models: Self-MM and SUGRM. Figure 7 A detailed comparison of the goodness of fit between the multimodal labels generated by each model and the real labels was conducted. The results show that the multimodal labels generated by the proposed method have a higher goodness of fit with the real labels, further demonstrating the effectiveness and advancement of ULGM in generating high-quality multimodal labels.

[0295] in conclusion

[0296] This method constructs a novel framework for a multimodal sentiment analysis model (Self-HCL). In the case of missing unimodal labels, this framework optimizes the representation learning of unimodal features by applying UFEM and utilizes SPT (Specialized Perspective Learning) to capture and integrate the final feature representations of each modality. Furthermore, this method employs a hybrid contrastive learning strategy to optimize the representation of multimodal data and proposes a novel ULGM module to stably generate unimodal labels in a short time.

[0297] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.

Claims

1. A multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning, characterized in that, Includes the following steps: S1. Construct a multimodal sentiment analysis model to generate multimodal predicted labels. The multimodal sentiment analysis model includes a single-peak feature extraction module, a single-peak feature enhancement module (UFEM), a sparse phase-controlled transformer (SPT), a feature fusion module, a multimodal label prediction module, and a single-modal label generation module (ULGM). The single-peak feature extraction module is used for multimodal information I based on the input. s Extracting various modal features Where s∈{t,a,v}, t represents the text modality, a represents the audio modality, and v represents the visual modality; The Single-Peak Feature Enhancement Module (UFEM) is used to enhance various modal features. Enhancement is performed to obtain the corresponding modal enhancement features. Sparse phase-controlled transformers (SPTs) are used to enhance features from various modes. The final feature representations of each modality are extracted from the data, thus obtaining the final features of each modality. The feature fusion module is used to process the final features of each modality. By fusing the features, multimodal features are obtained. The multimodal label prediction module is used for multimodal feature-based prediction. Obtain multimodal predicted labels The Unimodal Tag Generation Module (ULGM) is used for multimodal feature-based tag generation. Single-mode features And manually set multimodal labels y m Generate labels for each single modality y s Among them, each single-modal feature From various modal features It is obtained by mapping to the common semantic feature space; S2. Based on multi-task learning and hybrid contrastive learning, the multimodal sentiment analysis model constructed in S1 is trained; Multi-task learning includes multimodal labeling based on manually labeled y. m and multimodal prediction labels Multimodal learning, and the generation of unimodal labels y based on ULGM. s and corresponding single-mode prediction labels Single-modal learning; Hybrid contrastive learning includes enhancing the representational power of multimodal fusion through unsupervised contrastive learning and improving the model's performance in the absence of single-modal annotations through supervised contrastive learning; S3. In actual work, multi-source information, including text information, sound information and visual information, is input into the multimodal sentiment analysis model trained in S2 to obtain the corresponding multimodal predicted labels, which are then used for the corresponding multimodal sentiment analysis work.

2. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 1, characterized in that: The working process of the single-peak feature enhancement module UFEM includes: First, for various modal features Perform global average pooling to obtain channel-level statistics, which are then used as the compressed feature S. s : Among them, l s It is the sequence length, d s It is the feature dimension of modality; d = 1, 2, ..., ds; Then, compress the feature S s Connected and fed into a series of fully connected networks and ReLU to obtain the global multimodal embedding S. g : S g =ReLU(W z [S t ;S a ;S v ]+b z ); Among them, W z b represents the weight matrix of a fully connected network. z For bias terms in fully connected networks; Then, embed the global multimodal mode into S. g The input is processed through the attention mechanism module CBAM to obtain enhanced features. Then, the dimensions of each original modality feature are recovered through a fully connected layer: Among them, W s and b s These represent the weight matrix and bias term of a fully connected network, respectively. Finally, gating mechanisms are used to analyze various modal features. Recalibrate to obtain the corresponding modal enhancement features. Where σ represents the sigmoid function, This represents element-wise multiplication.

3. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 2, characterized in that: The attention mechanism module CBAM includes a channel attention module and a spatial attention module; The attention mechanism module CBAM supports global multimodal embedding S g The processing steps include: First, in the attention module, S is processed using average pooling and max pooling. g The vectors are compressed into two one-dimensional vectors, then passed through a shared multilayer perceptron (MLP), and finally normalized to the [0,1] interval using the sigmoid function to obtain M. CAM : M CAM <σ(MLP(AvgPool(S g ))+MLP(MaxPool(S g ))); Where σ represents the sigmoid function; AvgPool represents average pooling; and MaxPool represents max pooling. Subsequently, in the spatial attention module, average pooling and max pooling are performed again to aggregate feature information, and a two-dimensional spatial attention map M is generated through a 7×7 convolutional layer. SAM : M SAM =σ(f 7×7 ([AvgPool(M CAM );MaxPool(M CAM )])); Among them, f 7×7 This represents a 7×7 convolutional layer; Then, the weighted enhanced features are obtained. in, This represents element-wise multiplication.

4. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 1, characterized in that: Sparse phase-controlled transformer (SPT) processing yields the final characteristics of each mode. The expression is: Where, θ spt These are the learnable parameters of SPT; The feature fusion module performs final feature processing for each modality. Multimodal features are obtained by fusion. The expression is: in, These represent the final feature vectors for text, audio, and visual modalities, respectively. and These are the corresponding fusion weight matrix and bias terms; The multimodal label prediction module is based on multimodal features. Obtain multimodal predicted labels The expression is: in, and These represent the corresponding weight matrix and bias term, respectively.

5. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 1, characterized in that: In S2's multi-task learning, single-modal label prediction in single-modal learning. The generation process includes: First, various modal features Mapping to the common semantic feature space Obtain the features of each single mode in, The weight matrix is ​​the weight matrix of the common semantic feature space; For the bias term in the common semantic feature space; Subsequently, for each single-modal feature Each modality is further processed through its own independent fully connected layer network to obtain the sentiment prediction output. in, This is the weight matrix of the fully connected layer network; This is the bias term for the fully connected layer network.

6. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 5, characterized in that: In the hybrid contrastive learning of S2, the loss function for unsupervised contrastive learning is: In the formula, These represent text modal features. Audio modal features and visual modal features With multimodal features Comparative learning loss between; Single modal features With multimodal features Comparative learning loss The formula for calculation is: In the formula, N is the number of samples in the batch; This represents the average cross-entropy of the entire dataset; j represents the j-th sample in the batch. in, In the formula, Represents a parameter Neural networks, used to extract from generate The prediction; ||·||2 represents L2 normalization.

7. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 6, characterized in that: In the hybrid contrastive learning of S2, the loss function of supervised contrastive learning is... The formula for calculation is: in, In the formula, i∈I={1,2,…,L} represents the exponent of a batch of samples; τ∈R + This represents the temperature coefficient used to control the distance between samples; P(i) = I j=i -{i} represents the number of samples that have the same sentiment category as i but do not include i itself; A(i) = I - {i} represents the number of samples in a batch excluding i itself; Z i It is a fusion feature representation, Z p It is a feature representation of a single modality.

8. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 7, characterized in that: When training a multimodal sentiment analysis model in S2, the overall loss function is... The expression is: In the formula, λ0, λ1 and λ2 are the corresponding weights; In the formula, N is the number of training samples; denoted as the weight of the i-th sample in the auxiliary task s; tanh represents the tangent function; the auxiliary task s consists of three independent unimodal tasks, corresponding to text, audio, and visual modal tasks, respectively.

9. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 8, characterized in that: The ULGM single-modal tag generation module generates single-modal tags. s The expression is: In the formula, express and The distance between the corresponding tags in the tag space; direction indicates Compared to The direction of offset; The maximum distance within the pre-defined unsupervised contrastive learning space; In the unsupervised contrastive learning space and The distance between them; α is the label space weight coefficient; β is the unsupervised contrastive learning space weight coefficient.

10. The multimodal sentiment analysis method based on hybrid contrastive learning and multi-task learning as described in claim 9, characterized in that: The formula for calculating direction is: in, In the formula, ||·|| represents L2 normalization; It represents the average value of positively labeled multimodal features in the common semantic feature space; It represents the average value of the negatively labeled multimodal features in the common semantic feature space; The formula for calculation is: In the formula, for and Distance in the common semantic feature space; The maximum distance within the pre-defined public semantic feature space; This represents the distance between the positive and negative label value ranges in the label space. The formula for calculation is: This is the maximum distance within the pre-defined public semantic feature space.

Citation Information

Patent Citations

  • Fitness training management method and system based on smart bracelet and human body three-dimensional reconstruction

    CN113657266A

  • Video emotion classification method based on gating fusion and multi-task learning

    CN115203409A