Hardware Trojan dataset labeling method and system

By preprocessing and high-frequency texture extraction on low-quality integrated circuit chip image data sets, combined with subspace learning and graph neural network, high-precision annotation of hardware Trojan data sets are achieved, solving the problem of low correctness of data annotation in the prior art.

CN119888742AActive Publication Date: 2025-04-25GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510055968.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-04-25
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

Existing hardware Trojan detection and verification methods rely on high-quality image data sets, resulting in low data labeling accuracy and affecting detection accuracy.

Method used

By obtaining the low-quality integrated circuit chip image dataset for preprocessing, extracting the high-frequency texture matrix, constructing the subspace learning objective function, iteratively solve using the alternating direction multiplication method, determining the frequency domain and the airspace low-rank subspace matrix, and extracting the fusion features through the graph neural network for spectral clustering and annotating the dataset.

Benefits of technology

Effectively suppress noise interference, improve the accuracy and robustness of data set annotation, and improve the accuracy of hardware Trojan detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888742A_ABST
    Figure CN119888742A_ABST
Patent Text Reader

Abstract

The invention discloses a hardware Trojan horse data set labeling method and system, and relates to the technical field of data labeling, and the method comprises the steps: carrying out the high-frequency extraction of an optimized integrated circuit chip image data set generated through the preprocessing of a low-quality integrated circuit chip image data set, and determining a high-frequency texture matrix; carrying out iterative solution on the subspace learning objective function related to the optimized integrated circuit chip image data set by adopting an alternating direction multiplier method based on the optimized integrated circuit chip image data set and the high-frequency texture matrix, and determining a frequency domain low-rank subspace matrix and a space domain low-rank subspace matrix; outputting fusion features based on a frequency domain adjacent matrix corresponding to the frequency domain low-rank subspace matrix and a spatial domain adjacent matrix corresponding to the spatial domain low-rank subspace matrix through the trained graph neural network; and carrying out spectral clustering by adopting the fusion features, and determining a labeled integrated circuit chip image data set. Noise of a low-quality integrated circuit chip image data set can be effectively suppressed, and the data set marking correctness can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data annotation, and in particular to a method and system for annotating a hardware Trojan data set. Background Art

[0002] With the increasing expansion of the semiconductor market, the semiconductor industry's demand for reliability verification has reached a new peak. Common defects in reliability verification mainly include unintentional defects and malicious hardware Trojans (HT). Unintentional defects may be defects such as solder joint offset and stains caused by low yield due to immature process or poor processing environment. In comparison, malicious hardware Trojans are deliberately implanted by humans and may cause security vulnerabilities such as leakage of confidential information. They can be introduced in the two important stages of integrated circuit (IC) production design and manufacturing. Therefore, hardware Trojan detection and verification has become one of the core steps in the chip design and production process.

[0003] The current hardware Trojan detection and verification methods mainly train hardware Trojan detection models to identify abnormal behaviors or hidden malicious modifications in hardware design, using traditional machine learning algorithms based on feature extraction, such as support vector machines (SVM), decision trees (DT), random forests (RF), etc., or using deep learning models such as convolutional neural networks (CNN) and recurrent neural networks (RNN) to analyze various features in hardware design (such as power consumption mode, timing behavior, electromagnetic leakage, etc.). Overall, the advantage of machine learning methods is that they can automatically identify and detect potential hardware Trojans through large amounts of data training, and have strong generalization capabilities. However, in the process of proposing such verification methods, their effectiveness mainly comes from the labeled image data sets used for model training. However, in actual applications, due to the influence of factors such as device accuracy and environmental interference, it is difficult to obtain high-quality images. In the process of data annotation, problems such as noise interference and blur distortion of images can easily weaken the annotation reliability, resulting in low accuracy of hardware Trojan detection and verification. Summary of the invention

[0004] The present invention provides a method and system for labeling a hardware Trojan data set, which solves the technical problem that the current hardware Trojan detection and verification method mainly identifies hardware Trojans by training a hardware Trojan detection model, and its effectiveness mainly comes from the labeled image data set used for model training, but in the data labeling process, the labeling accuracy depends on high-quality images, resulting in low labeling accuracy.

[0005] A first aspect of the present invention provides a method for labeling a hardware Trojan data set, comprising:

[0006] Obtain a low-quality integrated circuit chip image dataset for hardware Trojan detection training and perform preprocessing to generate an optimized integrated circuit chip image dataset;

[0007] Performing high frequency extraction on the optimized integrated circuit chip image data set to determine a high frequency texture matrix;

[0008] Constructing a subspace learning objective function for optimizing an integrated circuit chip image data set, and using an alternating direction multiplier method to iteratively solve based on the optimized integrated circuit chip image data set and the high-frequency texture matrix to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix;

[0009] Extract the output frequency domain graph embedding features and the spatial domain graph embedding features based on the frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and the spatial domain adjacency matrix corresponding to the spatial domain low-rank subspace matrix through the trained graph neural network, and then splice them to generate fusion features;

[0010] The fusion features are used to perform spectral clustering to determine a labeled integrated circuit chip image data set.

[0011] Optionally, the extracting high frequencies from the optimized integrated circuit chip image data set to determine a high frequency texture matrix includes:

[0012] Performing a two-dimensional fast Fourier transform on the optimized integrated circuit chip image data set to determine a frequency domain image data set;

[0013] Performing high-pass filtering on the frequency domain image data set based on an adaptive filter to generate a filtered image data set;

[0014] An inverse two-dimensional fast Fourier transform is performed on the filtered image data set to output a high-frequency texture matrix.

[0015] Optionally, the subspace learning objective function includes:

[0016] ;

[0017] In the formula, is the frequency domain low-rank subspace matrix, is the nuclear norm, is the first trade-off parameter, To optimize the integrated circuit chip image dataset, is the high-frequency texture matrix, is the Frobenius norm, is the second trade-off parameter, is the sparse error, is the third trade-off parameter, is the spatial low-rank subspace matrix, is the fourth trade-off parameter, is sparse noise, for Norm.

[0018] Optionally, the training process of the graph neural network includes:

[0019] Obtaining a training frequency domain adjacency matrix and a training spatial domain adjacency matrix associated with a training low-quality integrated circuit chip image data set;

[0020] Performing unit matrix processing on the training frequency domain adjacency matrix to generate a frequency domain unit matrix;

[0021] Performing unit matrix processing on the training spatial adjacency matrix to generate a spatial unit matrix;

[0022] Input the frequency domain unit matrix and the spatial domain unit matrix into the graph neural network to be trained for feature extraction, and output training frequency domain graph embedding features and training spatial domain graph embedding features;

[0023] A self-supervised loss function value is calculated based on the training frequency domain graph embedding features and the training spatial domain graph embedding features, and when the loss function value converges, a trained graph neural network is determined.

[0024] Optionally, the calculation process of the loss function value includes:

[0025] ;

[0026] ;

[0027] ;

[0028] In the formula, is the loss function value of the frequency domain image embedding feature, For Node , For Node , For the layer, Node for embedding features for frequency domain graphs The embedding Node for embedding features for frequency domain graphs The embedding is the L2 norm, Node for embedding features for frequency domain graphs and nodes The similarity of is the loss function value of the spatial domain graph embedding feature, Nodes for embedding features in the spatial graph The embedding Nodes for embedding features in the spatial graph The embedding Nodes for embedding features in the spatial graph and nodes The similarity of is the self-supervised loss function value.

[0029] Optionally, the process of determining the similarity includes:

[0030] Determine the set of neighboring nodes of each node in the graph embedding feature through the K nearest neighbor algorithm;

[0031] According to the node Is it a node? The neighboring node set of and nodes The similarity.

[0032] A second aspect of the present invention provides a hardware Trojan data set annotation system, comprising:

[0033] A data preprocessing module is used to obtain and preprocess a low-quality integrated circuit chip image dataset for hardware Trojan detection training to generate an optimized integrated circuit chip image dataset;

[0034] A high-frequency extraction module, used to perform high-frequency extraction on the optimized integrated circuit chip image data set to determine a high-frequency texture matrix;

[0035] A subspace learning module is used to construct a subspace learning objective function for optimizing the integrated circuit chip image data set, and use an alternating direction multiplier method to iteratively solve based on the optimized integrated circuit chip image data set and the high-frequency texture matrix to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix;

[0036] A graph feature extraction module is used to extract the output frequency domain graph embedding features and the spatial domain graph embedding features based on the frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and the spatial domain adjacency matrix corresponding to the spatial domain low-rank subspace matrix through a trained graph neural network, and then splice them to generate fusion features;

[0037] The clustering and annotation module is used to perform spectral clustering using the fusion features to determine annotated integrated circuit chip image data set.

[0038] A third aspect of the present invention provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the hardware Trojan data set labeling method as described in any one of the above items.

[0039] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed, the method for labeling a hardware Trojan data set as described in any one of the above items is implemented.

[0040] A fifth aspect of the present invention provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the hardware Trojan data set labeling method as described in any one of the above items.

[0041] It can be seen from the above technical solutions that the present invention has the following advantages:

[0042] The above scheme of the present invention provides a method for labeling a hardware Trojan data set, including: obtaining a low-quality integrated circuit chip image data set for hardware Trojan detection training and performing preprocessing to generate an optimized integrated circuit chip image data set; performing high-frequency extraction on the optimized integrated circuit chip image data set to determine a high-frequency texture matrix; constructing a subspace learning objective function for the optimized integrated circuit chip image data set, and using an alternating direction multiplier method to iteratively solve based on the optimized integrated circuit chip image data set and the high-frequency texture matrix to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix; extracting output frequency domain graph embedding features and spatial domain graph embedding features based on a trained graph neural network based on a frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and a spatial domain adjacency matrix corresponding to the spatial domain low-rank subspace matrix, and then splicing them to generate fusion features; using the fusion features to perform spectral clustering to determine the labeled integrated circuit chip image data set. Based on the above scheme, for the low-quality integrated circuit chip image dataset used for hardware Trojan detection training, thanks to the high-frequency texture component extraction and subspace learning, it can effectively suppress the influence of noise on the results, maintain high-precision feature extraction and analysis, and combine the graph neural network to learn the embedded representation of the node as the basis of spectral clustering, which helps to improve the correctness of the dataset annotation. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 A flowchart of a method for labeling a hardware Trojan data set provided by an embodiment of the present invention;

[0045] Figure 2 A data flow diagram of a method for labeling a hardware Trojan data set provided by an embodiment of the present invention;

[0046] Figure 3 A structural block diagram of a hardware Trojan data set annotation system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0047] An embodiment of the present invention provides a method and system for labeling a hardware Trojan data set, which is used to solve the technical problem that the current hardware Trojan detection and verification method mainly identifies hardware Trojans by training a hardware Trojan detection model, and its effectiveness mainly comes from the labeled image data set used for model training. However, in the data labeling process, the accuracy of the labeling depends on high-quality images, resulting in low labeling accuracy.

[0048] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] See also Figure 1 , Figure 1 A flowchart of the steps of a method for labeling a hardware Trojan data set provided by an embodiment of the present invention.

[0050] The present invention provides a method for labeling a hardware Trojan data set, comprising:

[0051] Step 101: obtain a low-quality integrated circuit chip image dataset for hardware Trojan detection training and perform preprocessing to generate an optimized integrated circuit chip image dataset.

[0052] It should be noted that the low-quality integrated circuit chip image dataset includes low-quality integrated circuit chips with hardware Trojans and low-quality integrated circuit chips without hardware Trojans. The integrated circuit chips with hardware Trojans and the integrated circuit chips without hardware Trojans can be imaged by low-precision image acquisition devices such as low-cost ordinary microscope cameras to form a low-quality integrated circuit chip image dataset;

[0053] Compared with high-precision image acquisition devices, such as electron microscopes (SEMs), which use narrowly focused high-energy electron beams to scan image elements from left to right and from top to bottom on chip samples to obtain high-quality images at one time, low-precision image acquisition devices usually have smaller sensors, which makes them less sensitive when capturing light. The unstable temperature and light source of the acquisition environment will cause changes in the signal-to-noise ratio (SNR), and low-SNR images often contain white noise, Gaussian noise and other noises. If they are uploaded to the server, multiplicative noise may be introduced due to the non-ideal channel, resulting in the generated image quality may not be as good as that collected by high-precision image acquisition devices. However, the widespread use and easy access to low-precision image acquisition devices enable large-scale data acquisition in different environments and conditions. We can still extract valuable information through subsequent processing steps;

[0054] The low-quality integrated circuit chip image dataset is preprocessed to obtain the optimized integrated circuit chip image dataset to be labeled. The preprocessing includes operations such as grayscale and histogram equalization, which aims to improve image quality, enhance important features, and provide a clearer data basis for subsequent processing steps;

[0055] Grayscale refers to the process of converting a color image into a grayscale image. Its purpose is to simplify calculations, remove color information, reduce data complexity, and maintain the structural characteristics of the image to facilitate subsequent processing and analysis. This operation compresses the three-channel information of the RGB color model into a single brightness value by applying a weighted average to each pixel. The grayscale formula is: , where is the red channel value of the image, is the green channel value of the image, is the blue channel value of the image, is the gray value;

[0056] After grayscale processing, the contrast of the image is improved through histogram equalization. Through this process, the pixel value distribution of the image is adjusted to a uniform distribution, thereby enhancing the details of low-contrast areas and effectively enhancing the recognizability of the image, especially for uneven lighting conditions; this operation adjusts the grayscale value of each pixel through the cumulative distribution function (CDF), so that the dark and bright information in the image is balanced, improving the visual effect, and for the input image , the output image after histogram equalization The calculation process is: , where is the cumulative distribution function, is the number of gray levels.

[0057] Step 102: extract high frequencies from the optimized integrated circuit chip image data set to determine a high frequency texture matrix.

[0058] Step 102 includes the following sub-steps:

[0059] Performing a two-dimensional fast Fourier transform on the optimized integrated circuit chip image data set to determine a frequency domain image data set;

[0060] Performing high-pass filtering on the frequency domain image data set based on an adaptive filter to generate a filtered image data set;

[0061] Perform an inverse two-dimensional fast Fourier transform on the filtered image data set and output a high-frequency texture matrix.

[0062] It should be noted that, in this embodiment, high-frequency extraction is performed on the optimized integrated circuit chip in the optimized integrated circuit chip image data set to capture and filter out useless interference information such as low-frequency noise, thereby obtaining a high-frequency texture matrix, the high-frequency texture matrix including a plurality of high-frequency texture components, each of which corresponds to an optimized integrated circuit chip. It can be understood that the texture information reflecting the circuit structure of the integrated circuit chip exists in the region where its pixels change rapidly, which can be called high-frequency texture;

[0063] There are many ways to extract high frequencies, such as wavelet transform, high-pass filter, and morphological operation. In one implementation, Figure 2 As shown in the figure, the high-frequency texture components of the image are calculated by combining two-dimensional fast Fourier transform (2D FFT) and adaptive filter for subsequent fusion: First, the integrated circuit chip image dataset is optimized No. Optimized integrated circuit chip image Perform a two-dimensional fast Fourier transform (2D FFT) to complete the spatial domain to frequency domain conversion, thereby obtaining a frequency domain image Frequency domain image dataset composed of Then, the frequency domain image data set is high-pass filtered through an adaptive filter to filter useful information and remove noise in the frequency domain. After generating the filtered image data set, an inverse two-dimensional fast Fourier transform is performed to output the high-frequency texture components. The high-frequency texture matrix composed of the high-frequency texture components is calculated as follows:

[0064] ;

[0065] In the formula, is the pixel coordinate in the airspace, is the height of the image, is the width of the image, is an adaptive filter, is the pixel coordinate in the frequency domain, is an imaginary unit;

[0066] In specific implementation, the adaptive filter can be a least mean square (LMS) filter. The least mean square filter is widely used in tasks such as noise suppression and echo cancellation in signal processing. It adjusts the filter coefficients by minimizing the mean square error of the error signal. It is expressed as follows: Assuming the input signal , including the target ideal high frequency signal and low frequency noise , the output signal of the filter , is the coefficient of the filter, and the update rule is ,in , is the step size factor, is the error signal, and through continuous iterative updates, the output signal of the filter is Finally approaching the target ideal high frequency signal , and suppress low frequency noise.

[0067] Step 103: construct a subspace learning objective function for optimizing the integrated circuit chip image data set, and use the alternating direction multiplier method to iteratively solve based on the optimized integrated circuit chip image data set and the high-frequency texture matrix to determine the frequency domain low-rank subspace matrix and the spatial domain low-rank subspace matrix.

[0068] It should be noted that this embodiment uses a subspace learning algorithm to fuse the information features of high-frequency textures with the low-rank representation of the optimized integrated circuit chip image, and determines a frequency domain low-rank subspace matrix based on frequency domain knowledge and a spatial domain low-rank subspace matrix based on spatial domain knowledge to generate image features containing complete spectral information;

[0069] For the subspace learning algorithm, due to the different noise structures, the Frobenius norm, Norm and norm to measure the difference between clean data and original data, and learn a unique representation by minimizing each different metric at the same time; in this embodiment, in order to introduce the high-frequency texture matrix Based on the knowledge of the original data, the Frobenius norm is used to measure the error between the high-frequency texture component and the original data, and a subspace learning function is proposed:

[0070] ;

[0071] In the formula, is the frequency domain low-rank subspace matrix, is the rank of the matrix, is the first trade-off parameter, To optimize the integrated circuit chip image dataset, is the high-frequency texture matrix, is the Frobenius norm, is the second trade-off parameter, is the third trade-off parameter, is the spatial low-rank subspace matrix, is the fourth trade-off parameter, is sparse noise, for norm;

[0072] In the above subspace learning function, the second term can be regarded as the distance between the high-frequency texture component and the learned representation, the third term measures the error between the original data and the learned representation, the fourth term is the low-rank property constrained by the nuclear norm, and the fifth term is Constrained sparse terms (including noise, etc.); in the iterative solution process, by integrating knowledge from various aspects, a unique representation based on frequency domain knowledge can be learned , and representation based on spatial domain knowledge , while processing When operating, due to the non-convexity of the rank function, its solution may not be unique. As a common practice in rank minimization problems, The operation is usually relaxed through the convex kernel norm, which can be written as a minimization problem to obtain the subspace learning objective function, including:

[0073] ;

[0074] In the formula, is the nuclear norm, is the sparse error;

[0075] The above minimization problem can be solved iteratively by the alternating direction method of multipliers (ADMM), and the frequency domain low-rank subspace matrix Knowledge will be learned from the high-frequency texture components in the iterative process, and the spatial low-rank subspace matrix Knowledge will be learned from the spatial domain during the iteration process. Limited by the sparse error and low-rank terms, the learning results will find a balance while adjusting the trade-off parameters. ~ Bringing frequency domain knowledge into the spatial domain algorithm can better resist noise interference.

[0076] Step 104: extract the output frequency domain graph embedding features and spatial domain graph embedding features based on the frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and the spatial domain adjacency matrix corresponding to the spatial domain low-rank subspace matrix through the trained graph neural network, and then splice them to generate fusion features.

[0077] It should be noted that in this embodiment, the frequency domain low-rank subspace matrix and the spatial domain low-rank subspace matrix are learned and fused based on the graph neural network (GNN), so as to obtain the fusion features containing the topological graph structure for subsequent spectral clustering. This is because GNN can efficiently model the complex relationship between nodes, integrate information from different perspectives through the message passing mechanism, and capture nonlinear features at the same time, thereby improving the expressive power of the embedded representation. In addition, GNN can adaptively optimize the subspace fusion strategy during the training process, thereby improving the overall performance of the model while maintaining computational efficiency.

[0078] In the specific implementation, since the key to determining the structure of a graph lies in the adjacency matrix, the frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and the spatial domain adjacency matrix corresponding to the spatial domain low-rank subspace matrix are first constructed. The construction process is as follows:

[0079] ;

[0080] ;

[0081] In the formula, is the frequency domain adjacency matrix, is the spatial adjacency matrix, is the absolute value operator;

[0082] Then, a graph neural network is used to learn the embedded representation of the nodes: For the first graph represented by the frequency domain adjacency matrix, the update rule in the graph neural network is , where The frequency domain The node embedding of the layer is the frequency domain graph embedding feature. The frequency domain The node embedding of the layer, is the activation function (such as ReLU), is the weight matrix in the frequency domain. For the second graph represented by the spatial adjacency matrix, the update rule in the graph neural network is , where For the airspace The node embedding of the layer is the spatial domain graph embedding feature. For the airspace The node embedding of the layer, is the activation function (such as ReLU), is the weight matrix of the spatial domain; the information of the two graphs is merged into a unified representation by splicing: , where It means concatenating the embedding dimension of the node, that is, connecting the embedding vectors of each node in the two graphs into a longer vector, thereby merging the information of the two graphs into a fusion feature.

[0083] In a specific implementation, the training process of the graph neural network includes:

[0084] Obtaining a training frequency domain adjacency matrix and a training spatial domain adjacency matrix associated with a training low-quality integrated circuit chip image data set;

[0085] Perform unit matrix processing on the training frequency domain adjacency matrix to generate the frequency domain unit matrix;

[0086] The training spatial adjacency matrix is ​​processed into a unit matrix to generate a spatial unit matrix;

[0087] Input the frequency domain unit matrix and the spatial domain unit matrix into the graph neural network to be trained for feature extraction, and output the training frequency domain graph embedding features and the training spatial domain graph embedding features;

[0088] The self-supervised loss function value is calculated based on the training frequency domain graph embedding features and the training spatial domain graph embedding features. When the loss function value converges, the trained graph neural network is determined.

[0089] It should be noted that in the training process of the graph neural network, after obtaining the training low-quality integrated circuit chip image data set, the training frequency domain adjacency matrix and the training spatial domain adjacency matrix are determined according to steps 101 to 104. At this time, in order to help initialize the graph neural network to be trained, the frequency domain unit matrix corresponding to the training frequency domain adjacency matrix and the training spatial domain adjacency matrix is ​​constructed. and the spatial identity matrix As the training input of the graph neural network, for the first graph represented by the frequency domain identity matrix, we have , for the second graph represented by the spatial adjacency matrix, we have , and then refer to the update rules in the neural network through self-supervised learning methods to enable the network to learn the embedded representation of the node;

[0090] In the unsupervised case, we need to design a self-supervised learning goal so that GNN can learn the structural information of the graph. In clustering tasks, a common self-supervised goal is to make similar nodes have similar representations in the embedding space and stay away from dissimilar nodes. Therefore, during training, we hope that similar nodes are close to each other in the embedding space, while different nodes should have a greater distance. This goal can be achieved through a self-supervised loss. Therefore, the calculation process of the loss function value includes:

[0091] ;

[0092] ;

[0093] ;

[0094] In the formula, is the loss function value of the frequency domain image embedding feature, For Node , For Node , For the layer, Node for embedding features for frequency domain graphs The embedding Node for embedding features for frequency domain graphs The embedding is the L2 norm, Node for embedding features for frequency domain graphs and nodes The similarity of is the loss function value of the spatial domain graph embedding feature, Nodes for embedding features in the spatial graph The embedding Nodes for embedding features in the spatial graph The embedding Nodes for embedding features in the spatial graph and nodes The similarity of is the value of the self-supervised loss function;

[0095] In a more specific embodiment, a node and nodes The similarity can usually be defined by the adjacency matrix, which is determined by performing the KNN algorithm on the adjacency matrix and selecting a suitable K value. and , the similarity determination process includes: determining the neighboring node set of each node in the graph embedding feature through the K nearest neighbor algorithm; Is it a node? The neighboring node set of and nodes The similarity of Belongs to Node When the neighboring node set is , the similarity is 1, otherwise it is 0;

[0096] Finally, the loss function value is judged to converge. If it does not converge, the weight matrix is ​​optimized by using a gradient descent algorithm such as the Adam optimizer with the goal of minimizing the loss function value. and , thereby determining the trained graph neural network.

[0097] Step 105: Use the fusion features to perform spectral clustering to determine a labeled integrated circuit chip image data set.

[0098] It should be noted that in this embodiment, spectral clustering is used to divide data based on the fusion features learned with cluster knowledge to complete the data set annotation, which provides a more reliable data basis for subsequent verification tasks and helps to improve verification accuracy and classification performance; in specific implementation:

[0099] 1) Calculate the similarity matrix: Use cosine similarity to calculate the similarity between node pairs And form the computational similarity matrix:

[0100] ;

[0101] 2) Constructing the Laplacian matrix: Using the similarity matrix To construct the Laplacian matrix of the graph :

[0102] ;

[0103] In the formula, is the degree matrix, the diagonal elements of the degree matrix ;

[0104] 3) Eigendecomposition: Laplacian matrix Perform eigendecomposition, select the first g smallest eigenvectors, and concatenate them into the feature matrix U;

[0105] 4) K-means clustering: Input the feature matrix U into the K-means clustering algorithm to cluster the nodes, thereby dividing the data set into data with Trojans and data without Trojans, completing data labeling.

[0106] In order to verify the effectiveness of the above method, multiple clustering methods were used for experimental comparison. The comparison results are shown in Table 1:

[0107] Table 1 Comparison results of clustering methods

[0108]

[0109] In the above experimental verification, two sets of data sets were collected using a low-precision camera, each set covering different types of integrated circuit chip images with and without hardware Trojans, and multiple clustering schemes were used to cluster and annotate the data sets: 1) "Ncut" (normalized cut), "Kmeans" (K means) and "SSC" (sparse subspace clustering) are directly adopted The corresponding clustering methods, 2) "HFLRS" refers to the steps including two-dimensional fast Fourier transform based on Butterworth filter, subspace learning and spectral clustering, 3) "This scheme (Butterworth filter)" refers to the steps including two-dimensional fast Fourier transform based on Butterworth filter, subspace learning and graph neural network processing and spectral clustering, 4) "This scheme" refers to the steps of two-dimensional fast Fourier transform, subspace learning and graph neural network processing and spectral clustering based on the steps of two-dimensional fast Fourier transform, subspace learning and graph neural network processing and spectral clustering based on Butterworth filter; According to the results of the above clustering schemes in the indicator ACC, it can be seen that the clustering annotation effect of this scheme is relatively good.

[0110] In an embodiment of the present invention, for a low-quality integrated circuit chip image dataset used for hardware Trojan detection training, thanks to high-frequency texture component extraction and subspace learning, the influence of noise on the results can be effectively suppressed, high-precision feature extraction and analysis can be maintained, and the embedded representation of nodes learned by combining the graph neural network is used as the basis for spectral clustering, making the performance more robust in complex environments. Even in the case of low-quality or noise-interfered image data, reliable annotation results can still be obtained, which also makes the image acquisition process more economical and efficient, reduces experimental costs, and improves the algorithm's popularization and practical application potential.

[0111] See also Figure 3 , Figure 3 A structural block diagram of a hardware Trojan data set annotation system provided by an embodiment of the present invention.

[0112] The present invention provides a hardware Trojan data set annotation system, comprising:

[0113] The data preprocessing module 301 is used to obtain and preprocess a low-quality integrated circuit chip image dataset for hardware Trojan detection training to generate an optimized integrated circuit chip image dataset;

[0114] A high frequency extraction module 302 is used to perform high frequency extraction on the optimized integrated circuit chip image data set to determine a high frequency texture matrix;

[0115] The subspace learning module 303 is used to construct a subspace learning objective function for optimizing the integrated circuit chip image data set, and use an alternating direction multiplier method to iteratively solve based on the optimized integrated circuit chip image data set and the high-frequency texture matrix to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix;

[0116] A graph feature extraction module 304 is used to extract the frequency domain graph embedding features and the spatial domain graph embedding features based on the frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and the spatial domain adjacency matrix corresponding to the spatial domain low-rank subspace matrix through the trained graph neural network, and then splice them to generate fusion features;

[0117] The clustering and labeling module 305 is used to perform spectral clustering using fusion features to determine a labeled integrated circuit chip image data set.

[0118] Optionally, the high frequency extraction module 302 is specifically used for:

[0119] Performing a two-dimensional fast Fourier transform on the optimized integrated circuit chip image data set to determine a frequency domain image data set;

[0120] Performing high-pass filtering on the frequency domain image data set based on an adaptive filter to generate a filtered image data set;

[0121] Perform an inverse two-dimensional fast Fourier transform on the filtered image data set and output a high-frequency texture matrix.

[0122] Optionally, a subspace learning objective function includes:

[0123] ;

[0124] In the formula, is the frequency domain low-rank subspace matrix, is the nuclear norm, is the first trade-off parameter, To optimize the integrated circuit chip image dataset, is the high-frequency texture matrix, is the Frobenius norm, is the second trade-off parameter, is the sparse error, is the third trade-off parameter, is the spatial low-rank subspace matrix, is the fourth trade-off parameter, is sparse noise, for Norm.

[0125] Optionally, the training process of the graph neural network includes:

[0126] Obtaining a training frequency domain adjacency matrix and a training spatial domain adjacency matrix associated with a training low-quality integrated circuit chip image data set;

[0127] Perform unit matrix processing on the training frequency domain adjacency matrix to generate the frequency domain unit matrix;

[0128] The training spatial adjacency matrix is ​​processed into a unit matrix to generate a spatial unit matrix;

[0129] Input the frequency domain unit matrix and the spatial domain unit matrix into the graph neural network to be trained for feature extraction, and output the training frequency domain graph embedding features and the training spatial domain graph embedding features;

[0130] The self-supervised loss function value is calculated based on the training frequency domain graph embedding features and the training spatial domain graph embedding features. When the loss function value converges, the trained graph neural network is determined.

[0131] Optionally, the loss function value calculation process includes:

[0132] ;

[0133] ;

[0134] ;

[0135] In the formula, is the loss function value of the frequency domain image embedding feature, For Node , For Node , For the layer, Node for embedding features for frequency domain graphs The embedding Node for embedding features for frequency domain graphs The embedding is the L2 norm, Node for embedding features for frequency domain graphs and nodes The similarity of is the loss function value of the spatial domain graph embedding feature, Nodes for embedding features in the spatial graph The embedding Nodes for embedding features in the spatial graph The embedding Nodes for embedding features in the spatial graph and nodes The similarity of is the self-supervised loss function value.

[0136] Optionally, the process of determining the similarity includes:

[0137] Determine the set of neighboring nodes of each node in the graph embedding feature through the K nearest neighbor algorithm;

[0138] According to the node Is it a node? The neighboring node set of and nodes The similarity.

[0139] An embodiment of the present invention further provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory; when the computer program is executed by the processor, the processor executes the steps of the hardware Trojan data set labeling method of any of the above embodiments.

[0140] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the method for labeling a hardware Trojan data set as described in any of the above embodiments are implemented.

[0141] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the hardware Trojan data set labeling method as described in any of the above embodiments.

[0142] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system and module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0143] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0145] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0147] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for labeling a hardware Trojan dataset, characterized in that: include: Obtain a low-quality integrated circuit chip image dataset for hardware Trojan detection training and perform preprocessing to generate an optimized integrated circuit chip image dataset; Performing high frequency extraction on the optimized integrated circuit chip image data set to determine a high frequency texture matrix; Constructing a subspace learning objective function for optimizing an integrated circuit chip image data set, and using an alternating direction multiplier method to iteratively solve based on the optimized integrated circuit chip image data set and the high-frequency texture matrix to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix; Extract the output frequency domain graph embedding features and the spatial domain graph embedding features based on the frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and the spatial domain adjacency matrix corresponding to the spatial domain low-rank subspace matrix through the trained graph neural network, and then splice them to generate fusion features; The fusion features are used to perform spectral clustering to determine a labeled integrated circuit chip image data set.

2. The method for labeling a hardware Trojan dataset according to claim 1, characterized in that: The step of extracting high frequency from the optimized integrated circuit chip image data set to determine a high frequency texture matrix includes: Performing a two-dimensional fast Fourier transform on the optimized integrated circuit chip image data set to determine a frequency domain image data set; Performing high-pass filtering on the frequency domain image data set based on an adaptive filter to generate a filtered image data set; An inverse two-dimensional fast Fourier transform is performed on the filtered image data set to output a high-frequency texture matrix.

3. The method for labeling a hardware Trojan dataset according to claim 1, characterized in that: The subspace learning objective function includes: ; In the formula, is the frequency domain low-rank subspace matrix, is the nuclear norm, is the first trade-off parameter, To optimize the integrated circuit chip image dataset, is the high-frequency texture matrix, is the Frobenius norm, is the second trade-off parameter, is the sparse error, is the third trade-off parameter, is the spatial low-rank subspace matrix, is the fourth trade-off parameter, is sparse noise, for Norm.

4. The method for labeling a hardware Trojan dataset according to claim 1, characterized in that: The training process of the graph neural network includes: Obtaining a training frequency domain adjacency matrix and a training spatial domain adjacency matrix associated with a training low-quality integrated circuit chip image data set; Performing unit matrix processing on the training frequency domain adjacency matrix to generate a frequency domain unit matrix; Performing unit matrix processing on the training spatial adjacency matrix to generate a spatial unit matrix; Input the frequency domain unit matrix and the spatial domain unit matrix into the graph neural network to be trained for feature extraction, and output training frequency domain graph embedding features and training spatial domain graph embedding features; A self-supervised loss function value is calculated based on the training frequency domain graph embedding features and the training spatial domain graph embedding features, and when the loss function value converges, a trained graph neural network is determined.

5. The method for labeling a hardware Trojan dataset according to claim 4, characterized in that: The calculation process of the loss function value includes: ; ; ; In the formula, is the loss function value of the frequency domain image embedding feature, For Node , For Node , For the layer, Node for embedding features for frequency domain graphs The embedding Node for embedding features for frequency domain graphs The embedding is the L2 norm, Node for embedding features for frequency domain graphs and nodes The similarity of is the loss function value of the spatial domain graph embedding feature, Nodes for embedding features in the spatial graph The embedding Nodes for embedding features in the spatial graph The embedding Nodes for embedding features in the spatial graph and nodes The similarity of is the self-supervised loss function value.

6. The method for labeling a hardware Trojan dataset according to claim 5, characterized in that: The process of determining similarity includes: Determine the set of neighboring nodes of each node in the graph embedding feature through the K nearest neighbor algorithm; According to the node Is it a node? The neighboring node set of and nodes The similarity.

7. A hardware Trojan dataset annotation system, characterized in that: include: A data preprocessing module is used to obtain and preprocess a low-quality integrated circuit chip image dataset for hardware Trojan detection training to generate an optimized integrated circuit chip image dataset; A high-frequency extraction module, used to perform high-frequency extraction on the optimized integrated circuit chip image data set to determine a high-frequency texture matrix; A subspace learning module is used to construct a subspace learning objective function for optimizing the integrated circuit chip image data set, and use an alternating direction multiplier method to iteratively solve based on the optimized integrated circuit chip image data set and the high-frequency texture matrix to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix; A graph feature extraction module is used to extract the output frequency domain graph embedding features and the spatial domain graph embedding features based on the frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and the spatial domain adjacency matrix corresponding to the spatial domain low-rank subspace matrix through a trained graph neural network, and then splice them to generate fusion features; The clustering and annotation module is used to perform spectral clustering using the fusion features to determine annotated integrated circuit chip image data set.

8. A computer device, characterized in that: It includes a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the hardware Trojan data set labeling method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method for labeling a hardware Trojan data set as described in any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method for labeling a hardware Trojan data set as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Image classification acceleration method and device based on frequency domain decomposition neural network

    CN115240007A

  • Pet image reconstruction method based on swin-transformer regularization

    WO2024011797A1