Learning device, learning method, and learning program
By converting hardware Trojan circuits into adversarial forms and updating the detection model with extracted features, the method enhances resistance to adversarial attacks, improving detection accuracy and efficiency.
Patent Information
- Application Number
- JP2020172048
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-10-12
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2040-10-12
AI Technical Summary
Existing hardware Trojan detection methods are vulnerable to adversarial attacks that modify circuit elements to misclassify Trojan nets as normal nets, and existing adversarial learning techniques have not been effectively applied to hardware Trojan detection, failing to consider worst-case scenarios.
A learning device and method that converts hardware Trojan circuits into adversarial circuits using modification patterns maintaining logical equivalence, extracts features, and updates the detection model using these features as training data to enhance resistance.
The approach generates a hardware Trojan detection model resistant to hostile circuits, improving detection accuracy and reducing computational costs by focusing on worst-case scenarios and efficient adversarial circuit generation.
Smart Images

Figure 0007576790000001 
Figure 0007576790000002 
Figure 0007576790000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an apparatus, a method, and a program for learning a hardware Trojan detection model. [Background technology]
[0002] Conventionally, in order to manufacture hardware efficiently at low cost, the design and manufacture of hardware is sometimes outsourced to a third party. However, when a third party is involved in the design or manufacture of hardware, there is a risk that a hardware Trojan that executes malicious functions may be embedded in the hardware.
[0003] A representative countermeasure against hardware Trojans is a method that uses machine learning to detect hardware Trojans during the hardware design process from logical-level circuit information (netlist) that describes circuit elements in a circuit (gates, flip-flops, multiplexers, latches, external input / output terminals, etc.) and the wiring (nets) between the circuit elements (see, for example, non-patent document 1). In this method, the feature representation of each net contained in multiple netlists is used as training data, and a classification model is trained to distinguish between normal nets and nets related to hardware Trojans (Trojan nets). Then, when a netlist is given, the trained classification model is used to determine whether each net contained in the netlist is a Trojan net, thereby detecting hardware Trojans. This type of classification model is called a hardware Trojan detection model.
[0004] One threat to hardware Trojan detection is an attack using adversarial samples (see, for example, Non-Patent Document 2). In this attack, modifications are made to multiple circuit elements that make up a hardware Trojan in order to misclassify a Trojan net as a normal net. However, unlike adversarial samples for images, etc., this modification does not involve the addition of arbitrary perturbations, but rather only uses modification patterns that maintain logical equivalence before and after the modification. As a defense technique against adversarial samples, in the field of images, there is a method called adversarial learning, in which part of the training data is replaced with adversarial samples for learning (see, for example, Non-Patent Document 3). In this method, model updating and generation of adversarial samples are alternately repeated to maximize resistance to adversarial samples. [Prior art documents] [Non-patent literature]
[0005] [Non-Patent Document 1] K. Hasegawa, M. Yanagisawa, and N. Togawa, “Hardware Trojans classification for gate-level netlists using multi-layer neural networks,” Proceedings of the 2017 IEEE 23rd International Symposium on On-Line Testing and Robust System Design (IOLTS), pp.227-232, 2017. [Non-Patent Document 2] K. Nozawa, K. Hasegawa, S. Hidano, S. Kiyomoto, K. Hashimoto, and N. Togawa, “Adversarial examples for hardware-Trojan detection at gate-level netlists,” Proceedings of the 2019 International Workshop on Attacks and Defenses for Internet-of-Things (ADIoT), pp.1-18, 2019. [Non-Patent Document 3] A. Kurakin, IJ Goodfellow, and S. Bengio, “Adversarial machine learning at scale,” Proceedings of the 2017 5th International Conference on Learning Representations (ICLR), 2017. Summary of the Invention [Problem to be solved by the invention]
[0006] However, there have been no cases of applying adversarial learning to hardware Trojan detection. In particular, following existing methods, adversarial samples (adversarial circuits) for training a hardware Trojan detection model are not generated on an input (net) basis for the detection model, as is the case with images, but are modified to maximize the average loss value of all Trojan nets included in the circuit, with the aim of simultaneously reducing the discrimination performance for multiple Trojan nets that make up a hardware Trojan. In this case, the worst case is not considered for each Trojan net, so simply adding Trojan nets included in the adversarial circuits created using existing technology to the training data cannot prevent attacks that preferentially misclassify Trojan nets that do not consider the worst case.
[0007] An object of the present invention is to provide a learning device, a learning method, and a learning program capable of generating a hardware Trojan detection model that is resistant to adversarial circuits generated by modifying circuit elements. [Means for solving the problem]
[0008] The learning device of the present invention includes a conversion unit that converts a hardware Trojan circuit including a single Trojan net selected from a netlist into an adversarial circuit using a modification pattern that maintains logical equivalence, an extraction unit that extracts features of the Trojan net from the adversarial circuit converted by the conversion unit, and an update unit that updates a Trojan net detection model through machine learning based on training data to which the features extracted by the extraction unit have been added.
[0009] The conversion unit may search for a combination of modification patterns that maximizes a loss of the detection model for the Trojan horse.
[0010] The conversion unit may repeat the process of generating the adversarial circuit a predetermined number of times, each time selecting a pair of circuit elements and modification patterns that maximizes a loss of the detection model for the Trojan net.
[0011] The conversion unit may search for a pattern having a high priority level set in advance from among the plurality of alteration patterns.
[0012] The learning device may alternately repeat generation of the adversarial circuit for a part of Trojan nets by the conversion unit and updating of the detection model by the update unit.
[0013] The update unit may replace the feature amount extracted by the extraction unit with a feature amount in the circuit before conversion by the conversion unit, and use the replaced feature amount as the training data.
[0014] The update unit may add the feature amount extracted by the extraction unit while leaving the feature amount in the circuit before the conversion by the conversion unit, to the training data.
[0015] The learning method of the present invention includes a conversion step of converting a hardware Trojan circuit including a selected single Trojan net from a netlist into an adversarial circuit using a modification pattern that maintains logical equivalence, an extraction step of extracting features of the Trojan net from the adversarial circuit converted in the conversion step, and an update step of updating a Trojan net detection model by machine learning based on training data to which the features extracted in the extraction step have been added.
[0016] A learning program according to the present invention causes a computer to function as the learning device. Effect of the Invention
[0017] According to the present invention, a hardware Trojan detection model that is resistant to a hostile circuit generated by modifying a circuit element is realized. [Brief description of the drawings]
[0018] [Figure 1] FIG. 2 is a diagram illustrating a functional configuration of a learning device according to an embodiment. [Diagram 2] FIG. 10 is a diagram illustrating a netlist according to an embodiment. [Diagram 3] 1A to 1C are diagrams illustrating modification patterns of circuit elements in an embodiment. [Figure 4] 1 is a flowchart illustrating a learning method in an embodiment. [Diagram 5] 1 is a flowchart illustrating a method for generating an adversarial circuit in an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] An example of an embodiment of the present invention will now be described. According to the learning method of the present embodiment, a hardware Trojan detection model is generated using machine learning. In this method, when applying adversarial learning to hardware Trojans, an adversarial circuit is created by focusing on only a single Trojan net, and the features of the modified Trojan net are added to the training data to perform machine learning.
[0020] FIG. 1 is a diagram showing the functional configuration of a learning device 1 in this embodiment. The learning device 1 is an information processing device (computer) such as a server device or a personal computer, and includes a control unit 10 and a storage unit 20, as well as various data input / output devices and communication devices.
[0021] The control unit 10 is a part that controls the entire learning device 1, and realizes each function in this embodiment by appropriately reading and executing various programs stored in the storage unit 20. The control unit 10 may be a CPU.
[0022] The storage unit 20 is a storage area for various programs and various data for causing the hardware group to function as the learning device 1, and may be a ROM, a RAM, a flash memory, a hard disk drive (HDD), etc. Specifically, the storage unit 20 stores a program (learning program) for causing the control unit 10 to execute each function of this embodiment, as well as a detection model, training data, etc.
[0023] The control unit 10 includes a conversion unit 11, an extraction unit 12, and an update unit 13. The learning device 1 operates these functional units to learn a detection model for hardware Trojans.
[0024] The conversion unit 11 focuses on only a single Trojan net among the Trojan nets that constitute a hardware Trojan in a netlist, which is the design information of the circuit, and converts the hardware Trojan circuit containing the selected single Trojan net into an adversarial circuit using a modification pattern that maintains logical equivalence.
[0025] FIG. 2 is a diagram illustrating a netlist in this embodiment. A netlist is design information for a circuit expressed at the logical level, and is made up of circuit elements (gates, flip-flops, multiplexers, latches, external input / output terminals, etc.) included in the circuit, and nets, which are signal lines.
[0026] In this example, NAND gates 1 to 7, OR gates 1 to 3, and AND gates 1 to 3 are provided as circuit elements, and various signal lines (nets) such as WIRE1 are arranged between these elements or between the input / output terminals. In this embodiment, feature amounts are extracted from each of these nets based on the circuit configuration, and are input to the detection model.
[0027] FIG. 3 is a diagram illustrating an example of a modification pattern of a circuit element in this embodiment. For example, an OR gate can be converted into a combination of multiple OR gates while maintaining logical equivalence, as in modification patterns 1 to 3. In addition, the insertion of two NOT gates between any gates, as in modification pattern 4, is also a logically equivalent conversion. Similarly, as in modification patterns 5 and 6, AND gates, NAND gates, etc. can also be converted into combinations of multiple circuit elements while maintaining logical equivalence. In addition to these, various modification patterns can be applied, such as a pattern in which modification patterns 1 to 6 are reversed, or a modification pattern from multiple elements to multiple elements.
[0028] The conversion unit 11 searches for a combination of modification patterns that maximizes the loss of the detection model for the Trojan net. In this case, if the total number of modification patterns or modifiable circuit elements, or the number of modifications, is large and it is not possible to select the optimal combination of modification points through a brute force approach in terms of the amount of calculation, the conversion unit 11 preferentially selects and modifies a combination of circuit elements and modification patterns that maximizes the loss of the detection model for the targeted Trojan net.
[0029] Specifically, the conversion unit 11 first selects one combination of a circuit element and an alteration pattern that maximizes the loss of the detection model, and then generates an adversarial circuit by actually applying the alteration pattern to this circuit element. Next, the conversion unit 11 repeats the operation of generating an adversarial circuit for the generated adversarial circuit each time it selects another combination of a circuit element and an alteration pattern that maximizes the loss of the detection model. The conversion unit 11 then repeats this operation a preset number of times to generate an adversarial circuit that maximizes the loss against a certain Trojan net of interest.
[0030] Furthermore, the conversion unit 11 may reduce the number of calculations by searching for a pattern with a high preset priority from among a plurality of alteration patterns.
[0031] The extraction unit 12 extracts the feature quantities of the Trojan net of interest based on the configuration of the adversarial circuit converted by the conversion unit 11.
[0032] The update unit 13 updates the Trojan net detection model by machine learning based on the training data to which the feature amounts extracted by the extraction unit 12 have been added. At this time, the update unit 13 may replace the features extracted by the extraction unit 12 based on the configuration of the adversarial circuit with the features in the circuit before conversion by the conversion unit to create training data, or may add them as new training data while leaving the original features in the circuit before conversion intact. In addition, the method of generating training data may be switched based on the total amount of training data, for example, by replacing the data in the case of a large amount of data and adding the data in the case of a small amount of data.
[0033] The update unit 13 performs worst-case learning for all selected Trojan nets by adding similar features based on the adversarial circuit to some or all of the Trojan nets included in the training data.
[0034] The control unit 10 alternately repeats the generation of adversarial circuits for some Trojan nets by the conversion unit 11 and the update of the detection model by the update unit 13. This makes it possible to maximize the attack resistance of the detection model for hardware Trojans.
[0035] Here, let G be the circuit information (netlist) expressed at the logical level, and E be the set of nets contained in G. Let G' be the set of circuit elements and nets that make up hardware Trojans, and E' be the set of nets (Trojan nets) contained in G'. In this case, G' is a subset of G, and E' is a subset of E.
[0036] x e Let be a vector representation (feature vector) of the features corresponding to net e ∈ E. The hardware Trojan detection model f is x e With input x e is a Trojan net. The detection model f is generated using a training data set D. The training data set D is a set of feature vectors extracted from each of the nets included in multiple circuits in which hardware Trojans are embedded. The detection model f is trained to minimize the value of a loss function for the training data set D.
[0037] FIG. 4 is a flowchart illustrating a learning method in this embodiment. As an example, we will discuss a deep learning technique that repeats mini-batch learning.
[0038] In step S1, the control unit 10 initializes a hardware Trojan detection model f.
[0039] In step S2, the control unit 10 selects m feature vectors from the set D of training data and generates a mini-batch B.
[0040] In step S3, the control unit 10 (conversion unit 11) selects s (≦l) Trojan nets from among the 1 (≦m) Trojan nets included in the mini-batch B, and generates an adversarial circuit for each of the selected Trojan nets.
[0041] In step S4, the control unit 10 (extraction unit 12) generates feature vectors for the s Trojan nets selected in step S3 based on the configurations of the corresponding adversarial circuits.
[0042] In step S5, the control unit 10 (update unit 13) either replaces the feature vector generated in step S4 with the original feature vector included in mini-batch B, or adds a new feature vector generated without replacement to mini-batch B.
[0043] In step S6, the control unit 10 (update unit 13) uses the mini-batch B to update the detection model f.
[0044] In step S7, the control unit 10 determines whether or not the detection model f has been updated a predetermined number of times. If the determination is YES, the process ends, and if the determination is NO, the process returns to step S2.
[0045] FIG. 5 is a flowchart illustrating a method for generating an adversarial circuit in this embodiment. This flowchart corresponds to step S3 in the flowchart of FIG. 4 showing the learning method.
[0046] Now, given a Trojan net e'∈E', an adversarial circuit is generated to maximize the following utility function S: S(e')=-log f(x e’ )
[0047] Let P be a set of modification patterns that can be applied to any circuit element in a Hardware Trojan G'. Each modification pattern modifies the functionality of the original circuit G that contains G' equivalently. Adversarial Circuit GAE is generated so as to apply up to K modifications to the hardware Trojan G' and maximize the value of S(e'). However, if the size of the set of modification patterns P, the number of circuit elements included in G', or the number of modifications K is large, and the hostile circuit G AE When it is difficult to generate an adversarial circuit G from the viewpoint of computational complexity, the conversion unit 11 converts the circuit G into an adversarial circuit G by the following procedure. AE Generate.
[0048] In step S11, the conversion unit 11 selects one combination of an alteration pattern and a circuit element that maximizes S(e') when an alteration pattern included in the set P of alteration patterns is applied to a circuit element of the Hardware Trojan G'.
[0049] In step S12, the conversion unit 11 modifies the circuit element selected in step S11 in accordance with the selected modification pattern.
[0050] In step S13, the conversion unit 11 judges whether or not the K circuit elements have been modified. If the judgment is YES, the process ends. On the other hand, if the judgment is NO, the process returns to step S11, and further modifications are made to the circuit modified in step S12.
[0051] In this way, the conversion unit 11 modifies the circuit every time it searches for a combination of a modification pattern and a circuit element that maximizes S(e'), and by repeating this process, modifies K circuit elements.
[0052] According to this embodiment, the learning device 1 converts a hardware Trojan circuit containing a selected single Trojan net from the netlist into an adversarial circuit using a modification pattern that maintains logical equivalence. The learning device 1 then extracts features of the converted Trojan net, and updates the Trojan net detection model by machine learning based on the training data to which the extracted features have been added. Therefore, by learning based on adversarial circuits that correspond to powerful attacks at the individual net level, the learning device 1 can generate a hardware Trojan detection model that is resistant to any adversarial circuit generated by modifying circuit elements.
[0053] In addition, the learning device 1 generates an adversarial circuit using only modification patterns that are applicable to any of the circuit elements of a hardware Trojan, including a Trojan net of interest, and that maintain logical equivalence. This allows the learning device 1 to perform learning by assuming only adversarial circuits that can realistically pose a threat, thereby reducing the computational cost of generating an adversarial circuit.
[0054] The learning device 1 can maximize the performance of the detection model against powerful attacks against a targeted Trojan net by searching for a combination of modification patterns that maximizes the loss of the detection model for the Trojan net and generating an adversarial circuit.
[0055] When it is difficult from the viewpoint of computational complexity to exhaustively search combinations of modification patterns, the learning device 1 repeats the process of generating an adversarial circuit a predetermined number of times, each time selecting a combination of circuit elements and modification patterns that maximizes the loss of a detection model for a Trojan horse. This enables the learning device 1 to efficiently generate an appropriate adversarial circuit.
[0056] The learning device 1 can also reduce the processing load by searching for a pattern with a high preset priority from among a plurality of alteration patterns.
[0057] The learning device 1 can increase the attack resistance of the detection model by using a learning method that alternately repeats the generation of an adversarial circuit that maximizes the loss against some Trojan nets and the updating of the detection model that minimizes the loss.
[0058] The learning device 1 replaces features extracted from a Trojan net of an adversarial circuit with features based on the original circuit as training data, which is expected to improve detection accuracy, especially when large-scale training data is used. In addition, the learning device 1 adds features extracted from the Trojan net of the adversarial circuit while leaving the features based on the original circuit intact to create training data, which is expected to replenish data, especially when using small-scale training data, and improve the performance of the detection model.
[0059] Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Furthermore, the effects described in the above-described embodiments are merely a list of the most preferable effects resulting from the present invention, and the effects of the present invention are not limited to those described in the embodiments.
[0060] The learning method using the learning device 1 is realized by software. When realized by software, the programs constituting this software are installed in an information processing device (computer). These programs may be recorded on removable media such as CD-ROMs and distributed to users, or may be distributed by being downloaded to the user's computer via a network. Furthermore, these programs may be provided to the user's computer as a Web service via a network without being downloaded. [Explanation of symbols]
[0061] 1 Learning device 10 Control section 11 Conversion section 12 Extraction part 13 Update section 20 Memory section
Claims
1. a conversion unit that converts a hardware Trojan circuit including a selected single Trojan net from the netlist into an adversarial circuit using a modification pattern that maintains logical equivalence; an extraction unit that extracts features of the Trojan net from the adversarial circuit converted by the conversion unit; an update unit that updates a Trojan detection model by machine learning based on training data to which the feature amount extracted by the extraction unit has been added; The conversion unit is a learning device that generates the adversarial circuit by searching only for patterns with a high priority that have been set in advance among the multiple alteration patterns.
2. The learning device according to claim 1 , wherein the conversion unit searches for a combination of modification patterns that maximizes a loss of the detection model for the Trojan net.
3. The learning device according to claim 2 , wherein the conversion unit repeats the process of generating the adversarial circuit a predetermined number of times each time it selects a combination of a circuit element and an alteration pattern that maximizes a loss of the detection model for the Trojan net.
4. 4. The learning device according to claim 1, wherein the conversion unit alternately generates the adversarial circuit for a part of Trojan nets and the update unit alternately updates the detection model.
5. 5. The learning device according to claim 1, wherein the update unit replaces the feature extracted by the extraction unit with the feature in the circuit before conversion by the conversion unit to generate the training data.
6. 5. The learning device according to claim 1, wherein the update unit uses the feature extracted by the extraction unit and the feature in the circuit before conversion by the conversion unit as the training data.
7. a conversion step of converting a hardware Trojan circuit including a selected single Trojan net from the netlist into an adversarial circuit using a modification pattern that maintains logical equivalence; an extraction step of extracting features of the Trojan net from the adversarial circuit converted in the conversion step; an updating step of updating a Trojan detection model by machine learning based on training data to which the feature quantities extracted in the extracting step have been added, A learning method in which, in the conversion step, only patterns with a high priority set in advance are searched for among the plurality of modification patterns to generate the adversarial circuit.
8. A learning program for causing a computer to function as the learning device according to any one of claims 1 to 6.
Citation Information
Patent Citations
Training method and device for countermeasure attack model
CN111340214A
Method of detecting hardware trojan, program for detecting hardware trojan, and device for detecting hardware trojan
WO2016080380A1
