Method and related equipment for enhancing Android malware detection performance based on uncertainty
Through the method based on uncertainty enhancement, software features are extracted and multi-model prediction and correction are carried out, the aging and insufficient data of artificial intelligence models in malware detection are solved, and the accuracy and reliability of detection are improved.
Patent Information
- Application Number
- CN202410267536.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-08
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-03-08
AI Technical Summary
Artificial intelligence models have difficulty aware of model aging when detecting malware, and due to data collection difficulties and conceptual drifts of neural network models and adversarial sample attacks, it leads to inaccurate predictions, especially in the case of rapid evolution of Android malware.
A method of Android malware detection based on uncertainty enhancement is proposed. By extracting software features and inputting them into the basic model and uncertainty quantitative model for prediction, multiple uncertainty indicators are calculated, and the prediction results are used to correct the correction model and enhance the detection. performance.
Through the combination of uncertainty quantification and correction models, the accuracy and reliability of malware detection are improved, the problems of model aging and insufficient data are solved, and the detection performance of malware is enhanced.
Smart Images

Figure CN118378248B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence security technology, and more particularly to a method for enhancing Android malware detection performance based on uncertainty and related equipment. Background Art
[0002] When using AI to detect malware, it is often difficult for AI models to recognize model aging, that is, when to retrain.
[0003] On the other hand, due to the difficulty in collecting retraining data, it is even more difficult to obtain training data that is effective in enhancing the robustness of the model. Therefore, it is difficult to re-enhance the training of the artificial intelligence model.
[0004] On the other hand, due to the existence of concept drift and adversarial sample attacks in neural network models, especially the rapid evolution of Android malware, the basic model needs to be retrained frequently.
[0005] As a result, neural networks used to detect malware often suffer from inaccurate predictions after a period of use. Summary of the invention
[0006] In view of this, the purpose of this application is to propose a method and related equipment for enhancing Android malware detection performance based on uncertainty.
[0007] Based on the above objectives, the present application provides a method for enhancing Android malware detection performance based on uncertainty, including:
[0008] Extracting software features from the software to be detected, inputting the software features into a trained basic model and an uncertainty quantification model, predicting the software features using the basic model and outputting a first prediction result, and predicting the software features using the uncertainty quantification model and outputting a second prediction result, wherein the first prediction result indicates whether the type of the software is benign or non-benign, and the second prediction result includes at least one set of prediction probabilities corresponding to the software;
[0009] Calculating a plurality of preset uncertainty indicators of the second prediction result, and inputting the determined values of each uncertainty indicator as uncertainty features into the trained correction model;
[0010] The correction model is enabled to predict the first prediction result using the various uncertainty features and output a third prediction result, and the first prediction result is corrected according to the third prediction result, wherein the third prediction result indicates whether the first prediction result is reliable or unreliable.
[0011] Furthermore, before the software features are input into the trained basic model and uncertainty quantification model, the method further includes:
[0012] Inputting a preset corrected training sample into a trained basic model and an uncertainty quantification model, using the basic model to predict the corrected training sample, outputting a first prediction result, and using the uncertainty quantification model to predict the corrected training sample, outputting a second prediction result, wherein the corrected training sample includes sample data and an actual type corresponding to the corrected training sample;
[0013] Calculating respective uncertainty values for the second prediction results using the multiple uncertainty indicators, and inputting the respective uncertainty values as uncertainty features into the correction model to be trained;
[0014] Determining whether the first prediction result is correct according to the actual type of the sample data, setting a corresponding label, and inputting the first prediction result with the label into the correction model to be trained;
[0015] The correction model is trained using the uncertainty feature and the first prediction result with the label to obtain the trained correction model.
[0016] Furthermore, before inputting the preset correction training samples into the trained basic model and uncertainty quantification model, it also includes:
[0017] Using the preset basic training samples to train the basic model to be trained, to obtain the trained basic model;
[0018] The uncertainty quantification model to be trained is trained using the preset basic training samples to obtain the uncertainty quantification model that has completed the training.
[0019] Furthermore, the uncertainty quantization model includes at least one of a round model integration group, a Bayesian neural network, a deep neural network with a dropout layer, a deep model integration group, and a weight model integration group, wherein the round model integration group includes a plurality of first sub-models with different training rounds, the deep model integration group includes a plurality of second sub-models with different initialization parameters, and the weight model integration group includes a plurality of third sub-models with different weights.
[0020] Further, the software feature is predicted using the uncertainty quantification model to output a second prediction result, including:
[0021] Perform at least one of the following operations on the software feature using the uncertainty quantification model:
[0022] Using each first sub-model in the round model integration group to predict the software features respectively, and determining a single prediction probability of each first sub-model corresponding to the software feature, forming each prediction probability into a group of prediction probabilities and outputting the group;
[0023] Using the Bayesian neural network to predict the software features under different parameters, and determine a single prediction probability of the software features under each parameter, and form each prediction probability into a group of prediction probabilities and output it;
[0024] Using a deep neural network with a dropout layer to predict the software feature multiple times, and using the dropout layer to drop different neurons in each prediction, to obtain multiple different prediction probabilities corresponding to the software feature, and to form a group of prediction probabilities from each prediction and output the group;
[0025] Using each second sub-model in the deep model integration group to predict the software features respectively, and determining a single prediction probability of each second sub-model corresponding to the software feature, forming each prediction probability into a group of prediction probabilities and outputting the group;
[0026] The software features are predicted respectively using the third sub-models in the weight model integration group, and a single prediction probability of each third sub-model corresponding to the software feature is determined, and each prediction probability is formed into a group of prediction probabilities and output.
[0027] Further, calculating a plurality of preset uncertainty indicators of the second prediction result includes:
[0028] For the second prediction result, calculating the entropy value, relative entropy and standard deviation of the entire set of prediction probabilities;
[0029] The entropy value, the relative entropy and the standard deviation are all used to indicate the unreliability of the first prediction result of the basic model.
[0030] Further, calculating a plurality of preset uncertainty indicators of the second prediction result also includes:
[0031] For the group prediction probability in the second prediction result, perform at least one of the following:
[0032] Determine the difference between the maximum probability and the second largest probability of the entire set of predicted probabilities and use it as the value of an uncertainty indicator;
[0033] Determine the difference between the maximum probability and the median probability of the entire set of predicted probabilities and use it as the value of an uncertainty indicator;
[0034] Determine the difference between the maximum probability of the entire set of predicted probabilities and the mean probability, and use it as the value of an uncertainty indicator;
[0035] Determine the difference between the median of the entire set of predicted probabilities and the mean probability and use it as a threshold of an uncertainty indicator;
[0036] Determine the difference between the minimum probability and the second minimum probability of the entire set of predicted probabilities, and use it as the value of an uncertainty indicator;
[0037] Determine the difference between the minimum probability of the entire set of predicted probabilities and the median probability, and use it as the value of an uncertainty indicator;
[0038] The difference between the minimum probability of the entire set of predicted probabilities and the mean probability is determined and used as the value of an uncertainty indicator.
[0039] Further, correcting the first prediction result according to the third prediction result includes:
[0040] In response to determining that the third prediction result is reliable, retaining the first prediction result;
[0041] In response to determining that the third prediction result is unreliable, the first prediction result is modified.
[0042] Based on the same inventive concept, the present application also provides a device for enhancing Android malware detection performance based on uncertainty, including: a preliminary processing module, an uncertainty calculation module and a correction module;
[0043] The preliminary processing module is configured to extract software features from the software to be detected, input the software features into the trained basic model and uncertainty quantification model, predict the software features using the basic model and output a first prediction result, and predict the software features using the uncertainty quantification model and output a second prediction result, wherein the first prediction result indicates whether the type of the software is benign or non-benign, and the second prediction result includes at least one set of prediction probabilities corresponding to the software;
[0044] The uncertainty calculation module is configured to calculate a plurality of preset uncertainty indicators of the second prediction result, and input the determined values of each uncertainty indicator as uncertainty features into the trained correction model;
[0045] The correction module is configured to enable the correction model to predict the first prediction result using the various uncertainty features and output a third prediction result, and to correct the first prediction result according to the third prediction result, wherein the third prediction result indicates whether the first prediction result is reliable or unreliable.
[0046] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for enhancing Android malware detection performance based on uncertainty as described in any one of the above items is implemented.
[0047] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the above-mentioned method for enhancing Android malware detection performance based on uncertainty.
[0048] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method for enhancing Android malware detection performance based on uncertainty as described in any of the above items.
[0049] From the above, it can be seen that the uncertainty-based enhanced Android malware detection performance method and related equipment provided by the present application can predict the software based on the set basic model to obtain a first prediction result of whether the software is benign. Based on the uncertainty quantification model of the social sub-subsystem, a set of prediction probabilities for the same software can be obtained through the prediction of the software, that is, the second prediction result. By calculating the uncertainty index of the second prediction result, the uncertainty feature used to measure whether the first prediction result is reliable can be determined, so that the correction model can use the uncertainty feature to predict whether the first prediction result is reliable, and when the first prediction result is unreliable, to correct it, thereby enhancing the detection performance of malware. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 A flowchart of a method for enhancing Android malware detection performance based on uncertainty according to an embodiment of the present application;
[0052] Figure 2 This is a model framework diagram of an embodiment of the present application;
[0053] Figure 3 This is a schematic diagram of the structure of a device for enhancing Android malware detection performance based on uncertainty according to an embodiment of the present application;
[0054] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0055] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0056] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connecting" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0057] As described in the background technology section, the related uncertainty-based methods for enhancing Android malware detection performance are still difficult to meet the needs of malware detection in actual work.
[0058] In the process of implementing this application, the applicant discovered that the main problem with the related uncertainty-based method for enhancing Android malware detection performance is that when using artificial intelligence to detect malware, the artificial intelligence model often finds it difficult to realize the aging of the model, that is, when to retrain.
[0059] On the other hand, due to the difficulty in collecting retraining data, it is even more difficult to obtain training data that is effective in enhancing the robustness of the model. Therefore, it is difficult to re-enhance the training of the artificial intelligence model.
[0060] On the other hand, due to the existence of concept drift and adversarial sample attacks in neural network models, especially the rapid evolution of Android malware, the basic model needs to be retrained frequently.
[0061] As a result, neural networks used to detect malware often suffer from inaccurate predictions after a period of use.
[0062] Based on this, one or more embodiments in the present application provide a method for enhancing Android malware detection performance based on uncertainty.
[0063] In the embodiments of the present application, Figure 1 As a specific example, Figure 1 A model framework is provided for enhancing the performance of Android malware detection, wherein the model framework includes a basic model, an uncertainty quantification model, and a correction model.
[0064] Among them, the basic model can be a detector for detecting Android malware, which includes a deep neural network and predicts the type of software being detected, where the types of software being detected include trusted and untrusted, trusted means that the software is benign software, and untrusted means that the software is unbenign software, that is, malware; the uncertainty quantification model also includes a deep neural network; the uncertainty quantification model can be a single model or a group of model integration groups after slight modifications to the basic model; the correction model can be a model of a machine learning algorithm, such as a support vector machine, a K-nearest neighbor algorithm model, a decision tree algorithm model or a random forest algorithm.
[0065] exist Figure 1 In the specific example, ① represents the steps for training the uncertainty quantization model and the basic model, ② represents the steps for training the correction model, and ③ represents the steps for practical application of the model framework.
[0066] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0067] refer to Figure 2 , a method for enhancing Android malware detection performance based on uncertainty according to an embodiment of the present application comprises the following steps:
[0068] Step S201, extracting software features from the software to be predicted, inputting the software features into the trained basic model and uncertainty quantification model, using the basic model to predict the software features, outputting a first prediction result, and using the uncertainty quantification model to predict the software features, outputting a second prediction result, wherein the first prediction result indicates whether the type of the software feature is benign or non-benign, and the second prediction result includes at least one set of prediction probabilities corresponding to the software feature.
[0069] In an embodiment of the present application, in an application, for the software to be detected, the software features of each software can be extracted respectively, and the software features can be input into the uncertainty quantification model and the basic model that have been trained, so as to use the uncertainty quantification model and the basic model to predict the software features respectively.
[0070] There may be one or more software to be detected. For each software, its related data may be composed into an application data set, and one or more software features may be extracted from the application data set of the software.
[0071] Furthermore, if Figure 1 As shown, the software features are input into the basic model and uncertainty quantification model for training respectively, wherein the correction training sample includes not only the sample data itself but also the actual type corresponding to the correction training sample, that is, whether the correction training sample is credible or uncredible.
[0072] Based on this, after the software features are input into the trained basic model, the result output by the basic model is used as the first prediction result.
[0073] The output first prediction result indicates the type of the predicted software, wherein the types of software include trusted software, that is, benign software, and untrusted software, that is, malicious software.
[0074] Furthermore, the uncertainty quantification model that has completed training may include one or more of a round model integration group that has completed training, a Bayesian neural network that has completed training, a deep neural network that has completed training and is equipped with a discard layer, a deep model integration group that has completed training, and a weight model integration group that has completed training.
[0075] Among them, the integrated group of round models that have completed training includes multiple first sub-models. In each first sub-model, the training round of the basic model is modified, and each first sub-model completes the training according to different training rounds.
[0076] For example, the training rounds of the basic model are 30, and the round model integration group may include 5 first sub-models, and the training rounds of the 5 first sub-models are 10, 20, 30, 40 and 50 respectively.
[0077] Furthermore, after the software features of the same software are input into the round model integration group that has completed training in different rounds, the first sub-models can be used to predict the software features of the same software respectively. Accordingly, corresponding to the same software feature, each first sub-model in the round model group will output a prediction probability, and all single prediction probabilities corresponding to the same software feature will be combined into a group of prediction probabilities and output.
[0078] Furthermore, the difference between the trained Bayesian neural network and the basic model is that a variational Bayesian inference mechanism is provided therein, and its network structure can be consistent with the network structure of the basic model.
[0079] Furthermore, in a Bayesian neural network, its parameters can be regarded as random variables and conform to a preset prior distribution.
[0080] Based on this, in each prediction of the Bayesian neural network, all its parameters can be sampled from the prior distribution, so that the parameters used will be different each time the prediction is made.
[0081] Furthermore, the Bayesian neural network is used to make multiple predictions on the same software feature, thereby obtaining multiple single prediction probabilities corresponding to different parameters, and the individual prediction probabilities are combined into a group of prediction probabilities and output.
[0082] Furthermore, in a deep neural network with a dropout layer that has completed training, since a dropout layer is additionally provided compared to a basic model, an operation of dropping neurons can be performed during the prediction process.
[0083] Based on this, a deep neural network with a discard layer is used to make multiple predictions on the same software feature, and different neurons are discarded in each prediction, so that multiple different single prediction probabilities corresponding to the same software feature can be obtained, and the individual prediction probabilities are combined into a group of prediction probabilities and output.
[0084] Furthermore, the deep model integration group that has completed training includes multiple second sub-models, each second sub-model modifies the initialization parameters of the basic model, and makes the initialization parameters of each second sub-model different during initialization.
[0085] Furthermore, after the software features of the same software are input into the deep model integration group, the second sub-models can be used to predict the software features of the same software respectively. Accordingly, corresponding to the same software feature, each second sub-model in the deep model group will output a prediction probability, and all single prediction probabilities corresponding to the same software feature will be combined into a group of prediction probabilities and output.
[0086] Furthermore, the weight model integration group that has completed training includes multiple third sub-models, and each third sub-model modifies the weight configured by the basic model, and makes the weight configured by each third sub-model different.
[0087] Furthermore, after the software features of the same software are input into the weight model integration group, the third sub-models can be used to predict the software features of the same software respectively. Accordingly, corresponding to the same software feature, each third sub-model in the weight model group will output a prediction probability, and all single prediction probabilities corresponding to the same software feature will be combined into a group of prediction probabilities and output.
[0088] Based on this, one or more of the multiple groups of prediction probabilities output corresponding to the same software feature can be used as the second prediction result.
[0089] It can be seen that by making slight modifications to the base model, it is possible to determine whether the prediction of the uncertainty quantification model for the same sample will change significantly. If the difference between the prediction of the sample by the uncertainty quantification model after slight modification and the prediction of the sample by the base model before modification is greater, it indicates that the degree of uncertainty of the base model for the sample is higher, that is, the prediction of the sample by the base model is unreliable.
[0090] Step S202: Calculate multiple preset uncertainty indicators of the second prediction result, and input the determined values of each uncertainty indicator as uncertainty features into the trained correction model.
[0091] In an embodiment of the present application, based on the second prediction result determined above, a plurality of preset uncertainty indicators may be calculated to measure the degree of uncertainty of the first prediction.
[0092] Specifically, the prediction of a single sample by the uncertainty quantification model is a set of prediction probabilities. Therefore, the difference between each individual prediction probability in a set of prediction probabilities can be used as a representation of the degree of uncertainty of the underlying model.
[0093] Among them, the larger the gap between the individual prediction probabilities, the higher the degree of uncertainty of the basic model in the prediction of the sample, which means that the prediction is unreliable.
[0094] Based on this, multiple uncertainty indicators can be set to measure the uncertainty of the basic model, and the values of the uncertainty indicators will be used as features input into the correction model, that is, uncertainty features.
[0095] Specifically, the uncertainty indicator includes one or more of entropy value, KL divergence (relative entropy) and standard deviation.
[0096] Among them, the entropy value is used to measure the randomness or disorder of each individual prediction probability in the second prediction result. In a set of prediction probabilities, the larger the entropy value, the more chaotic the individual prediction probabilities are, which means that the uncertainty of the first prediction result predicted by the basic model for the sample is greater.
[0097] Furthermore, KL divergence is used to measure the degree of dissimilarity between two probability distributions. When KL divergence is applied to a set of predicted probabilities, it can be used to calculate the difference between the distribution of the set of predicted probabilities and the uniform distribution of their mean. The greater the deviation of the KL divergence, the greater the degree of uncertainty in the prediction of the basic model.
[0098] Furthermore, the standard deviation is used to measure the dispersion of each individual prediction probability in the second prediction result relative to its average value, and is calculated according to the square root of the variance. By calculating the standard deviation of each group of prediction probabilities, the larger the standard deviation, the greater the degree of uncertainty in the basic model prediction.
[0099] In this embodiment, the uncertainty index, in addition to the above entropy value, relative entropy and standard deviation, may also include other indicators obtained through statistics.
[0100] For example, the difference between the maximum probability and the second largest probability of the entire set of predicted probabilities is determined and used as the value of an uncertainty indicator.
[0101] Among them, the maximum probability can be subtracted from the second largest probability. The higher the difference obtained, the greater the degree of uncertainty in the basic model prediction.
[0102] Furthermore, the difference between the maximum probability of the entire set of predicted probabilities and the median probability is determined and used as the value of an uncertainty indicator.
[0103] Among them, when only the difference between the maximum probability and the second largest probability is used, if the two sub-models obtain incorrect prediction probabilities, the indicator using the difference between the maximum probability and the second largest probability will become invalid. Based on this, the maximum probability can be subtracted from the median probability. If the difference is small, it means that at least half of the models have made the same prediction. If the difference is high, it can make up for the defect of using the difference between the maximum probability and the second largest probability as an indicator, that is, make up for the defect caused by two or more models making incorrect predictions.
[0104] Furthermore, the difference between the maximum probability of the entire set of predicted probabilities and the mean probability is determined and used as the value of an uncertainty indicator.
[0105] Among them, the difference represents the difference between the maximum probability and the mean probability. If the difference is smaller, the degree of uncertainty is smaller. If the difference is larger, the degree of uncertainty is greater.
[0106] Furthermore, the difference between the median of the entire set of predicted probabilities and the mean probability is determined and used as a threshold for an uncertainty indicator.
[0107] Among them, when using the threshold to measure the samples to be predicted, for example, if only the average value is used as the threshold, when the predicted probability is greater than 0.5, the samples to be predicted will be classified into the same class. Therefore, a lot of information will be lost when only the average value is used as the threshold. Based on this, the median minus the average value can be used as the threshold. For example, for an uncertainty quantification model with 5 sub-models or 5 predictions, the 5 individual prediction probabilities in the entire set of prediction probabilities are: 1.00, 0.41, 0.42, 0.43 and 0.44, respectively. Since their predicted values are all less than 0.5, the basic model can classify it as benign software. However, if the average value is greater than 0.5, it should be classified as untrusted malware. It can be seen that the larger the threshold, the higher the degree of uncertainty.
[0108] Furthermore, the difference between the minimum probability and the second minimum probability of the entire set of predicted probabilities is determined and used as the value of an uncertainty indicator.
[0109] Among them, the second smallest probability can be subtracted from the smallest probability. The higher the difference obtained, the greater the degree of uncertainty in the basic model prediction.
[0110] Furthermore, the difference between the minimum probability of the entire set of predicted probabilities and the median probability is determined and used as the value of an uncertainty indicator.
[0111] Among them, the median probability can be subtracted from the minimum probability. If the difference is small, it means that at least half of the models have made the same prediction. If the difference is high, it can make up for the defect of using the difference between the second smallest probability and the minimum probability as an indicator, that is, make up for the defect caused by two or more models making wrong predictions.
[0112] Furthermore, the difference between the minimum probability of the entire set of predicted probabilities and the mean probability is determined and used as the value of an uncertainty indicator.
[0113] Among them, the difference represents the difference between the minimum probability and the mean probability. If the difference is smaller, the degree of uncertainty is smaller. If the difference is larger, the degree of uncertainty is greater.
[0114] Based on this, the above uncertainty index can be calculated for each group of prediction probabilities in the second prediction result, and the calculated value can be input as an uncertainty feature into the correction model that has completed training.
[0115] Step S203: Instruct the correction model to predict the first prediction result using the various uncertainty features and output a third prediction result, and correct the first prediction result according to the third prediction result, wherein the third prediction result indicates whether the first prediction result is reliable or unreliable.
[0116] In an embodiment of the present application, based on the uncertainty characteristics and the first prediction result determined in the aforementioned steps, the correction model can correct the unreliable first prediction result output by the basic model.
[0117] Specifically, the correction model can use the uncertainty features and to classify the first prediction result, and classify the first prediction result into two categories: reliable and unreliable in the third prediction result.
[0118] Further, when the third prediction result indicates that the first prediction result is reliable, the first prediction result is retained; when the third prediction result indicates that the first prediction result is unreliable, the software type in the first prediction result is modified from trusted to untrusted, and the software type in the first prediction result is modified from untrusted to trusted.
[0119] In another embodiment of the present application, before the software features of the software to be tested are input into the model framework and prediction is performed, the uncertainty quantification model, the basic model and the correction model need to be trained.
[0120] Among them, a basic training set for training a basic model and an uncertainty quantification model, and a correction training set for training a correction model are pre-set.
[0121] The basic training set includes a plurality of basic training samples, and the correction training set includes a plurality of correction training samples.
[0122] In specific training, such as Figure 1 As shown, basic training features are extracted from each basic training sample in the basic training set, and the basic training features are respectively input into the basic model and the uncertainty quantization model to be trained, so as to use the basic training samples to train the basic model and the uncertainty quantization model respectively.
[0123] In this embodiment, the uncertainty quantization model to be trained may include one or more of a round model integration group, a Bayesian neural network, a deep neural network with a discard layer, a deep model integration group, and a weight model integration group.
[0124] Among them, the round model integration group includes multiple first sub-models. In each first sub-model, the training round of the basic model is modified, and each first sub-model is set with a different training round.
[0125] For example, the training rounds of the basic model are 30, and the round model integration group may include 5 first sub-models, and the training rounds of the 5 first sub-models are 10, 20, 30, 40 and 50 respectively.
[0126] Furthermore, after the basic training features of the same basic training sample are input into the round model integration group, each first sub-model can be used to predict the basic training features of the same basic training sample respectively. Accordingly, corresponding to the same basic training feature, each first sub-model in the round model group will output a prediction probability, and all single prediction probabilities corresponding to the same basic training feature will be combined into a group of prediction probabilities and output.
[0127] Furthermore, the difference between the Bayesian neural network and the basic model is that a variational Bayesian inference mechanism is provided therein, and its network structure can be consistent with the network structure of the basic model.
[0128] Furthermore, in a Bayesian neural network, its parameters can be regarded as random variables and conform to a preset prior distribution.
[0129] Based on this, in each prediction of the Bayesian neural network, all its parameters can be sampled from the prior distribution, so that the parameters used will be different each time the prediction is made.
[0130] Furthermore, the Bayesian neural network is used to make multiple predictions on the same basic training feature, thereby obtaining multiple single prediction probabilities corresponding to different parameters, and the individual prediction probabilities are combined into a group of prediction probabilities and output.
[0131] Furthermore, in a deep neural network with a dropout layer, since a dropout layer is additionally provided compared to a basic model, an operation of dropping neurons can be performed during the prediction process.
[0132] Based on this, a deep neural network with a discard layer is used to make multiple predictions on the same basic training feature, and different neurons are discarded in each prediction, so that multiple different single prediction probabilities corresponding to the same basic training feature can be obtained, and the various prediction probabilities are combined into a group of prediction probabilities and output.
[0133] Furthermore, the deep model integration group includes multiple second sub-models, each second sub-model modifies the initialization parameters of the basic model, and makes the initialization parameters of each second sub-model different during initialization.
[0134] Furthermore, after the basic training features of the same basic training sample are input into the deep model integration group, the second sub-models can be used to predict the basic training features of the same basic training sample respectively. Accordingly, corresponding to the same basic training feature, each second sub-model in the deep model group will output a prediction probability, and all single prediction probabilities corresponding to the same basic training feature will be combined into a group of prediction probabilities and output.
[0135] Furthermore, the weight model integration group includes a plurality of third sub-models, each of which modifies the weight configured for the basic model, and makes the weight configured for each of the third sub-models different.
[0136] Furthermore, after the basic training features of the same basic training sample are input into the weight model integration group, each third sub-model can be used to predict the basic training features of the same basic training sample respectively. Accordingly, corresponding to the same basic training feature, each third sub-model in the weight model group will output a prediction probability, and all single prediction probabilities corresponding to the same basic training feature will be combined into a group of prediction probabilities and output.
[0137] Accordingly, one or more of the multiple groups of prediction probabilities output corresponding to the same basic training feature can be used as the second prediction result. Further, after training, a basic model and an uncertainty quantification model that have completed training are obtained.
[0138] In another embodiment of the present application, based on the trained basic model and the uncertainty quantization model, the correction model to be trained can be trained based on the trained basic model and the uncertainty quantization model.
[0139] Specifically, Figure 1 As shown, the corrected training features are extracted from each corrected training sample in the corrected training set, and the corrected training features are respectively input into the basic model and the uncertainty quantification model for completing the training, wherein the corrected training samples include not only the sample data itself but also the actual type corresponding to the corrected training samples, that is, whether the corrected training samples are credible or uncredible.
[0140] Based on this, after the corrected training features are input into the trained basic model, the result output by the basic model is used as the first prediction result.
[0141] In addition to the output first prediction result, the actual type corresponding to the corrected training sample is also output.
[0142] Based on this, the actual type can be used to determine whether the output first prediction result is consistent with the actual type, and a corresponding label can be set for the first prediction result.
[0143] Specifically, if the first prediction result is consistent with the actual type, a correct label is marked for the first prediction result; if the first prediction result is inconsistent with the actual type, an incorrect label is marked for the first prediction result.
[0144] Accordingly, the first prediction result with the label can be input into the correction model to be trained.
[0145] Furthermore, the uncertainty quantification model that has completed training may include one or more of a round model integration group that has completed training, a Bayesian neural network that has completed training, a deep neural network that has completed training and is equipped with a discard layer, a deep model integration group that has completed training, and a weight model integration group that has completed training.
[0146] Among them, the integrated group of round models that have completed training includes multiple first sub-models. In each first sub-model, the training round of the basic model is modified, and each first sub-model completes the training according to different training rounds.
[0147] For example, the training rounds of the basic model are 30, and the round model integration group may include 5 first sub-models, and the training rounds of the 5 first sub-models are 10, 20, 30, 40 and 50 respectively.
[0148] Furthermore, after the corrected training features of the same corrected training sample are input into the round model integration group that has completed training in different rounds, the first sub-models can be used to predict the corrected training features of the same corrected training sample respectively. Accordingly, corresponding to the same corrected training feature, each first sub-model in the round model group will output a prediction probability, and all single prediction probabilities corresponding to the same corrected training feature will be combined into a group of prediction probabilities and output.
[0149] Furthermore, the difference between the trained Bayesian neural network and the basic model is that a variational Bayesian inference mechanism is provided therein, and its network structure can be consistent with the network structure of the basic model.
[0150] Furthermore, in a Bayesian neural network, its parameters can be regarded as random variables and conform to a preset prior distribution.
[0151] Based on this, in each prediction of the Bayesian neural network, all its parameters can be sampled from the prior distribution, so that the parameters used will be different each time the prediction is made.
[0152] Furthermore, the Bayesian neural network is used to make multiple predictions on the same corrected training feature, thereby obtaining multiple single prediction probabilities corresponding to different parameters, and the individual prediction probabilities are combined into a group of prediction probabilities and output.
[0153] Furthermore, in a deep neural network with a dropout layer that has completed training, since a dropout layer is additionally provided compared to a basic model, an operation of dropping neurons can be performed during the prediction process.
[0154] Based on this, a deep neural network with a discard layer is used to make multiple predictions on the same corrected training feature, and different neurons are discarded in each prediction, so that multiple different single prediction probabilities corresponding to the same corrected training feature can be obtained, and the various prediction probabilities are combined into a group of prediction probabilities and output.
[0155] Furthermore, the deep model integration group that has completed training includes multiple second sub-models, each second sub-model modifies the initialization parameters of the basic model, and makes the initialization parameters of each second sub-model different during initialization.
[0156] Furthermore, after the corrected training features of the same corrected training sample are input into the deep model integration group, the second sub-models can be used to predict the corrected training features of the same corrected training sample respectively. Accordingly, corresponding to the same corrected training feature, each second sub-model in the deep model group will output a prediction probability, and all single prediction probabilities corresponding to the same corrected training feature will be combined into a group of prediction probabilities and output.
[0157] Furthermore, the weight model integration group that has completed training includes multiple third sub-models, and each third sub-model modifies the weight configured by the basic model, and makes the weight configured by each third sub-model different.
[0158] Furthermore, after the corrected training features of the same corrected training sample are input into the weight model integration group, each third sub-model can be used to predict the corrected training features of the same corrected training sample respectively. Accordingly, corresponding to the same corrected training feature, each third sub-model in the weight model group will output a prediction probability, and all single prediction probabilities corresponding to the same corrected training feature will be combined into a group of prediction probabilities and output.
[0159] Accordingly, one or more of the multiple groups of prediction probabilities output corresponding to the same corrected training feature may be used as the second prediction result.
[0160] It can be seen that by making slight modifications to the base model, it is possible to determine whether the prediction of the uncertainty quantification model for the same sample will change significantly. If the difference between the prediction of the sample by the uncertainty quantification model after slight modification and the prediction of the sample by the base model before modification is greater, it indicates that the degree of uncertainty of the base model for the sample is higher, that is, the prediction of the sample by the base model is unreliable.
[0161] In this embodiment, based on the second prediction result determined above, a plurality of preset uncertainty indicators may be calculated to measure the degree of uncertainty of the first prediction.
[0162] Specifically, the prediction of a single sample by the uncertainty quantification model is a set of prediction probabilities. Therefore, the difference between each individual prediction probability in a set of prediction probabilities can be used as a representation of the degree of uncertainty of the underlying model.
[0163] Among them, the larger the gap between the individual prediction probabilities, the higher the degree of uncertainty of the basic model in the prediction of the sample, which means that the prediction is unreliable.
[0164] Based on this, multiple uncertainty indicators can be set to measure the uncertainty of the basic model, and the values of the uncertainty indicators will be used as features of the training and correction model, that is, uncertainty features.
[0165] Specifically, the uncertainty indicator includes one or more of entropy value, KL divergence (relative entropy) and standard deviation.
[0166] Among them, the entropy value is used to measure the randomness or disorder of each individual prediction probability in the second prediction result. In a set of prediction probabilities, the larger the entropy value, the more chaotic the individual prediction probabilities are, which means that the uncertainty of the first prediction result predicted by the basic model for the sample is greater.
[0167] Furthermore, KL divergence is used to measure the degree of dissimilarity between two probability distributions. When KL divergence is applied to a set of predicted probabilities, it can be used to calculate the difference between the distribution of the set of predicted probabilities and the uniform distribution of their mean. The greater the deviation of the KL divergence, the greater the degree of uncertainty in the prediction of the basic model.
[0168] Furthermore, the standard deviation is used to measure the dispersion of each individual prediction probability in the second prediction result relative to its average value, and is calculated according to the square root of the variance. By calculating the standard deviation of each group of prediction probabilities, the larger the standard deviation, the greater the degree of uncertainty in the basic model prediction.
[0169] In this embodiment, the uncertainty index, in addition to the above entropy value, relative entropy and standard deviation, may also include other indicators obtained through statistics.
[0170] For example, the difference between the maximum probability and the second largest probability of the entire set of predicted probabilities is determined and used as the value of an uncertainty indicator.
[0171] Among them, the maximum probability can be subtracted from the second largest probability. The higher the difference obtained, the greater the degree of uncertainty in the basic model prediction.
[0172] Furthermore, the difference between the maximum probability of the entire set of predicted probabilities and the median probability is determined and used as the value of an uncertainty indicator.
[0173] Among them, when only the difference between the maximum probability and the second largest probability is used, if the two sub-models obtain incorrect prediction probabilities, the indicator using the difference between the maximum probability and the second largest probability will become invalid. Based on this, the maximum probability can be subtracted from the median probability. If the difference is small, it means that at least half of the models have made the same prediction. If the difference is high, it can make up for the defect of using the difference between the maximum probability and the second largest probability as an indicator, that is, make up for the defect caused by two or more models making incorrect predictions.
[0174] Furthermore, the difference between the maximum probability of the entire set of predicted probabilities and the mean probability is determined and used as the value of an uncertainty indicator.
[0175] Among them, the difference represents the difference between the maximum probability and the mean probability. If the difference is smaller, the degree of uncertainty is smaller. If the difference is larger, the degree of uncertainty is greater.
[0176] Furthermore, the difference between the median of the entire set of predicted probabilities and the mean probability is determined and used as a threshold for an uncertainty indicator.
[0177] Among them, when using the threshold to measure the samples to be predicted, for example, if only the average value is used as the threshold, when the predicted probability is greater than 0.5, the samples to be predicted will be classified into the same class. Therefore, a lot of information will be lost when only the average value is used as the threshold. Based on this, the median minus the average value can be used as the threshold. For example, for an uncertainty quantification model with 5 sub-models or 5 predictions, the 5 individual prediction probabilities in the entire set of prediction probabilities are: 1.00, 0.41, 0.42, 0.43 and 0.44, respectively. Since their predicted values are all less than 0.5, the basic model can classify it as benign software. However, if the average value is greater than 0.5, it should be classified as untrusted malware. It can be seen that the larger the threshold, the higher the degree of uncertainty.
[0178] Furthermore, the difference between the minimum probability and the second minimum probability of the entire set of predicted probabilities is determined and used as the value of an uncertainty indicator.
[0179] Among them, the second smallest probability can be subtracted from the smallest probability. The higher the difference obtained, the greater the degree of uncertainty in the basic model prediction.
[0180] Furthermore, the difference between the minimum probability of the entire set of predicted probabilities and the median probability is determined and used as the value of an uncertainty indicator.
[0181] Among them, the median probability can be subtracted from the minimum probability. If the difference is small, it means that at least half of the models have made the same prediction. If the difference is high, it can make up for the defect of using the difference between the second smallest probability and the minimum probability as an indicator, that is, make up for the defect caused by two or more models making wrong predictions.
[0182] Furthermore, the difference between the minimum probability of the entire set of predicted probabilities and the mean probability is determined and used as the value of an uncertainty indicator.
[0183] Among them, the difference represents the difference between the minimum probability and the mean probability. If the difference is smaller, the degree of uncertainty is smaller. If the difference is larger, the degree of uncertainty is greater.
[0184] Based on this, the above uncertainty index can be calculated for each group of prediction probabilities in the second prediction result, and the calculated value can be input into the correction model to be trained as an uncertainty feature.
[0185] In this embodiment, if Figure 1 As shown, the trained correction model can be trained using uncertainty features and the first prediction results with labels to obtain a corrected model that has completed training.
[0186] It can be seen that the uncertainty-based method for enhancing Android malware detection performance in the embodiments of the present application can predict the software based on the set basic model to obtain a first prediction result of whether the software is benign, and based on the uncertainty quantification model of the social sub-subsystem, a set of prediction probabilities for the same software can be obtained through the prediction of the software, that is, the second prediction result. By calculating the uncertainty index of the second prediction result, the uncertainty feature for measuring whether the first prediction result is reliable can be determined, so that the correction model can use the uncertainty feature to predict whether the first prediction result is reliable, and correct it when the first prediction result is unreliable, thereby enhancing the detection performance of malware.
[0187] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0188] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0189] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, an embodiment of the present application also provides a device for enhancing Android malware detection performance based on uncertainty.
[0190] refer to Figure 3 , the device for enhancing Android malware detection performance based on uncertainty includes: a preliminary processing module 301, an uncertainty calculation module 302 and a correction module 303;
[0191] The preliminary processing module 301 is configured to extract software features from the software to be detected, input the software features into the trained basic model and uncertainty quantification model, predict the software features using the basic model, output a first prediction result, and predict the software features using the uncertainty quantification model, output a second prediction result, wherein the first prediction result indicates whether the type of the software is benign or non-benign, and the second prediction result includes at least one set of prediction probabilities corresponding to the software;
[0192] The uncertainty calculation module 302 is configured to calculate a plurality of preset uncertainty indicators of the second prediction result, and input the values of each determined uncertainty indicator as uncertainty features into the trained correction model;
[0193] The correction module 303 is configured to enable the correction model to predict the first prediction result using the various uncertainty features and output a third prediction result, and correct the first prediction result according to the third prediction result, wherein the third prediction result indicates whether the first prediction result is reliable or unreliable.
[0194] For the convenience of description, the above devices are described in terms of functions and are divided into various modules. Of course, when implementing the embodiments of the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0195] The device of the above embodiment is used to implement the corresponding method of enhancing Android malware detection performance based on uncertainty in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0196] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, an embodiment of the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for enhancing Android malware detection performance based on uncertainty as described in any of the above embodiments is implemented.
[0197] Figure 4 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0198] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0199] The memory 1020 may be implemented in the form of ROM (Read On ly Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solution provided in the embodiment of the present application is implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0200] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0201] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WI FI, Bluetooth, etc.).
[0202] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0203] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiment of the present application, and does not necessarily include all the components shown in the figure.
[0204] The device of the above embodiment is used to implement the corresponding method of enhancing Android malware detection performance based on uncertainty in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0205] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for enhancing Android malware detection performance based on uncertainty as described in any of the above embodiments.
[0206] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0207] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for enhancing Android malware detection performance based on uncertainty as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0208] Based on the same concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are executed on a computer, the computer executes the method for enhancing Android malware detection performance based on uncertainty as described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.
[0209] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0210] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0211] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0212] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A method for enhancing Android malware detection performance based on uncertainty, characterized in that: include: Extracting software features from the software to be detected, inputting the software features into a trained basic model and an uncertainty quantification model, predicting the software features using the basic model, and outputting a first prediction result, and predicting the software features using the uncertainty quantification model, and outputting a second prediction result, wherein the first prediction result indicates whether the type of the software is benign or non-benign, and the second prediction result includes at least one set of prediction probabilities corresponding to the software, and taking one or more of the multiple sets of prediction probabilities output corresponding to the same software feature as the second prediction result; Calculating a plurality of preset uncertainty indicators of the second prediction result, and inputting the determined values of each uncertainty indicator as uncertainty features into the trained correction model; Instructing the correction model to predict the first prediction result using various uncertainty features and output a third prediction result, correcting the first prediction result according to the third prediction result, wherein the third prediction result indicates whether the first prediction result is reliable or unreliable; Before inputting the software features into the trained basic model and uncertainty quantification model, the method further includes: Inputting a preset corrected training sample into a trained basic model and an uncertainty quantification model, using the basic model to predict the corrected training sample and outputting a first prediction result, and using the uncertainty quantification model to predict the corrected training sample and outputting a second prediction result, wherein the corrected training sample includes sample data and an actual type corresponding to the corrected training sample; Calculating respective uncertainty values for the second prediction results using the multiple uncertainty indicators, and inputting the respective uncertainty values as uncertainty features into the correction model to be trained; Determining whether the first prediction result is correct according to the actual type of the sample data, setting a corresponding label, and inputting the first prediction result with the label into the correction model to be trained; The correction model is trained using the uncertainty feature and the first prediction result with the label to obtain the correction model that has completed the training; Before inputting the preset correction training samples into the trained basic model and uncertainty quantification model, the method further includes: Using the preset basic training samples to train the basic model to be trained, to obtain the trained basic model; and using the preset basic training samples to train the uncertainty quantification model to be trained to obtain the uncertainty quantification model that has completed the training; The uncertainty quantization model includes at least one of a round model integration group, a Bayesian neural network, a deep neural network with a dropout layer, a deep model integration group, and a weight model integration group, wherein the round model integration group includes a plurality of first sub-models with different training rounds, the deep model integration group includes a plurality of second sub-models with different initialization parameters, and the weight model integration group includes a plurality of third sub-models with different weights. The using the uncertainty quantification model to predict the software feature and output a second prediction result includes: Perform at least one of the following operations on the software feature using the uncertainty quantification model: Using each first sub-model in the round model integration group to predict the software features respectively, and determining a single prediction probability of each first sub-model corresponding to the software feature, forming each prediction probability into a group of prediction probabilities and outputting the group; Using the Bayesian neural network to predict the software features under different parameters, and determine a single prediction probability of the software features under each parameter, and form each prediction probability into a group of prediction probabilities and output it; Using a deep neural network with a dropout layer to predict the software feature multiple times, and using the dropout layer to drop different neurons in each prediction, to obtain multiple different prediction probabilities corresponding to the software feature, and to form a group of prediction probabilities from each prediction and output the group; Using each second sub-model in the deep model integration group to predict the software features respectively, and determining a single prediction probability of each second sub-model corresponding to the software feature, forming each prediction probability into a group of prediction probabilities and outputting the group; The software features are predicted respectively using the third sub-models in the weight model integration group, and a single prediction probability of each third sub-model corresponding to the software feature is determined, and each prediction probability is formed into a group of prediction probabilities and output.
2. The method according to claim 1, characterized in that The plurality of preset uncertainty indicators for calculating the second prediction result include: For the second prediction result, calculating the entropy value, relative entropy and standard deviation of the entire set of prediction probabilities; The entropy value, the relative entropy and the standard deviation are all used to indicate the unreliability of the first prediction result of the basic model.
3. The method according to claim 1, characterized in that: The calculating of the plurality of preset uncertainty indicators of the second prediction result further includes: For the group prediction probability in the second prediction result, perform at least one of the following: Determine the difference between the maximum probability and the second largest probability of the entire set of predicted probabilities and use it as the value of an uncertainty indicator; Determine the difference between the maximum probability and the median probability of the entire set of predicted probabilities and use it as the value of an uncertainty indicator; Determine the difference between the maximum probability of the entire set of predicted probabilities and the mean probability, and use it as the value of an uncertainty indicator; Determine the difference between the median of the entire set of predicted probabilities and the mean probability, and use it as the value of an uncertainty indicator; Determine the difference between the minimum probability and the second minimum probability of the entire set of predicted probabilities, and use it as the value of an uncertainty indicator; Determine the difference between the minimum probability of the entire set of predicted probabilities and the median probability, and use it as the value of an uncertainty indicator; The difference between the minimum probability of the entire set of predicted probabilities and the mean probability is determined and used as the value of an uncertainty indicator.
4. The method according to claim 1, characterized in that: The correcting the first prediction result according to the third prediction result includes: In response to determining that the third prediction result is reliable, retaining the first prediction result; In response to determining that the third prediction result is unreliable, the first prediction result is modified.
5. A device for enhancing Android malware detection performance based on uncertainty, characterized in that: include: Preliminary processing module, uncertainty calculation module and correction module; Wherein, the preliminary processing module is configured to extract software features from the software to be detected, input the software features into the trained basic model and uncertainty quantification model, use the basic model to predict the software features, output a first prediction result, and use the uncertainty quantification model to predict the software features, output a second prediction result, the first prediction result indicates whether the type of the software is benign or non-benign, the second prediction result includes at least one set of prediction probabilities corresponding to the software, and one or more of the multiple sets of prediction probabilities output corresponding to the same software feature are used as the second prediction result; The uncertainty calculation module is configured to calculate a plurality of preset uncertainty indicators of the second prediction result, and input the determined values of each uncertainty indicator as uncertainty features into the trained correction model; The correction module is configured to enable the correction model to predict the first prediction result using various uncertainty features and output a third prediction result, and correct the first prediction result according to the third prediction result, wherein the third prediction result indicates whether the first prediction result is reliable or unreliable; Before inputting the software features into the trained basic model and uncertainty quantification model, the method further includes: Inputting a preset corrected training sample into a trained basic model and an uncertainty quantification model, using the basic model to predict the corrected training sample and outputting a first prediction result, and using the uncertainty quantification model to predict the corrected training sample and outputting a second prediction result, wherein the corrected training sample includes sample data and an actual type corresponding to the corrected training sample; Calculating respective uncertainty values for the second prediction results using the multiple uncertainty indicators, and inputting the respective uncertainty values as uncertainty features into the correction model to be trained; Determining whether the first prediction result is correct according to the actual type of the sample data, setting a corresponding label, and inputting the first prediction result with the label into the correction model to be trained; The correction model is trained using the uncertainty feature and the first prediction result with the label to obtain the correction model that has completed the training; Before inputting the preset correction training samples into the trained basic model and uncertainty quantification model, the method further includes: Using the preset basic training samples to train the basic model to be trained, to obtain the trained basic model; and using the preset basic training samples to train the uncertainty quantification model to be trained to obtain the uncertainty quantification model that has completed the training; The uncertainty quantization model includes at least one of a round model integration group, a Bayesian neural network, a deep neural network with a dropout layer, a deep model integration group, and a weight model integration group, wherein the round model integration group includes a plurality of first sub-models with different training rounds, the deep model integration group includes a plurality of second sub-models with different initialization parameters, and the weight model integration group includes a plurality of third sub-models with different weights. The using the uncertainty quantification model to predict the software feature and output a second prediction result includes: Perform at least one of the following operations on the software feature using the uncertainty quantification model: Using each first sub-model in the round model integration group to predict the software features respectively, and determining a single prediction probability of each first sub-model corresponding to the software feature, forming each prediction probability into a group of prediction probabilities and outputting the group; Using the Bayesian neural network to predict the software features under different parameters, and determine a single prediction probability of the software features under each parameter, and form each prediction probability into a group of prediction probabilities and output it; Using a deep neural network with a dropout layer to predict the software feature multiple times, and using the dropout layer to drop different neurons in each prediction, to obtain multiple different prediction probabilities corresponding to the software feature, and to form a group of prediction probabilities from each prediction and output the group; Using each second sub-model in the deep model integration group to predict the software features respectively, and determining a single prediction probability of each second sub-model corresponding to the software feature, forming each prediction probability into a group of prediction probabilities and outputting the group; The software features are predicted respectively using the third sub-models in the weight model integration group, and a single prediction probability of each third sub-model corresponding to the software feature is determined, and each prediction probability is formed into a group of prediction probabilities and output.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable by the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.
7. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method according to any one of claims 1 to 4.
