A hardware trojan dataset labeling method and system

By preprocessing and extracting high-frequency textures from low-quality integrated circuit chip image datasets, combined with subspace learning and graph neural networks, high-precision labeling of hardware Trojan datasets was achieved, solving the problem of low labeling accuracy and improving detection accuracy.

CN119888742BActive Publication Date: 2025-10-24GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing hardware Trojan detection and verification methods rely on the correct annotation of high-quality image datasets, which leads to low annotation accuracy during the data annotation process and affects detection accuracy.

Method used

By obtaining a low-quality integrated circuit chip image dataset for preprocessing, extracting the high-frequency texture matrix, constructing the subspace learning objective function, using the alternating direction multiplier method for iterative solution, and combining the graph neural network to extract frequency domain and spatial domain features, and perform spectral clustering annotation.

Benefits of technology

Effectively suppress the impact of noise, maintain high-precision feature extraction, improve the accuracy of data set annotation, and enhance the accuracy and reliability of hardware Trojan detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888742B_ABST
    Figure CN119888742B_ABST
Patent Text Reader

Abstract

The application discloses a hardware Trojan dataset labeling method and system, relates to the technical field of data labeling, and comprises the following steps: high-frequency extraction is performed on an optimized integrated circuit chip image dataset generated by preprocessing a low-quality integrated circuit chip image dataset to determine a high-frequency texture matrix; an alternating direction multiplier method is adopted to iteratively solve a subspace learning objective function about the optimized integrated circuit chip image dataset based on the optimized integrated circuit chip image dataset and the high-frequency texture matrix to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix; a fusion feature is output 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 through a trained graph neural network; and spectral clustering is performed on the fusion feature to determine a labeled integrated circuit chip image dataset. The method can effectively suppress the noise of the low-quality integrated circuit chip image dataset and help improve the labeling correctness of the dataset.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data labeling, in particular to a hardware Trojan dataset labeling method and system. BACKGROUND

[0002] With the increasing expansion of the semiconductor market, the demand for reliability verification in the semiconductor industry has reached a new peak, and the common defect objects in reliability verification mainly include unintentional defects and malicious hardware Trojan (HT). Unintentional defects may be caused by immature process, such as solder shift and stain caused by low yield or poor processing environment. Compared with unintentional defects, malicious hardware Trojan is intentionally implanted, which may cause security vulnerabilities such as leaking secret information. It can be introduced in the design and manufacturing of integrated circuits (IC), so hardware Trojan detection and verification has become one of the core steps in chip design and production process.

[0003] The current hardware Trojan detection and verification method mainly identifies abnormal behavior or hidden malicious modification in hardware design by training a hardware Trojan detection model. Traditional machine learning algorithms based on feature extraction are used, such as support vector machine (SVM), decision tree (DT), random forest (RF), etc., or deep learning models such as convolutional neural network (CNN) and recurrent neural network (RNN) are used. Various features in hardware design (such as power consumption mode, timing behavior, electromagnetic leakage, etc.) are analyzed. Overall, the advantage of machine learning method is that it can automatically identify and detect potential hardware Trojan through a large amount of data training, and has strong generalization ability. However, in the process of proposing such verification method, its effectiveness mainly comes from the labeled image dataset used for model training. However, in practical application, due to the influence of device precision and environmental interference, it is difficult to obtain high-quality images, and the problems of noise interference and fuzzy distortion of images in the data labeling process can easily weaken the labeling reliability, resulting in low hardware Trojan detection and verification accuracy. SUMMARY

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

[0005] The first aspect of the present application provides a hardware Trojan dataset labeling method, 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 dataset to determine a high-frequency texture matrix;

[0008] constructing a subspace learning objective function with respect to the optimized integrated circuit chip image dataset, and iteratively solving based on the optimized integrated circuit chip image dataset and the high-frequency texture matrix by using an alternating direction multiplier method to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix;

[0009] extracting output frequency domain graph embedding features and spatial domain graph embedding features 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 by using the trained graph neural network, and then splicing the fusion features to generate a fusion feature;

[0010] performing spectral clustering on the fusion feature to determine a labeled integrated circuit chip image dataset.

[0011] Optionally, the high-frequency extraction on the optimized integrated circuit chip image dataset to determine a high-frequency texture matrix comprises:

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

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

[0014] performing inverse two-dimensional fast Fourier transform on the filtered image dataset to output a high-frequency texture matrix.

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

[0016] ;

[0017] wherein, is a frequency domain low-rank subspace matrix, is a nuclear norm, is a first trade-off parameter, is an optimized integrated circuit chip image dataset, is a high-frequency texture matrix, is a Frobenius norm, is a second trade-off parameter, is a sparse error, is a third trade-off parameter, is a spatial domain low-rank subspace matrix, is a fourth trade-off parameter, is a sparse noise, is a norm.

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

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

[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 domain unit matrix;

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

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

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

[0025] ;

[0026] ;

[0027] ;

[0028] In the formula, is a loss function value of the frequency domain graph embedding features, is an embedding of a node , is an embedding of a node , is a first layer, is an embedding of a node of the frequency domain graph embedding features, is an embedding of a node of the frequency domain graph embedding features, is an L2 norm, is a similarity between a node and a node of the frequency domain graph embedding features, is a loss function value of the spatial domain graph embedding features, is an embedding of a node of the spatial domain graph embedding features, is an embedding of a node of the spatial domain graph embedding features, is an embedding of a node and the similarity of the node , is a self-supervised loss function value.

[0029] Optionally, the similarity determination process comprises:

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

[0031] According to whether the node belongs to the neighboring node set of the node , the similarity of the node and the node is given.

[0032] The second aspect of the present application provides a hardware Trojan dataset labeling system, comprising:

[0033] A data preprocessing module is configured to 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.

[0034] A high-frequency extraction module is configured to perform high-frequency extraction on the optimized integrated circuit chip image dataset to determine a high-frequency texture matrix.

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

[0036] A graph feature extraction module is configured to extract output frequency domain graph embedding features and spatial domain graph embedding features 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 perform splicing to generate a fusion feature.

[0037] A clustering labeling module is configured to perform spectral clustering using the fusion feature to determine a labeled integrated circuit chip image dataset.

[0038] The third aspect of the present application provides a computer device, comprising a memory and a processor, the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the hardware Trojan dataset labeling method according to any one of the above aspects.

[0039] The fourth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed to realize the hardware Trojan dataset labeling method according to any one of the above aspects.

[0040] The fifth aspect of the present application provides a computer program product comprising computer programs / instructions which, when executed by a processor, implement the hardware Trojan dataset labeling method according to any one of the above aspects.

[0041] From the above technical solutions, the present application has the following advantages:

[0042] The above-mentioned scheme of the present application provides a hardware Trojan dataset labeling method, which comprises: obtaining a low-quality integrated circuit chip image dataset for hardware Trojan detection training and performing preprocessing to generate an optimized integrated circuit chip image dataset; performing high-frequency extraction on the optimized integrated circuit chip image dataset to determine a high-frequency texture matrix; constructing a subspace learning objective function about the optimized integrated circuit chip image dataset, and iteratively solving based on the optimized integrated circuit chip image dataset and the high-frequency texture matrix using an alternating direction multiplier method 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 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 through a trained graph neural network, and then splicing to generate a fusion feature; performing spectral clustering using the fusion feature to determine a labeled integrated circuit chip image dataset. Based on the above-mentioned scheme, for the low-quality integrated circuit chip image dataset for hardware Trojan detection training, the influence of noise on the result can be effectively suppressed, high-precision feature extraction and analysis can be maintained, and the embedding representation of a node learned by the graph neural network can be used as the basis for spectral clustering, which helps to improve the correctness of dataset labeling. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0044] Figure 1 A step flow chart of a hardware Trojan dataset labeling method provided for an embodiment of the present application;

[0045] Figure 2 A data flow conversion schematic diagram of a hardware Trojan dataset labeling method provided for an embodiment of the present application;

[0046] Figure 3 A structural block diagram of a hardware Trojan dataset labeling system provided for an embodiment of the present application. DETAILED DESCRIPTION

[0047] The embodiment of the present application provides a hardware Trojan dataset labeling method and system, and aims 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 the effectiveness of the hardware Trojan detection model mainly comes from the labeled image dataset used for model training, but the labeling correctness in the data labeling process depends on high-quality images, resulting in low labeling correctness.

[0048] In order to make the invention purpose, features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the following described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0049] Please refer to Figure 1 , Figure 1 The embodiment of the present application provides a hardware Trojan dataset labeling method.

[0050] The hardware Trojan dataset labeling method provided by the present application comprises:

[0051] Step 101, obtaining a low-quality integrated circuit chip image dataset for hardware Trojan detection training and 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, and the low-quality integrated circuit chips with hardware Trojans and the low-quality integrated circuit chips without hardware Trojans can be image collected by a low-precision image collection device such as a low-cost ordinary microscope camera to form the low-quality integrated circuit chip image dataset.

[0053] Compared with obtaining high-quality images by high-precision image acquisition devices such as electron microscopes (SEM) using a narrow focus high-energy electron beam to scan image elements from left to right and from top to bottom on a chip sample at one time, due to the fact that low-precision image acquisition devices usually have smaller sensors, which makes them less sensitive when capturing light, and the instability of the temperature and light source of the acquisition environment can cause changes in the signal-to-noise ratio (SNR), and low SNR images often contain various noises such as white noise and Gaussian noise, and if uploaded to the server, multiplicative noise may also be introduced due to the non-ideal channel, resulting in the generated image quality may not be as good as that of high-precision image acquisition devices, however, the widespread use and easy accessibility of low-precision image acquisition devices enable large-scale data collection in different environments and conditions, and through subsequent processing steps we can still extract valuable information;

[0054] The low-quality integrated circuit chip image dataset is preprocessed to obtain an optimized integrated circuit chip image dataset to be labeled, the preprocessing includes operations such as grayscale and histogram equalization, aiming 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 to a grayscale image, the purpose is to simplify the calculation, remove color information, reduce data complexity, while maintaining the structural features of the image, facilitating subsequent processing and analysis; this operation compresses the three-channel information of the RGB color model into a single luminance value by applying a weighted average to each pixel point, the formula for grayscale is: , in which, 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 grayscale 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 be uniformly distributed, thereby enhancing the details of low-contrast areas and effectively enhancing the distinguishability 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, for an input image , the calculation process of the output image after histogram equalization is: , in which, is the cumulative distribution function, is the number of grayscale levels.

[0057] Step 102, high-frequency extraction is performed on the optimized integrated circuit chip image dataset 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 dataset based on an adaptive filter to generate a filtered image dataset;

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

[0062] It should be noted that this embodiment performs high-frequency extraction on the optimized integrated circuit chips in the optimized integrated circuit chip image dataset 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 includes multiple 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 area 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, the high-frequency texture components of the image are calculated using a combination of two-dimensional fast Fourier transform (2D FFT) and adaptive filters for subsequent fusion: First, the integrated circuit chip image dataset is optimized No. Zhang 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 dataset is high-pass filtered by an adaptive filter to filter useful information and remove noise in the frequency domain. After generating the filtered image dataset, 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] Where, is the pixel coordinate of the spatial domain, 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 a specific implementation, the adaptive filter can be a least mean square (LMS) filter, which is widely used in noise suppression, echo cancellation and other tasks in signal processing. It adjusts the coefficients of the filter by minimizing the mean square error of the error signal, which is expressed as: Assuming that the input signal contains 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 , where , is a step factor, is an error signal. By continuously iterating and updating, the output signal of the filter eventually approaches the target ideal high-frequency signal and suppresses the low-frequency noise.

[0067] Step 103, construct a subspace learning objective function for optimizing the integrated circuit chip image dataset, and use the alternating direction multiplier method to iteratively solve based on the optimized integrated circuit chip image dataset 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 the present embodiment utilizes a subspace learning algorithm to fuse the information characteristics of the high-frequency texture and the low-rank representation of the optimized integrated circuit chip image, to determine 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 an image feature containing complete spectral information;

[0069] For the subspace learning algorithm, due to the difference in noise structure, the Frobenius norm, norm and norm can be used to measure the difference between clean data and original data, and a unique representation is learned by simultaneously minimizing each different metric; in the present embodiment, in order to introduce the knowledge of the high-frequency texture matrix , 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 weighting parameter, is the optimized integrated circuit chip image dataset, is the high-frequency texture matrix, is the Frobenius norm, is a second trade-off parameter, is a third trade-off parameter, is a low-rank subspace matrix in spatial domain, is a fourth trade-off parameter, is a sparse noise, is 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 the sparse term (including noise, etc.) constrained by ; in the iterative solving process, by fusing the knowledge of each aspect, a unique representation based on frequency domain knowledge and a representation based on spatial domain knowledge can be learned, and in the processing operation, due to the non-convexity of the rank function, the solution can not be unique, as a common practice in the rank minimization problem, the operation is usually relaxed by a convex nuclear norm, which can be written as a minimization problem, so as to obtain the subspace learning target function, including:

[0073] ;

[0074] wherein, is the nuclear norm, is a 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 will learn knowledge from the high-frequency texture component in the iteration process, and the spatial domain low-rank subspace matrix will learn knowledge from the spatial domain in the iteration process, and the learning result will seek a balance while adjusting the trade-off parameters, and the learning result will seek a balance while adjusting the trade-off parameters ~ The knowledge in the frequency domain is brought into the spatial domain algorithm, and the interference of the noise is better resisted.

[0076] Step 104, the output frequency domain graph embedding features and the spatial domain graph embedding features are extracted 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, and then the fusion features are generated by splicing.

[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), thereby obtaining a fusion feature containing a topological graph structure to facilitate subsequent spectral clustering. This is because GNN can efficiently model the complex relationships between nodes, integrate information from different perspectives through a 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 training, 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, we first construct 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. The construction process is as follows:

[0079] ;

[0080] ;

[0081] Where, 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 first The node embedding of the layer is the frequency domain graph embedding feature, The first 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 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 fused into a unified representation by splicing: , where It means splicing on the embedding dimension of the node, which means connecting the embedding vector 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 one specific embodiment, the training process of the graph neural network comprises:

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

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

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

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

[0088] Calculating a self-supervised loss function value based on the training frequency domain graph embedding features and the training spatial domain graph embedding features, and determining the trained graph neural network when the loss function value converges.

[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 dataset, the training frequency domain adjacency matrix and the training spatial adjacency matrix are determined according to the steps of steps 101 to 104. At this time, in order to help initialize the graph neural network to be trained, the frequency domain unit matrix and the spatial domain unit matrix corresponding to the training frequency domain adjacency matrix and the training spatial adjacency matrix are constructed as the training input of the graph neural network. For the first graph represented by the frequency domain unit matrix, there are , and for the second graph represented by the spatial adjacency matrix, there are Then, the network can learn the embedding representation of the nodes by the self-supervised learning method according to the update rule in the graph neural network.

[0090] Under unsupervised conditions, we want to design a self-supervised learning goal to let the GNN learn the structure information of the graph. In the clustering task, the common self-supervised goal is to let similar nodes have similar representations in the embedding space and be far away from dissimilar nodes. Therefore, in the training process, we hope that similar nodes are close to each other in the embedding space, and different nodes should have a farther distance. This goal can be achieved by a self-supervised loss, so the calculation process of the loss function value includes:

[0091] ;

[0092] ;

[0093] ;

[0094] wherein, is a loss function value of the frequency domain graph embedding feature, is a node , is a node , is the i-th layer, is an embedding of a node of the frequency domain graph embedding feature, is an embedding of a node of the frequency domain graph embedding feature, is an L2 norm, is a similarity between a node and a node of the frequency domain graph embedding feature, is a loss function value of the spatial domain graph embedding feature, is an embedding of a node of the spatial domain graph embedding feature, is an embedding of a node of the spatial domain graph embedding feature, is a similarity between a node and a node of the spatial domain graph embedding feature, is a self-supervised loss function value;

[0095] In a more specific embodiment, the similarity between a node and a node may be generally defined by an adjacency matrix, by performing a KNN algorithm on the adjacency matrix, and selecting a suitable K value to determine and The determination process of the similarity includes: determining a set of adjacent nodes of each node in the graph embedding feature by a K nearest neighbor algorithm; and assigning a similarity between a node and a node according to whether the node belongs to the set of adjacent nodes of the node , such as assigning a similarity of 1 when the node belongs to the set of adjacent nodes of the node , and assigning a similarity of 0 otherwise.

[0096] Finally, a convergence judgment is performed on the loss function value, and if the loss function value does not converge, a gradient descent algorithm such as an Adam optimizer is used to optimize the weight matrix and to minimize the loss function value, thereby determining a trained graph neural network.

[0097] Step 105, performing spectral clustering on the integrated circuit chip image data set using the fused features to determine the integrated circuit chip image data set.

[0098] It should be noted that in this embodiment, spectral clustering is used to partition data based on the learned fusion features with cluster knowledge to complete the data set annotation, providing a more reliable data foundation for subsequent verification tasks, which 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 similarity matrix:

[0100] ;

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

[0102] ;

[0103] Where, 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 dataset into data with and without Trojans, completing the 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 are collected by using a low-precision camera, each set covering images of different types of integrated circuit chips with and without hardware Trojan, and a plurality of clustering schemes are used for clustering labeling of the data sets: 1) “Ncut” (normalized cut), “Kmeans” (K-means) and “SSC” (sparse subspace clustering) are directly used for clustering methods corresponding to them, 2) “HFLRS” refers to steps including two-dimensional fast Fourier transform based on Butterworth filter, subspace learning and spectral clustering, 3) “The scheme (Butterworth filter)” refers to steps including two-dimensional fast Fourier transform based on Butterworth filter, subspace learning and spectral clustering of graph neural network processing, 4) “The scheme” refers to steps of two-dimensional fast Fourier transform based on Butterworth filter, subspace learning and spectral clustering of graph neural network processing; according to the results of the index ACC according to the above clustering scheme, the clustering labeling effect of the scheme is relatively optimal.

[0110] In the embodiment of the application, for the low-quality integrated circuit chip image data set used for hardware Trojan detection training, the influence of noise on the result can be effectively suppressed, high-precision feature extraction and analysis can be maintained, and the embedding representation of the node is learned by combining the graph neural network as the basis of spectral clustering, so that it performs more stably in a complex environment, even in low-quality or noisy image data, reliable labeling results can still be obtained, and the image acquisition process is more economical and efficient, reduces the experimental cost, and also improves the popularization and practical application potential of the algorithm.

[0111] Please refer to Figure 3 , Figure 3 The structure block diagram of a hardware Trojan data set labeling system provided by the embodiment of the application is shown in FIG. 1.

[0112] The hardware Trojan data set labeling system provided by the application comprises:

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

[0114] The high-frequency extraction module 302 is configured 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 configured to construct a subspace learning objective function for optimizing the integrated circuit chip image dataset, and iteratively solve the subspace learning objective function based on the optimized integrated circuit chip image dataset and the high-frequency texture matrix by using an alternating direction multiplier method, to determine a frequency domain low-rank subspace matrix and an empty domain low-rank subspace matrix.

[0116] The graph feature extraction module 304 is configured to extract output frequency domain graph embedding features and empty domain graph embedding features based on a frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and an empty domain adjacency matrix corresponding to the empty domain low-rank subspace matrix, and then splice the frequency domain graph embedding features and the empty domain graph embedding features to generate a fusion feature.

[0117] The clustering labeling module 305 is configured to perform spectral clustering on the fusion feature to determine a labeled integrated circuit chip image dataset.

[0118] Optionally, the high-frequency extraction module 302 is specifically configured to:

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

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

[0121] perform inverse two-dimensional fast Fourier transform on the filtered image dataset to output the high-frequency texture matrix.

[0122] Optionally, the subspace learning objective function comprises:

[0123] ;

[0124] wherein, the frequency domain low-rank subspace matrix is the nuclear norm is the first trade-off parameter is the optimized 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 empty domain low-rank subspace matrix is the fourth trade-off parameter is the sparse noise is is the norm.

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

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

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

[0128] Perform unit matrix processing on the training spatial adjacency matrix to generate a spatial domain unit matrix;

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

[0130] Calculate a self-supervised loss function value based on the training frequency domain graph embedding features and the training spatial domain graph embedding features, and when the loss function value converges, determine the trained graph neural network.

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

[0132] ;

[0133] ;

[0134] ;

[0135] In the formula, is a loss function value of the frequency domain graph embedding features, is an embedding of a node , is an embedding of a node , is a first layer, is an embedding of a node of the frequency domain graph embedding features, is an embedding of a node of the frequency domain graph embedding features, is an L2 norm, is a similarity between a node and a node of the frequency domain graph embedding features, is a loss function value of the spatial domain graph embedding features, is an embedding of a node of the spatial domain graph embedding features, is an embedding of a node of the spatial domain graph embedding features, is a similarity between a node and a node of the spatial domain graph embedding features, is a self-supervised loss function value.

[0136] Optionally, the similarity determination process comprises:

[0137] determining a set of neighboring nodes of each node in the graph embedding feature by a K-Nearest Neighbor algorithm;

[0138] assigning a similarity between the node and the node according to whether the node belongs to the set of neighboring nodes of the node .

[0139] The embodiment of the present application further provides a computer device, comprising a memory and a processor, and the memory stores a computer program; the computer program is executed by the processor, so that the processor executes the steps of the hardware Trojan dataset labeling method according to any one of the above-mentioned embodiments.

[0140] The embodiment of the present application further provides a computer readable storage medium, which stores a computer program / instruction, and the computer program / instruction is executed by a processor to realize the steps of the hardware Trojan dataset labeling method according to any one of the above-mentioned embodiments.

[0141] The embodiment of the present application further provides a computer program product, which comprises a computer program / instruction, and the computer program / instruction is executed by a processor to realize the steps of the hardware Trojan dataset labeling method according to any one of the above-mentioned 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-mentioned system and module can refer to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0143] In several embodiments provided in the present application, it should be understood that the disclosed system and method 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, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, device or unit, and can be electrical, mechanical or other forms.

[0144] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on a plurality of network units. According to actual needs, part or all of the units can be selected to achieve the purpose of the embodiment scheme.

[0145] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0146] When the integrated unit is realized in the form of a software function 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 solutions of the present application or the entire or part of the technical solutions that essentially contribute to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0147] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for labeling a hardware Trojan dataset, characterized in that, The method comprises the following steps: acquire a low-quality integrated circuit chip image dataset for hardware Trojan detection training and pre-process it to generate an optimized integrated circuit chip image dataset; extract high frequencies from the optimized integrated circuit chip image dataset to determine a high-frequency texture matrix; construct a subspace learning objective function for the optimized integrated circuit chip image dataset, and iteratively solve it based on the optimized integrated circuit chip image dataset and the high-frequency texture matrix using an alternating direction multiplier method to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix; extract output frequency domain graph embedding features and spatial domain graph embedding features 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 using a trained graph neural network, and then splice them to generate a fusion feature; perform spectral clustering using the fusion feature to determine a labeled integrated circuit chip image dataset; the subspace learning objective function comprises: ; wherein is a frequency domain low-rank subspace matrix, is a nuclear norm, is a first trade-off parameter, is to optimize integrated circuit chip image dataset, is a high-frequency texture matrix, is a Frobenius norm, is a second trade-off parameter, is a sparse error, is a third trade-off parameter, is a spatial domain low-rank subspace matrix, is a fourth trade-off parameter, is a sparse noise, is a norm.

2. The hardware Trojan dataset labeling method of claim 1, wherein, the step of extracting high frequencies from the optimized integrated circuit chip image dataset to determine a high-frequency texture matrix comprises: perform two-dimensional fast Fourier transform on the optimized integrated circuit chip image dataset to determine a frequency domain image dataset; perform high-pass filtering on the frequency domain image dataset based on an adaptive filter to generate a filtered image dataset; perform inverse two-dimensional fast Fourier transform on the filtered image dataset to output a high-frequency texture matrix.

3. The hardware Trojan dataset labeling method of claim 1, wherein, The training process of the graph neural network comprises: acquire a training frequency domain adjacency matrix and a training spatial domain adjacency matrix associated with a training low-quality integrated circuit chip image dataset; perform unit matrix processing on the training frequency domain adjacency matrix to generate a frequency domain unit matrix; perform unit matrix processing on the training spatial domain adjacency matrix to generate a spatial domain unit matrix; input the frequency domain unit matrix and the spatial domain unit matrix into the graph neural network to be trained to extract features and output training frequency domain graph embedding features and training spatial domain graph embedding features; calculate a self-supervised loss function value based on the training frequency domain graph embedding features and the training spatial domain graph embedding features, and determine a trained graph neural network when the loss function value converges.

4. The hardware Trojan dataset labeling method of claim 3, wherein, The calculation process of the loss function value comprises: ; ; ; wherein, is a loss function value for the frequency domain graph embedding features, is a node , is a node , is a node in the i-th layer, is an embedding of a node of the frequency domain graph embedding features, is an embedding of a node of the frequency domain graph embedding features, is an L2 norm, is a similarity between a node and a node of the frequency domain graph embedding features, is a loss function value for the spatial domain graph embedding features, is an embedding of a node of the spatial domain graph embedding features, is an embedding of a node of the spatial domain graph embedding features, is a similarity between a node and a node of the spatial domain graph embedding features, is a self-supervised loss function value.

5. The hardware Trojan dataset labeling method of claim 4, wherein, the determination process of the similarity comprises: determine a set of neighboring nodes of each node in the graph embedding features using a K-nearest neighbor algorithm; According to the node whether it belongs to the adjacent node set of the node , the similarity between the node and the node is given. 6.A hardware Trojan dataset annotation system, characterized in that, The method comprises the following steps: a data pre-processing module is configured to acquire a low-quality integrated circuit chip image dataset for hardware Trojan detection training and pre-process it to generate an optimized integrated circuit chip image dataset; a high-frequency extraction module is configured to extract high frequencies from the optimized integrated circuit chip image dataset to determine a high-frequency texture matrix; a subspace learning module is configured to construct a subspace learning objective function for the optimized integrated circuit chip image dataset, and iteratively solve it based on the optimized integrated circuit chip image dataset and the high-frequency texture matrix using an alternating direction multiplier method to determine a frequency domain low-rank subspace matrix and a spatial domain low-rank subspace matrix; a graph feature extraction module, configured to extract output frequency domain graph embedding features and space domain graph embedding features based on a frequency domain adjacency matrix corresponding to the frequency domain low-rank subspace matrix and a space domain adjacency matrix corresponding to the space domain low-rank subspace matrix through the trained graph neural network, and then splice the two types of features to generate fusion features; a clustering labeling module, configured to perform spectral clustering on the fusion features to determine a labeled integrated circuit chip image dataset; the subspace learning objective function comprises: ; wherein is a frequency domain low-rank subspace matrix, is a nuclear norm, is a first trade-off parameter, is to optimize integrated circuit chip image dataset, is a high-frequency texture matrix, is a Frobenius norm, is a second trade-off parameter, is a sparse error, is a third trade-off parameter, is a spatial domain low-rank subspace matrix, is a fourth trade-off parameter, is a sparse noise, is a norm.

7. A computer device, characterized by a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to make the processor execute the steps of the hardware Trojan dataset labeling method according to any one of claims 1-5.

8. A computer readable storage medium having stored thereon computer programs / instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps of the hardware Trojan dataset labeling method according to any one of claims 1-5.

9. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps of the hardware Trojan dataset labeling method according to any one of claims 1-5.

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