Model parameter recovery device, method and program
The model parameter recovery device uses error correction codes to determine and restore changes in model parameters, addressing the inefficiency of re-learning by directly restoring parameters to their pre-attack state.
Patent Information
- Application Number
- JP2023030727
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-01
- Publication Date
- 2024-09-12
- Estimated Expiration
- 2043-03-01
AI Technical Summary
Existing techniques for recovering model parameters after an attack require re-learning, which is inefficient and resource-intensive.
A model parameter recovery device that incorporates error correction codes to determine and restore changes in model parameters, eliminating the need for re-learning by using a change determination unit and recovery unit.
Enables model parameters to be restored to their pre-attack state without re-learning, enhancing efficiency and reducing resource consumption.
Smart Images

Figure 2024123378000001
Abstract
Description
[Technical field]
[0001] The disclosed techniques relate to recovering parameters of a model. [Background technology]
[0002] Various attacks on AI, or in other words, on model parameters, and countermeasures against them have been studied, but although many measures have been proposed to prevent attacks before they occur, there are not many technologies for continuing to use model parameters that have been attacked.
[0003] The techniques described in Non-Patent Documents 1 and 2 are known as techniques for continuing to use model parameters that have been attacked.
[0004] The technology of Non-Patent Document 1 is a technology that detects a backdoor attack, and when a backdoor attack is detected, optimizes a re-learning data set to return model parameters to the state before the attack.
[0005] The technology in Non-Patent Document 2 is a technology that detects a backdoor attack and returns the system to the state before the attack by changing parameters. [Prior art documents] [Non-patent literature]
[0006] [Non-Patent Document 1] Fahmy, Hazem & Pastore, Fabrizio & Bagherzadeh, Mojtaba & Briand, Lionel. (2021). Supporting Deep Neural Network Safety Analysis and Retraining Through Heatmap-Based Unsupervised Learning. IEEE Transactions on Reliability. PP. 1-17. 10.1109 / TR.2021.3074750. [Non-Patent Document 2] Yue Zhao, Hong Zhu, Kai Chen, and Shengzhi Zhang. 2021. AI-Lancet: Locating Error-inducing Neurons to Optimize Neural Networks. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security (CCS '21). Association for Computing Machinery, New York, NY, USA, 141-158. Summary of the Invention [Problem to be solved by the invention]
[0007] In the techniques of Non-Patent Document 1 and Non-Patent Document 2, it is necessary to re-learn the model parameters in order to return the model parameters to the state before the attack.
[0008] The disclosed technology aims to eliminate the need to re-learn model parameters in order to return them to their pre-attack state. [Means for solving the problem]
[0009] A model parameter recovery device, which is one aspect of the disclosed technology, includes a change determination unit that determines whether a specified change has occurred in a model parameter based on an error correction code assigned to the parameter, and a recovery unit that recovers the parameter based on the error correction code when the change determination unit determines that the specified change has occurred in the parameter. Effect of the Invention
[0010] According to the disclosed technology, there is no need to re-learn the model parameters to return them to their pre-attack state. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 is a diagram illustrating an example of a functional configuration of a model parameter recovery device. [Diagram 2] FIG. 2 is a diagram showing an example of a processing procedure of the model parameter recovery method. [Diagram 3] FIG. 3 is a diagram illustrating an example of a functional configuration of a model learning device with a recovery function. [Figure 4] FIG. 4 is a diagram showing an example of a processing procedure of the recovery function-equipped model learning method. [Diagram 5] FIG. 5 is a diagram illustrating an example of a functional configuration of a computer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, embodiments of the disclosed technology will be described with reference to the drawings. In the drawings, components having the same functions are denoted by the same reference numerals, and duplicated descriptions will be omitted.
[0013] [Model parameter recovery device and method] As shown in FIG. 1, the model parameter recovery device includes a model storage unit 1, a change determination unit 2, and a recovery unit 3, for example.
[0014] The model parameter recovery method is realized, for example, by each component of the model parameter recovery device performing the processes from step S2 to step S3 shown in FIG.
[0015] <Model memory section 1> A plurality of parameters constituting a model are stored in the model storage unit 1. The model is, for example, a deep neural network.
[0016] If the model is a deep neural network, then each parameter is a weight vector corresponding to the edges connecting the nodes.
[0017] An error correction code is added to all or part of the multiple parameters constituting the model. The model storage unit 1 stores the error correction code added to the parameter together with the parameter. An example of the error correction code is a cyclic redundancy check.
[0018] For example, some examples of the plurality of parameters constituting the model are at least one predetermined parameter among the plurality of parameters constituting the model.
[0019] When the model is a deep neural network, the parameters that are weight vectors may be elements of a matrix. In this case, some examples of the parameters that configure the model may be parameters included in a predetermined matrix among the parameters that configure the model.
[0020] The generation of the multiple parameters stored in the model storage unit 1 and the addition of error correction codes are performed before the process of step S1 is performed by a model learning device with recovery function, which will be described later.
[0021] <Change determination unit 2> The change determination unit 2 reads a certain parameter from among the multiple parameters stored in the model storage unit 1 and the error correction code added to the certain parameter.
[0022] The change determination unit 2 performs the following process using the read parameters and the error correction codes added to the parameters.
[0023] The change determination unit 2 determines whether a predetermined change has occurred in the model parameters based on the error correction code added to the parameters (step S1).
[0024] For example, the change determination unit 2 first calculates the amount of change in the parameter based on the error correction code added to the parameter of the model. Of course, the change determination unit 2 may calculate the amount of change in the parameter using not only the error correction code but also the parameter. Then, the change determination unit 2 compares the calculated amount of change with a predetermined threshold, and determines that the parameter has undergone a predetermined change if the calculated amount of change is greater than the predetermined threshold.
[0025] An example of the predetermined threshold is a predetermined absolute value. An example of the predetermined threshold is a representative value of the amount of change of the parameter over the past n times, where n is a predetermined positive integer. An example of the representative value is any one of an average value, a maximum value, a minimum value, and a mode value.
[0026] The amount of change in the parameter for the past n times can be obtained from information on the amount of change in the parameter when each learning session is performed, which is obtained by the learning unit 4 described below. The information on the amount of change in the parameter when each learning session is performed, which is obtained by the learning unit 4, may be input to the change determination unit 2.
[0027] In addition, the change determination unit 2 may determine that a predetermined change has occurred in the parameter if the absolute value of the calculated amount of change is greater than a predetermined threshold value and the calculated amount of change is either positive or negative.
[0028] The change determination unit 2 may also determine that a predetermined change has occurred in a parameter when the amount of change in the parameter over the past n times is positive and the amount of change calculated this time is negative.The change determination unit 2 may also determine that a predetermined change has occurred in a parameter when the amount of change in the parameter over the past n times is negative and the amount of change calculated this time is positive.
[0029] The change determination unit 2 may also determine that a predetermined change has occurred in the parameter when the absolute value of the calculated amount of change is greater than a predetermined threshold, and the amount of change in the parameter over the past n times is positive, and the amount of change calculated this time is negative.The change determination unit 2 may also determine that a predetermined change has occurred in the parameter when the absolute value of the calculated amount of change is greater than a predetermined threshold, and the amount of change in the parameter over the past n times is negative, and the amount of change calculated this time is positive.
[0030] The change determination unit 2 may determine whether a predetermined change has occurred in a parameter by combining an existing parameter change detection method based on vector distance or the like.
[0031] For example, the change determination unit 2 may make a final determination that a predetermined change has occurred in a parameter when it is determined that a predetermined change has occurred in a parameter based on the calculated amount of change as described above, and when it is determined that a predetermined change has occurred in a parameter based on an existing parameter change detection method.
[0032] <Recovery Part 3> The recovery unit 3 receives the result of the determination by the change determination unit 2 .
[0033] When the change determination section 2 determines that a predetermined change has occurred in the parameter, the recovery section 3 recovers the parameter based on the error correction code (step S3).
[0034] Restoring a parameter based on an error correcting code means restoring the parameter to its original value based on the error correcting code.
[0035] The recovery unit 3 may recover only those parameters for which it is determined that a predetermined change has occurred, or may recover not only the parameters for which it is determined that a predetermined change has occurred but also other parameters of the model, or may recover all parameters of the model.
[0036] Examples of other parameters of the model are parameters adjacent to the parameter determined to have undergone a predetermined change, parameters at a distance L from the parameter determined to have undergone a predetermined change, and parameters belonging to the same matrix as the parameter determined to have undergone a predetermined change, where L is a predetermined positive integer.
[0037] The parameters adjacent to the parameter for which a predetermined change has been determined to have occurred are, for example, the parameters corresponding to each edge connecting to the node to which the edge corresponding to that parameter connects, if the model is a deep neural network.
[0038] Here, when the model is a deep neural network, for example, the distance between the parameter P1 and the parameter P2 is the number of nodes between the edge corresponding to the parameter P1 and the edge corresponding to the parameter P2.
[0039] In this case, the parameter that is a distance L from the parameter for which it is determined that a predetermined change has occurred is the parameter that corresponds to an edge having L nodes between that parameter and the edge corresponding to that parameter.
[0040] When L=1, a parameter at a distance L from a parameter in which it is determined that a predetermined change has occurred is a parameter adjacent to the parameter in which it is determined that a predetermined change has occurred.
[0041] In this way, by incorporating a recovery mechanism such as an error-correcting code into the model parameters themselves, it becomes unnecessary to re-learn the model parameters in order to return them to their pre-attack state.
[0042] After a plurality of parameters constituting a model that have been learned by the learning unit 4 and assigned error correction codes by the error correction code assignment unit 5 are stored in the model memory unit 1, the plurality of parameters constituting the model stored in the model memory unit 1 may be re-learned by the learning unit 6 shown by the dashed line in Figure 1.
[0043] In this case, if the learning data used by the learning unit 6 for learning is contaminated with noise or triggers, learning by the learning unit 6 may cause changes to multiple parameters constituting the model stored in the model storage unit 1 that are not intended by the creator of the model stored in the model storage unit 1. Such unintended changes are referred to as contamination attacks.
[0044] Even if a plurality of parameters constituting a model stored in the model storage unit 1 are changed by such a contamination attack, the parameters can be restored by the above-described model parameter recovery device and method.
[0045] [Model learning device and method with recovery function] The model learning device with recovery function includes, for example, a model storage unit 1, a learning unit 4, and an error correcting code adding unit 5, as shown in FIG.
[0046] The recovery function-equipped model learning method is realized, for example, by performing the processes from step S4 to step S5 shown in FIG.
[0047] <Study Section 4> The learning unit 4 receives learning data.
[0048] The learning unit 4 performs learning based on the input learning data, and generates a plurality of parameters constituting a model (step S4). The plurality of parameters constituting the generated model are stored in the model storage unit 1.
[0049] The learning unit 4 divides the learning data into a plurality of groups and performs learning based on each of the plurality of groups. That is, the learning unit 4 performs learning multiple times. The multiple learning times may include so-called fine-tuning learning, which is light learning.
[0050] When performing learning multiple times, the learning unit 4 may obtain information on the amount of change in parameters when learning is performed each time.
[0051] Information on the amount of change in the parameter when each learning session is performed may be output to the change determination unit 2. In this case, the change determination unit 2 determines a predetermined threshold value based on the information on the amount of change in the parameter when each learning session is performed.
[0052] <Error correction code adding unit 5> The error-correcting code adding unit 5 reads from the model storage unit 1 a plurality of parameters that constitute the model.
[0053] The error correction code adding unit 5 adds error correction codes to all or some of the multiple parameters that make up the read model (step S5). The error correction codes are stored in the model storage unit 1 together with the corresponding parameters.
[0054] In this way, by applying error correction codes to all or part of the multiple parameters that make up the model, it is possible to eliminate the need to re-learn the model parameters in order to return them to their pre-attack state.
[0055] Note that learning may be performed using learning data contaminated with noise or triggers before the error correction code is assigned by the error correction code assigning unit 5. For example, when the learning unit 4 performs learning multiple times, at least one of the multiple learning times is learning using learning data contaminated with noise or triggers. Even in this case, when the change determining unit 2 of the model parameter recovery device determines whether a predetermined change has occurred by using a representative value of the amount of change in the parameter over the past n times as a predetermined threshold, and n is sufficiently larger than the number of times learning has been performed using learning data contaminated with noise or triggers, the change determining unit 2 can determine whether a predetermined change has occurred.
[0056] [Variations] The specific configurations of the embodiments of the disclosed technology are not limited to the configurations described above. The specific configurations of the embodiments of the disclosed technology can be appropriately modified in design without departing from the spirit of the embodiments of the disclosed technology.
[0057] The various processes described in the embodiments of the disclosed technology may not only be performed chronologically in the order described, but may also be performed in parallel or individually depending on the processing capabilities of the device performing the processes or as necessary.
[0058] For example, data exchange between components of the model parameter recovery device may be performed directly or via a storage unit (not shown).
[0059] [Programs, recording media] The processing of each unit of each of the above-mentioned devices may be realized by a computer, in which case the processing contents of the functions that each device should have are described by a program. Then, by loading this program into the storage unit 1020 of the computer 1000 shown in Fig. 5 and operating the arithmetic processing unit 1010, the input unit 1030, the output unit 1040, the display unit 1060, etc., various processing functions of each of the above-mentioned devices are realized on the computer.
[0060] The program describing the processing contents can be recorded on a computer-readable recording medium. The computer-readable recording medium is, for example, a non-transitory recording medium, specifically, a magnetic recording device, an optical disk, etc.
[0061] The program may be distributed, for example, by selling, transferring, lending, etc. portable recording media such as DVDs and CD-ROMs on which the program is recorded. Furthermore, the program may be distributed by storing the program in a storage device of a server computer and transferring the program from the server computer to other computers via a network.
[0062] A computer that executes such a program, for example, first stores a program recorded on a portable recording medium or a program transferred from a server computer in the auxiliary recording unit 1050, which is a non-transient storage device of the computer. Then, when executing a process, the computer reads the program stored in the auxiliary recording unit 1050, which is a non-transient storage device of the computer, into the storage unit 1020, and executes a process according to the read program. As another execution form of the program, the computer may directly read the program from the portable recording medium into the storage unit 1020 and execute a process according to the program, or may execute a process according to the received program each time a program is transferred from the server computer to the computer. Alternatively, the server computer may not transfer the program to the computer, but may execute the above-mentioned process by a so-called ASP (Application Service Provider) type service that realizes a processing function only by issuing an execution instruction and obtaining a result. Note that the program in this embodiment includes information used for processing by an electronic computer and equivalent to a program (data that is not a direct instruction to a computer but has a nature that specifies the processing of the computer, etc.).
[0063] In this embodiment, the device is configured by executing a predetermined program on a computer, but at least a part of the processing may be realized by hardware. For example, the change determination unit 2, the recovery unit 3, the learning unit 4, and the error correction code adding unit 5 may be configured by a processing circuit.
[0064] Needless to say, other modifications can be made without departing from the spirit of the present invention.
[0065] All publications, patent applications, and standards mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication, patent application, or standard was specifically and individually indicated to be incorporated by reference.
Claims
1. a change determination unit that determines whether a predetermined change has occurred in a parameter of a model based on an error correction code added to the parameter; a recovery unit that recovers the parameter based on the error correction code when the change determination unit determines that a predetermined change has occurred in the parameter; A model parameter recovery device including:
2. 2. The model parameter recovery device of claim 1, The change determination unit determines that a predetermined change has occurred in the parameter when an amount of change in the parameter is greater than a predetermined threshold. Model parameter recovery device.
3. 2. The model parameter recovery device of claim 1, The recovery unit recovers not only the parameters but also other parameters of the model. Model parameter recovery device.
4. a change determination step in which a change determination unit determines whether a predetermined change has occurred in the parameter of the model based on an error correction code added to the parameter; a recovery step of recovering the parameter based on the error correction code when the change determination unit determines that a predetermined change has occurred in the parameter; A model parameter recovery method including:
5. A program for causing a computer to function as each part of the model parameter recovery device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Error checking circuit
JP1982100541A
Bch code decoder correcting double error and detecting multiple error
JP1995326974A
Neural network, information addition device, learning method, information addition method and program
JP2020052813A
Processing method and device
US20200250539A1
