{'fraction_non_alphanumeric': 0.024184016728793528, 'fraction_numerical': 0.008818983543958542, 'mean_word_length': 4.801687763713081, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Test Set Optimization by Machine Learning Algorithms

Diagnosis results are highly dependent on the volume of test set. To derive the most efficient test set, we propose several machine learning based methods to predict the minimum amount of test data that produces relatively accurate diagnosis. By collecting outputs from failing circuits, the feature matrix and label vector are generated, which involves the inference information of the test termination point. Thus we develop a prediction model to fit the data and determine when to terminate testing. The considered methods include LASSO and Support Vector Machine(SVM) where the relationship between goals(label) and predictors(feature matrix) are considered to be linear in LASSO and nonlinear in SVM. Numerical results show that SVM reaches a diagnosis accuracy of 90.4% while deducting the volume of test set by 35.24%.


I. INTRODUCTION
The process of determining the cause of a failing integrated circuit (IC) is known as failure analysis. The main purpose of this diagnosis is to detect the location of the failure, such as to mitigate the effects based on a specific reconfiguration of the system and to recover from the identified fault with the component's corrupted state healed or fixed. In these ways, the failure analysis is always operated off-line during normal working time while beginning from the initial assumption.
The increase cost of this analysis is known as one of the most significant problems in testing a failing chip. The major reason is a large sum of test vectors are needed for large scale circuits test which results in increasing tester memory space, application time, and hence the total cost. The mechanism to find redundant vectors is to create a fault detection table that contains the detection information of all faults detected by each test vector. Various compaction techniques have been proposed by numerous research papers to reduce the cost of test vectors, for example, Brain and Tracy presented a new dictionary organization which concentrate on reducing the size by managing the organization and encoding of the dictionary [1].
However, only a few research works focus on reducing the number of test vectors to reduce the cost of test data storage. The prior work has already shown that a high-volume test data does not mean high accuracy of test output, in other words, the increasing test data volume may not help to improve the diagnosis result [2]. On the other hand, reducing the test data volume could contribute to a lower cost and allow a reduction in the size of the fault dictionary, which is an important method for fault diagnosis [3].
In this paper, we propose algorithms to reduce diagnostic test vectors for circuits. Linear regression is regarded as one of the most frequently used and well-known statistical models that could be used to solve the problems mentioned above. Regression analysis represents a linear approach to model the relationship between dependent variables and independent variables. By finding the linear model between goals and predictors, it is possible to predict the output values for some specific inputs. Least square is the most important part of the linear regression model which provides the approximation solution for an over-determined system by minimizing the sum of the squares of the residuals [4]. In order to find the most reasonable linear relationship impacted by the related explanatory variables, a penalty term is usually added to lower the impact of related variables.
However, the real relationship between goals and predictors tends to be complex or at least nonlinear. Thus in this work, we use a well-behaved nonlinear model, support vector machines (SVMs) to capture the relationship between circuit testing results and the test termination point. SVM was proposed by Vapnik and his fellows in the 1990s and was applied to analyze data used for classification and regression analysis. Given a set of training examples, a classification model that assigns examples into different categories is generated by mapping the input data into a higher dimensional space and constructing an optimal separating hyper-plane [5]. To perform non-linear classification efficiently, different kernel functions are adopted in the algorithm, which implicitly map their inputs into highdimensional feature spaces. Hence, in our work, testing data from real circuits are collected and by extracting specific expressive features, the input data matrix of machine learning algorithms is generated. After performing linear regression and SVM models on such input, the termination point is constructed and the performance of such algorithms is discussed.

II. RELATED WORK
Machine learning is integrated into hardware testing by Tang et al. [6]. Since then, it has become more involved in this field. arXiv:2010.15240v1 [cs.
LG] 28 Oct 2020 The study of Laura Isabel [7] shows the potential of machine learning for gathering useful and useless information in logical analysis and making use of it. A number of related studies of Machine Learning based on hardwares are beginning to emerge. Cheng et al. [8] shows that using machine learning method can greatly reduce testing time and cost to accelerate locating systematic defect identification comparing to the physical failure analysis(PFA). Gómez et al. [9] provides a method to classify different defects. Nelson et al. [10] and Wang et al. [11] works on volume diagnosis by applying decision forest algorithm to locate bridge defects and stuckat errors respectively. Moreover, Huang et al. [12] provides a novel method to find out the meaningful fail log of the circuit which can make industrialized testing more efficient. Similarly, Wang et al. [2] demonstrated a method to reduce the test volume by applying machine learning techniques including linear regression, k-nearest neighbor, support vector machines, and decision tree. Afterwards, Gomez et al. [13] showed that machine learning can not only help address permanent faults, but can also help analysing intermittent faults.
However, different feature extraction processes have a great impact on the performance of machine learning algorithms. The features used in this work has been shown to obtain relatively high performance in reducing the test volume.

A. Data Extraction
For failing circuits, defect responses can be collected, after which the underlying patterns and trends that suggest a termination point for testing are able to be discovered. However, it is difficult to use the collected raw data directly for finding the termination point. Therefore, to create the data matrix X in the fit model, the raw test data is processed and then organized into a set of features that are more readable for a prediction model.
To be specific, suppose that there are n examples(performed tests), an n × 5 feature matrix X and an n × 1 response vector Y are built. Table 1 shows the five features extracted from raw data. We regard the first test case to the first failing test case as the first pattern, the first test case to the second failing  Feature description X(·, 1) Amount of inputs to the circuit X(·, 2) Total number of failing patterns have been applied so far X(·, 3) Index of the first failing pattern detected in this circuit X(·, 4) Index of the this failing pattern detected in this circuit X(·, 5) Index of last failing pattern detected in this circuit

B. Linear Regression
The basic model of linear regression can be expressed as where β is the 5×1 coefficient vector characterizing the linear model and ε is the n×1 residual vector. Specifically, elements in β represents the weights of corresponding features in X to the output Y and ε is generated by the least-square estimation.
To take the model size into consideration, we use LASSO (Least Absolute Shrinkage and Selection) to characterize the relationship between X and Y, where ε has been transferred to X · β − Y 2 2 + α β 2 2 and α β 2 2 is a punish term which can be adjusted by changing the value of tuning parameter α.

C. Supporting Vector Machine
Since the relationship between X and Y is not necessarily linear, supporting vector machines is proposed to characterize such complex nonlinear relationship. To solve this problem, the input data is mapped into a higher dimensional space. By applying Kernel functions, nonlinear problem in the lower dimensional space has been transferred into a linear one and thus an optimal separating hyper-plane can be learned [5]. In our method, logistic regression SVMs with RBF kernel is applied and the cost function could be expressed explicitly as During the training process, the model parameter is learned to minimize the objective function, after which the selected optimal parameter θ is applied to calculate the prediction label y in the testing process.

IV. NUMERICAL RESULTS
In this section, we verify that the machine learning algorithms mentioned above can be performed during test process and reduce the test size while maintaining a high defect detection accuracy.
First, we collect test results from 153 real circuits. Then we calculate the feature matrix X and label Y, which both contain 5427 rows. After dividing them into training and testing sets, linear regression and SVM models are performed to fit the data sources X and Y. The following graphic results are based on the prediction results of the fitted model. Fig.1 provides the accuracy of prediction results under different punishment terms of LASSO algorithm. The figure shows that the smaller α is, the more accurate the prediction results that locates the certain stuck-at defect will be. Generally, the result of linear regression is better than that of LASSO algorithm.  Fig.2 shows how important each feature in X is to the prediction results. As we can see, when α = 0.1, the coordinates of β are all close to 0 and thus does not fit the data well, which is consistent with the performance result in Fig. 1.  For a bigger training set, a higher test classifier score can be achieved, which verifies the accuracy of our algorithms. However, when the size of training set reaches 1080, as the training size increases, the prediction accuracy will not be greatly improved and the highest prediction accuracy is 90.4%, which is much higher than that of the linear regression model. The reason behind this phenomenon is trivial, that is the data collected from real world can be fitted better by a nonlinear model. Moreover, under the premise of maintaining a diagnosis accuracy of 90.4%, the volume of test set has been deducted by 35.24%. In this paper, the diagnosis process has been optimized by reducing the test volume. Different features from the collected test and response data are extracted and machine learning algorithms are performed to characterize the test termination point. After training, SVM has better diagnosis performance than LASSO and reaches an accuracy of 90.4% while deducting the volume of test set by 35.24%.