Targetless vulnerability extraction method based on responsive knowledge distillation
By employing a reactive knowledge distillation method, the logit value of the teacher model is modified and KL divergence distillation is performed to identify and simulate vulnerabilities. This addresses the issues of uninterpretability and security risks in deep learning models, improving their interpretability and security. It is applicable to fields such as medical diagnosis and autonomous driving.
Patent Information
- Application Number
- CN202411975617.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2044-12-31
AI Technical Summary
The lack of interpretability and nonlinearity of deep learning models make them difficult to defend against attacks. Traditional methods struggle to effectively identify and fix vulnerabilities, posing security risks, especially in fields requiring high reliability and interpretability, such as medical diagnosis and autonomous driving.
A targetless vulnerability extraction method based on reactive knowledge distillation is adopted. By modifying the logit value of the teacher model and converting it into a probability distribution using the Softmax function, knowledge distillation is performed in combination with KL divergence to transmit vulnerability knowledge to the student model, thereby identifying and simulating vulnerabilities in the teacher model.
It improves the interpretability and security of the model, enabling more accurate identification and analysis of vulnerabilities, reducing the risk of attacks in practical applications, enhancing the stability and robustness of the model, and making it suitable for security assessment and improvement in data-sensitive scenarios.
Smart Images

Figure CN119808101B_ABST
Abstract
Description
Technical Field
[0001] This invention patent relates to the field of vulnerability extraction methods, and in particular to a targetless vulnerability extraction method based on reactive knowledge distillation. Background Technology
[0002] Deep learning models, with their powerful data processing and learning capabilities, occupy an important position in the field of modern artificial intelligence. However, the nonlinear nature of these models makes their decision-making processes complex and difficult to understand directly. This nonlinearity means that when processing input data, the model does not simply apply linear functions or rules, but rather extracts and integrates information through complex interactions and transformations between multiple layers of neural networks. This high complexity makes the model's decision-making logic opaque, making it difficult even for technical professionals to intuitively explain why the model makes specific predictions or decisions. Furthermore, this lack of interpretability further deepens the confusion surrounding the operating principles of deep learning models. Although these models have demonstrated remarkable performance in many fields, the complexity of their internal mechanisms often prevents people from knowing exactly how the model arrives at its predictions. This, to some extent, limits the application of deep learning models in areas requiring high reliability and interpretability, such as medical diagnosis and autonomous driving.
[0003] In this context, attackers often exploit vulnerabilities in deep learning models, along with their inherent nonlinearity and lack of interpretability, to launch elaborate attacks. Due to the complexity of deep learning models, attackers can discover and exploit vulnerabilities in specific inputs—which may be carefully crafted data with specific textures or shapes—to mislead the model into making incorrect predictions. Furthermore, the nonlinear nature of the model allows attackers to significantly alter its output through minute input perturbations. The lack of interpretability provides attackers with stealth, allowing them to exploit the model's opacity to launch attacks undetected, thus bypassing traditional security defenses. In the field of vulnerability discovery in deep learning models, traditional rule-based methods often prove inadequate.
[0004] To more effectively discover and exploit these potential security vulnerabilities, we have turned to a more flexible technique—knowledge distillation. Knowledge distillation is a method of model compression and knowledge transfer that trains a lighter, simpler student model by mimicking the behavior of a large and complex teacher model. In the context of vulnerability discovery, we utilize the idea of knowledge distillation to extract and reflect potential vulnerabilities and error patterns from the teacher model into the student model. The resulting student model is not only structurally simple but also reflects the vulnerabilities and defects of the teacher model under certain categories. Through in-depth analysis of the student model, we can more intuitively observe in which situations the teacher model is prone to errors and the specific reasons for these errors. This not only helps us more accurately identify vulnerabilities in deep learning models but also provides specific directions for repairing and improving the model. Therefore, knowledge distillation technology provides a new and more effective approach for vulnerability discovery in deep learning models. Summary of the Invention
[0005] In order to overcome the technical problems existing in the prior art, this invention proposes a targetless vulnerability extraction method based on responsive knowledge distillation. By modifying the linear regression value of the teacher model for the input, the student model can inherit the vulnerability of the teacher model in the specified classification.
[0006] The technical solution adopted in this invention is as follows: a targetless vulnerability extraction method based on reactive knowledge distillation, the steps of which are:
[0007] Step 1: Select the target teacher model, and obtain the output logit of the teacher model by inputting the specified dataset. For the target teacher model T, for a K-class dataset, the input sample x, the obtained logit value is represented as T(x):
[0008]
[0009] in, This is the logit value of the teacher model's Kth classification prediction for input x. Unlike other predictions, The logit value for the category of our selected target.
[0010] Step 2: Convert the logit value obtained in Step 1 into a probability distribution using the Softmax function, as follows:
[0011]
[0012] in, Let x be the probability distribution of the teacher model's response to input x.
[0013] Step 3: Calculate the response probability distribution obtained in Step 2. This information is processed to be used to transfer knowledge containing vulnerabilities to the student model.
[0014] Starting with the target classification trg, we look for loopholes that could cause the model to misclassify to any other classification. In processing the teacher model's predictions, we negate the probability values for all classifications:
[0015]
[0016] in, This represents the probability value of the corresponding category after negation;
[0017] The probability distribution required for distillation is obtained by combining the negated probability values of each category.
[0018]
[0019] in, This represents the probability distribution formed by combining the negations. This represents the probability value of the corresponding category after negation;
[0020] Normalizing the probability values obtained in the previous step yields the final probability distribution used for distilling vulnerabilities.
[0021]
[0022] in, This represents the k-class probability value obtained by negation followed by normalization; This represents the probability distribution formed by combining normalized probability values, used for distillation.
[0023] Step 4: Perform knowledge distillation using distillation loss. The distillation loss is defined as the student probability. And the teacher probability obtained after the third step of processing KL divergence value:
[0024]
[0025] in, Equation (2) is calculated based on the output of the student model. This represents the predicted probability value of the teacher model for the k-class classification of input x after the third step of processing. This represents the predicted probability value of the student model for the k-class classification of input x.
[0026] Step 5: Load the distilled student model to perform predictions. Input the test set of the specified dataset into the student model, load the student model to predict the input samples. If the prediction results are the same as the true labels of the samples, it means that the teacher model's prediction has failed.
[0027] The beneficial effects of this invention are as follows: The method provided by this patent can more easily identify and analyze vulnerabilities in teacher models, helping researchers to deeply understand the causes, scope of impact, and possible remediation strategies of vulnerabilities. It can also be used for teaching purposes in the education field and promote in-depth research on model vulnerabilities and security issues in the research field. First, this method is particularly suitable for scenarios where data is sensitive and privacy-sensitive, where frequent use of teacher models for prediction is impractical. Second, it provides a simulated vulnerability environment for student models, facilitating security assessments and testing their robustness against security threats such as attacks and data contamination. This allows for the evaluation and improvement of the security of teacher models, reducing the risk of attacks in practical applications. Furthermore, this method is highly targeted, accurately analyzing the nature and impact of vulnerabilities, while also being highly flexible, allowing for adjustments to distillation parameters and methods according to research needs. It is also easily implemented based on existing knowledge distillation frameworks, reducing implementation difficulty and cost. Ultimately, by simulating vulnerabilities, researchers can gain a deeper understanding of the internal workings of models, promote the development of model security and robustness technologies, support the construction of safer and more reliable deep learning models, and enhance the robustness of models by analyzing vulnerabilities and taking remedial measures, making them more stable and reliable in the face of various challenges. Attached Figure Description
[0028] Figure 1 This is a flowchart of the method of the present invention. Detailed Implementation
[0029] The present invention will now be fully described with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0030] A targetless vulnerability extraction method based on reactive knowledge distillation is at its core. This method employs a unique knowledge distillation technique that cleverly transfers key information and potential vulnerabilities from large, complex neural network models to a lightweight, simpler model. This process is not a simple data copying or imitation, but rather based on the analysis of the model's internal knowledge structure and the extraction of key information. In this way, we can gain insight into the internal decision-making logic of complex models while identifying and mitigating potential risks. In practical applications, this technique has powerful applicability. It can help us quickly locate specific input data types that are prone to causing incorrect predictions, such as images with specific textures, colors, or shapes. By accurately identifying and processing this problematic data, we can make targeted adjustments and optimizations to the model, thereby improving its predictive accuracy.
[0031] This method can also reveal patterns in which models are more prone to errors under specific distributions of predicted results. This discovery provides a completely new perspective for examining and evaluating the robustness and stability of models. For applications with extremely high security requirements, such as autonomous driving and medical diagnosis, the introduction of this technology could significantly improve the overall performance of the system and reduce potential risks. In summary, this knowledge distillation-based technique provides defenders with a powerful tool, enabling them to gain a deeper understanding of the internal mechanisms and potential risks of deep learning models. By accurately extracting and identifying security vulnerabilities, we can improve the accuracy, robustness, and overall security of the system.
[0032] The specific method is as follows:
[0033] Step 1: Select the target teacher model and obtain its output logit by inputting a specified dataset. For the target teacher model T, and for a K-classification dataset, the logit value obtained from the input sample x is denoted as T(x):
[0034]
[0035] in, This is the logit value of the teacher model's Kth classification prediction for input x. Unlike other predictions, The logit value for the category of our selected target.
[0036] Step 2: Convert the logit value obtained in Step 1 into a probability distribution using the Softmax function. The calculation method is as follows:
[0037]
[0038] in, Let x be the probability distribution of the teacher model's response to input x.
[0039] Step 3: Calculate the response probability distribution obtained in Step 2. This information is processed to be used to transfer knowledge containing vulnerabilities to the student model.
[0040] Starting with the target classification `trg`, we look for loopholes that could cause the model to misclassify to any other classification. In processing the teacher model's predictions, we negate the probability values for all classifications:
[0041]
[0042] in, This represents the probability value of the corresponding category after negation.
[0043] By combining the negated probability values of each category, we can obtain the probability distribution required for distillation.
[0044]
[0045] in, This represents the probability distribution formed by combining the negated values. This represents the probability value of the corresponding category after negation.
[0046] Normalizing the probability values obtained in the previous step yields the final probability distribution used for distilling vulnerabilities.
[0047]
[0048] in, This represents the k-class probability value obtained by negation followed by normalization; This represents the probability distribution formed by combining the normalized probability values, which is also the final probability distribution used for distillation.
[0049] Step 4: Knowledge distillation using distillation loss. To better extract vulnerabilities from the teacher model, the student model needs to better fit the teacher model's output. Vulnerability knowledge distillation is performed using distillation loss, which is defined as the student probability... (Calculated from the output of the student model using equation (2)) and the teacher probability obtained after the third step of processing. The KL divergence value (Kullback-Leibler divergence):
[0050]
[0051] in, This represents the predicted probability value of the teacher model for the k-class classification of input x after the third step of processing.
[0052] This represents the predicted probability value of the student model for the k-class classification of input x.
[0053] Step 5: Load the distilled student model and perform predictions. Input the test set of the specified dataset into the student model and load it to predict the input samples. If the predicted result is the same as the true label of the sample, it indicates that the teacher model's prediction has failed. This student model has effectively inherited the weaknesses of the teacher model derived from a specific target domain. In this way, the student model's prediction should be opposite to or different from the teacher model's. When it correctly predicts a sample, we can assume that the teacher model has misclassified that sample. Therefore, it can be considered that the student model exposes the weaknesses and vulnerabilities of the teacher model under certain specific samples.
Claims
1. A targetless vulnerability extraction method based on reactive knowledge distillation, characterized in that, The steps are as follows: Step 1: Select the target teacher model, and obtain the output logit of the teacher model by inputting a specified dataset; the specified dataset consists of images with specific textures, colors, or shapes; for the target teacher model... ,for Classification dataset, input samples The obtained logit value is represented as : (1) in, For the teacher model, for the input , its first The logit value of each classification prediction; unlike other prediction values. The logit value for classifying the selected target; Step 2: Convert the logit value obtained in Step 1 into a probability distribution using the Softmax function, as follows: (2) in, For the teacher model, for the input The response probability distribution; Step 3: Calculate the response probability distribution obtained in Step 2. This information is processed to be used to transfer knowledge containing vulnerabilities to the student model. Step 4: Perform knowledge distillation using distillation loss, which is defined as the student probability. And the teacher probability obtained after the third step of processing KL divergence value: (7) in, The value is calculated based on the output of the student model, representing the predicted probability value of the student model for the k-class classification of the input x. This represents the predicted probability value of the teacher model for the k-class classification of input x after the third step of processing; Step 5: Load the distilled student model to perform predictions. Input the test set of the specified dataset into the student model, load the student model to predict the input samples. If the prediction results are the same as the true labels of the samples, it means that the teacher model's prediction has failed.
2. The targetless vulnerability extraction method based on reactive knowledge distillation according to claim 1, characterized in that, The specific method for the third step is as follows: From the perspective of target classification Starting with finding loopholes that could cause the model to misclassify into any other category, the probability values for all categories are negated during the processing of the teacher model's predictions: (3) in, This represents the probability value of the corresponding category after negation; The probability values of each category after negation are combined to obtain the probability values required for distillation. : (4) in, This represents the probability value formed by combining the negations. This represents the probability value of the corresponding category after negation; Normalizing the obtained probabilities yields the final probability distribution used for distillation vulnerabilities. : (5) (6) in, This represents the k-class probability value obtained by negation followed by normalization; This represents the probability distribution formed by combining the normalized probability values.
Citation Information
Patent Citations
Multi-teacher self-adaptive joint knowledge distillation
CN112418343A
Learning efficient object detection models with knowledge distillation
US20180268292A1
