Malicious voice detection method based on feature combination genetic algorithm
The feature combination genetic algorithm automatically searches for the optimal feature combination and trains the Transformer model, which solves the problems of tedious feature extraction and high model complexity in malicious speech detection, improves detection accuracy and efficiency, and reduces computational costs.
Patent Information
- Application Number
- CN202410698027.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-09-10
AI Technical Summary
Existing malicious speech detection methods have problems such as cumbersome feature extraction, limited generalization capabilities, and deep learning model complexity and high computational cost. It is difficult to reduce model complexity and computational cost while ensuring detection performance.
A malicious speech detection method based on a feature combination genetic algorithm is used to automatically search for the optimal feature combination and input it into the Transformer through Gray coding feature encoding, fitness function based on model classification confidence rate, feature importance heuristic selection, feature combination crossover and mutation The model is trained to build an efficient malicious speech detection model.
It effectively avoids the tedious process of manually designing features, improves the accuracy and efficiency of malicious speech detection, reduces model complexity and computational costs, and provides new ideas for other security detection issues.
Smart Images

Figure CN118629423A
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of malicious voice detection, in particular to a malicious voice detection method based on a feature combination genetic algorithm. Background Art
[0002] With the rapid development of information technology, voice, as an important way of human-computer interaction, has become increasingly problematic. Malicious voice attacks, such as forging, tampering, or injecting false voice information, have posed a serious threat to speech recognition systems, intelligent voice assistants, and telephone banking applications. Therefore, studying effective malicious voice detection methods is crucial to maintaining information security and protecting user privacy.
[0003] Traditional malicious speech detection methods often rely on manually designed feature extraction and classifier design. Although these methods have achieved certain results, they have problems such as cumbersome feature extraction and limited generalization ability. In recent years, the development of deep learning technology has provided new ideas for malicious speech detection. However, deep learning models usually require a large amount of labeled data for training, and the complexity and computational cost of the model are high. Therefore, how to reduce the complexity and computational cost of the model while ensuring detection performance has become an urgent problem to be solved in the current field of malicious speech detection. Summary of the invention
[0004] The present invention aims at the technical problems existing in the prior art and provides a malicious speech detection method based on a feature combination genetic algorithm.
[0005] The technical solution adopted by the present invention is as follows: a malicious speech detection method based on a feature combination genetic algorithm, the steps of which are:
[0006] 1. Extract feature combination:
[0007] 1) Feature combination coding: Gray coding is selected to encode the feature number, and the genetic algorithm performs detailed local search by directly transitioning to the next value by changing only one position at a time;
[0008] 2) Generate an initial population;
[0009] 3) Calculate the fitness of feature combination: propose a fitness function based on the confidence rate of model classification, which is used to evaluate the feature combination in the genetic algorithm. The fitness function uses the confidence rate when classifying the model as a measurement standard, providing a quantitative evaluation basis for the genetic algorithm;
[0010] 4) Selecting the parent of feature combination: A heuristic selection method based on feature importance is proposed, which accumulates the importance of each feature in each feature combination sample as the selection criterion;
[0011] 5) Determine the termination condition: If the accuracy of the model trained using the feature combination reaches the threshold requirement, then the training ends and the feature combination is obtained; otherwise, proceed to step 6);
[0012] 6) performing feature combination crossover and feature combination mutation in sequence, and re-inputting the processed feature combination into step 3);
[0013] Second, the extracted features are combined and input into the Transformer model to train the final malicious speech detection model;
[0014] 3. Extract the same feature combination as that in training from the sample of the speech to be detected, and input it into the malicious speech detection model for detection. If the confidence of the output malicious speech is greater than 0.5, it is judged as malicious speech. If the confidence of the output malicious speech is less than 0.5, it is judged as non-malicious speech.
[0015] 1), the specific method is:
[0016] First, initialize the input, including the total number of features n in the feature combination and the number X of each feature j , determine a set of n features by random selection;
[0017] Secondly, calculate the extreme value of all feature numbers in the feature combination, that is, the maximum feature number Max n and the minimum feature number Min n , ensure that the range of feature number variations is understood;
[0018] Then, the number of bits L required for encoding is determined based on the extreme value difference n , L n By Max n -Min n +1 is calculated by rounding up the logarithm;
[0019] Next, perform binary conversion on the feature number and convert the number X of the jth feature j Subtract the minimum feature number Min n , and then converted to length L n The binary code B j ;
[0020] Finally, the binary code B j Gray code G j , and Gray code G of all features 0 G 1 ……G nThe final Gray code G is obtained by splicing. Each binary code is bitwise XORed with the result of shifting it right by one bit to ensure that the codes between adjacent values differ by only one bit. The output of the algorithm is the Gray code corresponding to the individual eigenvalue.
[0021] 3), the specific method is:
[0022] The design of the fitness function takes into account the confidence rate of the feature combination in the model for different emotion categories. It not only pays attention to the model's predicted output value for the correct emotion category, but also focuses on analyzing the dispersion of the model's predicted output value for other incorrect emotion categories.
[0023] If a sample has a high predicted output value in the correct emotion category, while the predicted output values of other incorrect emotion categories are low and evenly distributed, then the fitness evaluation of the sample in the genetic algorithm will be high. This is because the high correct category prediction value and the balanced distribution of incorrect category prediction values indicate that the model is very certain about the classification of the sample. Therefore, in the selection process of the genetic algorithm, such samples are more likely to be selected for subsequent crossover and mutation operations. Through this design, it is possible to select a more important feature combination for the classification accuracy and stability of the SER model under the framework of the genetic algorithm. The fitness function formula is as follows:
[0024]
[0025] Among them, F(i) is the fitness of the i-th feature combination sample, C i,correct is the confidence rate of feature combination sample i for the correct category, is the confidence rate of feature combination sample i for the jth category, and α is an adjustment parameter used to control the contribution of the dispersion of confidence rates of other categories except the confidence rate of the correct category to the fitness.
[0026] 4), the specific method is:
[0027] First, initialize an empty parent set P and an unselected sample set U, where U is equal to the entire feature combination sample set S;
[0028] Secondly, traverse each feature combination sample s i , calculate the internal features f ij The feature importance value w ij The sum of
[0029] Then, p cycles are performed, and two feature combination samples s are randomly selected from the unselected sample set U in each cycle. a and bCompare the sum of their feature importances, select the feature combination with the larger sum of feature importance as the parent, add the selected feature combination to the parent set P, and remove the feature combination from the unselected sample set U;
[0030] Finally, the parent set P is returned as output.
[0031] 5), the specific method of feature combination mutation is:
[0032] First, initialize the changes ΔC and ΔC between two consecutive generations * , they are all set to 0, at the same time, set the iteration counter item to 0, and determine a hyperparameter e, which is used to determine whether the change between the two generations is within an acceptable range;
[0033] Secondly, a loop is entered, the condition is that the difference in the amount of change between the two generations is greater than the hyperparameter e, or the number of iterations item is less than 3. This loop is used to check whether the difference in the amount of change of three consecutive iterations is less than the hyperparameter e. If the loop condition is not met, it can be considered that the solution is stable enough and the loop will not be entered;
[0034] Then, inside the loop, first update the change ΔC of the previous generation * is the change ΔC of the current generation, and then calculates the difference between the maximum accuracy of the current generation and the previous generation max|CC * |, assign this value to ΔC as the contemporary change; then determine the difference between the current generation and the previous generation |ΔC-ΔC * |Is it less than the hyperparameter e? If so, it means that the difference between the two generations is not very significant. At this time, the iteration counter item increases by 1. If it is not less than, it means that the difference between the two generations is significant. The iteration counter item is reset to 0, indicating that the convergence is discontinuous.
[0035] Finally, after the loop ends, the final difference Z between the two generations of transformations is returned.
[0036] 6), the specific method of feature combination crossover is:
[0037] First, initialize the unselected sample set U to be the same as the input feature combination sample set S;
[0038] Secondly, calculate the sum of all feature importance values of each feature combination sample in set S
[0039] Then, two pairs of feature combination samples s are randomly selected from the unselected sample set U a ,s b ,s c,s d , based on the sum of feature importance, select the samples s corresponding to the two maximum values 1 and 2 , and remove these two samples from set U to avoid being selected again;
[0040] Finally, for s 1 and 2 Perform a two-point crossover operation to obtain a new feature combination sample and These new samples are added to the feature combination sample set S, and this crossover process is repeated p times until the final crossover feature combination sample set S is generated.
[0041] 6), the specific method of feature combination mutation is:
[0042] First, the algorithm initializes the unselected feature combination sample set U to S, and calculates the sum of the importance values of all the features in each feature combination sample in the set S.
[0043] Secondly, the algorithm enters a loop, and in each loop, two unselected feature combination samples s are randomly selected a and b ;
[0044] Then, the algorithm compares the sum of the feature importances of the two samples and selects the larger one for bit-reversal mutation operation to generate the mutated feature combination sample. or
[0045] Finally, update the feature combination sample set S and replace the original s a or b Remove from S and U and add new variant samples or After repeating the above steps p times, the algorithm returns the final feature combination sample set S.
[0046] The beneficial effects created by the present invention are as follows: the present invention uses a genetic algorithm as an optimization search algorithm, which has the advantages of strong global search capability and good adaptability. By combining the genetic algorithm with the feature combination, the optimal feature combination can be automatically searched, thereby avoiding the tedious process of manually designing features and improving the accuracy and efficiency of malicious speech detection. At the same time, the method first automatically searches for the optimal feature combination through a genetic algorithm, and then inputs these feature combinations into the Transformer model for training to build an efficient malicious speech detection model, which not only helps to improve the accuracy and efficiency of malicious speech detection, but also provides new ideas and methods for other similar security detection problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is the flow chart of the feature combination genetic algorithm;
[0048] Figure 2 Flowchart for encoding feature combinations;
[0049] Figure 3 Flowchart for trait combination sire selection;
[0050] Figure 4 It is a cross flow chart of feature combination weights;
[0051] Figure 5 This is a flow chart of biased variation of feature combinations;
[0052] Figure 6 Calculate the flow chart for the termination condition determination. DETAILED DESCRIPTION
[0053] A malicious speech detection method based on feature combination genetic algorithm selects genetic algorithm as the theoretical basis for screening feature combinations to deal with the correlation between features. Genetic algorithm is a heuristic search technology that draws on the natural selection and genetics mechanisms of the biological world. It solves optimization problems by imitating the inheritance, mutation, selection and mating mechanisms in the biological evolution process. The advantage of genetic algorithm for feature selection is that it can find the best or sub-optimal feature set that meets the predetermined evaluation criteria in a large number of combinations of candidate features in a random but directional iterative manner. Compared with traditional greedy algorithms, genetic algorithms can better balance global and local searches and avoid falling into local optimal solutions too early.
[0054] Genetic algorithms usually focus on the selection and evolution of individuals in a population, rather than exploring excellent feature combinations from all features. A feature combination genetic algorithm is proposed by redesigning the feature encoding, fitness function, population selection, crossover and mutation processes of the genetic algorithm. This algorithm uses feature combinations as individuals and uses feature combination numbers to express individuals. By encoding feature numbers, crossover and mutation of the codes to generate new feature combinations, it can more effectively handle the exploration of complex feature spaces. The feature combination genetic algorithm flow chart is shown in the figure below. Figure 1 shown.
[0055] in:
[0056] (1) Feature combination encoding stage
[0057] In the feature combination encoding stage, the patent chose Gray coding instead of traditional binary coding. The main feature of Gray coding is that it can reduce the difficulty of converting between two consecutive values. In the traditional binary coding method, a mutation may cause a huge change in the value even if it only changes one bit. Such a change may cause the genetic algorithm to cross different areas of the search space and fail to conduct detailed exploration of local areas, increasing the difficulty of finding the global optimal solution. More importantly, in binary coding, the conversion from one value to the next adjacent value may involve changes in multiple bits. This multi-point change condition makes the probability of continuous conversion of values smaller, resulting in the instability of the algorithm.
[0058] In contrast, Gray coding has adjacent numbers that differ by only one bit in binary, and can directly transition to the next value by changing only one position at a time. This enables the genetic algorithm to perform detailed local searches to a certain extent. When performing genetic operations such as crossover and mutation, it helps to maintain the continuity of feature changes and genetic diversity, thereby helping to maintain the exploration continuity of the genetic algorithm. This encoding method allows the algorithm to gradually approach the solution to the problem more carefully, rather than conducting a large-scale aimless search, optimizing the smoothness of stepping and exploration during the search process. Feature combination encoding process, algorithms such as Figure 2 shown.
[0059] In the feature encoding process, first, the algorithm initializes the input, which contains the total number of features n in the feature combination and the number of each feature X j In this step, a set of n features is determined by random selection.
[0060] Secondly, calculate the extreme value of all feature numbers in the feature combination, that is, the maximum feature number Max n and the minimum feature number Min n This process ensures that the range of variation of the characteristic numbers is known. The number of bits required for encoding is then determined based on the extreme value differences. n This number is obtained by n -Min n +1 is calculated by rounding up the logarithm. Next, the feature number is converted to binary and the number of the jth feature is X j Subtract the minimum feature number Min n , and then converted to length L n The binary code B j .
[0061] Finally, the binary code B j Gray code G j , and Gray code G of all features 0 G1 ……G n The final Gray code G is obtained by splicing. This process involves performing a bitwise XOR operation on each binary code with the result of shifting it right by one bit. This method ensures that the codes between adjacent values differ by only one bit and helps maintain the continuity of local search in the genetic algorithm. This conversion is the key to optimizing the search efficiency of Gray coding in genetic algorithms. The output of the algorithm is the Gray code corresponding to the individual eigenvalue.
[0062] (2) Calculation of feature combination fitness stage
[0063] For the multi-classification SER model, a fitness function based on the model classification confidence rate is proposed to evaluate the feature combination in the genetic algorithm. This fitness function uses the confidence rate when classifying the model as a measurement standard, providing a quantitative evaluation basis for the genetic algorithm.
[0064] The design of the fitness function takes into account the confidence rate of the feature combination in the model for different emotion categories. It not only pays attention to the model's predicted output value for the correct emotion category, but also focuses on analyzing the dispersion of the model's predicted output values for other incorrect emotion categories. Specifically, if a sample has a high predicted output value for the correct emotion category, while the predicted output values for other incorrect emotion categories are low and evenly distributed, then the fitness evaluation of the sample in the genetic algorithm will be high. This is because the high correct category prediction value and the balanced distribution of incorrect category prediction values indicate that the model is very certain about the classification of the sample, so in the selection process of the genetic algorithm, such samples are more likely to be selected for subsequent crossover and mutation operations. Through this design, it is possible to select more important feature combinations for the classification accuracy and stability of the SER model under the framework of the genetic algorithm. The fitness function formula is shown in the formula.
[0065]
[0066] Among them, F(i) is the fitness of the i-th feature combination sample, C i,correct is the confidence rate of feature combination sample i for the correct category, is the confidence rate of feature combination sample i for the jth category, and α is an adjustment parameter used to control the contribution of the dispersion of confidence rates of other categories except the confidence rate of the correct category to the fitness.
[0067] (3) Feature combination paternal selection stage
[0068] In the feature combination parent selection stage, a heuristic selection method based on feature importance is proposed. Specifically, this method accumulates the importance of each feature in each feature combination sample as the selection criterion. During the selection process, two feature combination samples that have not been selected are randomly selected for comparison, and the one with the higher sum of feature importance is selected as the parent. This method ensures that feature combination samples with larger cumulative feature importance values have a higher chance of being selected as the parent, thereby guiding the genetic algorithm search process to evolve in the direction of more important features. Feature combination parent selection process, algorithm such as Figure 3 shown.
[0069] In the feature combination parent selection process, first, the algorithm initializes an empty parent set P and an unselected sample set U, where U is equal to the entire feature combination sample set S. Secondly, traverse each feature combination sample s i , calculate the internal features f ij The feature importance value w ij Then, p cycles are performed, and two feature combination samples s are randomly selected from the unselected sample set U in each cycle. a and b Compare them. Compare the sum of their feature importances, select the feature combination with the larger sum of feature importance as the parent, add the selected feature combination to the parent set P, and remove the feature combination from the unselected sample set U. Finally, return the parent set P as the output.
[0070] (4) Feature combination crossover stage
[0071] In the feature combination crossover stage, a weighted crossover method based on feature importance is proposed. Specifically, by comparing the sum of the importance of all features in different feature combination samples, it is determined whether the feature combination samples will be crossed. However, in order to avoid the phenomenon that feature combination samples with high total feature importance are always selected first than feature combination samples with low total feature importance, we first perform a random selection step before this. This not only takes into account the importance of the features, but also maintains the diversity and randomness of the selection, which helps prevent the algorithm from converging to the local optimal solution too early.
[0072] After determining the feature combination samples for weighted crossover, the basic two-point crossover method is used for crossover. This method involves randomly selecting two different points from the code of each parent individual, and then exchanging the coding sequence between the two points to generate a new combination of genetic features. Through this simple and efficient two-point crossover method, the algorithm can introduce solutions that help maintain population diversity while maintaining existing high-quality traits and explore more suitable solutions. The feature combination weighted crossover process, the algorithm is as follows Figure 4 shown.
[0073] In the feature combination weight crossover process, first, the algorithm initializes the unselected sample set U to be the same as the input feature combination sample set S.
[0074] Secondly, calculate the sum of all feature importance values of each feature combination sample in set S Then, two pairs of feature combination samples s are randomly selected from the unselected sample set U a ,s b ,s c ,s d , based on the sum of feature importance, select the samples s corresponding to the two maximum values 1 and 2 , and remove these two samples from set U to avoid being selected again.
[0075] Finally, for s 1 and 2 Perform a two-point crossover operation to obtain a new feature combination sample and And add these new samples to the feature combination sample set S. This crossover process is repeated p times until the final crossover feature combination sample set S is generated.
[0076] (4) Feature combination mutation stage
[0077] In the feature combination mutation stage, a biased mutation method based on feature importance is proposed. This method adopts a strategy similar to weighted crossover when selecting feature combination samples for mutation. Specifically, the process starts with randomly selecting feature combination samples, and then decides which feature combination sample will undergo mutation by comparing the cumulative value of feature importance. This method gives priority to samples with higher importance features, in order to produce better feature combinations after mutation.
[0078] After determining the special diagnostic samples for biased mutation, the basic bit reversal mutation method was used for mutation. The bit reversal mutation method is a common mutation operation in genetic algorithms, mainly used for coded individuals. In this process, the algorithm randomly selects one or more sites of an individual and reverses the values at these sites, that is, changes 0 to 1, or changes 1 to 0. This method increases the diversity of the population by introducing small random changes, which helps the algorithm to jump out of the local optimal solution and explore a wider solution space. Feature combination biased mutation process, algorithm such as Figure 5 shown.
[0079] Machine selects two unselected feature combination samples s a and bThen, the algorithm compares the sum of the feature importance of the two samples and selects the larger one for bit reversal mutation operation to generate the mutated feature combination sample or Finally, update the feature combination sample set S and replace the original s a or b Remove from S and U and add new variant samples or After repeating the above steps p times, the algorithm returns the final feature combination sample set S. This process ensures that feature combination samples with higher feature importance have a greater possibility of mutation, in the hope of generating new feature combinations with better performance.
[0080] (5) Termination condition determination stage
[0081] During the execution of the genetic algorithm, it is very important to set a reasonable termination condition. Common termination conditions include setting a maximum number of iterations and the quality of the solution reaching a predetermined threshold. However, both methods have certain limitations. If the preset maximum number of iterations is too small, the optimal solution may not be found before the end of the algorithm; if the number of iterations is too large, the algorithm may still perform invalid iterations after finding the optimal solution, wasting computing resources. On the other hand, if the quality of the solution is used as the termination condition, the algorithm may be stopped prematurely because the model accidentally obtains a good result at a certain moment, resulting in the final solution being not optimal.
[0082] To avoid these problems, the population convergence and model training mechanisms in the genetic algorithm are combined to monitor the diversity of the population. When the individuals in the population tend to be similar and the diversity decreases, it means that the population may have converged and the algorithm can be terminated. In specific implementation, the following method is used: If the difference in the change of the population before and after two generations is less than the set threshold within several consecutive generations (for example, three generations), then it can be considered that the result tends to be stable, the population in the genetic algorithm tends to be consistent, and the model training effect converges. The termination condition judgment process, the algorithm is as follows Figure 6 shown.
[0083] In the termination condition determination process, first, the changes ΔC and ΔC between two consecutive generations are initialized. * , they are all set to 0. At the same time, set the iteration counter item to 0, and determine a hyperparameter e, which is used to determine whether the change between two generations is within an acceptable range.
[0084] Secondly, a loop is entered, the condition is that the difference in the amount of change between the two generations is greater than the hyperparameter e, or the number of iterations item is less than 3. This loop is used to check whether the difference in the amount of change for three consecutive iterations is less than the hyperparameter e. If the loop condition is not met, it can be considered that the solution is stable enough and the loop will not be entered.
[0085] Then, inside the loop, first update the change ΔC of the previous generation * is the change ΔC of the current generation. Then calculate the difference between the maximum accuracy of the current generation and the previous generation max|CC * |, assign this value to ΔC as the contemporary change. Next, determine the difference between the current and previous generations |ΔC-ΔC * |Is it less than the hyperparameter e? If it is less than, it means that the difference between the two generations is not very significant, and the iteration counter item is increased by 1. If it is not less than, it means that the difference between the two generations is significant, and the iteration counter item is reset to 0, indicating that the convergence is discontinuous.
[0086] Finally, after the loop ends, the final difference between the two generations of transformations, Z, is returned. This algorithm can more effectively determine when the genetic algorithm should end by monitoring the changes between consecutive generations of populations, thereby avoiding invalid iterations or premature termination.
[0087] We input the extracted feature combinations into the Transformer model to train a more accurate malicious speech detection model. During the detection phase, we extract the same feature combinations as during training to ensure that the model can efficiently and accurately identify malicious speech. Through this process, our malicious speech detection system can return accurate and reliable detection results more quickly.
Claims
1. A malicious speech detection method based on feature combination genetic algorithm, characterized in that: The steps are:
1. Extract feature combination: 1) Feature combination coding: Gray coding is selected to encode the feature number, and the genetic algorithm performs detailed local search by directly transitioning to the next value by changing only one position at a time; 2) Generate an initial population; 3) Calculate the fitness of feature combination: propose a fitness function based on the confidence rate of model classification, which is used to evaluate the feature combination in the genetic algorithm. The fitness function uses the confidence rate when classifying the model as a measurement standard, providing a quantitative evaluation basis for the genetic algorithm; 4) Selecting the parent of feature combination: A heuristic selection method based on feature importance is proposed, which accumulates the importance of each feature in each feature combination sample as the selection criterion; 5) Determine the termination condition: If the accuracy of the model trained using the feature combination reaches the threshold requirement, then the training ends and the feature combination is obtained; Otherwise, proceed to step 6); 6) performing feature combination crossover and feature combination mutation in sequence, and re-inputting the processed feature combination into step 3); Second, the extracted features are combined and input into the Transformer model to train the final malicious speech detection model; 3. Extract the same feature combination as that in training from the sample of the speech to be detected, and input it into the malicious speech detection model for detection. If the confidence of the output malicious speech is greater than 0.5, it is judged as malicious speech. If the confidence of the output malicious speech is less than 0.5, it is judged as non-malicious speech.
2. The malicious speech detection method based on feature combination genetic algorithm according to claim 1 is characterized in that: In the above 1), the specific method is: First, initialize the input, including the total number of features n in the feature combination and the number X of each feature j , determine a set of n features by random selection; Secondly, calculate the extreme value of all feature numbers in the feature combination, that is, the maximum feature number Max n and the minimum feature number Min n , ensure that the range of feature number variations is understood; Then, the number of bits L required for encoding is determined based on the extreme value difference n , L n By Max n -Min n +1 is calculated by rounding up the logarithm; Next, perform binary conversion on the feature number and convert the number X of the jth feature j Subtract the minimum feature number Min n , and then converted to length L n The binary code B j ; Finally, the binary code B j Gray code G j , and Gray codes of all features G0G1......G n The final Gray code G is obtained by splicing. Each binary code is bitwise XORed with the result of shifting it right by one bit to ensure that the codes between adjacent values differ by only one bit. The output of the algorithm is the Gray code corresponding to the individual eigenvalue.
3. The malicious speech detection method based on feature combination genetic algorithm according to claim 1 is characterized in that: In the above 3), the specific method is: The design of the fitness function takes into account the confidence rate of the feature combination in the model for different emotion categories. It not only pays attention to the model's predicted output value for the correct emotion category, but also focuses on analyzing the dispersion of the model's predicted output value for other incorrect emotion categories. If a sample has a high predicted output value in the correct emotion category, while the predicted output values of other incorrect emotion categories are low and evenly distributed, then the fitness evaluation of the sample in the genetic algorithm will be high. This is because the high correct category prediction value and the balanced distribution of incorrect category prediction values indicate that the model is very certain about the classification of the sample. Therefore, in the selection process of the genetic algorithm, such samples are more likely to be selected for subsequent crossover and mutation operations. Through this design, it is possible to select a more important feature combination for the classification accuracy and stability of the SER model under the framework of the genetic algorithm. The fitness function formula is as follows: Among them, F(i) is the fitness of the i-th feature combination sample, c i,correct is the confidence rate of feature combination sample i for the correct category, is the confidence rate of feature combination sample i for the jth category, and α is an adjustment parameter used to control the contribution of the dispersion of confidence rates of other categories except the confidence rate of the correct category to the fitness.
4. The malicious speech detection method based on feature combination genetic algorithm according to claim 1 is characterized in that: In the above 4), the specific method is: First, initialize an empty parent set P and an unselected sample set U, where U is equal to the entire feature combination sample set S; Secondly, traverse each feature combination sample s i , calculate the internal features f ij The feature importance value w ij The sum of Then, p cycles are performed, and two feature combination samples s are randomly selected from the unselected sample set U in each cycle. a and b Compare the sum of their feature importances, select the feature combination with the larger sum of feature importance as the parent, add the selected feature combination to the parent set P, and remove the feature combination from the unselected sample set U; Finally, the parent set P is returned as output.
5. The malicious speech detection method based on feature combination genetic algorithm according to claim 1 is characterized in that: In the above 5), the specific method of feature combination variation is: First, initialize the changes ΔC and ΔC between two consecutive generations * , they are all set to 0, at the same time, set the iteration counter item to 0, and determine a hyperparameter e, which is used to determine whether the change between the two generations is within an acceptable range; Secondly, a loop is entered, the condition is that the difference in the amount of change between the two generations is greater than the hyperparameter e, or the number of iterations item is less than 3. This loop is used to check whether the difference in the amount of change of three consecutive iterations is less than the hyperparameter e. If the loop condition is not met, it can be considered that the solution is stable enough and the loop will not be entered; Then, inside the loop, first update the change ΔC of the previous generation * is the change ΔC of the current generation, and then calculates the difference between the maximum accuracy of the current generation and the previous generation max|CC * |, assign this value to ΔC as the contemporary change; then determine the difference between the current generation and the previous generation |ΔC-ΔC * |Is it less than the hyperparameter e? If so, it means that the difference between the two generations is not very significant. At this time, the iteration counter item increases by 1. If it is not less than, it means that the difference between the two generations is significant. The iteration counter item is reset to 0, indicating that the convergence is discontinuous. Finally, after the loop ends, the final difference Z between the two generations of transformations is returned.
6. The malicious speech detection method based on feature combination genetic algorithm according to claim 1 is characterized in that: In the above 6), the specific method of feature combination intersection is: First, initialize the unselected sample set U to be the same as the input feature combination sample set S; Secondly, calculate the sum of all feature importance values of each feature combination sample in set S Then, two pairs of feature combination samples s are randomly selected from the unselected sample set U a ,s b ,s c ,s d , based on the sum of feature importance, select the samples s1 and s2 corresponding to the two maximum values, and remove these two samples from the set U to avoid being selected again; Finally, perform a two-point crossover operation on s1 and s2 to obtain a new feature combination sample and These new samples are added to the feature combination sample set s, and this crossover process is repeated p times until the final crossover feature combination sample set S is generated.
7. The malicious speech detection method based on feature combination genetic algorithm according to claim 1 is characterized in that: In the above 6), the specific method of feature combination variation is: First, the algorithm initializes the unselected feature combination sample set U to S, and calculates the sum of the importance values of all the features in each feature combination sample in the set S. Secondly, the algorithm enters a loop, and in each loop, two unselected feature combination samples s are randomly selected a and b ; Then, the algorithm compares the sum of the feature importances of the two samples and selects the larger one for bit-reversal mutation operation to generate the mutated feature combination sample. or Finally, update the feature combination sample set S and replace the original s a or b Remove from S and U and add new variant samples or After repeating the above steps p times, the algorithm returns the final feature combination sample set s.
Citation Information
Cited By
Multidimensional fusion-based forged voice intelligent detection system
CN119479697A
Malicious voice detection method and device
CN121331141A
A malicious speech detection method and device
CN121331141B
