Sample-crossing modal dynamic rotation emotion recognition method and system
Through cross-sample modal dynamic rotation and gated residual attention mechanism, the order of modal fusion is dynamically adjusted, which solves the problem of imbalance of semantic information between modalities in multi-modal emotion recognition and improves the accuracy and effectiveness of emotion recognition. sex.
Patent Information
- Application Number
- CN202410859676.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-28
AI Technical Summary
In existing multi-modal emotion recognition technology, the imbalance of emotional semantic information between modalities leads to low accuracy of emotional analysis, and the traditional static modal fusion sequence ignores the heterogeneity between modalities, resulting in biased results.
A cross-sample modal dynamic rotation emotion recognition method is proposed, which captures the interactive attributes between modalities through a gated residual attention mechanism, dynamically adjusts the modal fusion order, and combines single-modal independent emotional annotation to achieve deeper intra-modal understanding. Homogeneous and heterogeneous feature extraction.
It improves the accuracy and effectiveness of emotion recognition, breaks through the limitations of traditional static modal fusion order, enhances the tightness of information fusion between modalities, and achieves good experimental results.
Smart Images

Figure CN118734248A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of multimodal sentiment analysis, and specifically relates to a sentiment recognition method and system for dynamic rotation across sample modalities. Background Art
[0002] In human social interactions, expressions between people often contain rich emotional values. The complexity of their recognition lies in the fact that they are the result of cross-expression in multiple ways (for example, facial and body movements, voice, and language). Therefore, multimodal fusion has always been the focus of people's attention. Unlike single-modal emotion recognition, which only mines the emotional clues contained in one modality, multimodal emotion recognition focuses more on the mining of isomorphism and heterogeneity between multiple modalities. It not only needs to consider the common characteristics between multiple modalities, but also needs to capture and analyze the heterogeneous characteristics of the modalities themselves in a more detailed manner. However, the emotional semantic information contained in multiple modalities themselves is unequal, that is, the emotional semantic information between modalities is unbalanced. This phenomenon can easily lead to semantic information overload of a certain modality. The modality with overloaded emotional semantic information often receives too much attention, which results in the order of fusion between modalities generally focusing on it. For specific cases, please refer to Figure 1 In contrast, this ignores the importance of the secondary modality, causing the overall fusion result to be overly dependent on the primary modality and thus biased. Mohit et al. have confirmed that the different order of modal fusion will have a great impact on the results of sentiment analysis.
[0003] The modal fusion order adopted by most studies is mostly a general fusion order with text modality as the main and non-text modality as the auxiliary. And this order is a static and fixed fusion order that is implemented in the entire emotion recognition framework. For example, the AMOA model proposed by Ziming Li et al. introduced global acoustic features into the field of multimodal sentiment analysis and proposed a modal integration order of text, audio, and video; MOsarcation et al. further studied the impact of modal injection order on sarcasm detection and discovered the optimal modal fusion order through experiments. This fusion order is essentially a modal fusion order under a fixed static mode. Since it does not take into account the unequal emotional semantic information of different modalities at the cross-sample level, the accuracy of sentiment analysis is not high.
[0004] To this end, the present invention proposes an emotion recognition method and system with dynamic rotation across sample modalities. By considering the impact of sequential interactions of different modalities across samples on the multimodal sentiment analysis results and combining the independent sentiment annotations of the single modality itself, it aims to solve the capture of isomorphic heterogeneity between modalities from the level of modal fusion order, so that the system can more effectively detect more contradictory multimodal unified emotions.
[0005] Explanation of terms
[0006] Dynamic rotation: In different training batches, the rotation order of each mode is determined by taking samples as units. Because the direction of the dynamic replacement order of the three modes is similar to dynamic rotation, it is named dynamic rotation. Summary of the invention
[0007] The purpose of the present invention is to propose a cross-sample modality dynamic rotation emotion recognition method in order to address the neglect and shortcomings of the prior art, so as to accurately grasp the interactive properties between each feature, capture deeper intra-modal isomorphic and heterogeneous characteristics, and thus improve the accuracy and effectiveness of emotion recognition. First, multimodal data and sentiment classification annotations are obtained and modal features are extracted from them. Then, the corresponding features are processed into preliminary modal feature information respectively. Then, from the perspective of the dynamic modal fusion order based on samples, the influence of the independent sentiment annotation of the single modality itself on the final sentiment analysis result is considered, and the gated residual attention mechanism is used to capture deeper single-modal independent sentiment heterogeneous features. Finally, a solution and model are proposed, and good experimental results are achieved on two data sets for single-modal independent sentiment annotations.
[0008] In a first aspect, the present invention provides a method for emotion recognition with dynamic rotation across sample modalities, the method comprising the following steps:
[0009] Step 1: According to the video, obtain multimodal data and corresponding sentiment classification annotations; the multimodal data includes text modality, audio modality, and visual modality; the sentiment classification annotations include multimodal unified sentiment classification annotations and three modality independent sentiment classification annotations;
[0010] Step 2: Preprocess the multimodal data through the corresponding modal encoder to obtain the corresponding preliminary modal feature information; the preliminary modal feature information X m Including language embedding features, visual embedding features, and audio embedding features, m = l, v, a represent language embedding features, visual embedding features, and audio embedding features respectively;
[0011] Step 3: Process the preliminary modal feature information using a gated residual self-attention mechanism to obtain a modal self-attention feature; the modal self-attention feature Including language self-attention features Visual self-attention features Characteristics of auditory self-attention Specifically:
[0012] The preliminary modal feature information is processed by the gated residual self-attention mechanism, and a deeper modal self-attention feature is obtained after multiple iterations. and the gated residual attention factor
[0013]
[0014] Among them, GatedResiAtten self (·) represents the gated residual self-attention mechanism; For the nth iteration modal self-attention feature, initialize is the gated residual attention factor of the nth iteration, and N represents the maximum number of iterations.
[0015] Step 4: Based on the modal self-attention features obtained in step 3, calculate the multimodal fusion order of the three modalities. This fusion method is slightly modified based on the gated residual self-attention mechanism proposed in step 3; specifically:
[0016] S4-1. Extract the feature information corresponding to the unimodal independent sentiment annotation from the modal self-attention features and aggregate them into a modal score sequence
[0017]
[0018] in, Represents the unimodal independent sentiment classification annotation y corresponding to modality m i The i-th score sequence of ; B is the number of sample batches, ∑ represents the summation operator; Match(·) represents the matching operation; Softmax(·) is the activation function, which performs the probability distribution calculation so that the value of each sequence position is between 0 and 1, and the sum of all positions is 1;
[0019] S4-2. Calculate the difference ratio ρ between two modes bc ;
[0020]
[0021] in, They represent the score sequences of two different modalities, b and c do not represent specific modal features, i represents the independent sentiment annotation of the corresponding sample; subscript j represents the corresponding relative position of the score sequence; ρ bc It is a general method to calculate the difference ratio between two modes, including ρ va ,ρ vl ,ρ al If bc >1, it indicates a fractional sequence D represents the feature dimension;
[0022] S4-3, by comparing the score sequences of the three modes, the main mode P in the current mode rotation cycle is obtained;
[0023]
[0024] Among them, Sort(·) means to sort the three difference ratios from large to small. If the first two selected difference ratios both contain a certain mode, then the mode is set as the main mode P; Both represent the identity after taking the mean of the sequence values;
[0025] S4-4. According to the main modality P, the modal self-attention features of the remaining two modalities are used as the secondary modality I i ;
[0026] Minor Mode I i Perform similarity measurement calculations with P respectively, and find the modal feature with the closest similarity to P (that is, the degree of alignment of the two modalities) as the second modal feature;
[0027]
[0028] Among them, M PI Represents the obtained main mode P and secondary mode I i The similarity measurement matrix of the secondary mode I i is a general reference, i represents the numbers of the remaining two modes; μ PI is the learnable threshold hyperparameter;
[0029] According to the main mode P and the second mode features, the three modes can be sorted to obtain the multimodal fusion order;
[0030] Step 5: According to the multimodal fusion order in step 4, cross-modal fusion of modal self-attention features is performed;
[0031] Step 6: Input the multimodal fusion result into the classifier to obtain the emotion recognition result;
[0032] In a second aspect, the present invention provides an emotion recognition system, the system comprising the following:
[0033] The data acquisition module is responsible for acquiring multimodal data and sentiment classification annotations based on the video; the multimodal data includes textual modality, audio modality, and visual modality; the sentiment classification annotations include unified multimodal sentiment classification annotations and independent sentiment classification annotations of the three modalities;
[0034] The feature extraction module is responsible for preprocessing the multimodal data to obtain the corresponding preliminary modal feature information; the modal feature information includes language embedding features, visual embedding features, and audio embedding features;
[0035] The modal dynamic fusion module is responsible for measuring the richness of the emotional semantic information of each modality, obtaining the multimodal fusion order, and finally performing multimodal fusion according to the multimodal fusion order;
[0036] The recognition module is responsible for inputting the multimodal fusion results into the classifier to obtain the emotion recognition results;
[0037] In a third aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method described.
[0038] In a fourth aspect, the present invention provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method described is implemented.
[0039] The beneficial effects of the present invention are as follows:
[0040] 1. This paper proposes a new gated residual attention mechanism that is adapted to dynamic rotation across sample modalities, so as to capture the heterogeneous characteristics of modal attention under multiple layers of attention hierarchy while increasing the direct closeness of the hierarchy.
[0041] 2. This invention improves the inherent static modal fusion order and proposes for the first time a method of dynamic modal rotation based on samples, and has achieved good results on multiple datasets for single-modal independent sentiment annotations.
[0042] 3. This paper focuses on the problem of imbalanced sentiment semantic information between modalities, explores and studies the impact of modality priority on the field of multimodal sentiment detection, and breaks through the traditional priority mode, that is, the general fusion order with text modality as the main and non-text modality as the auxiliary. It proposes the idea of dynamically adjusting the fusion order of the modality itself according to independent sentiment annotations, which has made certain contributions to the field of sentiment recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 Description of the problem proposed for the present invention.
[0044] Figure 2 This is the overall structural diagram of the present invention (a multimodal rotation emotion feedback network based on gated residual attention).
[0045] Figure 3 This is a diagram of the gated residual self-attention model proposed in the present invention;
[0046] Figure 4 It is a flow chart of the score calculation diagram of the present invention (i.e., the score calculation part in the modal dynamic fusion score calculation module).
[0047] Figure 5 It is a flow chart of the rotation order similarity measurement diagram of the present invention (ie, the rotation order matrix measurement part in the modal dynamic fusion score calculation module).
[0048] Figure 6 Flowchart of the gated residual attention fusion module of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0051] The emotion recognition method of the present invention proposes the following ideas:
[0052] First, obtain multimodal data and sentiment classification annotations. Then, perform corresponding modality encoder preprocessing on different modal data, and project their time series feature dimensions into the same dimension to obtain the corresponding embedded feature information and modality feature information. Figure 3 Gated residual self-attention model diagram. The present invention finds that the use of an improved gated residual self-attention mechanism can effectively capture deeper modal attention features and is more suitable for the score calculation part of the modal order.
[0053] Based on the obtained modal attention feature part, the present invention considers the richness of modal emotional semantic information and combines the single modal independent emotional annotation with it to jointly calculate the integrated modal score sequence. The modal score queue will obtain different score results depending on the different characteristics of the sample itself in the modal rotation cycle, thereby obtaining different dynamic rotation orders. This part refers to the score calculation diagram Figure 4 Then, the modal attention feature with the richest emotional semantic information in the current rotation cycle is calculated based on the obtained modal score sequence, and its similarity is measured with the attention features of the remaining two modalities. For reference, the rotation order similarity measurement diagram Figure 5 Finally, the modal rotation order determined in the current rotation cycle is obtained. Finally, a multimodal fusion method based on a cross-modal gated residual attention mechanism is used to fuse according to the rotation order. Refer to the gated residual attention fusion module diagram Figure 6 .
[0054] Based on this, an embodiment of the present invention provides an emotion recognition method that dynamically rotates across sample modalities, such as Figure 2 The specific steps are as follows:
[0055] Step 1: Obtain multimodal data and sentiment classification annotations based on the video; the multimodal data includes text modality, audio modality, and visual modality; the sentiment classification annotations include multimodal unified sentiment classification annotations and three-modal independent sentiment classification annotations;
[0056] This paper selects three modalities as the main basis for emotion recognition, namely textual modality, visual modality, and audio modality; and divides the independent emotion recognition annotations contained in the three modalities in a more detailed way, that is, each modality itself contains certain emotion classification labels, reference Figure 1 .
[0057] Step 2: preprocess the multimodal data through the corresponding modal encoder to obtain corresponding preliminary modal feature information; the preliminary modal feature information includes language embedding features, visual embedding features, and acoustic embedding features; since the fusion method adopted in the present invention belongs to the late fusion method, each single modal encoder requires a separate training process, that is, the result obtained by each encoder can be used as the classification result of the single modality for its independent emotional annotation.
[0058] In the language embedding feature extraction part, the present invention uses the traditional natural language processing pre-trainer BERT (Bidirectional Encoder Representation from Transformers) to extract preliminary text features. In the sequence of the preprocessing process, the traditional token method is used to fill the text sequence length to 50. And for the individual text encoder, its optimizer uses AdamW for training.
[0059] In the extraction of visual embedding features and audio embedding features, both use Transformer encoders for feature preprocessing. In order to make them better adapt to the Transformer encoder, a position encoding training module is added to add tags similar to [CLS] in Transformer to help the Transformer encoder learn features at different positions in the two sequences. For both encoders, the optimizer is trained with Adam.
[0060] Step 3: Process the modal feature information using a gated residual self-attention mechanism to obtain a modal self-attention feature; the modal self-attention feature Including language self-attention features Visual self-attention features Characteristics of auditory self-attention like Figure 3 .
[0061] S3-1. After the modal feature information is transformed through the linear layer dimension, it is put into the gated residual self-attention mechanism to obtain the modal self-attention feature for the first time. and the gated residual attention factor The gated residual attention mechanism of the present invention is different from the traditional attention mechanism. The present invention strengthens the effect of the attention factor and retains the historical attention factor, namely the gated residual attention factor.
[0062]
[0063] Among them, GatedResiAtten self (·) represents the gated residual self-attention mechanism; is the nth iteration modal self-attention feature, is the gated residual attention factor of the nth iteration, and N represents the maximum number of iterations.
[0064] Specific modality self-attention features The solution is as follows:
[0065]
[0066] in, is the gated residual attention factor for the nth iteration; value matrix for The matrix space after linear layer projection; d is used for attention factor Scaling of fractions.
[0067]
[0068] Update Gate Corresponding to the current attention factor Weight ratio operation; forget gate The weight ratio operation corresponding to the gated residual attention factor retained in the previous iteration. That is, if it is the first iteration, No Gate forget Forget gate operation, at this time is a pure attention factor; otherwise, as described in the above formula, is the gated residual attention factor after mixing.
[0069] Attention Factor The specific formula is as follows:
[0070]
[0071] Among them, the bond matrix Query Matrix Both The matrix space after linear layer projection. Key matrix Value Matrix Query Matrix Initialization is defined as the preliminary modal feature information X m .
[0072] α shift The variable represents the proportion of α weight after the shift, which is used to adjust the two gating mechanisms for the current gated residual attention factor The following formula shows the influence of shift on α.
[0073]
[0074] The specific shift formula is as follows:
[0075]
[0076] Among them, Mean(·) is the mean function; tanh(·) is the activation function; Gate stable It represents the stable gate operation, which is actually a normalization layer used to stabilize the obtained value and prevent the value from exploding. From the above two formulas, we can see that shift can well reflect the current attention factor. The gated residual factor of the previous layer , thereby affecting the original fixed weight α of 0.5.
[0077] Step 4: Calculate the multimodal fusion order of the three modalities based on the modal self-attention features obtained in step 3. Note that the modal rotation order in the present invention is not run only once, but is dynamically rotated continuously within a certain rotation period in units of samples. Figure 4 , 5 :
[0078] S4-1. Extract the feature information corresponding to the unimodal independent sentiment annotation from the modal self-attention features and aggregate them into a modal score sequence
[0079]
[0080] in, Represents the unimodal independent sentiment classification annotation y corresponding to modality m iis the i-th score sequence of ; B is the number of sample batches, ∑ represents the summation operator; Match(·) represents the matching operation; Softmax(·) is the activation function, which performs the probability distribution calculation so that the value of each sequence position is between 0 and 1, and the sum of all positions is 1.
[0081] The specific implementation of the matching operation is:
[0082] extract Medium and unimodal independent sentiment classification annotations y i The corresponding sample space is denoted as because
[0083] is a two-dimensional tensor, so Batch processing samples (bashsize) are compressed to obtain a modal score sequence;
[0084] S4-2. Calculate the difference ratio ρ between each pair of modes.
[0085]
[0086] in, They represent the score sequences of two different modalities, b and c do not represent specific modal features, i represents the independent sentiment annotation of the corresponding sample; subscript j represents the corresponding relative position of the score sequence; ρ bc It is a general method to calculate the difference ratio between two modes, including ρ va ,ρ vl ,ρ al If ρ bc >1, it indicates a fractional sequence D represents the feature dimension.
[0087] S4-3. By comparing the score sequences of the three modes, the main mode P in the current modal rotation cycle is obtained.
[0088]
[0089] Among them, Sort(·) means sorting the three difference ratios from large to small. If the first two selected difference ratios both contain a certain mode, then the mode is set as the main mode P. Both represent the identity after taking the mean of the sequence values.
[0090] S4-4. According to the main modality P, the modal self-attention features of the remaining two modalities are used as the secondary modality I i ;
[0091] Minor Mode I iPerform similarity measurement calculations with P respectively, and find the modal feature with the closest similarity to P (that is, the degree of alignment of the two modes) as the second modal feature.
[0092]
[0093] Among them, M PI Represents the obtained main mode P and secondary mode I i The similarity measurement matrix of the secondary mode I i is a general reference, i represents the numbers of the remaining two modes; μ PI is a learnable threshold hyperparameter.
[0094] According to the main mode P and the second mode characteristics, the three modes can be sorted to obtain the multimodal fusion order.
[0095] Step 5: According to the multimodal fusion order calculated in step 4, the modal self-attention features are cross-modally fused based on the gated residual attention mechanism;
[0096] Based on the gated residual self-attention mechanism in step three, the input object is changed and the self-loop iteration part is removed.
[0097] The implementation process of cross-modal fusion based on the gated residual attention mechanism is as follows:
[0098]
[0099] in, Represents the modal self-attention features of the main modality, the second modality, and the third modality, respectively, and its value is the corresponding GatedResiAtten cross (·) represents the gated residual attention mechanism, is the gated residual attention factor obtained by fusing the first modality with the second modality;
[0100] But the difference is that the input object of the gated residual self-attention mechanism and In the above formula, due to This is the first fusion, so there is no gated residual attention factor, where the superscript is always 0 to indicate loop iteration; These are the modal self-attention features of each modality after being processed by the gated residual self-attention mechanism. Specifically refers to three modes, but since the modal fusion is based on samples to perform dynamic modal sequence rotation, the present invention uses the main mode P and the secondary mode I i It is worth noting that the key matrix in the gated residual self-attention mechanism Query Matrix Value Matrix Both The matrix space after linear layer projection, but in the above gated residual attention mechanism, the key matrix Value Matrix The input variable is changed to the attention matrix space of the secondary modality, and the query matrix The input is changed to the attention matrix space of the main modality. is the gated residual attention factor obtained by fusing the first modality with the second modality; Represents the final result of the three-modal fusion.
[0101] Step 6: Input the multimodal fusion results into the classifier to obtain the emotion recognition results.
[0102] The classifier adopts the traditional perceptron structure, which is implemented by superimposing a linear layer (nn.linear) and an activation function (nn.GELU). The activation function is used to calculate the probability weight of sample classification, and the linear layer is used to map the feature space of the result into the sample label space and integrate it into a numerical value.
[0103] In the present invention, the recognized sentiment classification result does not use a simple loss function, but a specific objective function designed for the method, as follows:
[0104] L all =L pred +βL uni
[0105] Among them, L pred express The loss comparison between the predicted classification result and the actual classification result input into the classifier; L uni Comparison of the loss between the classification results obtained by putting the modal self-attention features of each modality obtained above into a single-modal independent sentiment classifier and the actual classification results; β is the weight ratio.
[0106] Finally, the model proposed in this paper was tested on two multimodal emotion-related and industry-recognized public datasets, and related ablation experiments were performed. The datasets and parameter settings are as follows:
[0107] In sarcasm identification, the present invention uses Chinese multimodal sentiment analysis datasets CH-SIMS and CH-SIMS2.0 to verify the effectiveness of the model of the present invention.
[0108] (1) CH-SIMS: Publicly released in 2020, it is a Chinese unimodal and multimodal sentiment classification dataset that contains 2,281 refined video clips in the wild with multimodal and independent unimodal annotations, allowing researchers to study the interaction between modalities or perform unimodal sentiment analysis using independent unimodal sentiment classification annotations.
[0109] (2) CH-SIMS2.0: This dataset is a supplementary and advanced version of CH-SIMS, released in 2022. Based on CH-SIMS, this dataset focuses more on the collection of expressive audio and visual behaviors, and in a variety of video scenes, so that it not only contains conventional emotion classification, but also contains other instances of ambiguous, sarcastic, and metaphorical text modalities.
[0110] Due to the particularity of single-modal independent sentiment classification annotation, the present invention uses the above two data sets for testing. In terms of evaluation methods, the present invention adopts common evaluation methods in multi-classification, namely, the accuracy of two-classification acc-2, the F1 score of two-classification, the accuracy of three-classification acc-3, the accuracy of five-classification acc-5, the mean absolute error MAE and the correlation coefficient Corr.
[0111] The fusion method adopted by the model is late fusion based on the gated residual attention mechanism, that is, the three unimodal encoders require additional training parameters. For the audio encoder and the visual encoder, the training batch size is 64, the learning rate is 0.0001, and the number of iterations is 300; for the text encoder, the training batch size is 64, the learning rate is 0.00001, and the number of iterations is 150. The model uses the Adamax optimizer as the target optimizer, with a training batch size of 32, a learning rate of 0.0001, and a number of iterations of 50.
[0112] Experimental results analysis:
[0113] The experimental evaluation results of the present invention are better than the evaluation results of similar models on various data sets, which shows that the emotion recognition method of the present invention based on the gated residual attention mechanism and dynamic rotation of cross-sample modalities has certain rationality and reliability. The average accuracy of the two-class classification on the two data sets reached 84.03% and 83.17% respectively; the three-class classification accuracy was 73.09% and 77.66% respectively. This has a relatively large advantage over other similar emotion recognition models, such as LF_DNNv2 (acc-2: 77.24%), AF_Self-MM (acc-2: 80.6%), BIMHA (acc-2: 82.71%, acc-3: 69.23%), MMML (acc-2: 82.93%, acc-3: 69.37%), ALMT (acc-2: 81.19%, acc-3: 68.93%), and ConFEDE (acc-2: 82.23%, acc-3: 70.15%).
Claims
1. A method for emotion recognition with dynamic rotation across sample modalities, characterized in that The method comprises the following steps: Step 1: According to the video, obtain multimodal data and corresponding sentiment classification annotations; the multimodal data includes text modality, audio modality, and visual modality; the sentiment classification annotations include multimodal unified sentiment classification annotations and three modality independent sentiment classification annotations; Step 2: Preprocess the multimodal data through the corresponding modal encoder to obtain the corresponding preliminary modal feature information X m , m = l, v, a represent language embedding features, visual embedding features, and audio embedding features respectively; Step 3: Preliminary modal feature information X m Perform gated residual self-attention mechanism processing to obtain modal self-attention features Step 4: Modal self-attention features obtained in step 3 Get the multimodal fusion order; Step 5: According to the multimodal fusion order in step 4, the modal self-attention features Perform cross-modal fusion; Step 6: Input the cross-modal fusion result of step 5 into the classifier to obtain the emotion recognition result.
2. The method according to claim 1, characterized in that Step three is as follows: The preliminary modal feature information X m After multiple iterations of gated residual self-attention mechanism, a deeper modal self-attention feature is obtained. and the gated residual attention factor Among them, GatedResiAtten self (·) represents the gated residual self-attention mechanism; For the nth iteration modal self-attention feature, initialize is the gated residual attention factor of the nth iteration, and N represents the maximum number of iterations.
3. The method according to claim 2, characterized in that In step 3, the gated residual self-attention mechanism is specifically: in, is the gated residual attention factor of the nth iteration, when initialized Value Matrix for The matrix space after linear layer projection; d is used for attention factor Scaling of fractions; in, is the attention factor; the key matrix Query Matrix Both Matrix space after linear layer projection; Initialize key matrix Value Matrix Query Matrix Defined as the preliminary modal feature information X m ; α shift is the α weight ratio after shift.
4. The method according to claim 3, characterized in that In step three, Mean(·) is the mean function; tanh(·) is the activation function; Gate stable Indicates stable door operation.
5. The method according to claim 1, characterized in that Step 4 is as follows: S4-1. Extract the feature information corresponding to the unimodal independent sentiment annotation from the modal self-attention features and aggregate them into a modal score sequence in, Represents the unimodal independent sentiment classification annotation y corresponding to modality m i is the i-th score sequence of ; B is the number of sample batches, ∑ represents the summation operator; Match(·) represents the matching operation; Softmax(·) is the activation function; S4-2. Calculate the difference ratio ρ between two modes bc ; in, They represent the score sequences of two different modes respectively, and j represents the corresponding relative position of the score sequences; S4-3. By comparing the difference ratios ρ of the three modes bc , get the main mode P in the current mode rotation period; Wherein, Sort(·) means that the first two difference ratios are taken after the means of the three difference ratios are sorted in descending order, and the common mode of the two difference ratios is the main mode P; S4-4. According to the main modality P, the modal self-attention features of the remaining two modalities are used as the secondary modality I i ; Minor Mode I i Calculate the similarity with the main mode P respectively, and find the modal feature with the closest similarity to P as the second modal feature; According to the main mode P and the second mode, the three modes can be sorted to obtain the multimodal fusion order.
6. The method according to claim 5, characterized in that In step S4-4, the similarity M PI The calculation is: Among them, μ PI is a learnable threshold hyperparameter.
7. The method according to claim 1, characterized in that Step 5 specifically uses the gated residual attention mechanism to achieve cross-modal fusion; the implementation process is as follows: in, Represents the modal self-attention features of the main modality, the second modality, and the third modality, respectively, and its value is the corresponding GatedResiAtten cross (·) represents the gated residual attention mechanism, is the gated residual attention factor obtained by fusing the primary modality with the secondary modality.
8. An emotion recognition system implementing the method according to any one of claims 1 to 7, characterized in that The system comprises the following: The data acquisition module is responsible for acquiring multimodal data and sentiment classification annotations based on the video; the multimodal data includes text modality, audio modality, and visual modality; The sentiment classification annotations include unified multimodal sentiment classification annotations and independent sentiment classification annotations of three modalities; The feature extraction module is responsible for preprocessing the multimodal data to obtain the corresponding preliminary modal feature information; the modal feature information includes language embedding features, visual embedding features, and audio embedding features; The modal dynamic fusion module is responsible for measuring the richness of the emotional semantic information of each modality, obtaining the multimodal fusion order, and finally performing multimodal fusion according to the multimodal fusion order; The recognition module is responsible for inputting the multimodal fusion results into the classifier to obtain the emotion recognition results.
9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.
10. A computing device, comprising a memory and a processor, wherein the memory stores executable codes, and when the processor executes the executable codes, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Voice emotion recognition method based on global perception cross-modal feature fusion network
CN115730203A
Short video classification method based on multi-modal information aggregation
CN116189047A
Multi-modal emotion recognition method and system for guiding attention fusion based on text modal, and storage medium
CN117786596A
Method for multimodal emotion classification based on modal space assimilation and contrastive learning
US20240119716A1
