Open-world forged speech attribution method and system based on soft contrastive pseudo-learning
Through a method based on soft contrast pseudo-learning, the deep and shallow features of speech samples are extracted, and the global similarity and local similarity are combined to solve the problem of attribution efficiency of the open world forgery speech attribution method in the existing technology to the new forgery method types. It solves the problem of low performance and achieves efficient clustering performance improvement for unknown categories.
Patent Information
- Application Number
- CN202410428635.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-04-10
AI Technical Summary
Existing forgery speech attribution methods cannot effectively handle emerging forgery methods in open-world scenarios, and the attribution of unseen method types is inefficient.
Using a method based on soft contrastive pseudo-learning, the deep and shallow features of speech samples are extracted through a deep convolutional neural network, combined with global similarity and local similarity, to design a sample pair screening module, using soft pseudo-labels and similarity maximization bidirectional The top1 screening algorithm calculates soft contrastive learning loss and entropy regularization loss to improve the model's clustering performance for unknown categories.
Without affecting the recognition accuracy of known categories, it significantly improves the clustering performance of unknown categories and all categories of data, can effectively describe the statistical information in known and unknown data, enhances the intra-class compactness of features, and reduces artifacts. Wrong label.
Smart Images

Figure CN118298809B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of forged speech attribution, and in particular relates to an open-world forged speech attribution method and system based on soft-contrastive pseudo learning (SPL). Background Art
[0002] With the rapid development of generative technologies such as Deepfakes, the phenomenon of malicious use of fake content on social media has raised public concerns about voice security and privacy. In recent years, the detection or classification of forged speech has been widely studied. In addition to predicting the binary classification of true and false speech, the attribution of deep fake speech has become crucial to building interpretable and reliable anti-spoofing strategies. Forgery Speech Attribution (FSA) aims to identify the source of forged speech and has attracted much attention in recent years, where the source refers to the generation method of the speech, the identity of the attacker who generated the speech, or both. On the one hand, FSA is a key step to improve the interpretability of anti-spoofing methods, for example, it can answer why a certain speech is fake. On the other hand, FSA is able to learn enhanced representations for different categories of forged speech, and the learned representations can be further used to improve the performance of forged speech detection.
[0003] However, existing FSA works have at least the following two shortcomings. The first shortcoming is that they can only analyze speech forgery methods that have appeared in the training data, that is, they define FSA as a closed set pattern recognition problem and assign each forgery method to a class label, which of course cannot handle new forgery methods that appear in open-world scenarios. Second, they simply treat all unseen methods as an unknown class, that is, they create an additional class to represent all unseen methods without distinguishing them, which is not suitable for attributing new types of forgery methods that appear in open-world scenarios. Therefore, existing works are inefficient in attributing open-world forged speech. Summary of the invention
[0004] In order to solve the deficiencies in the prior art, the present invention provides an open-world forged speech attribution method and system based on soft contrast pseudo-learning, which can describe the statistical information of known data and the statistical information of known and unknown classes contained in unknown data when performing forged speech attribution. While not affecting the recognition accuracy of known category data, it can significantly improve the clustering performance of unknown and all category data.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] In a first aspect, a method for attributing a forged voice is provided, comprising: obtaining time-frequency features of a voice sample; inputting the time-frequency features of the voice sample into a trained forged voice attribution model, and outputting the probability that the time-frequency features of the voice sample belong to each category of a known voice forgery method and an unknown voice forgery method as a recognition result of the forged voice attribution; wherein the forged voice attribution model comprises: a feature extraction module and a feature classification module; the feature extraction module is used to extract deep features and shallow features of the voice sample using a deep convolutional neural network, and output the obtained deep features of the voice sample to the feature classification module; the feature classification module is used to perform category judgment on the deep features of the voice sample; the feature classification module is a fully connected layer followed by a Softmax function, and the number of output nodes of the fully connected layer is the same as the total number of categories in the known voice forgery method and the unknown voice forgery method.
[0007] Furthermore, the training method of the fake speech attribution model includes: inputting the time-frequency features of the speech training sample, using the feature extraction module to extract the deep features and shallow features of the speech training sample; using the deep features and shallow features as input, using the similarity-based soft filtering (SSF) module to filter sample pairs, using the global similarity as the weight, and calculating the similarity-based soft contrast learning loss; outputting the deep features to the feature classification module, and outputting the predicted logical values of the speech training sample belonging to each category; using the similarity-based soft pseudo-labeling (SSP) module, using the predicted logical value as input, using Gumbel The Softmax function generates smooth pseudo labels, and uses global similarity as weight to calculate the similarity-based soft pseudo label learning loss; based on the predicted logical value, the predicted label of the labeled sample is obtained, and the classification loss is calculated; based on the predicted logical values of the labeled sample and the unlabeled sample, the probability that the speech training sample belongs to each category is obtained; using the probability as input, the entropy regularization loss is calculated; a linear combination of similarity-based soft contrast learning loss, similarity-based soft pseudo label learning loss, classification loss and entropy regularization loss is used to jointly supervise the training of the deep convolutional neural network and the fully connected layer, and the weight parameters of the deep convolutional neural network and the fully connected layer are obtained.
[0008] Furthermore, a similarity-based soft screening module is used to screen sample pairs, including: using global average pooling on the deep features to obtain a global embedding representation of the deep features; using local average pooling on the shallow features to obtain a local embedding representation of the shallow features; using cosine distance to calculate the similarity of the global embedding representation of a pair of samples as the global similarity of the sample pair; using cosine distance to calculate the similarity of the local embedding representation of a pair of samples as the local similarity of the sample pair; based on the global similarity and the local similarity, using a similarity maximization bidirectional top1 screening algorithm to screen sample pairs for unlabeled speech samples; based on the global similarity, using a similarity minimization screening algorithm to screen sample pairs for labeled speech samples.
[0009] Furthermore, the method for calculating the global similarity and the local similarity includes: for a speech sample x, extracting its logarithmic Mel spectrum Among them, W m ,H m are the width and height of the logarithmic Mel spectrum respectively; then the feature extraction module f(·) is used to extract the deep features of m and shallow features Among them, C d ,W d ,H d are the number of channels, width and height of deep features, C s ,W s ,H s are the number of channels, width and height of shallow features respectively; for f d (m) Perform adaptive average pooling with an output scale of 1×1 to obtain the global embedding representation T of x G for:
[0010] T G =Global_Adaptivepool(f(m),1×1) (1)
[0011] in, The shallow feature f s (m) is divided into q×q regions {P k |k=1,2,...,q×q}, then for P k Perform average pooling to obtain the embedding representation of q×q regions:
[0012]
[0013] in, is the local embedding representation of the kth region; for the i-th sample x i and the jth sample x j , and their corresponding logarithmic Mel spectra are m i and mj , and the corresponding global embedding representations are T Gi and T Gj , the corresponding embedding representations of the kth region are and Then the sample pair (x i ,x j ) is calculated by using T Gi and T Gj The cosine similarity between i and x j The global similarity S between Gij , the calculation formula is:
[0014] S Gij = cosine(T Gi ,T Gj ) (3)
[0015] The local similarity is calculated by using the weighted sum of the cosine similarities between the embedding representations of each region of the shallow feature as x i and x j The local similarity between them; first, calculate the kth region and The similarities between them are:
[0016]
[0017] Secondly, calculate the weight of the weighted sum and use the ratio of the L2 norm of the embedding representation of the kth region to the sum of the L2 norms of the embedding representation of all regions as the weight w of the similarity of the kth region k , the calculation method is:
[0018]
[0019] Finally, the sample x i and x j The local similarity on shallow features is:
[0020]
[0021] Furthermore, a similarity maximization bidirectional top1 screening algorithm is used to screen sample pairs for unlabeled speech samples, including: for unlabeled speech samples x u First, we use the global similarity metric to find the sample with the greatest similarity Then, under the local similarity metric, as long as x u and The similarity is greater than and any other sample, then we consider x u and Belong to the same category and form them into a pair, where the superscript u means no label.
[0022] Further, a similarity minimization screening algorithm is used to screen sample pairs for labeled speech samples, including: for labeled speech samples x l and its label y l , in the same l Among the samples of the same type, select l The sample with the smallest global similarity The sample pairs are composed of , where the superscript l indicates a label.
[0023] Furthermore, the similarity-based soft contrastive learning loss is calculated, including: considering a batch of samples, the number of which is B, for the sample pairs (x i ,x j ), setting the weight of its contrastive learning loss to For the sample pairs (x i ,x j ), setting the weight of its contrastive learning loss to Finally, the similarity-based soft contrastive learning loss is calculated as follows:
[0024]
[0025] in, and Represents labeled speech samples and unlabeled speech samples The global embedding representation of , h(·) represents the probability that the sample belongs to each category, <·> represents the dot product operation, log(·) represents the logarithmic operation, D l represents a labeled data set, n represents the number of labeled samples in this batch of samples, and D u Represents an unlabeled dataset, and m represents the number of unlabeled samples contained in this batch of samples.
[0026] Furthermore, the similarity-based soft pseudo-label learning loss is calculated, including: considering a batch of samples, the number of which is B, for the unlabeled speech samples Use the Gumbel Softmax function to generate soft labels instead of one-hot encoding hard labels; in addition, use other samples and The maximum value of the global similarity As a weight, The corresponding loss is constrained, and finally the soft pseudo-label learning loss L based on similarity is obtained SSP for:
[0027]
[0028] Where, Q = |C k ∪C n | represents the total number of each category in known voice forgery methods and unknown voice forgery methods, C k represents the category of known voice forgery methods, C n Indicates the category of unknown voice forgery method. yes The corresponding logical values of all categories, yes Soft label.
[0029] Further, the classification loss is calculated, including: using the Softmax cross entropy loss function or the AM-Softmax loss function to calculate the classification loss; considering a batch of samples, the number is B, for the labeled speech samples Taking the logical value and label output by the fully connected layer as input, when the Softmax cross entropy loss function is used to calculate the classification loss, the formula is:
[0030]
[0031] Among them, Q l =|C k | indicates the number of known categories; yes The logical value of the corresponding known category; when the AM-Softmax loss function is used to calculate the classification loss, its calculation formula is formula (9). The only difference is the calculation method of the logical value; the logical value used by the AM-Softmax loss function is:
[0032]
[0033] Among them, s k ,s c They are the global embedding representations and the kth,c,c∈[1,Q l ],c≠k-class classifier weight w k ,w c is the intra-class and inter-class similarity of , and Δp is the margin imposed on the intra-class similarity.
[0034] Furthermore, the entropy regularization loss is calculated, including: The entropy regularization loss uses KL divergence as the optimization target, and the formula is as follows:
[0035] L RE =KL(Pr(y|x i ∈D l ∪D u )||P(y)) (10)
[0036] where KL(·||·) represents the Kullback-Leibler (KL) divergence of two probability distributions. represents the posterior probability distribution of label y; P(y) is the prior probability distribution of label y.
[0037] Furthermore, the final loss function is:
[0038] L=L CE +β1L SSF +β2L SSP +β3L RE (11)
[0039] Among them, β1, β2, β3 are parameters that balance the importance of corresponding losses.
[0040] Furthermore, the time-frequency features of the speech sample are obtained, including: using short-time Fourier transform, Mel filtering and logarithmic operation to convert the speech signal into a logarithmic Mel spectrum.
[0041] Furthermore, deep features and shallow features of speech samples are extracted, including: using ResNet-50 to extract deep features and shallow features of speech samples with time-frequency features as input; ResNet-50 has four convolution blocks, using the output of the last convolution block as the deep features, and the output of the second-to-last convolution block as the shallow features. It is worth noting that other deep learning-based feature extraction networks can also be used as solutions for extracting deep features and shallow features of speech samples, such as ResNet-18.
[0042] In a second aspect, a forged voice attribution system is provided, comprising: a data acquisition module for acquiring time-frequency features of a voice sample; an attribution module for inputting the time-frequency features of the voice sample into a trained forged voice attribution model, and outputting the probability that the time-frequency features of the voice sample belong to each category in a known voice forgery method and an unknown voice forgery method as an identification result of the forged voice attribution; wherein the forged voice attribution model comprises: a feature extraction module and a feature classification module; the feature extraction module is used to extract deep features and shallow features of the voice sample using a deep convolutional neural network, and output the obtained deep features of the voice sample to the feature classification module; the feature classification module is used to perform category judgment on the deep features of the voice sample; the feature classification module is a fully connected layer followed by a Softmax function, and the number of output nodes of the fully connected layer is the same as the total number of categories in the known voice forgery method and the unknown voice forgery method.
[0043] According to a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for attributing fake speech as described in the first aspect is implemented.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] (1) The present invention inputs the time-frequency features of the speech sample into a trained forged speech attribution model, and outputs the probability that the time-frequency features of the speech sample belong to each category of the known speech forgery method and the unknown speech forgery method as the recognition result of the forged speech attribution; when performing forged speech attribution, it can describe the statistical information of the known data and the statistical information of the known and unknown categories contained in the unknown data; while not affecting the recognition accuracy of the known category data, it significantly improves the clustering performance of the unknown category and all category data;
[0046] (2) Using the global similarity of the deep features of the fake speech and the local similarity of the shallow features, a sample pair screening module is designed, and the global similarity is used as the weight of the contrastive learning loss. Through soft contrastive learning, the intra-class compactness of the features is enhanced. The probability of the fake speech belonging to each class is used as input, and the Gumbel Softmax function is used to output smooth labels. The global similarity is used as the weight. Through soft pseudo-label learning, possible errors in pseudo-labels are reduced, and the soft pseudo-label learning effect is enhanced.
[0047] (3) Compared with existing forged speech attribution methods, the soft contrastive pseudo-learning method can not only assign known class labels to test samples belonging to known classes, but also assign clustering indices to samples belonging to unknown classes;
[0048] (4) Compared with the existing open-world semi-supervised learning methods, the soft contrastive pseudo-learning method fully considers the fine-grained time-frequency details and local waveform modifications involved in the speech forgery process, and designs a screening module based on global and local similarities of features at different scales, which can screen out as many similar samples as possible to form sample pairs;
[0049] (5) When calculating the loss of contrastive learning, the present invention takes into account the impact of the screening samples on the confidence level and adjusts the loss contribution rate of the screening samples by adding an adaptive weight based on similarity. The algorithm adopts a similarity-based soft pseudo-label strategy and reduces the pseudo-noise generated by similar speech of different categories through class label smoothing technology and similarity weighting technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1is a schematic diagram of an open-world speech forgery attribution task in an embodiment of the present invention; in the open-world speech forgery attribution task, the unlabeled set may contain speech forgery categories that have never appeared in the labeled set; an effective method in this task should be able to correctly classify seen speech forgery methods (i.e., waveforms with blue borders) and discover new types of forgery methods in unseen forged speech (i.e., waveforms with red borders); S and U in the figure are abbreviations of “Seen” and “Unseen”, respectively, representing seen and unseen forgery method categories, respectively.
[0051] Figure 2 It is a main flow chart of an open-world forged speech attribution method based on soft contrast pseudo-learning provided by an embodiment of the present invention;
[0052] Figure 3 Schematic diagram of feature visualization learned on the evaluation set of the ASVSpoof2019LA dataset, where (a) is the visualization using the CPL method, and (b) is the visualization using the method of the present invention;
[0053] Figure 4 It is a curve diagram showing the variation of sample pairing accuracy (a) and recall accuracy (b) with the number of iterations when the method of the present invention is trained on the training set of the ASVSpoof2019LA dataset;
[0054] Figure 5 It is a flow chart of a training method for a fake speech attribution model in an open-world fake speech attribution method based on soft contrast pseudo-learning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0056] Embodiment 1:
[0057] like Figure 1 to Figure 5 As shown, an open-world forged speech attribution method based on soft contrast pseudo-learning includes: obtaining time-frequency features of a speech sample; inputting the time-frequency features of the speech sample into a trained forged speech attribution model, and outputting the probability that the time-frequency features of the speech sample belong to each category of known speech forgery methods and unknown speech forgery methods as the recognition result of the forged speech attribution.
[0058] The forged voice attribution model includes: a feature extraction module and a feature classification module; the feature extraction module is used to extract deep features and shallow features of the voice sample using a deep convolutional neural network, and output the acquired deep features of the voice sample to the feature classification module. The feature classification module is used to perform category judgment on the deep features of the voice sample; the feature classification module is a fully connected layer followed by a Softmax function, and the number of output nodes of the fully connected layer is the same as the total number of categories in the known voice forgery method and the unknown voice forgery method.
[0059] For the input speech sample x, use short-time Fourier transform, Mel filter and logarithmic method to convert x into logarithmic Mel spectrum As the input of the feature extraction module. m ,H m are the width and height of the logarithmic Mel spectrum respectively.
[0060] Optionally, use ResNet-50 as the feature extraction module. ResNet-50 has four convolution blocks, using the output of the last convolution block as the deep features and the output of the second-to-last convolution block as the shallow features.
[0061] A fully connected layer followed by a Softmax function is used as a feature classification module. This module takes deep features as input and outputs the probability that the feature belongs to each category. The largest index value in the probability vector corresponds to the label of a known category or the cluster index of an unknown category.
[0062] Calculate the global similarity between samples based on deep features:
[0063] First, global average pooling is used on the deep features to obtain the global embedding representation of the deep features; then the feature extraction module f(·) is used to extract the deep features of m and shallow features Among them, C d ,W d ,H d are the number of channels, width and height of deep features, C s ,W s ,H s are the number of channels, width and height of shallow features respectively.
[0064] f d (m) Perform adaptive average pooling with an output scale of 1×1 to obtain the global embedding representation T of x G for:
[0065] T G =Global_Adaptivepool(f(m),1×1) (1)
[0066] in,
[0067] The shallow feature f s (m) is divided into q×q regions {P k |k=1,2,...,q×q}, then for P k Perform average pooling to obtain the embedding representation of q×q regions:
[0068]
[0069] in, is the local embedding representation of the kth region;
[0070] For the i-th sample x i and the jth sample x j , and their corresponding logarithmic Mel spectra are m i and m j , and the corresponding global embedding representations are T Gi and T Gj , the corresponding embedding representations of the kth region are and Then the sample pair (x i ,x j ) is calculated as follows:
[0071] Using T Gi and T Gj The cosine similarity between i and x j The global similarity S between Gij , the calculation formula is:
[0072] S Gij = cosine(T Gi ,T Gj ) (3)
[0073] The local similarity is calculated as:
[0074] Use the weighted sum of the cosine similarities between the embedding representations of each region of the shallow feature as x i and x j The local similarity between them; first, calculate the kth region and The similarities between them are:
[0075]
[0076] Secondly, calculate the weight of the weighted sum. Given that different speech forgery methods leave different forgery traces in different regions, the importance of similarity in different regions is also different. Therefore, the ratio of the L2 norm of the embedding representation of the kth region to the sum of the L2 norms of the embedding representation of all regions is used as the weight w of the similarity of the kth region. k .w k It can be calculated as:
[0077]
[0078] Finally, the sample x i and x j The local similarity on shallow features can be calculated as:
[0079]
[0080] Use the SSF module to filter sample pairs. The specific method is as follows:
[0081] For a labeled speech sample x l and its label y l , in the same l Among the samples of the same type, select l The sample with the smallest global similarity The sample pairs are composed of , where the superscript l indicates a label.
[0082] For an unlabeled speech sample x u First, we use the global similarity metric to find the sample with the greatest similarity Then, under the local similarity metric, as long as x u and The similarity is greater than and any other sample, then we consider x u and belong to the same category, and form them into a pair. The superscript u indicates no label. Otherwise, the sample pair is not selected for this sample. The similarity maximization bidirectional top1 screening strategy requires: Under the local similarity measurement, The most similar one is x u ; Under the global similarity measure, u The most similar is
[0083] Based on the selected sample pairs, the soft contrast learning loss is calculated. The specific method is:
[0084] Consider a batch of samples, the number of which is B, for the sample pairs (x i ,x j ), setting the weight of its contrastive learning loss to For the sample pairs (x i ,x j ), setting the weight of its contrastive learning loss to Finally, the similarity-based soft contrastive learning loss is calculated as follows:
[0085]
[0086] in, and Represents labeled speech samples and unlabeled speech samples The global embedding representation of , h(·) represents the probability that the sample belongs to each category, <·> represents the dot product operation, log(·) represents the logarithmic operation, D l represents a labeled data set, n represents the number of labeled samples in this batch of samples, and D u represents an unlabeled dataset, and m represents the number of unlabeled samples contained in this batch of samples. By minimizing L SSF , which can improve the intra-class compactness of samples.
[0087] Calculate the similarity-based soft pseudo-label learning loss as follows:
[0088] Consider a batch of samples, the number of which is B, and the unlabeled speech samples Use the Gumbel Softmax function to generate soft labels instead of one-hot encoding hard labels; in addition, use other samples and The maximum value of the global similarity As a weight, The corresponding loss is constrained, and finally the soft pseudo-label learning loss L based on similarity is obtained SSP for:
[0089]
[0090] Where, Q = |C k ∪C n | represents the total number of each category in known voice forgery methods and unknown voice forgery methods, C k represents the category of known voice forgery methods, C n Indicates the category of unknown voice forgery method. yes The corresponding logical values of all categories, yes By minimizing L SSP , which can improve the classification performance of the model for unknown class data.
[0091] In a specific embodiment, the classification loss of labeled samples is calculated optionally by using one of the following methods.
[0092] Solution 1 for calculating the classification loss of labeled samples:
[0093] Taking the logical value and label output by the fully connected layer as input, the Softmax cross entropy classification loss is calculated as follows:
[0094]
[0095] Among them, Q l =|C k | indicates the number of known categories. yes The logical value corresponding to the known category.
[0096] Solution 2 for calculating the classification loss of labeled samples:
[0097] The AM-Softmax loss function is used to calculate the classification loss of labeled samples. The calculation formula is the same as formula (9). The only difference is the calculation method of the logical value. The logical value used by the AM-Softmax loss function is:
[0098]
[0099] Among them, s k ,s c They are the global embedding representations and the kth,c,c∈[1,Q l ],c≠k-class classifier weight w k ,w c is the intra-class and inter-class similarity of , and Δp is the margin imposed on the intra-class similarity.
[0100] It should be noted that other loss functions that can be used for classification of labeled samples can be used here to calculate the classification loss.
[0101] By minimizing the classification loss, the model's classification performance for samples of known categories can be improved.
[0102] Calculate the entropy regularization loss as follows:
[0103] Entropy regularization loss avoids assigning all samples to the same cluster. It uses KL divergence as the optimization target. The formula is as follows:
[0104] L RE =KL(Pr(y|x i ∈D l ∪D u )||P(y)) (10)
[0105] where KL(·||·) represents the Kullback-Leibler (KL) divergence of two probability distributions. represents the posterior probability distribution of label y. P(y) is the prior probability distribution of label y. By minimizing the entropy regularization loss, we can avoid the model from simply clustering all samples into one class, which is conducive to improving the model's clustering performance for samples.
[0106] The above four loss functions are linearly combined to obtain the final loss function:
[0107] L=L CE +β1L SSF +β2L SSP +β3L RE (11)
[0108] Among them, β1, β2, β3 are parameters that balance the importance of corresponding losses.
[0109] The linear combination of the above four losses is used to jointly supervise the training of the feature extraction module and the classification module. A total of T rounds of training are performed. In each round, the weight parameters of the feature extraction module and the classification module are updated according to the gradient back propagation algorithm, and the classification accuracy of the known class, the clustering accuracy of the unknown class and all classes, the adjusted Rand coefficient, and the normalized mutual information index are calculated on the validation set. After the training is completed, the model with the highest clustering accuracy of all classes on the validation set is used as the final model. The performance of the final model on the evaluation set is evaluated, and the label of the sample belonging to a known class or the index of a cluster is output.
[0110] In the embodiment of the present invention, the open-world voice forgery attribution based on soft contrastive pseudo-learning utilizes the global similarity of deep features and the local similarity of shallow features of forged voices to design a sample pair screening module, and uses the global similarity as the weight of contrastive learning loss to enhance the intra-class compactness of features through soft contrastive learning; the probability that the forged voice belongs to each class is used as input, the Gumbel Softmax function is used to output smooth labels, and the global similarity is used as the weight to learn through soft pseudo-labels to reduce possible errors in pseudo-labels and enhance the soft pseudo-learning effect. This method can significantly improve the clustering performance of the model for unknown categories and all categories of voice forgery methods while maintaining a high recognition accuracy of known categories.
[0111] In conjunction with a specific implementation of an embodiment of the present invention, a method flow for implementing open-world voice forgery attribution using the SPL method is introduced on the ASVSpoof2019LA dataset. Figure 5 As shown, this embodiment relies on the ASVSpoof2019LA dataset to construct the training set, verification set, and evaluation set of open world voice forgery attribution. The following steps may be included:
[0112] S501, dividing the speech data into training samples, verification samples and test samples.
[0113] S502, converting the speech data into a logarithmic Mel spectrum by using short-time Fourier transform, Mel filtering and logarithmic operation.
[0114] S503, input the logarithmic MelP into the feature extraction module ResNet-50, and output the deep features and shallow features.
[0115] S504, input the deep features into the classification module, and output the category logic value and category probability.
[0116] S505, input the deep features and shallow features into the SSF module, calculate L SSF .
[0117] S506, input the deep features and category logic values into the SSP module to calculate L SSP .
[0118] S507, using the category logic value and sample label, use Softmax cross entropy loss to calculate the known category classification loss L CE .
[0119] S508, using the category probability and sample labels, calculate the entropy regularization loss L corresponding to all samples RE .
[0120] S509, combining the above four losses to obtain the final soft contrast pseudo learning loss L SPL .
[0121] S510, using L SPL Train the feature extraction module and the classification module.
[0122] S511, using the trained feature extraction module and classification module to identify data in the open world.
[0123] The Open-World Forgery Speech Attribution (OW-FSA) dataset is created based on the ASVspoof2019LA dataset, which is widely used for forged speech detection for anti-spoofing purposes. ASVspoof2019LA has a large amount of data, including a wealth of speech forgery methods and their detailed descriptions, including common methods and their variants such as Tacotron2 and WaveNet. The information of the OW-FSA dataset is shown in Table 1, where real speech is also included as a special category.
[0124] In addition to real speech (Real, including class A00), fake speech can be roughly divided into three categories: Text-To-Speech (TTS), Voice Conversion (VC) and Waveform Concatenation (WC), which are further divided into nineteen categories, represented by A01 to A19. Real speech and nineteen types of fake speech exist in both the training set and the test set. However, only real speech (i.e. A00) and the first nine fake classes (i.e. A01-A09) are seen classes, and the last ten fake classes (i.e. A10-A19) are unseen classes. In addition, some data in A00-A09 are labeled. The speech data in A10-A19 is unlabeled, and together with the unlabeled data in A00-A09, it constitutes an unlabeled dataset. In Table 1, seen / unseen indicates the labels of the fake methods that are seen / unseen during the training process, which are used as known / unknown information for training.
[0125] Table 1 OW-SFA dataset
[0126]
[0127] The Adam optimizer and batch size of 128 were used for 40 rounds of training. The initial learning rate was set to 2.5e-4 and the weight decay was 1e-5. The learning rate was reduced by 0.2 times every 10 rounds. The weight parameters β1, β2, and β3 in formula (11) were set to 0.5, 0.5, and 1 respectively. The hyperparameter τ in Gumbel Softmax was set to 1.
[0128] We performed calculations and compared SPL with the current typical open-world semi-supervised learning (OW-SSL) method, and listed the results in Table 2.
[0129] In Table 2, ORCA is the method described in the article "Open World Semi-Supervised Learning" published in the International Conference on Learning Representations in 2022; CPL is the method described in the article "Comparative Learning of Open World Deep Fake Attribution" published in the International Conference on Computer Vision in 2023. RankStats is the method described in the article "Automatically Discovering and Learning New Visual Categories with Rank Statistics" published in the International Conference on Learning Representations in 2020, OpenLDN is the method described in the article "Openldn: Learning to Discover New Categories in Open World Semi-Supervised Learning" published in the European Conference on Computer Vision in 2022, NACH is the method described in the article "Robust Semi-Supervised Learning When Not All Categories Have Labels" published in the journal Advances in Neural Information Processing Systems in 2022, and SPL is the method of the present invention.
[0130] Table 2 Comparison of SPL with other methods (%)
[0131]
[0132] From the indicators listed in Table 2, it can be seen that the method of the present invention can significantly improve the ACC, Adjusted Rand Index (ARI), and Normalized Mutual Information (NMI) on unknown classes and all classes while maintaining a high accuracy (ACC) of known classes. Compared with CPL, which is the best performing method among other methods, SPL improves ACC, NMI, and ARI of unseen classes by 4.22%, 4.66%, and 8.02%, respectively, and improves ACC of all classes by 2.08%. Although learning unseen forged classes has a slight negative impact on the prediction results of seen forged classes, SPL performs much better than all OW-SSL methods on unseen forged classes and all forged classes. These results show that SPL can successfully classify forged methods of known and unknown classes in real-world forged speech data, and it is a very useful technique, especially in discovering clustering information hidden in unlabeled data.
[0133] from Figure 3 It can be seen that in the embedded feature representation of samples learned by the CPL method, which performs the most advanced performance among other methods, the unseen class and the seen class are easily confused (such as A16 and A04, A19 and A06), and different unseen classes are also easily confused (such as A10 and A13). Compared with the representation of CPL, the performance of the embedded feature representation learned by SPL is better: whether it is a seen class or an unseen class, speech samples of different forged classes are easily distinguished in the feature space. This shows that SPL not only improves the separability of seen and unseen classes, but also effectively discovers the unseen class information contained in the forged speech, and improves the separability of different classes hidden in the unseen data.
[0134] from Figure 4 It can be seen that the SPL method significantly improves the precision and recall of sample pairing compared with other methods.
[0135] Embodiment 2:
[0136] Based on the open-world forged voice attribution method based on soft contrast pseudo-learning described in Example 1, this embodiment provides an open-world forged voice attribution system based on soft contrast pseudo-learning, including:
[0137] A data acquisition module, used to obtain the time-frequency characteristics of speech samples;
[0138] An attribution module, which is used to input the time-frequency features of the speech sample into the trained forged speech attribution model, and output the probability that the time-frequency features of the speech sample belong to each category of the known speech forgery method and the unknown speech forgery method as the recognition result of the forged speech attribution;
[0139] Wherein, the forged speech attribution model includes: a feature extraction module and a feature classification module;
[0140] The feature extraction module is used to extract deep features and shallow features of the speech sample using a deep convolutional neural network, and output the obtained deep features of the speech sample to the feature classification module;
[0141] The feature classification module is used to perform category judgment on the deep features of the voice sample; the feature classification module is a fully connected layer followed by a Softmax function, and the number of output nodes of the fully connected layer is the same as the total number of categories in the known voice forgery method and the unknown voice forgery method.
[0142] Embodiment three:
[0143] Based on the open-world forged voice attribution method based on soft contrast pseudo-learning described in Example 1, this embodiment provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the open-world forged voice attribution method based on soft contrast pseudo-learning as described in Example 1 is implemented.
[0144] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0145] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1A device that provides the functions specified in a block or multiple blocks.
[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0148] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the purpose of the present invention and the claims, which all fall within the protection of the present invention.
Claims
1. A method for attributing fake speech, characterized in that: include: Obtaining time-frequency features of speech samples; Input the time-frequency features of the speech sample into the trained forged speech attribution model, and output the probability that the time-frequency features of the speech sample belong to each category of the known speech forgery method and the unknown speech forgery method as the recognition result of the forged speech attribution; Wherein, the forged speech attribution model includes: a feature extraction module and a feature classification module; The feature extraction module is used to extract deep features and shallow features of the speech sample using a deep convolutional neural network, and output the obtained deep features of the speech sample to the feature classification module; The feature classification module is used to perform category judgment on the deep features of the voice sample; the feature classification module is a fully connected layer followed by a Softmax function, and the number of output nodes of the fully connected layer is the same as the total number of categories in the known voice forgery method and the unknown voice forgery method; The training method of the forged speech attribution model comprises: Input the time-frequency features of the speech training sample, and use the feature extraction module to extract the deep features and shallow features of the speech training sample; use the deep features and shallow features as input, use the similarity-based soft screening module to screen sample pairs, use the global similarity as the weight, and calculate the similarity-based soft contrast learning loss; output the deep features to the feature classification module, and output the predicted logical value of the speech training sample belonging to each category; Using a similarity-based soft pseudo-label module, taking the predicted logical value as input, using a Gumbel Softmax function to generate a smooth pseudo-label, taking the global similarity as a weight, and calculating a similarity-based soft pseudo-label learning loss; According to the predicted logical value, the predicted label of the labeled sample is obtained, and the classification loss is calculated; Based on the predicted logical values of labeled and unlabeled samples, the probability of the speech training sample belonging to each category is obtained; the entropy regularization loss is calculated with the probability as input; A linear combination of similarity-based soft contrastive learning loss, similarity-based soft pseudo-label learning loss, classification loss, and entropy regularization loss is used to jointly supervise the training of the deep convolutional neural network and the fully connected layer to obtain the weight parameters of the deep convolutional neural network and the fully connected layer.
2. The method for attributing fake speech according to claim 1, characterized in that: Using similarity-based soft filtering modules, sample pairs are screened, including: On the deep features, global average pooling is used to obtain a global embedding representation of the deep features; On the shallow features, local average pooling is used to obtain a local embedding representation of the shallow features; Using cosine distance, we calculate the similarity of the global embedding representation of a pair of samples as the global similarity of the sample pair; Using cosine distance, we calculate the similarity of the local embedding representation of a pair of samples as the local similarity of the sample pair; Based on global similarity and local similarity, a similarity maximization bidirectional top1 screening algorithm is used to screen sample pairs for unlabeled speech samples; Based on the global similarity, a similarity minimization screening algorithm is used to screen sample pairs for labeled speech samples.
3. The method for attributing fake speech according to claim 2, characterized in that: The method for calculating the global similarity and the local similarity includes: For speech samples , extract its logarithmic Mel spectrum ,in, , They are the width and height of the logarithmic Mel spectrum respectively; then use the feature extraction module extract Deep features of and shallow features ,in, , , are the number of channels, width and height of deep features, , , are the number of channels, width and height of shallow features respectively; right Perform adaptive average pooling with an output scale of 1×1 to obtain The global embedding representation of for: (1) in, ; The shallow features Divide into Regions , then Perform average pooling to obtain The embedding of a region is expressed as: (2) in, It is The local embedding representation of the region; For Samples and Samples , and their corresponding logarithmic Mel spectra are and , and the corresponding global embedding representations are and , corresponding to The embedding representation of each region is and , then the sample pair The calculation method of the global similarity is: use and The cosine similarity between and The global similarity between , the calculation formula is: (3) The local similarity is calculated as: The weighted sum of the cosine similarities between the embedding representations of each region of the shallow feature is used as and The local similarity between Regions and The similarities between them are: (4) Second, calculate the weight of the weighted sum, using The embedding representation of the region The norm accounts for all regions of the embedded representation The ratio of the sum of the norms is taken as the The weight of the similarity of the regions , the calculation method is: (5) Finally, the sample and The local similarity on shallow features is: (6)。 4. The method for attributing fake speech according to claim 2, characterized in that: Use the similarity maximization bidirectional top1 screening algorithm to screen sample pairs for unlabeled speech samples, including: For unlabeled speech samples First, we use the global similarity metric to find the sample with the greatest similarity ; Then, under the local similarity metric, as long as and The similarity is greater than The similarity with any other sample is considered and belong to the same category, and form them into a pair, where the superscript Indicates no label.
5. The method for attributing fake speech according to claim 2, characterized in that: Use the similarity minimization screening algorithm to screen sample pairs for labeled speech samples, including: For labeled speech samples and its tags , in the Among the samples of the same type, select The sample with the smallest global similarity The sample pairs are composed of Indicates that there is a label.
6. The method for attributing fake speech according to claim 1, characterized in that: Computes a similarity-based soft contrastive learning loss, including: Consider a batch of samples, the number of which is B, for the sample pairs selected from the labeled speech samples , setting the weight of its contrastive learning loss to ; For the sample pairs selected for the unlabeled speech samples , setting the weight of its contrastive learning loss to ; Finally, the similarity-based soft contrastive learning loss is calculated as follows: (7) in, and Represents labeled speech samples and unlabeled speech samples The global embedding representation of represents the probability that the sample belongs to each category, represents the dot product operation, represents the logarithmic operation, Represents a labeled dataset, Indicates the number of labeled samples included in this batch of samples. represents an unlabeled dataset, Indicates the number of unlabeled samples contained in this batch of samples.
7. The method for attributing fake speech according to claim 1, characterized in that: Compute similarity-based soft pseudo-label learning loss, including: Consider a batch of samples, the number of which is B, and the unlabeled speech samples , use the Gumbel Softmax function to generate soft labels instead of one-hot encoding hard labels; in addition, use other samples and The maximum value of the global similarity As a weight, The corresponding loss is constrained, and finally the soft pseudo-label learning loss based on similarity is obtained for: (8) in, Represents the total number of each category in known voice forgery methods and unknown voice forgery methods, Represents the categories of known voice forgery methods, Indicates the category of unknown voice forgery method. yes The corresponding logical values of all categories, yes Soft label.
8. The method for attributing fake speech according to claim 1, characterized in that: Calculate classification loss, including: using Softmax cross entropy loss function or AM-Softmax loss function to calculate classification loss; Consider a batch of samples, the number of which is B, and the labeled speech samples , taking the logical value and label output by the fully connected layer as input, when the Softmax cross entropy loss function is used to calculate the classification loss, the formula is: (9) in, Indicates the number of known categories; yes The corresponding logical value of the known category; When the AM-Softmax loss function is used to calculate the classification loss, the calculation formula is as follows: (9). The only difference is the calculation method of the logical value. The logical value used by the AM-Softmax loss function is: (9-1) in, , They are the global embedding representations and the classification module , , Class classifier weights , The intra-class and inter-class similarities of is the margin imposed on the intra-class similarity.
9. The method for attributing fake speech according to claim 1, characterized in that: Calculate the entropy regularization loss, including: Entropy regularization loss uses KL divergence as the optimization target, and the formula is as follows: (10) in, represents the Kullback-Leibler (KL) divergence of two probability distributions, Representation Tags The posterior probability distribution of ; Yes Tags The prior probability distribution of .
10. The method for attributing fake speech according to claim 1, characterized in that: The final loss function is: (11) in, is a parameter that balances the importance of the corresponding loss.
11. The method for attributing fake speech according to claim 1, characterized in that: Get the time-frequency features of the speech sample, including: The speech signal is converted into a logarithmic Mel spectrum using short-time Fourier transform, Mel filtering, and logarithmic operation.
12. The method for attributing fake speech according to claim 1, characterized in that: Extract deep and shallow features of speech samples, including: Taking time-frequency features as input, ResNet-50 is used to extract deep and shallow features of speech samples; ResNet-50 has four convolution blocks, and the output of the last convolution block is used as the deep feature, and the output of the second to last convolution block is used as the shallow feature.
13. A forged speech attribution system, characterized in that: include: A data acquisition module, used to obtain the time-frequency characteristics of speech samples; An attribution module, which is used to input the time-frequency features of the speech sample into the trained forged speech attribution model, and output the probability that the time-frequency features of the speech sample belong to each category of the known speech forgery method and the unknown speech forgery method as the recognition result of the forged speech attribution; Wherein, the forged speech attribution model includes: a feature extraction module and a feature classification module; The feature extraction module is used to extract deep features and shallow features of the speech sample using a deep convolutional neural network, and output the obtained deep features of the speech sample to the feature classification module; The feature classification module is used to perform category judgment on the deep features of the voice sample; the feature classification module is a fully connected layer followed by a Softmax function, and the number of output nodes of the fully connected layer is the same as the total number of categories in the known voice forgery method and the unknown voice forgery method; The training method of the forged speech attribution model comprises: Input the time-frequency features of the speech training sample, and use the feature extraction module to extract the deep features and shallow features of the speech training sample; use the deep features and shallow features as input, use the similarity-based soft screening module to screen sample pairs, use the global similarity as the weight, and calculate the similarity-based soft contrast learning loss; output the deep features to the feature classification module, and output the predicted logical value of the speech training sample belonging to each category; Using a similarity-based soft pseudo-label module, taking the predicted logical value as input, using a Gumbel Softmax function to generate a smooth pseudo-label, taking the global similarity as a weight, and calculating a similarity-based soft pseudo-label learning loss; According to the predicted logical value, the predicted label of the labeled sample is obtained, and the classification loss is calculated; Based on the predicted logical values of labeled and unlabeled samples, the probability of the speech training sample belonging to each category is obtained; the entropy regularization loss is calculated with the probability as input; A linear combination of similarity-based soft contrastive learning loss, similarity-based soft pseudo-label learning loss, classification loss, and entropy regularization loss is used to jointly supervise the training of the deep convolutional neural network and the fully connected layer to obtain the weight parameters of the deep convolutional neural network and the fully connected layer.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the forged speech attribution method according to any one of claims 1 to 12 is implemented.
Citation Information
Patent Citations
Deception voice detection method based on deep neural network
CN110491391A
Audio recognition method, audio recognition model training method and device, and electronic equipment
CN113851147A
