Integrated attack method using non-systematic preprocessing and dynamic weight
Through the integrated attack method of non-systematic preprocessing and dynamic weights, the problems of high query cost and underutilized model differences in black-box attacks are solved, and high transferability and robustness of adversarial samples are achieved, which is suitable for multiple applications. A proxy model improves the attack success rate.
Patent Information
- Application Number
- CN202410716651.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-04
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-06-04
AI Technical Summary
In black-box attacks, existing technologies have insufficient migration and robustness of adversarial samples due to high query costs and failure to fully consider model differences. Traditional unified preprocessing methods ignore the differences in sensitivity of different models to input disturbances. , limiting the transferability of adversarial examples.
Non-systematic preprocessing technology is used to convert input data into different models, combined with multi-model dynamic tuning and weight rebalancing strategies to enhance the input diversity of the integrated model and dynamically adjust the contribution weight of each model to generate highly adaptable, Adversarial examples with high generalization ability.
It significantly improves the transfer effectiveness and generalization ability of adversarial samples, can adapt to a variety of proxy models, and improves the attack success rate of adversarial samples between different models, especially showing obvious advantages on models with large structural differences.
Smart Images

Figure CN118711034A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer vision and deep learning security, and more specifically, to an integrated attack method utilizing non-systematic preprocessing and dynamic weights. Background Art
[0002] As deep learning technology has made significant progress in many fields such as image recognition, natural language processing, and recommendation systems, its application in the field of computer vision is particularly prominent, reaching or even surpassing human-level image recognition capabilities. However, with the widespread application of these technologies, especially in key fields such as aerospace, self-driving cars, and security monitoring, their security issues have gradually emerged, highlighting the importance of deep neural network model security.
[0003] Adversarial attacks, as a type of attack that misleads model predictions by adding tiny perturbations to input samples, not only pose a threat to deep learning models, but also become a tool for evaluating and enhancing model robustness. Research on adversarial attacks not only helps to reveal potential vulnerabilities in models, but also enriches the model's learning sample space and improves the model's robustness through training with adversarial samples. Although adversarial attacks are divided into two forms: white-box and black-box attacks, in real applications, black-box attacks are more universal and practical due to the limitations of prior knowledge.
[0004] In this context, improving the transferability of adversarial samples, that is, enabling them to successfully attack unknown black-box models, has become a research focus. The success rate of transferability depends on the similarity between the proxy model and the target model. Existing research mainly improves transferability by enhancing the commonality between adversarial samples and multiple models, such as by maximizing the perturbation of key neurons or introducing momentum. However, these methods have limited effects when facing models with large structural differences.
[0005] Model integration methods have emerged based on the assumption that if an adversarial example can deceive multiple models with different structures, its attack success rate on unknown models will be higher. However, most integration methods simply merge the outputs of different models and fail to fully consider the differences in the contribution of each model to the attack, which limits the improvement of the transferability of adversarial examples.
[0006] In the attempt to improve the transferability of adversarial examples, the focus has previously been on enhancing the generalization ability of adversarial examples through unified input preprocessing techniques (such as standard operations such as scaling, cropping, and rotation). However, these methods often use a fixed preprocessing process that is the same for all models, ignoring the fact that different models may have different sensitivities to different types of input perturbations. Although this "one-size-fits-all" preprocessing method is simple and easy to implement, in practical applications, it often limits the transferability of adversarial examples due to the lack of sufficient input diversity. In other fields, such as image enhancement and data augmentation, non-uniform, targeted transformation strategies have been shown to significantly improve the generalization and robustness of models, which provides new insights into the field of adversarial example generation.
[0007] Relevant patents at home and abroad mainly include a method for generating image adversarial samples based on black box scenarios [CN113537494B], an adversarial sample generation method based on attention heat maps and ensemble learning [CN115311708A], a highly transferable adversarial sample generation method and system [CN116011558B], a transferable image adversarial sample generation and deep neural network testing method and system [CN114741310A] and a device and method for generating image adversarial samples based on transferability [CN112215292B].
[0008] An analysis of the above patents revealed the following deficiencies:
[0009] (1) Black-box attacks take a long time due to their high query costs. Therefore, when implementing black-box adversarial sample attacks, white-box proxy models are often relied upon to perform migration attacks. However, adversarial samples generated by a single proxy model often face the problem of low attack success rate.
[0010] (2) The process of integrating multiple proxy models to counter attacks does not take into account the different contributions of the structures of each proxy model to the attack. The logic, probability, and loss of the integration are relied upon without truly considering the fundamental reasons for improving transferability, resulting in the inability to maximize the potential of the integrated model.
[0011] (3) Traditional adversarial sample generation methods often introduce unified input preprocessing technology for data enhancement. Although this method is simple and easy to implement, it ignores the differences in sensitivity of different models to different types of input perturbations, which often leads to a lack of sufficient input diversity in the generated adversarial samples, limiting their transferability between different models. In order to solve the above technical problems.
[0012] In order to solve the above technical problems, the present invention provides an integrated attack method using non-systematic preprocessing and dynamic weights, which aims to evaluate and enhance the robustness of the model by combining with other basic adversarial sample generation techniques. This method first uses non-systematic preprocessing technology to perform different input conversion methods on the input data in different models, thereby enhancing the input diversity of the integrated model, and then monitors and adjusts the contribution weight of each model to the generation of adversarial samples through multi-model dynamic tuning and weight rebalancing strategies. This strategy not only improves the transfer effectiveness of adversarial samples, but also can adapt to a variety of proxy models, greatly enhancing the generalization ability of generating adversarial samples. Summary of the invention
[0013] The purpose of the embodiments of the present disclosure is to provide an integrated attack method using non-systematic preprocessing and dynamic weights, aiming to evaluate and enhance the robustness of the model by combining with other basic adversarial sample generation techniques. Traditional adversarial sample generation techniques mainly focus on averaging the attack effects of multiple models, but do not fully consider the contribution of differences between models to the attack. The existing technology cannot effectively adapt to the characteristics of different models, nor can it provide adversarial samples with strong adaptability and high generalization ability.
[0014] In a general aspect, an integrated attack method using non-systematic preprocessing and dynamic weights is provided, comprising the following steps:
[0015] Step 1: Select CIFAR_10 as the experimental dataset and determine four white-box proxy models and multiple black-box models;
[0016] Step 2: Randomly use different input transformation strategies to enhance the input sample data of the four white-box models, and the changed data is saved as a copy of the benign sample.
[0017] Step 3: Integrated attack with dynamic tuning of multiple models. For a given image, use a white-box alternative model to attack, predict the adversarial attack sample to be updated in the next step, identify the contribution of each model to the attack effect, determine the weight of each model, and generate adversarial samples of the integrated model.
[0018]
[0019] Step 4: Model weight rebalancing strategy. According to the prediction performance of the adversarial samples on the sub-model after the initial integration, adjust the model weight again:
[0020]
[0021] ω new_1 ,ω new_2 ... new_k =softmax(ρ new_1,ρ new_2 ... new_3 )
[0022] The prediction performance is reflected by the loss value of the adversarial sample on the model. The higher the loss value, the lower the probability of the model accurately predicting the adversarial sample. When the model is integrated, the model contributes more to the adversarial target. Finally, the optimized adversarial sample is generated according to the normalized weights.
[0023]
[0024] Step 5: Loop through steps 3 and 4 until the set iteration threshold is exceeded, adjust the model fusion weights according to the integrated attack of multi-model dynamic tuning integration and weight rebalancing, and update the adversarial samples.
[0025] Step 6: The loop ends and the adversarial sample generated by the final integrated model is output.
[0026] Step 7: Use the obtained adversarial attack samples to attack the target black box model.
[0027] The white-box proxy models are ResNet-18, Inception v3, ViT-Tiny, and DeiT-Tiny.
[0028] The black box models are ResNet-50, WideResNet-50, BiT-M-R50, BiT-M-R101, ViT-Base, DeiT-Base, Swin-Base and Swin-Small.
[0029] The input sample data augmentation includes random noise or random resizing.
[0030] The specific implementation of step 3 includes the following sub-steps:
[0031] Step 3.1: For the adversarial samples generated by the integrated model, for an image x of any size as the input of the deep neural network to the image recognition model, set the starting point of the adversarial attack sample update iterative process
[0032] Where is the current adversarial attack sample The adversarial sample generation process is:
[0033]
[0034] Among them, w k is the kth proxy model f k The integration weights satisfy all w k ≥0 and
[0035] Step 3.2: Get each proxy model f by input image i The output (f i (x)) and gradient information g i Right now
[0036] Step 3.3: Determine the weight of each model based on the loss of adversarial samples generated by different models on other models and the contribution of each model to generating effective adversarial samples:
[0037]
[0038] Among them, p k (·) indicates from f k The logits output, S k,i can be viewed as the loss of the kth model on the adversarial examples generated using the gradients of the i-th model. β represents a hyperparameter that controls the weighted effect of the ensemble, and ρ i Higher values indicate a shift from g i The generated adversarial samples have better transfer attack capabilities, which means that g i Contains more transferable adversarial information.
[0039] Step 3.4: According to the adversarial ratio of each model, use the softmax function to normalize each model: ω 1 ,ω 2 ... k =sofymax(ρ 1 ,ρ 2 ... k ) where ω i The weights for each model.
[0040] Step 3.5: Use the weights of each model to calculate the preliminary adversarial sample of the integrated mode, and calculate the integrated adversarial sample based on the weights of each model
[0041] The innovation of the embodiment of the present invention lies in:
[0042] (1) This technology does not require any specific white-box proxy model or target model information, and is compatible with other methods for generating adversarial samples and has wide applicability.
[0043] (2) By dynamically adjusting the weights of multiple models and rebalancing these weights, this technology can monitor and optimize the contribution of each proxy model to the attack effect, significantly improving the ability of adversarial samples to migrate between different models, especially for models with large structural differences, showing obvious technical progress and advantages.
[0044] (3) Use non-systematic data augmentation methods to preprocess data to enhance the diversity of model input, thereby effectively improving the transfer ability of generated adversarial samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The above and other objects and features of the present disclosure will become more apparent from the following description in conjunction with the accompanying drawings.
[0046] Figure 1 is a flowchart schematic diagram showing an integrated attack method using non-systematic preprocessing and dynamic weights according to an embodiment of the present disclosure;
[0047] Figure 2 is a schematic diagram showing an integrated attack method using non-systematic preprocessing and dynamic weights according to an embodiment of the present disclosure.
[0048] Figure 3 is a test result diagram showing an integrated attack method using non-systematic preprocessing and dynamic weights according to an embodiment of the present disclosure; DETAILED DESCRIPTION
[0049] The following specific embodiments are provided to help the reader obtain a comprehensive understanding of the methods, devices and / or systems described herein. However, after understanding the disclosure of the present application, various changes, modifications and equivalents of the methods, devices and / or systems described herein will be clear. For example, the order of operations described herein is only an example and is not limited to those orders set forth herein, but can be changed as will be clear after understanding the disclosure of the present application, except for operations that must occur in a specific order. In addition, for greater clarity and simplicity, the description of features known in the art may be omitted.
[0050] The features described herein can be implemented in different forms and should not be construed as being limited to the examples described herein. Rather, the examples described herein have been provided to illustrate only some of the many possible ways to implement the methods, devices, and / or systems described herein, which will be clear after understanding the disclosure of the present application.
[0051] As used herein, the term "and / or" includes any one of the associated listed items and any combination of any two or more.
[0052] Although terms such as "first", "second", and "third" may be used herein to describe various members, components, regions, layers, or portions, these members, components, regions, layers, or portions should not be limited by these terms. Instead, these terms are only used to distinguish one member, component, region, layer, or portion from another member, component, region, layer, or portion. Therefore, without departing from the teachings of the examples described herein, the first member, first component, first region, first layer, or first portion referred to in the examples may also be referred to as the second member, second component, second region, second layer, or second portion.
[0053] In the specification, when an element (such as a layer, a region or a substrate) is described as being “on”, “connected to” or “coupled to” another element, the element may be directly “on”, “connected to” or “coupled to” another element, or one or more other elements may be present therebetween. Conversely, when an element is described as being “directly on”, “directly connected to” or “directly coupled to” another element, there may be no other elements present therebetween.
[0054] The terms used herein are only used to describe various examples and are not intended to limit the disclosure. Unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. The terms "comprise", "include" and "have" indicate the presence of the described features, quantities, operations, components, elements and / or combinations thereof, but do not exclude the presence or addition of one or more other features, quantities, operations, components, elements and / or combinations thereof.
[0055] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by a person of ordinary skill in the art to which the present disclosure belongs after understanding the present disclosure. Unless explicitly defined as such herein, terms (such as those defined in a general dictionary) should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and should not be interpreted in an idealized or overly formal manner.
[0056] Furthermore, in the description of examples, when it is considered that a detailed description of a well-known related structure or function would cause vague interpretation of the present disclosure, such a detailed description will be omitted.
[0057] Figure 1 is a schematic diagram showing an integrated attack method using non-systematic preprocessing and dynamic weights according to an embodiment of the present disclosure.
[0058] In the generation optimization problem of adversarial samples, existing methods are mainly divided into gradient optimization, input transformation and integrated models. Although integrated models can improve the transferability of adversarial samples, existing integrated models are usually ignored by averaging the logits, probabilities and losses of multiple proxy models, which leads to the fact that the individual characteristics between models and the effectiveness of the transferability of a single model to adversarial samples are usually ignored. Therefore, considering the contribution of each proxy model to the attack target and the impact of transferability to dynamically adjust the weight of the distribution model in the entire integration process is an effective way to give full play to the individual characteristics of the model. In addition, simply summarizing their contributions may offset the overall attack target. By re-weighing the importance of the sub-model gradients to guide the generation of adversarial samples, the weights of the models that contribute more to the attack in the integrated model are more optimized, and the transferability of the generated adversarial samples of the entire integrated model is improved. In addition, input diversity (such as resizing and padding, translation, scaling) strategies have been proven to enhance transferability, but applying the same transformation to the inputs of multiple models may limit input diversity and may hinder overall transferability. Therefore, applying non-systematic data augmentation techniques to the inputs of all models to increase the input diversity within the integration can improve the transferability of the generated adversarial samples. Based on the above principles, the present invention innovatively proposes an integrated attack method using non-systematic preprocessing and dynamic weights. The specific implementation process of the present invention is as follows: Figure 1 As shown, Figure 2 It is a schematic diagram of the principle of this embodiment.
[0059] The specific implementation examples of the present invention are as follows:
[0060] Step 1: First, CIFAR_10 is selected as the experimental dataset for image classification tasks. The selected black-box models include ResNet-50 (Res-50), WideResNet-50 (WRN101-2), BiT-M-R50 (BiT-50), BiT-M-R101 (BiT-101), ViT-Base (ViT-B), DeiT-Base (DeiT-B), Swin-Base (Swin-B) and Swin-Small (Swin-S). As for the white-box proxy model, ResNet-18, Inception v3, ViT-Tiny (ViT-T) and DeiT-Tiny (DeiT-T) are selected.
[0061] Step 2: Use different random input transformation strategies to enhance the input sample data of the four white-box models, such as random noise, random resizing, etc. The changed data is saved as a copy of the benign sample.
[0062] Step 3: Input the data converted by the corresponding model in step 2 into the corresponding model to obtain the output of the model (fi (x)) and the gradient information g after back propagation i Right now
[0063] According to the gradient information of each model, an adversarial sample clip(x+γ·sign(g i )); According to the loss of adversarial samples generated by different models on other models and the contribution of each model to generating effective adversarial samples, the weight of each model is determined: S k,i =-1 y
[0064]
[0065] Among them, p k (·) indicates from f k The logits output, S k,i can be viewed as the loss of the kth model on the adversarial examples generated using the gradients of the i-th model. β represents a hyperparameter that controls the weighted effect of the ensemble, and ρ i Higher values indicate a shift from g i The generated adversarial samples have better transfer attack capabilities, which means that g i Contains more transferable adversarial information; according to the adversarial ratio of each model, each model is normalized using the softmax function: ω 1 ,ω 2 ... k =softmax(ρ 1 ,ρ 2 ... k ), where ω i The weights for each model.
[0066] Calculate the integrated adversarial samples based on the weights of each model
[0067] Step 4: According to the prediction performance of the adversarial sample on the sub-model after the initial integration, adjust the model weight again: The prediction performance is reflected by the loss value of the adversarial sample on the model. The higher the loss value, the lower the probability of the model accurately predicting the adversarial sample. When the model is integrated, the model contributes more to the adversarial target. new_1 ,ω new_2 ... new_k =softmax(ρ new_1 ,ρ new_2 ... new_3 ), and finally generate optimized adversarial samples based on the normalized weights.
[0068] Step 5: Loop through steps 3 and 4 until the set iteration threshold is exceeded, adjust the model fusion weights according to the integrated attack of multi-model dynamic tuning integration and weight rebalancing, and update the adversarial samples.
[0069] Step 6: The loop ends and the adversarial sample generated by the final integrated model is output.
[0070] Step 7: Use the obtained adversarial attack samples to attack the target black box model and calculate the success rate of the adversarial sample attack model.
[0071] The present invention compares the experimental method Ours with the experimental results of two current integrated models Ens and SVRE. Figure 3 As shown in Table 1, under the same parameter configuration, the success rate of the adversarial samples generated by this method in attacking the black box model is higher than that of the other two, which shows the effectiveness of the method proposed in this invention in improving the transferability of adversarial samples.
[0072] Table 1 Experimental results of the present invention
[0073] Attack Res-50 WRN101-2 BiT-50 BiT-101 ViT-B DeiT-B Swin-B Swin-T Average Ens 21.32 16.22 12.58 10.69 7.17 10.68 8.3 15.23 12.77 SVRE 26.05 20.61 21.26 18.87 17.84 22.23 17.66 25.99 21.31 Ours 52.53 34.7 32.61 29.35 38.83 53.36 43.66 56.34 42.6725
[0074] Beneficial effects of the present invention
[0075] Universality and flexibility: The present invention is not limited by a specific type of white-box proxy model, nor does it require any prior knowledge of the target black-box model, so it can be flexibly combined with other adversarial sample generation methods. This feature of not relying on a specific model type and black-box information gives the method wide applicability and flexibility, and can generate effective adversarial samples in more application scenarios.
[0076] Improving the transferability of adversarial samples: Through multi-model dynamic tuning and model weight rebalancing mechanisms, the present invention can supervise and optimize the contribution of different proxy models to the attack target, especially when the model structures differ significantly, while maintaining efficient weight adjustment. In addition, the use of non-systematic data augmentation strategies enhances the diversity of input data. These methods work together to improve the transferability of adversarial samples between different models, and can maintain the attack effect even in the face of models with different structures. This means that the present invention has made significant improvements over the prior art in improving the applicability and effectiveness of adversarial samples in multi-model environments.
[0077] Although some embodiments of the present disclosure have been shown and described, it will be appreciated by those skilled in the art that modifications may be made to the embodiments without departing from the principles and spirit of the present disclosure, the scope of which is defined by the claims and their equivalents.
Claims
1. An integrated attack method using non-systematic preprocessing and dynamic weights, characterized in that: The following steps are involved: Step 1: Select CIFAR_10 as the experimental dataset for image classification tasks, and determine four white-box proxy models and multiple black-box models; Step 2: Use different random input transformation strategies to enhance the input sample data of the four white-box models, and save the changed data as a copy of the benign sample; Step 3: Integrated attack with dynamic tuning of multiple models. For a given image, a white-box alternative model is used to attack it, predict the adversarial attack sample to be updated in the next step, identify the contribution of each model to the attack effect, determine the weight of each model, and generate adversarial samples of the integrated model. Step 4: Model weight rebalancing strategy, adjust the model weight again according to the prediction performance of the adversarial samples on the sub-model after preliminary integration: The prediction performance is reflected by the loss value of the adversarial sample on the model. The higher the loss value, the lower the probability of the model accurately predicting the adversarial sample. When the model is integrated, the model contributes more to the adversarial target. Finally, the optimized adversarial sample is generated according to the normalized weights. Step 5: Loop through steps 3 and 4 until the set iteration threshold is exceeded, adjust the model fusion weights according to the integrated attack of multi-model dynamic tuning integration and weight rebalancing, and update the adversarial sample; Step 6: The loop ends and the adversarial sample generated by the final integrated model is output; Step 7: Use the obtained adversarial attack samples to attack the target black box model and calculate the success rate of the adversarial sample attack model.
2. The integrated attack method using non-systematic preprocessing and dynamic weighting as claimed in claim 1, characterized in that: The white-box proxy models are ResNet-18, Inception v3, ViT-Tiny, and DeiT-Tiny.
3. The integrated attack method using non-systematic preprocessing and dynamic weighting as claimed in claim 1, characterized in that: The black box models are ResNet-50, WideResNet-50, BiT-M-R50, BiT-M-R101, ViT-Base, DeiT-Base, Swin-Base and Swin-Small.
4. The integrated attack method using non-systematic preprocessing and dynamic weighting as claimed in claim 1, characterized in that: The input sample data augmentation includes random noise or random resizing.
5. The integrated attack method using non-systematic preprocessing and dynamic weighting as claimed in claim 1, characterized in that: The specific implementation of step 3 includes the following sub-steps: Step 3.1: For the adversarial samples generated by the integrated model, for an image x of any size as the input of the deep neural network to the image recognition model, set the starting point of the adversarial attack sample update iterative process Where is the current adversarial attack sample The adversarial sample generation process is: Among them, w k is the kth proxy model f k The integration weights satisfy all w k ≥0 and Step 3.2: Get each proxy model f by input image i The output (f i (x)) and gradient information g i Right now Step 3.3: Determine the weight of each model based on the loss of adversarial samples generated by different models on other models and the contribution of each model to generating effective adversarial samples: Among them, p k (·) indicates from f k The logits output, S k,i can be viewed as the loss of the kth model on the adversarial examples generated using the gradient of the ith model, β represents a hyperparameter that controls the weighted effect of the ensemble, and ρ i Higher values indicate a shift from g i The generated adversarial samples have better transfer attack capabilities, which means that g i Contains more transferable adversarial information; Step 3.4: According to the adversarial ratio of each model, use the softmax function to normalize each model: ω1,ω2...ω k =softmax(ρ1,ρ2...ρ k ) where ω i is the weight for each model; Step 3.5: Use the weights of each model to calculate the preliminary adversarial sample of the integrated mode, and calculate the integrated adversarial sample according to the weights of each model
Citation Information
Patent Citations
Multi-model cooperative defense method facing deep learning antagonism attack
CN108446765A
Denial-of-service attack detection method based on adversarial decision tree integration
CN108764267A
Method for resisting attacks and generating confrontation samples
CN113822443A
Intelligent system confrontation sample generation method and system based on diversified input strategies
CN115527084A
Black box mobility countermeasure attack method based on GAN
CN117057408A
