A cross-database speech emotion recognition method based on sample balance and maximum mean difference
Through the combination of MMD distance and Frobenius norm, the problem of data distribution differences and sample imbalance in cross-database speech emotion recognition is solved, the accuracy and diversity of speech emotion recognition are improved, and a more effective domain adaptation process is achieved.
Patent Information
- Application Number
- CN202110803192.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-15
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-07-15
AI Technical Summary
The accuracy of speech emotion recognition systems decreases when processing data with different distributions, and target domain data labels are difficult to obtain, resulting in poor performance in cross-database speech emotion recognition, especially due to differences and imbalances in sample distribution.
The MMD distance is used to align the feature distribution of the source domain and the target domain, and the prediction diversity of the model is enhanced by maximizing the Frobenius norm. The Alexnet network and backpropagation algorithm are combined for model training to optimize feature extraction and sample equalization processing.
It effectively reduces the data distribution difference between the source domain and the target domain, improves the accuracy and diversity of cross-database speech emotion recognition, enhances the discriminative ability of the model, and improves the recognition performance in practical applications.
Smart Images

Figure 210715193319 
Figure 210715193321 
Figure BDA0003165423970000021
Abstract
Description
Technical Field
[0001] The present invention relates to a domain adaptive cross-database speech emotion recognition method based on feature distribution alignment and sample balance. Background Art
[0002] Emotion is an important part of human intelligence. Giving computers the ability to recognize emotions is a cutting-edge topic in current deep learning. At present, research on emotion recognition mainly focuses on language emotion recognition, facial expression recognition, and text emotion recognition. As one of the most convenient and effective ways for humans to communicate emotions and thoughts, speech is a key research topic in the field of emotion recognition. When the training and test data are co-distributed, the speech emotion recognition system can achieve high accuracy. However, in many practices in the field of speech emotion recognition, this assumption is often not true. The accuracy of the SER (Speech Emotion Recognition) system drops significantly when processing unexpected data (i.e., test set data with a different distribution from the training set data). It is challenging to design a robust SER model. The current limitations of this technology also restrict the development of speech emotion recognition in practical applications.
[0003] If we want to solve the problem of sentiment classification of unlabeled speech data, the most effective method should be to manually annotate a considerable part of the speech data for training, and then use the trained model to classify large quantities of speech. However, speech sentiment data is difficult to annotate, especially when the context is unknown. Therefore, how to use existing labeled datasets to classify unlabeled datasets has become a research focus. How to overcome the differences between the two datasets, such as the speaker's voice quality, pronunciation environment, and language differences. For this problem, more and more researchers are trying to introduce the concept of transfer learning, aligning the features of the two databases at the level of feature distribution to train an efficient model. At present, certain results have been achieved, and using transfer learning to complete cross-database speech emotion recognition has become an important research direction.
[0004] Transfer learning can be used to improve the performance of machine learning models on cross-domain tasks. When a large amount of labeled data is not available in the target domain to train a machine learning model with good performance, it is possible to consider pre-training the model in a different but related source domain with a large amount of labeled data, and then adjust the pre-trained model and apply it to the target domain. This overcomes the difficulty of obtaining target domain data labels in practical applications. However, cross-domain data distribution differences have become an obstacle to model migration. Domain Adaptation aims to learn a model so that the knowledge learned in the source domain can be well generalized in the target domain. Introducing domain adaptation technology can reduce the data distribution differences between the source domain and the target domain, thereby achieving cross-domain migration and reuse of domain-invariant knowledge.
[0005] Therefore, the present invention mainly focuses on how to solve the problems of sample distribution differences and sample imbalance, and further improve the cross-database speech emotion recognition effect. There are data distribution differences between the target domain and the source domain. The imbalance of samples of each category in the target domain will make the data misclassification problem more serious. The learning ability of the model can be enhanced by aligning feature distribution and enhancing the discrimination ability of fuzzy samples. After the deep learning model classifies the input, it often outputs a probability matrix. The classifier will only classify according to the probability of belonging to each category. However, the category with a large number of samples will gradually dominate the model. Therefore, it is very important to select a parameter to adjust the problem of sample imbalance. On the basis of traditional domain adaptation, the present invention uses MMD distance to align the feature distribution of the source domain and the target domain, and selects Frobenius norm to adjust the prediction ability of the model, which can not only ensure the discriminability of the model to the samples, but also ensure the diversity of the model prediction samples, thereby realizing a more effective domain adaptation process. Summary of the invention
[0006] There are currently two major problems with cross-database speech emotion recognition. First, the data distribution between the source domain and the target domain is different. Second, the samples between categories in the target domain are unbalanced. This method uses the MMD distance to align the feature distribution of different databases for problem one, and uses the Frobenius norm maximization to ensure the diversity of predictions for problem two. The specific steps are as follows:
[0007] (1) Speech preprocessing: The continuously sampled speech signal in the time domain is framed, windowed, and subjected to short-time discrete Fourier transform processing to extract the spectrogram. The spectrogram intuitively reflects the energy strength of the speech frequency components at each moment and contains rich speech emotion information.
[0008] (2) Feature extraction: The spectrogram extracted in step (1) is the expansion of the one-dimensional speech signal in the two-dimensional time domain and frequency domain. Alexnet is used to extract deep features from the spectrogram.
[0009] (3) Feature alignment: The feature matrix generated in step (2) is input into the MMD module, which maps the source domain and target domain features to the Reproducing Kernel Hilbert Space (RKHS) and finds the mapping function The distance between the transformed source domain and the target domain is minimized. The source domain target domain distance is defined as follows:
[0010]
[0011] (4) Sample balancing: The feature matrix in step (2) becomes the prediction probability matrix P after Softmax processing. i,j, and perform double Frobenius norm maximization processing on it. First, in the method of using entropy minimization to ensure the accuracy of model prediction, the Frobenius norm and entropy H(X) have strictly opposite monotonicity. Therefore, maximizing the Frobenius norm can ensure the minimization of H(X) and increase the accuracy of model prediction. At the same time, in order to make up for the fuzzy sample misjudgment caused by the entropy minimization method, the difference between each row in the output prediction matrix and all the rows below it is calculated to construct the sample spacing measurement matrix D. At this time, maximizing the Frobenius norm of the matrix D can make the prediction category richer while ensuring the model prediction accuracy, and protect the fuzzy samples on the decision boundary. The process is as follows:
[0012]
[0013]
[0014]
[0015]
[0016] Among them, Q is the quotient of batchsize divided by the number of categories j, R is the remainder of batchsize divided by the number of categories j, and the dimension of D is the number of categories j multiplied by OK;
[0017] (5) Model training: The spectrogram obtained in step (1) is directly input into the Alexnet network, and the features of the source domain and the target domain are measured by MMD to obtain the feature distribution difference loss L mmd , the labeled source domain data passes through the classifier and obtains the classification loss L cls , the prediction matrix obtained after the unlabeled target domain data passes through the feature extraction network is converted into a sample spacing metric matrix, and the Frobenius norm maximization operation is performed on the metric matrix to obtain a loss of L fnm , the model is trained using the back propagation algorithm, and the total loss is as follows:
[0018] L all
[0019] =L cls +L mmd +L fnm (12)
[0020] (6) Repeat steps (2)(3)(4) to optimize the network model parameters;
[0021] (7) After a certain number of iterations, the optimal model under the guidance of this method is obtained, achieving improved cross-database speech emotion recognition performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] As shown in the attached figure, Figure 1 is a flow chart for realizing the present invention, Figure 2 This is a model framework diagram of a cross-database speech emotion recognition method based on sample balance and maximum mean difference. DETAILED DESCRIPTION
[0023] The present invention will be further described below in conjunction with specific implementation methods.
[0024] (1) Feature extraction: Speech is modeled as an image, and image features are used to describe information related to speech emotion. The speech spectrum reflects the dynamic spectrum process of the speech signal, breaking through the singleness of traditional spectrum-related features. It comprehensively considers the frequency domain and time domain of the spectrum, uses a two-dimensional plane to express three-dimensional information, and extracts more emotion-related information. The speech signal is divided into frames and windows, and then the short-time Fourier transform of each frame is calculated to obtain a two-dimensional frequency energy matrix, which is then processed to obtain different spectrograms.
[0025] (2) After the spectrogram data obtained in step (1) are classified, they are input into the pre-trained Alexnet network for feature extraction. The Alexnet network includes five convolutional layers and three fully connected layers. Since the spectrogram features are more reflected in the feature texture rather than the background information, maximum pooling is used to avoid the blurring effect of average pooling, and the step size is made smaller than the pooling kernel size, so as to generate overlap between the outputs of the pooling layer, improve the richness of the features, and reduce information loss.
[0026] (3) Input the source domain and target domain features extracted by the Alexnet network into the MMD module, and map the two feature matrices to the Reproducing Kernel Hilbert Space (RKHS), so that the distribution of the two domains can be represented by the inner product of two points, and find the mapping function , so that the feature distribution distance between the transformed source domain and the target domain is minimized, the feature distribution distance between the source domain and the target domain is calculated, and the MMD loss L is constructed mmd , back-propagation is used to train the feature extraction network, allowing the network to extract source domain and target domain features with a smaller distribution distance.
[0027] (4) The source domain features extracted by the Alexnet network are processed by Softmax and then classified, and compared with the source domain labels to obtain the classification loss L clsAfter the target domain features are processed by Softmax, a Batch prediction probability matrix is obtained. Combined with the entropy minimization method, the prediction probability matrix P is processed by maximizing the Frobenius norm to minimize the entropy value of the matrix P, thereby ensuring the prediction accuracy of the model. For the fuzzy sample misjudgment caused by the entropy minimization method, the output prediction probability matrix P is used to construct the sample spacing measurement matrix D, as follows:
[0028]
[0029]
[0030] It can be seen that the matrix D can effectively measure the distance between samples. Maximizing the Frobenius norm of the matrix D can effectively increase the distance between the predicted samples. Therefore, without affecting the classification performance, maximizing the Frobenius norm can play a certain protective role for categories with fewer samples. Constructing a Frobenius norm maximization loss function can ensure prediction diversity and prevent the model's prediction from collapsing to categories with only large samples.
[0031] (5) Combined with the source domain classifier loss L in the model cls , feature distribution difference loss L mmd and the Frobenius norm maximizes the loss L fnm , perform back-propagation training on the model, iteratively optimize network parameters, and improve the performance of cross-database speech emotion recognition.
[0032] The scope of protection sought for the present invention is not limited to the description of this specific embodiment.
Claims
1. A cross-database speech emotion recognition method based on sample balance and maximum mean difference, comprising the following steps: (1) Speech preprocessing: The continuously sampled speech signal in the time domain is framed, windowed, and subjected to short-time discrete Fourier transform processing to extract the spectrogram. The spectrogram intuitively reflects the energy strength of the speech frequency components at each moment and contains rich speech emotion information. (2) Feature extraction: The spectrogram extracted in step (1) is the expansion of the one-dimensional speech signal in the two-dimensional time domain and frequency domain. Alexnet is used to extract deep features from the spectrogram. (3) Feature alignment: The feature matrix generated in step (2) is input into the MMD module, which maps the source domain and target domain features into the regenerated Hilbert space and finds the mapping function The distance between the transformed source domain and the target domain is minimized. The distance between the source domain and the target domain is defined as: (4) Sample balancing: The feature matrix in step (2) becomes the prediction matrix P after Softmax processing. i,j , and perform double Frobenius norm maximization processing on it. First, in the method of using entropy minimization to ensure the accuracy of model prediction, the Frobenius norm and entropy H(X) have strictly opposite monotonicity. Therefore, Frobenius norm maximization ensures the minimization of H(X) and increases the accuracy of model prediction. At the same time, in order to make up for the fuzzy sample misjudgment caused by the entropy minimization method, the difference between each row in the output prediction matrix and all the rows below it is calculated to construct the sample spacing measurement matrix D. At this time, maximizing the Frobenius norm of the matrix D makes the prediction category richer while ensuring the model prediction accuracy, and protects the fuzzy samples on the decision boundary. The process is: Among them, Q is the quotient of batchsize divided by the number of categories j, R is the remainder of batchsize divided by the number of categories j, and the dimension of D is the number of categories j multiplied by OK; (5) Model training: The spectrogram obtained in step (1) is directly input into the Alexnet network, and the features of the source domain and the target domain are measured by MMD to obtain the feature distribution difference loss L mmd , the labeled source domain data passes through the classifier and obtains the classification loss L cls , the prediction matrix obtained after the unlabeled target domain data passes through the feature extraction network is converted into a sample spacing metric matrix, and the Frobenius norm maximization operation is performed on the metric matrix to obtain a loss of L fnm , the model is trained using the back propagation algorithm, and the total loss is: L all =L cls +L mmd +L fnm (6) (6) Repeat steps (2)(3)(4) to optimize the network model parameters; (7) After iterations, the optimal model is obtained, achieving improved cross-database speech emotion recognition performance.
