## 4 Experimental Study
### Data Preparation  
In the implementation, we chose to use simulated samples obtained by processing high-quality images from the real world due to several reasons. First of all, it is hard to access sufficient quantities of the desired low-resolution equipment. Secondly, the high-quality image used in this experiment was taken by a scanning electron microscope, meaning that it should be able to represent the highest-quality chip image. Therefore, the down-sampling of high-quality images in different proportions is effective for simulating different conditions for low-resolution devices. In addition, the simultaneous interpreting of different sizes and intensities of the image is used to simulate the sizes of different sensors, because the size of the sensor is positively correlated with the signal-to-noise ratio (SNR). Based on the above discussion, we entrusted an authoritative research institution, named the Science and Technology on Reliability Physics and Application of Electronic Component Laboratory, with the high-quality chip images scanned by an electron microscope. Based on the principle of confidentiality of information and the frequency with which the chip was attacked, the research institution provided a real image of the chip. Figure 1 shows a general view of this chip.  
There was one more major processing step before we proceeded with the clustering experiment, which was histogram equalization. This method is generally utilized to increase the global contrast of images, especially when the contrast of the valid data of the image is quite close. Through this method, the brightness can be better distributed on the histogram. In the actual production process, it is difficult to obtain timely and high-quality chip images to analyze whether there are hardware Trojans and defects, which are caused by equipment accuracy, environmental interference, and operation error. In order to solve the above shackles, different partial views of the chip can be scanned multiple times through a low-precision lens, and all partial views can be reassembled into a complete chip image.  
When obtaining experimental data, the low-quality image would be simulated through the following three steps. First, we divided the full-view pictures into several parts and further controlled the resolution by reducing the sampling proportionally. Secondly, the defects of different sizes and numbers extracted from real chip images were covered on the simulated data samples. Lastly, we added different strengths of Gaussian noise, salt-and-pepper noise, and multiplicative noise to simulate environmental interference. Figure 2 presents a part of the simulated low-quality images of ICs. In this experiment, a complete chip image would be divided into 12 parts, and each part would be divided into 10 categories by adding defective blocks at random locations and the same noise intensity. Therefore, the dataset size of this experiment was 10 categories and 120 samples in total.  
Next is the explanation of the noise parameters. \"Gaussian 0.1\" means adding Gaussian white noise, where the mean value is 0.1 and the variance is 0.01 by default. \"Multiplicative noise 0.1\" means adding multiplicative noise using equation \(J=I+n*I\), where I is the original image and N is the uniformly distributed random noise with a mean value of 0 and variance of 0.1 by default. The range of the mean and variance parameters of Gaussian noise and multiplicative noise types is [0, 1]. \"Salt-and-Pepper 0.1\" means adding salt and pepper noise, where 0.1 is the noise density, which means it will affect about \(0.1*numel(I)\) pixels.  
Figure 1: A scanning electron microscope image of the chip with a resolution of \(6960\times 5084\).  
Figure 2: Data samples corrupted by Gaussian noise with two different types of intensities and simulated defects. (**a**) sample a; (**b**) sample b.