Deep network adversarial robustness improvement model, construction method, equipment, and medium

Through the two-stage target supervised training method, the problems of high cost and low clean accuracy in improving the adversarial robustness of neural networks are solved, achieving both high accuracy of adversarial samples and accuracy of clean sample sets, and in-depth study of adversarial robustness. principle.

CN114358282BActive Publication Date: 2024-10-29SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210009388.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-05
Publication Date
2024-10-29
Estimated Expiration
2042-01-05

AI Technical Summary

Technical Problem

When improving the adversarial robustness of neural networks, existing technologies require a large amount of computing power and memory, making real-time debugging difficult. At the same time, the prediction accuracy of clean sample sets is sacrificed, and the deep principles behind adversarial robustness are not studied in depth.

Method used

A two-stage target supervised training method is used to divide the training process into two stages: feature extraction and classification decision-making. By training the feature extractor, similar samples are separated close to different types of samples, and a classification surface with strong adversarial robustness is trained on the embedding space. Avoid artificially introducing confrontational information.

Benefits of technology

It significantly improves the prediction accuracy of adversarial samples while retaining the prediction accuracy of clean sample sets, reduces computational costs, and provides an in-depth understanding of the principles behind adversarial robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114358282B_ABST
    Figure CN114358282B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of neural network model construction, and discloses a deep network adversarial robustness improvement model, construction method, device, and medium. By drawing on the idea that the training and testing stages in face recognition tasks are supervised by different objective functions, the entire training process is divided into two stages: feature extraction and classification decision-making; a feature extractor that can generate an embedding space that makes the responses of samples of the same type closer and the responses of samples of different types farther apart is trained, and a classification surface with stronger adversarial robustness is trained on the obtained embedding space, thereby achieving classification of samples. Under adversarial attacks of different network frameworks, different data sets, and different intensities, compared with a normally trained network, the method of the present invention significantly improves the adversarial accuracy on the test set; compared with adversarial training, the accuracy of the model on a clean test data set can be retained to a great extent; at the same time, compared with adversarial training, the computing time cost can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of neural network model construction, and in particular relates to a deep network adversarial robustness improvement model, construction method, equipment, and medium. Background Art

[0002] At present, adversarial samples refer to a type of sample generated by adding perturbations that are imperceptible to humans to clean samples, so that humans can correctly classify them while deep neural networks misclassify them. Figure 5 The panda image x on the left is a clean image input that can be correctly classified by the neural network; after applying the perturbation generated in a specific way, we get Figure 5 The panda image on the right will be misclassified as a gibbon by the same neural network.

[0003] In the general paradigm of generating adversarial examples, given a supervised training dataset, for any input x and its class label y correctly classified by the model, input the dataset D. The process of finding its adversarial examples is the process of making the model misclassify through training, which is essentially solving such a constrained optimization problem:

[0004]

[0005] st||x′-x||≤ε

[0006] Where 1(.) is the indicative function, and ε reflects the lowest perturbation limit that humans can detect, that is, the maximum confrontation distance.

[0007] In order to improve the anti-interference ability of neural network models against potential adversarial samples, that is, adversarial robustness, the main strategy is adversarial training, which artificially introduces adversarial information during the training phase to minimize the expected adversarial risk of the model:

[0008]

[0009] Where f is the network model, θ is the network parameter, S x is a certain form of adversarial neighborhood corresponding to the clean sample x. δ is a certain adversarial distance corresponding to the clean sample x in the input space, and the adversarial risk L(f θ , x+δ, y) refers to the risk of the model misclassifying adversarial samples.

[0010] In the above schemes, status quo a: artificially introducing adversarial information during the training phase requires a lot of additional objective costs such as computing power, memory, and running time, which ultimately makes it extremely difficult to debug the neural network in real time (that is, there is room for improvement in the cost of generating adversarial information). Status quo b: while adversarial training improves the prediction accuracy of the neural network for adversarial sample sets, it sacrifices the prediction accuracy of the network on clean sample sets (that is, there is room for improvement in the balance of model prediction accuracy). Status quo c: Most non-adversarial training methods for improving adversarial robustness simply supervise the model to approximate the effect of adversarial training by constructing different objective functions, without studying the deep principles behind adversarial robustness. Therefore, there is an urgent need for a new deep network adversarial robustness improvement model, construction method, equipment, and medium.

[0011] Through the above analysis, the problems and defects of the prior art are as follows:

[0012] (1) Existing technologies artificially introduce adversarial information during the training phase, which requires a lot of additional objective costs such as computing power, memory, and running time, which ultimately makes it extremely difficult to debug the neural network in real time.

[0013] (2) While existing adversarial training improves the prediction accuracy of neural networks for adversarial sample sets, it sacrifices the network's prediction accuracy on clean sample sets.

[0014] (3) Existing methods for improving adversarial robustness in the form of non-adversarial training simply supervise the model to approach the effect of adversarial training by constructing different objective functions, but do not study the deep principles behind adversarial robustness.

[0015] The difficulty in solving the above problems and defects is that the neural network model is a black box problem, and the optimization solution form is non-convex optimization. Therefore, it is difficult for people to track all the changes brought to the model by adversarial training through experiments (it can only be tracked and observed based on some artificially integrated indicators), and it is also difficult to fully deduce from the perspective of optimization theory how the introduction of adversarial information changes the prediction accuracy iteratively (it can only be estimated based on the definition of the supervised objective function).

[0016] The significance of solving the above problems and defects is: if there is an invented technology that can not only retain the high adversarial accuracy of adversarial training, but also overcome the high cost and low clean accuracy defects of adversarial training, it is an ideal model construction method. Summary of the invention

[0017] In response to the problems existing in the prior art, the present invention provides a deep network adversarial robustness improvement model, construction method, device, and medium, and more particularly, relates to a deep network adversarial robustness improvement model, construction method, device, and medium based on two-stage target supervised training.

[0018] The present invention is implemented by a method for constructing a deep network adversarial robustness improvement model, the method for constructing a deep network adversarial robustness improvement model comprising:

[0019] Drawing on the idea that the training and testing stages in the face recognition task are supervised by different objective functions, the entire training process is divided into two stages: feature extraction and classification decision. A feature extractor is trained to generate an embedding space that makes the responses of samples of the same type closer and the responses of samples of different types farther apart, and a classification surface with stronger adversarial robustness is trained on the obtained embedding space to achieve classification of samples.

[0020] Furthermore, the method for constructing the deep network adversarial robustness improvement model includes the following steps:

[0021] Step 1, feature extraction: train the neural network to obtain model parameters and feature extractor;

[0022] Step 2, parameter import: import the model parameters obtained in step 1 into the new network and fix them;

[0023] Step 3: Classification decision: train the model parameters to obtain the classification surface and realize the classification of samples.

[0024] The positive effect of step one is to train an embedding response generator with special properties so that the embedding feature vectors of various samples meet the characteristics of similar samples being close to each other and different samples being separated. The positive effect of step two is to retain the feature extractor obtained in step one. The positive effect of step three is to train a good classification surface so that the model's prediction accuracy for samples is as high as possible.

[0025] Further, in step 1, the feature extraction includes:

[0026] In the feature extraction stage, the neural network is trained so that samples of the same class are as close as possible in the embedding space, and samples of different classes are as separated as possible. The optimization goal is to minimize the ArcFace loss:

[0027]

[0028] The obtained feature extractor makes it possible for the adversarial perturbation domains corresponding to the responses of each sample in the embedding space to have a lower degree of overlap with each other.

[0029] Further, in step 2, the parameter importing includes:

[0030] The model parameters obtained in step 1 are imported into a new network with the same framework as step 1 after removing the last layer and fixed, and no longer participate in the gradient update in back propagation; the model parameters obtained by training under the supervision of the specific Arcface loss function in the first stage are retained, so that in the subsequent training process, the learned embedding space always has the characteristics of close responses of samples of the same type and separate responses of samples of different types.

[0031] Furthermore, in step three, the classification decision includes:

[0032] For the network obtained in step 2, train the model parameters of the remaining last layer so that the model can classify the samples, and the optimization goal is to minimize the cross entropy loss:

[0033]

[0034] An adversarially robust classification face is trained in the embedding space through the classification decision step.

[0035] Another object of the present invention is to provide a system for constructing a deep network adversarial robustness improvement model using the method for constructing a deep network adversarial robustness improvement model, wherein the system for constructing a deep network adversarial robustness improvement model comprises:

[0036] A feature extraction module is used to obtain model parameters and feature extractors by training a neural network;

[0037] The parameter import module is used to import the model parameters obtained by the feature extraction module into the new network and fix them;

[0038] The classification decision module is used to obtain the classification surface by training model parameters to achieve sample classification.

[0039] Another object of the present invention is to provide a computer device, the computer device comprising a memory and a processor, the memory storing a computer program, and when the computer program is executed by the processor, the processor performs the following steps:

[0040] In the feature extraction stage, the neural network is trained to obtain model parameters and feature extractors, so that samples of the same type are as close as possible in the embedding space, and samples of different types are as separated as possible. The optimization goal is to minimize the ArcFace loss. The feature extractor obtained makes the adversarial perturbation domains corresponding to the responses of each sample in the embedding space overlap less.

[0041] After removing the last layer, the obtained model parameters are imported into the new network and fixed, and no longer participate in the gradient update in the back propagation; the model parameters trained under the supervision of the specific Arcface loss function in the first stage are retained, so that in the subsequent training process, the learned embedding space always has the characteristics of close responses of samples of the same type and separate responses of samples of different types;

[0042] For the obtained network, the model parameters of the remaining last layer are trained so that the model can classify the samples, and the optimization goal is to minimize the cross entropy loss; through the classification decision step, a classification surface with strong adversarial robustness is trained in the embedding space.

[0043] Another object of the present invention is to provide a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:

[0044] In the feature extraction stage, the neural network is trained to obtain model parameters and feature extractors, so that samples of the same type are as close as possible in the embedding space, and samples of different types are as separated as possible. The optimization goal is to minimize the ArcFace loss. The feature extractor obtained makes the adversarial perturbation domains corresponding to the responses of each sample in the embedding space overlap less.

[0045] After removing the last layer, the obtained model parameters are imported into the new network and fixed, and no longer participate in the gradient update in the back propagation; the model parameters trained under the supervision of the specific Arcface loss function in the first stage are retained, so that in the subsequent training process, the learned embedding space always has the characteristics of close responses of samples of the same type and separate responses of samples of different types;

[0046] For the obtained network, the model parameters of the remaining last layer are trained so that the model can classify the samples, and the optimization goal is to minimize the cross entropy loss; through the classification decision step, a classification surface with strong adversarial robustness is trained in the embedding space.

[0047] Another object of the present invention is to provide a deep network adversarial robustness improvement model constructed by applying the method for constructing the deep network adversarial robustness improvement model.

[0048] Another object of the present invention is to provide an information data processing terminal, which is used to implement the construction system of the deep network adversarial robustness improvement model.

[0049] Combining all the above-mentioned technical solutions, the advantages and positive effects of the present invention are as follows: the method for constructing a deep network adversarial robustness improvement model provided by the present invention draws on the idea that the training and testing stages in the face recognition task are supervised by different objective functions, and divides the entire training process into two stages of "feature extraction-classification decision", which can effectively improve adversarial robustness.

[0050] The purpose of the present invention is to propose a two-stage target supervised training method for a neural network that can train a more robust neural network without artificially introducing adversarial information, combining the idea that the training process and the test process in the face recognition task have different objective functions.

[0051] The present invention proposes a two-stage target-supervised neural network training method to improve adversarial robustness, trains a feature extractor that can generate an embedding space that makes responses of samples of the same type closer and responses of samples of different types farther apart, and trains a classification surface with stronger adversarial robustness on the obtained embedding space.

[0052] The highlight of the present invention is that a special training process is designed (the whole network training is divided into two stages: feature extraction and classification decision).

[0053] Compared with the prior art, under different network frameworks, different data sets, and different strengths of adversarial attacks, the method of the present invention significantly improves the adversarial accuracy on the test set compared to the normally trained network; compared with adversarial training, the method of the present invention can greatly retain the accuracy of the model on the clean test data set. Compared with adversarial training, the method of the present invention does not require the artificial introduction of adversarial information, greatly reducing the running time of the model on each data set, thereby saving a lot of computing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0055] Figure 1 It is a flow chart of a method for constructing a deep network adversarial robustness improvement model provided by an embodiment of the present invention.

[0056] Figure 2 It is a schematic diagram of a method for constructing a deep network adversarial robustness enhancement model provided by an embodiment of the present invention.

[0057] Figure 3 It is a structural block diagram of a deep network adversarial robustness improvement model construction system provided by an embodiment of the present invention;

[0058] In the figure: 1. Feature extraction module; 2. Parameter import module; 3. Classification decision module.

[0059] FIG. 4 is a visualization diagram of sample responses in an embedding space provided by an embodiment of the present invention.

[0060] FIG4( a ) is a baseline schematic diagram provided by an embodiment of the present invention.

[0061] FIG4( b ) is a schematic diagram of adversarial training provided by an embodiment of the present invention.

[0062] FIG4( c ) is a schematic diagram of a two-stage training provided by an embodiment of the present invention.

[0063] Figure 5 It is a schematic diagram of a background technology adversarial sample provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0065] In view of the problems existing in the prior art, the present invention provides a deep network adversarial robustness improvement model, construction method, device, and medium. The present invention is described in detail below in conjunction with the accompanying drawings.

[0066] like Figure 1 As shown, the method for constructing a deep network adversarial robustness improvement model provided by an embodiment of the present invention includes the following steps:

[0067] S101, feature extraction: training the neural network to obtain model parameters and feature extractor;

[0068] S102, parameter import: import the model parameters obtained in S101 into the new network and fix them;

[0069] S103, classification decision: training model parameters to obtain the classification surface and classify the samples.

[0070] The schematic diagram of the deep network adversarial robustness improvement model construction method provided by the embodiment of the present invention is shown in Figure 2 .

[0071] like Figure 3 As shown, the system for constructing a deep network adversarial robustness improvement model provided by an embodiment of the present invention includes:

[0072] Feature extraction module 1, used to obtain model parameters and feature extractors by training a neural network;

[0073] Parameter import module 2, used to import the model parameters obtained by the feature extraction module into the new network and fix them;

[0074] The classification decision module 3 is used to obtain the classification surface by training model parameters to achieve classification of samples.

[0075] The technical solution of the present invention is further described below in conjunction with specific embodiments.

[0076] The purpose of the present invention is to propose a two-stage target supervised training method for a neural network that can train a more robust neural network without artificially introducing adversarial information, combining the idea that the training process and the test process in the face recognition task have different objective functions.

[0077] This invention draws on the idea that the training and testing stages in the face recognition task are supervised by different objective functions, and divides the entire training process into two stages: "feature extraction-classification decision" to improve adversarial robustness. Figure 2 It is a design scheme diagram of the technology of the present invention, such as Figure 2 As shown, the two-stage objective supervised neural network training method proposed in the present invention includes the following steps:

[0078] 1. In the feature extraction stage, the neural network is trained so that samples of the same class are as close as possible in the embedding space, and samples of different classes are as separated as possible. The optimization goal is to minimize the ArcFace loss:

[0079]

[0080] This step is to obtain a good feature extractor so that the adversarial perturbation domains corresponding to the responses of each sample in the embedding space have less overlap. Figure 4 is a schematic diagram of the impact of step 1 on the embedding space.

[0081] 2. After removing the last layer, the model parameters obtained in step 1 are imported into a new network with the same framework as step 1 and fixed (innovation point), and no longer participate in the gradient update in back propagation. This operation will retain the model parameters obtained by training under the supervision of the specific Arcface loss function in the first stage, so that in the subsequent training process, the learned embedding space always has the characteristics of close responses of samples of the same type and separate responses of samples of different types.

[0082] 3. For the network obtained in step 2, train the model parameters of the remaining last layer so that the model can classify the samples as correctly as possible. The optimization goal is to minimize the cross entropy loss:

[0083]

[0084] This step is to train a classification face with strong adversarial robustness in the embedding space.

[0085] The present invention proposes a two-stage target-supervised neural network training method to improve adversarial robustness, trains a feature extractor that can generate an embedding space that makes responses of samples of the same type closer and responses of samples of different types farther apart, and trains a classification surface with stronger adversarial robustness on the obtained embedding space.

[0086] The highlight of the present invention is that a special training process is designed (the whole network training is divided into two stages: feature extraction and classification decision).

[0087] Table 1 Comparison of accuracy of different frameworks and different datasets

[0088]

[0089]

[0090] Compared with the prior art, under different network frameworks, different data sets, and adversarial attacks of different intensities, the method of the present invention significantly improves the adversarial accuracy on the test set compared to the normally trained network; compared with adversarial training, the method of the present invention can retain the accuracy of the model on the clean test data set to a great extent.

[0091] Table 2. Runtime per iteration on different networks

[0092]

[0093] Compared with adversarial training, the method of the present invention does not require the artificial introduction of adversarial information, greatly reduces the running time of the model on each data set, thereby saving a lot of computing costs.

[0094] The technical effects of the present invention are described in detail below in conjunction with experiments.

[0095] The experimental data sets use three image data sets, namely mnist, fashion mnist and cifar10. The convolutional networks use three architectures, namely lenet, vgg and resnet. In the method of generating adversarial samples, the present invention uses FGSM, PGD, MIM, BIM and CW. Based on the three data sets, the traditional neural network training method, the adversarial training based on PGD and the margin training method proposed by the present invention are used respectively, and the accuracy of the model on the corresponding adversarial samples is used as an estimate of the robustness.

[0096] Experimental environment: The operating systems are Linux and Windows, the programming language is Python, the compiler is PyCharm, and the libraries used in the project are mainly PyTorch and Advertorch.

[0097] Practical application scenarios: Nowadays, more and more deep learning security issues have emerged in many fields. For example, in face recognition systems, criminals imitate or forge the victim's face to pass system authentication; in the field of autonomous driving, the existence of adversarial samples will also cause autonomous driving cars to make wrong judgments, thereby causing safety hazards. Therefore, the present invention needs to study the problem of deep learning robustness. So far, adversarial training based on minimax optimization is the most popular and effective method for deep neural networks to defend against adversarial samples. Although this method can give deep neural networks adversarial robustness, it will also reduce the accuracy of the model on clean samples. The method proposed in the present invention can improve the adversarial robustness of the model while maintaining the recognition accuracy on clean samples.

[0098] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When the use is implemented in whole or in part in the form of a computer program product, the computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL) or wireless (e.g., infrared, wireless, microwave, etc.) mode) to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0099] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with the technical field within the technical scope disclosed by the present invention and within the spirit and principle of the present invention should be covered by the protection scope of the present invention.

Claims

1. A method for constructing a deep network adversarial robustness improvement model, characterized in that: The method for constructing the deep network adversarial robustness improvement model includes: drawing on the idea that the training and testing stages in the face recognition task are supervised by different objective functions, dividing the entire training process into two stages: feature extraction and classification decision; training a feature extractor that can generate an embedding space that makes the responses of samples of the same type closer and the responses of samples of different types farther apart, and training a classification surface with stronger adversarial robustness on the obtained embedding space, thereby achieving classification of samples; The method for constructing the deep network adversarial robustness improvement model comprises the following steps: Step 1, feature extraction: train the neural network to obtain model parameters and feature extractor; Step 2, parameter import: import the model parameters obtained in step 1 into the new network and fix them; Step 3: Classification decision: train the model parameters to obtain the classification surface and classify the samples; In step 1, the feature extraction includes: In the feature extraction stage, the neural network is trained so that samples of the same class are as close as possible in the embedding space, and samples of different classes are as separated as possible. The optimization goal is to minimize ArcFaceloss: Where: N is the number of training samples in the training set; s, m are the model parameters to be trained; yi represents the true label of the i-th sample; θ represents the angle corresponding to the inner product between the i-th sample xi and the j-th column wj of the weight matrix, that is, The obtained feature extractor makes the adversarial perturbation domains corresponding to the responses of each sample in the embedding space overlap less; In step 2, the parameter import includes: The model parameters obtained in step 1 are imported into a new network with the same framework as step 1 after removing the last layer and fixed, and no longer participate in the gradient update in back propagation; the model parameters obtained by training under the supervision of the specific Arcface loss function in the first stage are retained, so that in the subsequent training process, the learned embedding space always has the characteristics of close responses of samples of the same type and separate responses of samples of different types; In step three, the classification decision includes: For the network obtained in step 2, train the model parameters of the remaining last layer so that the model can classify the samples, and the optimization goal is to minimize the cross entropy loss: An adversarially robust classification face is trained in the embedding space through the classification decision step.

2. A system for constructing a deep network adversarial robustness improvement model that implements the method for constructing a deep network adversarial robustness improvement model according to claim 1, characterized in that: The system for constructing the deep network adversarial robustness improvement model includes: A feature extraction module is used to obtain model parameters and feature extractors by training a neural network; The parameter import module is used to import the model parameters obtained by the feature extraction module into the new network and fix them; The classification decision module is used to obtain the classification surface by training model parameters to achieve sample classification.

3. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the method for constructing a deep network adversarial robustness improvement model as described in claim 1.

4. A computer-readable storage medium storing a computer program, which, when executed by a processor, enables the processor to perform the steps of the method for constructing a deep network adversarial robustness improvement model as described in claim 1.

5. An information data processing terminal, characterized in that: The information data processing terminal is used to implement the construction system of the deep network adversarial robustness improvement model as described in claim 2.

Citation Information

Patent Citations

  • Semi-supervised text classification method based on adversarial training and adversarial learning network

    CN110532377A

  • Method and apparatus for training classification task model, device, and storage medium

    US20210319258A1