Learning device, learning method, and learning program
By adjusting the learning policy based on model difficulty in identifying adversarial examples, the proposed method enhances classification accuracy and robustness for adversarial examples.
Patent Information
- Application Number
- JP2023553921
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-10-18
- Publication Date
- 2024-10-23
- Estimated Expiration
- 2041-10-18
AI Technical Summary
Existing models trained with MART struggle to accurately classify adversarial examples, even when correctly recognizing original input data, leading to challenges in achieving high classification accuracy.
A learning device and method that determines the model's identification difficulty for adversarial examples, adjusting the learning policy to emphasize correct label identification or minimizing output deviation based on this difficulty, using a modified loss function to enhance classification accuracy.
The approach enables training models with high classification accuracy for adversarial examples, improving robustness and accuracy in identifying such inputs.
Smart Images

Figure 0007571896000009 
Figure 0007571896000010 
Figure 0007571896000011
Abstract
Description
[Technical field]
[0001] The present invention relates to a learning device, a learning method, and a learning program. [Background technology]
[0002] Conventionally, there are adversarial examples that add noise to data to cause a model (e.g., a classifier) to make a false positive. Misclassification Aware adversarial Training (MART) is a method for learning a model that is robust against adversarial examples.
[0003] MART is a method of adversarial training that trains a model (adversarial training) based on a policy determined based on the difficulty of the model to distinguish between the original input data (data before noise is added). [Prior art documents] [Non-patent literature]
[0004] [Non-Patent Document 1] YisenWang, Difan Zou, Jinfeng Yi, James Bailey, Xingjun Ma, Quanquan Gu,”IMPROVING ADVERSARIAL ROBUSTNESS REQUIRES REVISITING MISCLASSIFIED EXAMPLES”, ICLR 2020 Summary of the Invention [Problem to be solved by the invention]
[0005] However, even if the model can correctly recognize the original input data, MART has a difficult task of learning to correctly identify the labels of Adversarial Examples. As a result, there is a problem that the model trained by MART may not be able to accurately classify Adversarial Examples. Therefore, the present invention aims to train a model with high classification accuracy for Adversarial Examples. [Means for solving the problem]
[0006] In order to solve the above-mentioned problems, the present invention is characterized in that it comprises a data acquisition unit that acquires training data for a model to output a classification result of input data including Adversarial Examples, a difficulty determination unit that determines the difficulty of the model to classify Adversarial Examples, and a learning processing unit that trains the model by increasing the weight of the difference between the classification result for the Adversarial Examples and the classification result for the data of the Adversarial Examples before noise is added in a loss function used for training the model by MART (Misclassification Aware adveRsarial Training), the higher the determined difficulty of the model to classify Adversarial Examples. Effect of the Invention
[0007] According to the present invention, it is possible to train a model with high classification accuracy for Adversarial Examples. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a diagram illustrating an example of the configuration of a learning device. [Diagram 2] FIG. 2 is a flowchart illustrating an example of a processing procedure of the learning device. [Diagram 3]FIG. 3 is a flowchart illustrating an example of a processing procedure of the learning device. [Figure 4] FIG. 4 is a diagram illustrating an application example of the learning device. [Diagram 5] FIG. 5 is a diagram showing experimental results for a model trained by a learning device. [Figure 6] FIG. 6 is a diagram illustrating an example of the configuration of a computer that executes a learning program. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] Hereinafter, a mode (embodiment) for carrying out the present invention will be described with reference to the drawings, but the present invention is not limited to the present embodiment.
[0010] [Overview of the learning device] First, an overview of the learning device of this embodiment will be described with reference to Fig. 1. The learning device performs adversarial training of a model using a method that improves on the existing method MART.
[0011] That is, the learning device first determines the discrimination difficulty of the Adversarial Examples for the model to be trained. If the discrimination difficulty of the Adversarial Examples for the model to be trained is low, the learning device trains the model with an emphasis on identifying the correct labels of the Adversarial Examples, rather than on ensuring that the model output for the Adversarial Examples does not deviate significantly from the model output for the original input data (the data before the noise of the Adversarial Examples is added).
[0012] On the other hand, when the model being trained has a high degree of difficulty in identifying Adversarial Examples, the learning device trains the model with an emphasis on ensuring that the model's output for the Adversarial Examples does not deviate significantly from the model's output for the original input data, rather than on identifying the correct label of the Adversarial Examples.
[0013] In this way, the learning device 10 determines a model learning policy and learns the model based on the robust accuracy of classification for adversarial examples, and therefore can learn a model with high classification accuracy.
[0014] [Prerequisite knowledge] Here, the Adversarial Example and Adversarial Training in this embodiment will be described.
[0015] [Adversarial Example] Adversarial Example is an attacking method that causes a model to make a wrong decision by adding tiny noise to the input data that is too small to be detected by the human eye. The objective function of Adversarial Example is shown in Equation (1).
[0016]
number
[0017] In the above formula (1), l(θ,x,y) is the loss function of the model. θ is the model parameter, x is the input data of the model, and y is the classification result of the input data x output from the model. Representative algorithms for generating adversarial examples include FGSM (Fast Gradient Sign Method) and PGD (Projection Gradient Descent). For example, FGSM adds noise to the input data x according to the following formula (2).
[0018]
number
[0019] In equation (2), ε is the magnitude of noise. In FGSM, noise is added to the input data x so that the value of the model’s loss function becomes larger.
[0020] In addition, in PGD, noise is added to the input data x according to the algorithm shown in the following equation (3).
[0021]
number
[0022] [Adversarial Training] Adversarial training is a learning method for learning a robust model against adversarial examples. The objective function of adversarial training is shown in Equation (4).
[0023]
number
[0024] In general adversarial training, the model parameter θ is updated according to the algorithm shown in the following equation (5).
[0025]
number
[0026] l(θ,x,y) is a loss function, and the CE (Cross Entropy) function is usually used. In equation (5), x' is an adversarial example of the input data x. This algorithm differs from general learning algorithms in that it uses adversarial examples for the learning data.
[0027] [MART] In MART, the model is trained using the loss function shown in the following equation (6).
[0028]
number
[0029] The BCE in this loss function is a Boosted Cross Entropy function and is expressed by the following equation (7).
[0030]
number
[0031] In addition, the function represented by KL in equation (6) is the Kullback-Leibler distance, which is used as an index for measuring the distance between probability distributions.
[0032] In MART, the loss function shown in Equation (6) is used to calculate the classification difficulty (1-p y (x,θ)), it is possible to determine the model training direction.
[0033] Here, if the model can correctly identify the original input data (i.e., if the difficulty of identification is low), learning is performed with emphasis on the first term (BCE term) of the loss function shown in equation (6). In other words, learning is performed with emphasis on the model identifying the Adversarial Example as the correct label.
[0034] On the other hand, if the model cannot correctly identify the original input data (i.e., if the identification difficulty is high), learning is performed with emphasis on the second term (KL term) of the loss function shown in equation (6). In other words, learning is performed with emphasis on ensuring that the model output for the Adversarial Example does not deviate significantly from the model output for the original input data.
[0035] The loss function used in MART is designed based on the intuition that if a model cannot correctly recognize the original input data, it is too difficult for the model to learn to correctly label Adversarial Examples.
[0036] However, even if the model can correctly recognize the original input data, training to correctly label the Adversarial Examples may be too difficult for the model.
[0037] Therefore, the learning device of this embodiment determines whether the learning of a model to classify an Adversarial Example into a correct label is too strict for the model, based on the discrimination difficulty of the Adversarial Example for the model.
[0038] [Example of learning device configuration] An example of the configuration of a learning device 10 will be described with reference to Fig. 1. The learning device 10 includes an input unit 11, an output unit 12, a communication control unit 13, a storage unit 14, and a control unit 15, for example.
[0039] The input unit 11 is an interface that accepts input of various data. For example, the input unit 11 accepts input of data used in a learning process and a prediction process, which will be described later. The output unit 12 is an interface that outputs various data. For example, the output unit 12 outputs a label of data predicted by the control unit 15.
[0040] The communication control unit 13 is realized by a NIC (Network Interface Card) or the like, and controls communication between an external device such as a server via a network and the control unit 15. For example, the communication control unit 13 controls communication between the control unit 15 and a management device (see FIG. 4) that manages data to be learned.
[0041] The memory unit 14 is realized by a semiconductor memory element such as a RAM (Random Access Memory) or a flash memory, or a storage device such as a hard disk or an optical disk, and stores parameters of the model learned by the learning process described below.
[0042] The control unit 15 is realized, for example, by using a CPU (Central Processing Unit) or the like, and executes a processing program stored in the storage unit 14. Thereby, the control unit 15 functions as an acquisition unit 15a, a learning unit 15b, and a prediction unit 15c, as illustrated in FIG.
[0043] The acquisition unit 15a acquires data used in the learning process and prediction process described below via the input unit 11 or the communication control unit 13.
[0044] The learning unit 15b performs adversarial training of a model for predicting the label of input data including an adversarial example. The learning unit 15b includes a difficulty level determination unit 151 and a learning processing unit 152.
[0045] The difficulty level determination unit 151 determines the difficulty level of discrimination for an adversarial example of a model to be trained. For example, the difficulty level determination unit 151 inputs an adversarial example for training to the model to be trained, and determines the probability p y (x', θ) is obtained. Then, the difficulty level determination unit 151 obtains (1-p y Let (x', θ) be the discrimination difficulty of the model to be trained against the adversarial example.
[0046] The learning processing unit 152 determines a learning policy for the model based on the level of difficulty of discrimination for the Adversarial Examples of the model determined by the difficulty determination unit 151, and performs learning.
[0047] For example, the higher the difficulty of the model in classifying Adversarial Examples, the greater the weighting of the difference between the classification result for the Adversarial Examples and the classification result for the data of the Adversarial Examples before noise was added in the loss function used to train the model by MART, and the learning processing unit 152 trains the model.
[0048] In other words, the learning processing unit 152 learns the model by placing emphasis on identifying Adversarial Examples with correct labels rather than on ensuring that the model output for an Adversarial Example does not deviate significantly from the model output for the original input data.
[0049] In addition, the learning processing unit 152 trains the model by reducing the weighting of the difference between the classification result for the Adversarial Example and the classification result for the data of the Adversarial Example before noise is added, in the loss function used to train the model by MART, as the difficulty of classifying the Adversarial Example for the model becomes lower.
[0050] In other words, the learning processing unit 152 learns the model by placing emphasis on ensuring that the output of the model for an Adversarial Example does not deviate significantly from the output of the model for the original input data, rather than on identifying the Adversarial Example with the correct label.
[0051] For example, the learning processing unit 152 performs model learning using a loss function shown in the following equation (8).
[0052]
number
[0053] The difference from the loss function used in MART (see equation (6)) is the discrimination difficulty part (1-p y (x,θ)) is the classification difficulty for the Adversarial Example (1-p y (x', θ)). As a result, when determining a learning policy for a model, the learning processing unit 152 uses the classification difficulty for an Adversarial Example of the model to be learned, so that a model with high classification accuracy for an Adversarial Example can be learned.
[0054] The prediction unit 15c predicts (identifies) the label of the input data using the model trained by the learning unit 15b. For example, the prediction unit 15c uses the trained model to calculate the probability of each label of newly acquired data and output the label with the highest probability. This allows the learning device 10 to output a correct label even when the input data is an Adversarial Example, for example.
[0055] [Learning process] Next, an example of a learning process procedure performed by the learning device 10 will be described with reference to Fig. 2. The process shown in Fig. 2 is started, for example, when an operational input is made to instruct the start of the learning process.
[0056] First, the acquisition unit 15a acquires training data including Adversarial Examples (S1). Next, the learning unit 15b uses the training data and a loss function (see Equation (8)) to learn a model that represents a probability distribution of the labels of input data (S2). The learning unit 15b stores the parameters of the model learned in S2 in the storage unit 14.
[0057] [Prediction processing] Next, an example of input data label prediction processing by the learning device 10 will be described with reference to Fig. 3. The processing shown in Fig. 3 is started, for example, when an operational input is made to instruct the start of prediction processing.
[0058] First, the acquisition unit 15a acquires data for which a label is to be predicted (S11). Next, the prediction unit 15c predicts the label of the data acquired in S11 using a model trained by the learning unit 15b (S12). For example, the prediction unit 15c uses the trained model to calculate p(x') of the data x' acquired in S11, and outputs the label with the highest probability. This allows the learning device 10 to output a correct label, for example, even if the data x' is an adversarial example.
[0059] [Application examples of learning devices] The above-described learning device 10 may be applied to object recognition processing in an image. An example of this application will be described with reference to FIG.
[0060] For example, the learning device 10 performs model learning (adversarial training) using teacher data (learning data) acquired from a data acquisition device and the loss function described above. After that, when the learning device 10 acquires image data from the data acquisition device, it predicts the label of the acquired image data using the trained model. Then, the learning device 10 outputs an object recognition result based on the prediction result.
[0061] [experiment] Next, experimental results of a model trained by the learning device 10 will be described. In the experiment, a model was trained by MART and a model was trained by the learning device 10 on the CIFAR10 dataset, and the classification accuracy of each model was compared. The model used in the experiment was ResNet18. The learning parameters were set to match the settings in the MART paper (Non-Patent Document 1), and the hyperparameter λ was set to 1, 2, ..., 10 used in the above paper.
[0062] The evaluation results of the model trained by MART and the model trained by the learning device 10 (Propose) are shown in Fig. 5. In Fig. 5, NatAcc indicates the accuracy rate of the model for the original input data, and RobAcc indicates the accuracy rate of the model for the Adversarial Example. Note that the accuracy shown in Fig. 5 is the accuracy at the epoch with the highest accuracy for the Adversarial Example.
[0063] As shown in Figure 5, it was confirmed that Propose outperformed MART in terms of RobAcc, except when λ = 7. In addition, when checking the RobAcc of each epoch at λ = 7, it was confirmed that there was a certain epoch in which RobAcc was significantly higher.
[0064] [System configuration, etc.] In addition, each component of each unit shown in the figure is a functional concept, and does not necessarily have to be physically configured as shown in the figure. In other words, the specific form of distribution and integration of each device is not limited to that shown in the figure, and all or a part of it can be functionally or physically distributed and integrated in any unit according to various loads, usage conditions, etc. Furthermore, each processing function performed by each device can be realized in whole or in part by a CPU and a program executed by the CPU, or can be realized as hardware using wired logic.
[0065] Furthermore, among the processes described in the above embodiments, all or part of the processes described as being performed automatically can be performed manually, or all or part of the processes described as being performed manually can be performed automatically by a known method. In addition, the information including the processing procedures, control procedures, specific names, various data and parameters shown in the above documents and drawings can be changed arbitrarily unless otherwise specified.
[0066] [program] The learning device 10 can be implemented by installing a program (learning program) as package software or online software on a desired computer. For example, the above program can be executed by an information processing device, causing the information processing device to function as the learning device 10. The information processing device referred to here includes mobile communication terminals such as smartphones, mobile phones, and PHS (Personal Handyphone Systems), as well as terminals such as PDAs (Personal Digital Assistants).
[0067] 6 is a diagram showing an example of a computer that executes a learning program. The computer 1000 has, for example, a memory 1010 and a CPU 1020. The computer 1000 also has a hard disk drive interface 1030, a disk drive interface 1040, a serial port interface 1050, a video adapter 1060, and a network interface 1070. Each of these components is connected by a bus 1080.
[0068] The memory 1010 includes a read only memory (ROM) 1011 and a random access memory (RAM) 1012. The ROM 1011 stores a boot program such as a basic input output system (BIOS). The hard disk drive interface 1030 is connected to a hard disk drive 1090. The disk drive interface 1040 is connected to a disk drive 1100. A removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1100. The serial port interface 1050 is connected to a mouse 1110 and a keyboard 1120, for example. The video adapter 1060 is connected to a display 1130, for example.
[0069] The hard disk drive 1090 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. That is, the programs that define each process executed by the learning device 10 are implemented as program modules 1093 in which computer-executable codes are written. The program modules 1093 are stored, for example, in the hard disk drive 1090. For example, a program module 1093 for executing processes similar to those of the functional configuration of the learning device 10 is stored in the hard disk drive 1090. The hard disk drive 1090 may be replaced by an SSD (Solid State Drive).
[0070] Data used in the processing of the above-described embodiment is stored as program data 1094 in, for example, the memory 1010 or the hard disk drive 1090. Then, the CPU 1020 reads out the program module 1093 or the program data 1094 stored in the memory 1010 or the hard disk drive 1090 into the RAM 1012 as necessary and executes them.
[0071] Note that the program module 1093 and the program data 1094 are not limited to being stored in the hard disk drive 1090, but may be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1100 or the like. Alternatively, the program module 1093 and the program data 1094 may be stored in another computer connected via a network (such as a local area network (LAN) or wide area network (WAN)). The program module 1093 and the program data 1094 may then be read by the CPU 1020 from the other computer via the network interface 1070. [Explanation of symbols]
[0072] 10 Learning Device 11 Input section 12 Output section 13 Communication control section 14 Storage section 15 Control section 15a Acquisition part 15b Learning Section 15c Prediction Section 151 Difficulty level judgment section 152 Learning processing unit
Claims
1. A data acquisition unit that acquires data for training a model to output a classification result of input data including an Adversarial Example; A difficulty determination unit that determines the difficulty of discrimination for an Adversarial Example of the model; a learning processing unit that, as the determined difficulty of the model in classifying an Adversarial Example increases, a weight is increased on a difference between a classification result for the Adversarial Example and a classification result for data of the Adversarial Example before noise is added in a loss function used for training the model by MART (Misclassification Aware adveRsarial Training), thereby training the model; A learning device comprising:
2. The learning processing unit: The lower the determined difficulty level of the model in classifying the adversarial example, the smaller the weight of the difference between the classification result for the adversarial example and the classification result for the data of the adversarial example before noise is added is applied to the loss function, thereby training the model.
2. The learning device according to claim 1,
3. The difficulty level determination unit is By inputting an adversarial example into the model to be trained, the difficulty of discriminating between the adversarial example and the model is determined.
2. The learning device according to claim 1 .
4. A classification unit that classifies input data using the model that has been subjected to adversarial training. The learning device according to claim 1 , further comprising:
5. A learning method executed by a learning device, comprising: A step of acquiring data for training a model for outputting a classification result of input data including Adversarial Examples; A step of determining the discrimination difficulty of the adversarial examples of the model; a step of training the model by increasing the weight of the difference between the classification result for the Adversarial Example and the classification result for the data of the Adversarial Example before noise is added in a loss function used for training the model by MART (Misclassification Aware adveRsarial Training) as the determined difficulty of the model in classifying the Adversarial Example becomes higher, and training the model; A learning method comprising:
6. A step of acquiring data for training a model for outputting a classification result of input data including Adversarial Examples; A step of determining the discrimination difficulty of the adversarial examples of the model; a step of training the model by increasing the weight of the difference between the classification result for the Adversarial Example and the classification result for the data of the Adversarial Example before noise is added in a loss function used for training the model by MART (Misclassification Aware adveRsarial Training) as the determined difficulty of the model in classifying the Adversarial Example becomes higher, and training the model; A learning program for a computer to execute the above.
Citation Information
Patent Citations
Living body detection model processing method and device, computer equipment and storage medium
CN113255531A
