Training method of synthetic sound quality evaluation model based on quality contrast learning

Through a three-stage training method, including large-scale data set training, intermediate task contrast learning and downstream task head training, the data misfit and overfitting problems of the speech quality assessment model when the pre-training model is introduced are solved, and the model's performance is improved. Evaluating accuracy and human rating correlation.

CN116524958BActive Publication Date: 2024-10-22NANKAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310623577.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-10-22
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

Existing speech quality assessment methods have problems with data misfit and training target mismatch when introducing pre-training models, which affects model evaluation performance and cannot effectively alleviate the problems of over-fitting and poor performance.

Method used

A three-stage training method is adopted. First, the model is trained on a large-scale data set. In the second stage, label score comparison learning is performed through intermediate tasks to adjust the representation distance of positive and negative sample pairs. In the third stage, the feature extraction part is retained and the downstream task head is added. , training with the goal of minimizing the mean square error of prediction scores and label scores.

Benefits of technology

Learning audio quality differences through intermediate tasks alleviates the problem of data misfit, improves the model's accuracy and correlation with human expert ratings, and improves the accuracy and generalization ability of speech quality assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116524958B_ABST
    Figure CN116524958B_ABST
Patent Text Reader

Abstract

The present invention belongs to the field of computer processing technology, and more specifically, relates to a training method for a synthetic sound quality evaluation model based on quality contrast learning. The method comprises the following steps: step S101, introducing a model trained on a large-scale data set as a pre-training model; step S102, setting an intermediate task, defining positive and negative samples, and dividing the positive and negative samples in the data set; step S103, defining a weighted loss function, controlling the training target, and adjusting the distance between the positive and negative sample pairs; step S104, adding an intermediate task head on the basis of the pre-training model, and training according to the above rules; step S105, retaining the feature extraction part obtained by the training in step S104, adding a downstream task head, and training with the goal of minimizing the mean square error of the prediction score and the label score.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer processing technology, and more specifically, relates to a training method for a synthetic sound quality evaluation model based on quality contrast learning. Background Art

[0002] Speech quality assessment is a major area of ​​speech technology research and is of great significance to the development of speech enhancement, speech synthesis and other fields. Among them, the mean opinion score (MOS) is the gold standard for speech quality evaluation and is widely used in various types of speech synthesis research. The mean opinion score experiment requires the experimenter to recruit a certain number of volunteers as subjects. On the basis of pre-training, the subjects will conduct quality assessment and scoring of the test speech in a specific experimental environment. The scoring results are sorted to obtain the final speech quality assessment score. This process is time-consuming and labor-intensive, and it is impossible to obtain more real-time feedback results. Therefore, researchers propose to use deep learning algorithms to automatically predict the mean opinion score and accurately evaluate the quality of synthesized speech at a lower time and economic cost.

[0003] Automatic evaluation methods for synthesized speech quality can be divided into two categories. The first category is single-stage training algorithms represented by MOSNet. This type of method uses convolutional neural networks and recurrent neural networks to build algorithm models, and then trains them on mean opinion score datasets to obtain speech quality assessment capabilities. However, due to the small datasets in this field, the model cannot be fully learned, and it is easy to have problems such as overfitting and poor performance. The second type of method is a two-stage training model represented by SSL-MOS. This type of model introduces a large model with strong representation capabilities for feature extraction, and builds a model by connecting several linear layers as downstream task heads. This type of model needs to go through two stages of training: first training on a large-scale dataset, and then fine-tuning on the mean opinion score dataset to obtain better performance.

[0004] The above methods are all classic methods for automatic evaluation of synthetic sound quality, especially the second method, which has become the mainstream method in this field. However, since the large model is not designed for automatic evaluation of synthetic sound quality, there are complex situations such as data incompatibility and training target mismatch during its introduction and use, which affects the model evaluation performance. Summary of the invention

[0005] In order to solve the various incompatibility problems of the existing methods when introducing pre-trained models and further improve the model quality assessment capability, the present invention provides a three-stage training method: an intermediate training stage is added during the pre-training and fine-tuning process, and the content of the intermediate task is to use label scores for comparative learning. The present invention can not only alleviate the incompatibility problem of the original method, but also enable the model to learn the ability to assess speech quality by comparing audio quality, thereby improving the accuracy of model prediction and its correlation with human expert scores.

[0006] To achieve the above object, the present invention adopts the following technical solution:

[0007] A training method for a synthetic sound quality evaluation model based on quality contrast learning, the method comprising the following steps:

[0008] Step S101, introducing a model trained on a large-scale dataset as a pre-training model;

[0009] Step S102, setting intermediate tasks, defining positive and negative samples, and dividing the data set into positive and negative samples;

[0010] Step S103, defining a weighted loss function, controlling the training target, and adjusting the distance between the representations of the positive and negative sample pairs defined in step S102;

[0011] Step S104, adding an intermediate task head based on the pre-trained model in step S101, and training according to the rules defined in steps S102 and S103;

[0012] Step S105, retain the feature extraction part obtained by the training in step S104, add a downstream task head, and perform training with the goal of minimizing the mean square error of the prediction score and the label score.

[0013] This technical solution is further optimized. In step S102, two samples i and j are recorded, and the corresponding quality score label is l i and l j , then the discriminant function isPositive(i,j) is:

[0014]

[0015] Among them, d is a preset parameter. In the above discriminant function, whether two samples belong to a positive sample pair does not depend on their respective scores, but on the distance between the two samples. When the distance between the two samples is less than the preset threshold, it is a positive sample pair, otherwise it is a negative sample pair. At the same time, by adjusting d, the granularity of the model to distinguish speech quality can be dynamically adjusted.

[0016] The technical solution is further optimized, and the step 103 introduces a weight coefficient w, and the weight is set as follows:

[0017]

[0018] The value of the weight coefficient is set according to two conditions: whether it is a positive or negative sample pair and the absolute value of the difference between the sample pair label scores. Therefore, the weighted loss function L w is defined as follows:

[0019]

[0020] Where i∈I≡{1,...,N} is the index of the training sample in each training batch, A(i)≡I\{i}, P(i)={p∈A(i):IsPositive(x i ,x a )=1},z i and z p is the representation vector corresponding to the audio, w ia is the weight formula above.

[0021] The technical solution is further optimized. The model structure trained in this stage of step 104 is that the pre-trained model converts the input audio into a [T, 768]-dimensional vector, where T is a dimension related to the audio length, and then uses an average pooling layer to pool the time dimension and convert it into a [1, 768]-dimensional feature vector. Then, two fully connected layers are connected as an intermediate task head to compress the 768-dimensional vector into a 128-dimensional vector to speed up the operation; the "pre-trained model + intermediate task head" model is trained through the rules designed in steps S102 and S103, so that the model indirectly learns to obtain general speech quality assessment capabilities by comparing audio quality.

[0022] This technical solution is further optimized, in which step 105 retains the feature extraction part of the model trained in step S104, discards the intermediate task head, and connects a fully connected layer as the downstream task head, outputting a 1-dimensional vector as the predicted quality assessment score. The training process aims to minimize the mean square error function of the predicted score and the label score.

[0023] Different from the prior art, the beneficial effect of the present invention is that it reduces the incompatibility problem of the original method in introducing the pre-trained model, and at the same time obtains the ability to evaluate the speech quality by learning the correlation between audios, which is not only beneficial to improving the accuracy, but also can improve the correlation with the human expert scores. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1A flow chart of a training method for a synthetic sound quality evaluation model based on quality contrast learning;

[0025] Figure 2 A visual comparison chart of the training results. DETAILED DESCRIPTION

[0026] In order to explain the technical content, structural features, achieved objectives and effects of the technical solution in detail, the following is a detailed description in conjunction with specific embodiments and accompanying drawings.

[0027] The technical solution adopted by the present invention is: the first stage is to train the model on a large-scale data set. The second stage is to perform intermediate task training based on the training in the previous stage, wherein the intermediate task refers to comparative learning training based on label scores to indirectly obtain speech evaluation capabilities: first, the positive sample pairs and negative sample pairs are divided according to the proposed definition. Since the label scores are continuous, the definition of positive and negative sample pairs is dynamically realized based on the relative score difference between the two audios. Then, during the learning process, the loss function is used to shorten the distance between the positive sample pairs and increase the distance between the negative sample pairs, so that the model can distinguish the audio quality. The third stage is to retain the model structure of the second stage and the weight parameters obtained through training, add a downstream task head, and train with the goal of minimizing the mean square error of the prediction score and the label score.

[0028] See also Figure 1 FIG. 1 is a flow chart of a training method for a synthetic sound quality evaluation model based on quality contrast learning. The method includes the following steps:

[0029] Step S101, introducing a model trained on a large-scale dataset as a pre-trained model.

[0030] Since the synthetic voice quality automatic evaluation dataset requires a lot of manual annotations and the synthetic voice quality evaluation dataset is small in scale, this low resource problem will seriously limit the performance and generalization ability of the model. However, the pre-trained models such as the wav2vec 2.0 model and the huber model trained on the Librispeech dataset have strong feature representation capabilities and can extract universal representations of speech. Therefore, using the pre-trained model as the upstream model of the synthetic voice quality evaluation task, that is, adding an upstream task - training wav2vec 2.0 in an unsupervised manner on large-scale datasets such as Librispeech, can improve the generalization ability and evaluation performance of the final model. The general usage method is two-stage training: first pre-train the model on a large dataset, and then add a downstream task head to fine-tune it on a small synthetic voice quality evaluation dataset. However, since there are large differences between the pre-training stage and the synthetic voice quality evaluation model training stage in terms of output label space and input training data distribution, this solution adds intermediate tasks to the traditional two-stage training to improve the evaluation performance.

[0031] Step S102, setting intermediate tasks, defining positive and negative samples, and dividing the data set into positive and negative samples.

[0032] The motivation for introducing the intermediate task is to alleviate the difference between the original two-stage training methods, so the setting of the intermediate task target is very critical. Existing synthetic sound quality assessment models such as MOSNet, DDOS, UTMOS, etc. all obtain quality assessment capabilities close to humans by learning the mapping relationship between audio and scores. However, the way humans obtain audio quality assessment is not to directly learn the relationship between audio and scores, but to naturally obtain it by comparing various quality audios in daily life. Based on this, this scheme sets the intermediate task to learn and compare the quality differences between audios by utilizing the relationship between audio and audio to obtain quality assessment capabilities. Specifically, this scheme uses quality contrast learning as an intermediate task. However, general contrast learning is used to deal with classification problems, which is not applicable in this field. Because the quality score is a continuous value, there is no natural category information in the audio. Therefore, it is necessary to specially design the discrimination of positive and negative samples in contrastive learning, specifically: record two samples i and j, and the corresponding quality score label is l i and l j , then the discriminant function isPositive(i,j) is:

[0033]

[0034] Where d is a preset parameter. In the above discriminant function, whether two samples belong to a positive sample pair does not depend on their respective scores, but on the distance between the two samples. When the distance between the two samples is less than the preset threshold, it is a positive sample pair, otherwise, it is a negative sample pair. At the same time, by adjusting d, the granularity of the model to distinguish speech quality can be dynamically adjusted.

[0035] Step S103, defining a weighted loss function, controlling the training target, and adjusting the distance represented by the positive and negative sample pairs defined in step S102.

[0036] General contrastive learning only considers shortening the distance between the representations of positive sample pairs and increasing the distance between the representations of negative sample pairs. However, in the problem of synthetic sound quality assessment, different negative sample pairs are different: some negative sample pairs have relatively small quality differences, while some negative sample pairs have relatively large quality differences. Therefore, this scheme further improves the loss function of contrastive learning to make full use of the distance difference between negative sample pairs and adjust the distance between the representations of negative sample pairs. As shown below, the weight coefficient w is introduced to adapt to this change. The size of the weight matrix W is N×N, where N is the size of a training batch, which can be set by yourself. The setting of the weight matrix W is as follows:

[0037]

[0038] The weight coefficient is set based on two conditions: whether it is a positive or negative sample pair and the absolute value of the difference between the sample pair label scores. Therefore, the weighted loss function L w is defined as follows:

[0039]

[0040] Where i∈I≡{1,...,N} is the index of the training sample in each training batch, a∈A(i)≡I\{i}, p∈P(i)={p∈A(i):IsPositive(x i ,x a )=1},z i and z p is the representation vector corresponding to the audio, w ia is the above weight formula, and τ is a hyperparameter used to scale the representation distance. Through the guidance of the above weighted loss function, it can be ensured that the model shortens the distance between positive sample pairs during training, and increases the distance between negative sample pairs to varying degrees according to the difference in label scores: the larger the difference in negative sample pairs, the farther the distance should be.

[0041] Step S104, adding an intermediate task head based on the pre-trained model introduced in step S101, and training according to the rules defined in steps S102 and S103.

[0042] The model structure trained in this stage is that the pre-trained model converts the input audio into a [T, 768]-dimensional vector, where T is the dimension related to the audio length, and then uses the average pooling layer to pool the time dimension and convert it into a [1, 768]-dimensional feature vector. Then, two fully connected layers are connected as intermediate task heads to compress the 768-dimensional vector into a 128-dimensional vector to speed up the operation. The "pre-trained model + intermediate task head" model is trained through the rules designed in steps S102 and S103, so that the model indirectly learns to acquire general speech quality assessment capabilities by comparing audio quality. The trained model is used to represent and extract the audio, and then tsne is used for dimensionality reduction and visualization to obtain the following: Figure 2The results shown are as follows: the left picture is the visualization of the original training results, and the right picture is the visualization of the training results of the present invention. The color represents the quality score of the audio. It can be found that the wav2vec 2.0 trained on Librispeech cannot distinguish the audio from the perspective of audio quality, but after the quality comparison learning designed by this solution, the model can effectively distinguish audio of different qualities. At the same time, since the learning goal of this stage is not to directly fit the error, but to learn to compare and distinguish audio quality like humans, this ability is universal, so the trained model has stronger generalization ability than other two-stage models, and performs better on cross-domain data.

[0043] Step S105, retain the feature extraction part obtained by the training in step S104, add a downstream task head, and perform training with the goal of minimizing the mean square error of the prediction score and the label score.

[0044] The feature extraction part of the model trained in step S104 is retained, the intermediate task head is discarded, and a fully connected layer is connected as the downstream task head, and the output 1-dimensional vector is the predicted quality assessment score. The training process aims to minimize the mean square error function of the prediction score and the label score. Through this stage of training, the model obtains the ability to evaluate the quality of synthesized sound by directly fitting the score, achieving excellent performance. As shown in the table below, the traditional two-stage training scheme is compared with this scheme. On the BVCC dataset, this scheme performs well in the eight indicators at the sentence level and the system level, achieving a lower error level (MSE) and a higher correlation level (LCC, SRCC and KTAU).

[0045] Table 1 Performance comparison between this solution and traditional solution

[0046]

[0047] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "include..." or "comprise..." do not exclude the existence of other elements in the process, method, article or terminal device including the elements. In addition, in this article, "greater than", "less than", "exceed" and the like are understood to exclude the number itself; "above", "below", "within" and the like are understood to include the number itself.

[0048] Although the above embodiments have been described, once those skilled in the art know the basic creative concepts, they can make additional changes and modifications to these embodiments. Therefore, the above description is only an embodiment of the present invention and does not limit the patent protection scope of the present invention. All equivalent structures or equivalent process changes made using the contents of the present invention specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A training method for a synthetic sound quality evaluation model based on quality contrast learning, characterized in that: The method comprises the following steps: Step S101, introducing a model trained on a large-scale dataset as a pre-training model; Step S102, setting intermediate tasks, defining positive and negative samples, and dividing the data set into positive and negative samples; In step S102, two samples i and j are recorded, and the corresponding quality score label is l i and l j , then the discriminant function isPositive(i,j) is: Wherein, d is a preset parameter. In the above discriminant function, whether two samples belong to a positive sample pair does not depend on their respective scores, but on the distance between the two samples. When the distance between the two samples is less than the preset threshold, it is a positive sample pair, otherwise, it is a negative sample pair. At the same time, by adjusting d, the granularity of the model to distinguish speech quality can be dynamically adjusted. Step S103, defining a weighted loss function, controlling the training target, and adjusting the distance between the representations of the positive and negative sample pairs defined in step S102; The step S103 introduces a weight coefficient w, and the size of the weight matrix W is N×N, where N is the size of a training batch. The weight is set as follows: The value of the weight coefficient is set according to two conditions: whether it is a positive or negative sample pair and the absolute value of the difference between the sample pair label scores. Therefore, the weighted loss function L w is defined as follows: Among them, i∈I≡{1,...,N} is the index of the training sample in each training batch, a∈A(i)≡I\{i}, p∈P(i)={p∈A(i):isPositive(x i ,x a )=1},z i and z p is the representation vector corresponding to the audio, w ia is the above weight formula, τ is a hyperparameter used to scale the representation distance; Step S104, adding an intermediate task head based on the pre-trained model in step S101, and training according to the rules defined in steps S102 and S103; Step S105, retain the feature extraction part obtained by the training in step S104, add a downstream task head, and perform training with the goal of minimizing the mean square error of the prediction score and the label score.

2. The method for training a synthetic sound quality assessment model based on quality contrast learning as claimed in claim 1, characterized in that: The model structure trained in this stage of step S104 is that the pre-trained model converts the input audio into a [T, 768]-dimensional vector, where T is a dimension related to the audio length, and then uses an average pooling layer to pool the time dimension and convert it into a [1, 768]-dimensional feature vector, and then connects two layers of fully connected layers as an intermediate task head to compress the 768-dimensional vector into a 128-dimensional vector to speed up the operation; the "pre-trained model + intermediate task head" model is trained through the rules designed in steps S102 and S103, so that the model indirectly learns to obtain general speech quality assessment capabilities by comparing audio quality.

3. The training method of the synthetic sound quality evaluation model based on quality contrast learning as claimed in claim 1, characterized in that: The step S105 retains the feature extraction part of the model trained in step S104, discards the intermediate task head, and connects a fully connected layer as the downstream task head, and outputs a 1-dimensional vector as the predicted quality assessment score. The training process aims to minimize the mean square error function of the predicted score and the label score.