Learning device, learning method, and learning program

The learning device enhances model robustness against Adversarial Examples by using a stricter loss function approximation and filtering with correct labels, ensuring high accuracy on both normal and adversarial data.

JP7533594B2Active Publication Date: 2024-08-14NIPPON TELEGRAPH & TELEPHONE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2022550078
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-09-15
Publication Date
2024-08-14
Estimated Expiration
2040-09-15

AI Technical Summary

Technical Problem

Conventional TRADES method is challenging to improve generalization performance for Adversarial Examples due to insufficient approximation of the loss function with a sufficiently small upper bound, leading to potential deterioration in model robustness.

Method used

A learning device that acquires data with added noise and uses the correct label as a filter to learn a model, employing a stricter loss function approximation to enhance robustness against Adversarial Examples, specifically through methods like '1+loss', 'p+loss', and 'fixed p+loss', which minimize the loss function by excluding incorrect data and optimizing with a gradient method.

Benefits of technology

The learning device effectively learns a model that is more robust to Adversarial Examples by approximating the loss function with a stricter upper bound, maintaining high accuracy on both normal and adversarial data, thereby improving resistance to blind spot attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007533594000016
    Figure 0007533594000016
  • Figure 0007533594000014
    Figure 0007533594000014
  • Figure 0007533594000011
    Figure 0007533594000011
Patent Text Reader

Abstract

An acquisition unit (15a) acquires data for which a label is to be predicted. A learning unit (15b) learns a model representing a probability distribution of labels of the acquired data by using the correct label of the data as a filter so as to correctly predict the label against an adversarial example obtained by adding a noise to the data.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a learning device, a learning method, and a learning program. [Background technology]

[0002] Machine learning has been a huge success in recent years, and with the emergence of deep learning in particular, it has become a mainstream methodology in the fields of image and natural language processing.

[0003] On the other hand, deep learning is known to be vulnerable to attacks by Adversarial Examples that contain malicious noise. As an effective countermeasure against such Adversarial Examples, a method called TRADES (TRadeoff-inspired Adversarial DEfense via Surrogate-loss minimization) that uses surrogate loss has been proposed (see Non-Patent Documents 1 and 2). [Prior art documents] [Non-patent literature]

[0004] [Non-Patent Document 1] A.Madry et al., “Towards Deep Learning Models Resistant to Adversarial Attacks”, [online], arXiv:1706.06083v4 [stat.ML], September 2019, [Retrieved August 19, 2020], Internet<URL: https: / / arxiv.org / pdf / 1706.06083.pdf> [Non-Patent Document 2] H. Zhang et al., “Theoretically Principled Trade-off between Robustness and Accuracy”, [online], arXiv:1901.08573v3 [cs.LG], June 2019, [Retrieved August 19, 2020], Internet<URL: https: / / arxiv.org / pdf / 1901.08573.pdf> Summary of the Invention [Problem to be solved by the invention]

[0005] However, in conventional TRADES, it may be difficult to improve the generalization performance for adversarial examples. In other words, in TRADES, the loss function is approximated and minimized by a computable upper bound, so the generalization performance may deteriorate because the upper bound is not sufficiently small.

[0006] The present invention has been made in view of the above, and has an object to learn a model that is robust against adversarial examples. [Means for solving the problem]

[0007] In order to solve the above-mentioned problems and achieve the objective, the learning device of the present invention is characterized by having an acquisition unit that acquires data for predicting a label, and a learning unit that trains a model representing a probability distribution of the labels of the acquired data, using a correct label of the data as a filter, so as to correctly predict labels for Adversarial Examples obtained by adding noise to the data. Effect of the Invention

[0008] According to the present invention, it is possible to learn a model that is robust against adversarial examples. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a schematic diagram illustrating a schematic configuration of a learning device. [Diagram 2] FIG. 2 is a flowchart showing the procedure of the learning process. [Diagram 3] FIG. 3 is a flowchart showing a procedure of the detection process. [Figure 4] FIG. 4 is a diagram for explaining an embodiment. [Diagram 5] FIG. 5 is a diagram for explaining an embodiment. [Figure 6] FIG. 6 is a diagram for explaining an embodiment. [Figure 7] FIG. 7 is a diagram for explaining an embodiment. [Figure 8] FIG. 8 is a diagram illustrating a computer that executes the learning program. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings. Note that the present invention is not limited to this embodiment. In addition, in the description of the drawings, the same parts are indicated by the same reference numerals.

[0011] [Learning device configuration] Fig. 1 is a schematic diagram illustrating the general configuration of a learning device. As illustrated in Fig. 1, a learning device 10 is realized by a general-purpose computer such as a personal computer, and includes an input unit 11, an output unit 12, a communication control unit 13, a storage unit 14, and a control unit 15.

[0012] The input unit 11 is realized by input devices such as a keyboard and a mouse, and inputs various instruction information such as a command to start processing to the control unit 15 in response to an input operation by an operator. The output unit 12 is realized by a display device such as a liquid crystal display, a printing device such as a printer, or the like.

[0013] 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 or the like that manages data to be learned.

[0014] The storage 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 a learning process described later. The storage unit 14 may be configured to communicate with the control unit 15 via the communication control unit 13.

[0015] The control unit 15 is realized by using a CPU (Central Processing Unit) or the like, and executes a processing program stored in a memory. As a result, the control unit 15 functions as an acquisition unit 15a, a learning unit 15b, and a detection unit 15c, as exemplified in FIG. 1. Note that each or some of these functional units may be implemented in different hardware. For example, the learning unit 15b and the detection unit 15c may be implemented as separate devices. Alternatively, the acquisition unit 15a may be implemented in a device different from the learning unit 15b and the detection unit 15c. The control unit 15 may also include other functional units.

[0016] The acquiring unit 15a acquires data for predicting a label. For example, the acquiring unit 15a acquires data used in a learning process and a detection process, which will be described later, via the input unit 11 or the communication control unit 13. The acquiring unit 15a may store the acquired data in the storage unit 14. The acquiring unit 15a may transfer the information to the learning unit 15b or the detection unit 15c without storing it in the storage unit 14.

[0017] The learning unit 15b uses the correct label of the data as a filter in a model representing a probability distribution of the labels of the acquired data to train the model so as to correctly predict a label for an adversarial example in which noise is added to the data. Specifically, the learning unit 15b trains the model by searching for a model that minimizes a loss function.

[0018] Here, a model representing the probability distribution of label y of data x is expressed by the following equation (1) using parameter θ: f is a vector representing the label output by the model.

[0019]

number

[0020] The learning unit 15b performs model learning by determining a parameter θ of the model so as to reduce a loss function expressed by the following equation (2): where p(y|x) represents a true probability.

[0021]

number

[0022] Furthermore, the learning unit 15b learns a model so as to correctly predict a label for an adversarial example shown in the following formula (3) in which noise η is superimposed on data x.

[0023]

number

[0024] In TRADES, a model that is robust to adversarial examples is trained by searching for and determining θ that minimizes the loss function shown in the following equation (4), where β is a constant.

[0025]

number

[0026] Here, as shown in the following equation (5), the Natural Error R nat (f) Robust Error R rob (f) Boundary Error R bdy Define (f). In the following formula (5), 1(*) is an indicator function that is 1 when the content * is true and 0 when it is false.

[0027]

number

[0028] Moreover, these relationships are expressed by the following equation (6): Therefore, it can be seen that in order to make a model robust against Adversarial Examples, it is necessary to reduce the Robust Error.

[0029]

number

[0030] Here, it is known that the following equation (7) holds (see Non-Patent Document 2).

[0031]

number

[0032] Regarding the second term of the above formula (7), the following formula (8) holds.

[0033]

number

[0034] Therefore, the learning unit 15b sets the loss function to the following formula (9) (hereinafter, this method will be referred to as "1+loss"). As a result, as can be seen from the third and fourth lines of the above formula (8), the upper bound is stricter than the conventional loss function shown in the above formula (4). Therefore, it becomes possible to learn a model that is more robust against Adversarial Examples than before.

[0035]

number

[0036] The method of formula (9) above means that in the loss function, a filter is applied to limit the second term related to the Adversarial Example, which is an adversarial example that adds noise to the data x, to only the correct label of the data x. This makes it possible to eliminate unnecessary data that is not predicted correctly in the first place in TRADES, which is a method for adjusting the trade-off between the accuracy rate using normal data and the performance rate using the Adversarial Example.

[0037] Furthermore, the learning unit 15b may replace the filter expressed by the indicator function of the above formula (9) with the probability of the correct label as shown in the following formula (10) (hereinafter, this method will be referred to as "p+loss"). This also results in a stricter upper bound than conventional loss functions.

[0038]

number

[0039] Furthermore, in order to minimize the loss function of the above formula (10), the learning unit 15b searches for the second term of the above formula (10) by the gradient method. Thus, the learning unit 15b may minimize the loss function for the Adversarial Example with the probability distribution of the data labels as a fixed value. In other words, the learning unit 15b may exclude the second term in the above formula (10) from the target of optimization by the gradient method of the loss function (hereinafter, this method will be referred to as "fixed p+loss"). Specifically, the learning unit 15b searches for p in the second term of the above formula (10). θ This allows us to search for p θ This makes it possible to efficiently optimize by excluding cases where is close to 0.

[0040] The detection unit 15c predicts the label of the acquired data using the trained model. In this case, the detection unit 15c applies the trained parameter θ to the above formula (1) to calculate the probability of each label of the newly acquired data, and outputs the label with the highest probability. This makes it possible to output a correct label even when the data is an Adversarial Example, for example. In this way, the detection unit 15c is able to withstand blind spot attacks and predict a correct label for an Adversarial Example.

[0041] [Learning process] Next, the learning process by the learning device 10 according to the present embodiment will be described with reference to Fig. 2. Fig. 2 is a flowchart showing the procedure of the learning process. The flowchart in Fig. 2 starts, for example, when an operational input is made to instruct the start of the learning process.

[0042] First, the acquiring unit 15a acquires data for predicting a label (step S1).

[0043] Next, the learning unit 15b learns a model that represents the probability distribution of the labels of the acquired data (step S2). At this time, the learning unit 15b uses the correct answer label of the data as a filter to learn the model so as to correctly predict the label for an adversarial example in which noise is added to the data. This completes a series of learning processes.

[0044] [Detection process] Next, the detection process by the learning device 10 according to the present embodiment will be described with reference to Fig. 3. Fig. 3 is a flowchart showing the procedure of the detection process. The flowchart in Fig. 3 starts, for example, when an operation input is made to instruct the start of the detection process.

[0045] First, the acquiring unit 15a acquires new data for predicting a label, similarly to the process of step S1 in FIG. 2 described above (step S11).

[0046] Next, the detection unit 15c predicts the label of the acquired data using the trained model (step S12). In this case, the detection unit 15c applies the trained parameter θ to the above formula (1) to calculate p(x') of the newly acquired data x' and output the most probable label. For example, even if the data x' is an adversarial example, the correct label can be output. This completes the series of detection processes.

[0047] As described above, the acquiring unit 15a acquires data for predicting a label. The learning unit 15b learns a model that represents a probability distribution of the labels of the acquired data, using the correct label of the data as a filter, so as to correctly predict a label for an adversarial example in which noise has been added to the data.

[0048] This enables the learning device 10 to learn a model that is robust against Adversarial Examples by approximating the loss function with a strict upper bound.

[0049] Furthermore, the learning unit 15b minimizes the loss function for the Adversarial Example by setting the probability distribution of the data labels as a fixed value, which enables the learning device 10 to efficiently optimize the loss function using the gradient method.

[0050] Furthermore, the detection unit 15c predicts the label of the acquired data by using the trained model, which enables the detection unit 15c to withstand blind spot attacks and predict the correct label even for an adversarial example.

[0051] [Example] 4 to 7 are diagrams for explaining an embodiment of the present invention. In this embodiment, the accuracy of the model of the above embodiment was evaluated using an image dataset: Cifar10 and a deep learning model: Resnet18. Specifically, the model of the above embodiment and a model of a conventional method, which were trained using the above loss function, were evaluated using test data and an adversarial example generated from the test data by an existing method called PGD.

[0052] The PGD parameters used were esp=8 / 255, train_iter=10, eval_iter=20, eps_iter=0.031, rand_init=True, clip_min=0.0, and clip_max=1.0.

[0053] We then calculated the accuracy rate of the top 1 for the test data (hereinafter referred to as natural acc) and the accuracy rate of the top 1 for the adversarial examples generated from the test data (performance rate, hereinafter referred to as robust acc).

[0054] First, in Fig. 4 and Fig. 5, the effect of the filter of the correct answer label added to the second term of the loss function in the above embodiment is illustrated. Here, a set S of normal data to which no noise has been added and to which a correct answer label has been added is + , a set of data with incorrect labels S - Then, we sample the two sets to make them the same size, and generate a set S by combining the two sets.

[0055] For this set S, we used a model trained using a conventional method (None in the figure), a model trained using the above-mentioned "1+loss" method (1+ in the figure), and a model trained using incorrectly labeled data with an indicator function of 0 for true and 1 for false (1- in the figure). We then calculated the robust acc and natural acc for each method.

[0056] Figure 4 shows an example of the change in robust acc of each model due to learning. Figure 5 shows an example of the change in natural acc of each model due to learning. As shown in Figure 4, it was confirmed that the 1+ method model contributed to improving robust acc compared to the conventional method model.

[0057] On the other hand, it can be seen that the model of method 1- inhibits the improvement of robust acc. Also, as shown in Figure 5, it can be seen that the model of method 1- inhibits the improvement of natural acc as well. This is because TRADES is a method for adjusting the trade-off between robust acc and natural acc, and method 1- uses unnecessary data that cannot be predicted correctly in the first place.

[0058] FIG. 6 illustrates the relationship between robust acc and β for models using each method. FIG. 7 illustrates the relationship between natural acc and β for models using each method. Here, p+ is the "p+loss" method in the above embodiment. Also, p- is 1-(p+). Also, fixed p+ is the "fixed p+loss" method in the above embodiment. Also, fixed p- is 1-(fixed p+).

[0059] As shown in FIG. 6, it can be seen that the prediction accuracy for Adversarial Examples does not depend on β for both the model of the conventional method (TRADES in the figure) and the model of the present invention (TRADES with 1+, TRADES with p+, TRADES with fixed p+ in the figure). In contrast, as shown in FIG. 7, the prediction accuracy for normal data decreases for both the model of the conventional method and the model of the present invention as β increases. This is because the first term of the loss function described above represents the loss function for normal data, and the second term represents the loss function for Adversarial Examples, and therefore the larger β is, the greater the influence of the second term becomes.

[0060] Therefore, β when robust acc is high is adopted to compare the accuracy of the model of the conventional method and the model of "1+loss". As a result, in the model of the conventional method, β=20 Robust Acc=50.74, Natural Acc=75.39. In addition, in the model of "1+loss" of this embodiment, β=10, Robust Acc=51.3, Natural Acc=76.01. In this way, it was confirmed that the model of this embodiment has a slightly higher robust acc than the model of the conventional method. It was also confirmed that the model of this embodiment does not impair natural acc as much as the conventional method even if β is changed. In this way, it was confirmed that the model of the embodiment can learn a model that is robust against Adversarial Examples in response to the second term of the loss function.

[0061] [program] A program can be created in which the process executed by the learning device 10 according to the above embodiment is written in a language executable by a computer. As an embodiment, the learning device 10 can be implemented by installing a learning program that executes the above learning process as package software or online software on a desired computer. For example, the information processing device can be made to function as the learning device 10 by executing the above learning program on the information processing device. In addition, the information processing device also includes mobile communication terminals such as smartphones, mobile phones, and PHS (Personal Handyphone System), and even slate terminals such as PDA (Personal Digital Assistant). The functions of the learning device 10 may be implemented on a cloud server.

[0062] 8 is a diagram showing an example of a computer that executes a learning program. The computer 1000 includes, for example, a memory 1010, a CPU 1020, 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. These components are connected by a bus 1080.

[0063] The memory 1010 includes a ROM (Read Only Memory) 1011 and a RAM 1012. The ROM 1011 stores a boot program such as a BIOS (Basic Input Output System). The hard disk drive interface 1030 is connected to a hard disk drive 1031. The disk drive interface 1040 is connected to a disk drive 1041. A removable storage medium such as a magnetic disk or an optical disk is inserted into the disk drive 1041. The serial port interface 1050 is connected to a mouse 1051 and a keyboard 1052, for example. The video adapter 1060 is connected to a display 1061, for example.

[0064] Here, the hard disk drive 1031 stores, for example, an OS 1091, an application program 1092, a program module 1093, and program data 1094. Each piece of information described in the above embodiments is stored in the hard disk drive 1031 or memory 1010, for example.

[0065] The learning program is stored in the hard disk drive 1031 as, for example, a program module 1093 in which instructions to be executed by the computer 1000 are written. Specifically, the hard disk drive 1031 stores the program module 1093 in which each process executed by the learning device 10 described in the above embodiment is written.

[0066] Furthermore, data used for information processing by the learning program is stored as program data 1094, for example, in the hard disk drive 1031. Then, the CPU 1020 reads out the program module 1093 and the program data 1094 stored in the hard disk drive 1031 into the RAM 1012 as necessary, and executes each of the above-mentioned procedures.

[0067] The program module 1093 and program data 1094 related to the learning program are not limited to being stored in the hard disk drive 1031, and may be stored in, for example, a removable storage medium and read by the CPU 1020 via the disk drive 1041 or the like. Alternatively, the program module 1093 and program data 1094 related to the learning program may be stored in another computer connected via a network such as a LAN (Local Area Network) or a WAN (Wide Area Network), and read by the CPU 1020 via the network interface 1070.

[0068] Although the embodiment to which the invention made by the present inventor is applied has been described above, the present invention is not limited by the description and drawings which form a part of the disclosure of the present invention according to the present embodiment. In other words, other embodiments, examples, operation techniques, etc. made by those skilled in the art based on the present embodiment are all included in the scope of the present invention. [Explanation of symbols]

[0069] 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 Detection unit

Claims

1. An acquisition unit for acquiring data for predicting a label; a learning unit that uses a correct answer label of the acquired data as a filter to learn the model representing a probability distribution of the label of the acquired data so as to minimize the probability distribution of the label of the data as a fixed value in a loss function for an Adversarial Example obtained by adding noise to the data; A learning device comprising:

2. The learning device according to claim 1 , further comprising a detection unit that predicts a label of the acquired data using the trained model.

3. A learning method executed by a learning device, comprising: An acquisition step of acquiring data for predicting a label; a learning process for learning a model representing a probability distribution of the labels of the acquired data by using the correct label of the data as a filter, so as to minimize the probability distribution of the labels of the data as a fixed value in a loss function for an Adversarial Example obtained by adding noise to the data; A learning method comprising:

4. An acquisition step of acquiring data for predicting a label; A learning step of learning a model representing a probability distribution of the labels of the acquired data, using the correct label of the data as a filter, so as to minimize the probability distribution of the labels of the data as a fixed value in a loss function for an Adversarial Example obtained by adding noise to the data; A learning program for a computer to execute the above.