A wafer defect detection method and system based on image recognition and a storage medium
By constructing a defect analysis space and using image recognition technology, wafer defects are automatically identified and matched with faulty equipment, solving the problem of low efficiency in manual interpretation in existing technologies and improving the accuracy and efficiency of wafer defect analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LVG SEMICON (HUANGSHI) CO LTD
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, wafer defect analysis relies on manual interpretation, which is inefficient and highly subjective. As the complexity of the process increases, the relationship between defect modes and failure causes becomes increasingly complex, making misjudgments more likely.
By constructing a defect analysis space, acquiring wafer surface images, extracting defect coordinates using image recognition technology, constructing a topology network and extracting topology skeleton features, combining spatial frequency domain analysis, matching candidate fault sources in the mechanical motion library, performing inverse trajectory fitting and geometric distance minimization based on kinematic equations, and generating a defect diagnosis report.
It has achieved automated wafer defect identification and faulty equipment matching, improved the confidence of diagnostic results, and reduced misjudgments and production capacity losses caused by manual interpretation.
Smart Images

Figure CN122289130A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wafer inspection technology, specifically relating to a wafer defect detection method, system, and storage medium based on image recognition. Background Technology
[0002] Automated optical inspection equipment is widely used to perform high-resolution scanning of semiconductor wafer surfaces to identify and record the location, size, and type of all microscopic defects. The equipment generates wafer defect maps containing defect coordinates, providing engineers with raw data on product quality. The point cloud distribution on a defect map is not entirely random; its specific spatial patterns are often a direct projection of kinematic anomalies in specific mechanical components within an upstream process equipment. Currently, the analysis of such defect maps relies heavily on manual interpretation by experienced process engineers. Engineers must use their accumulated knowledge to identify visual patterns on the defect map and match these patterns with potential equipment failures. This process is not only inefficient and highly subjective, but also, with increasing process complexity, the relationship between defect patterns and failure causes becomes increasingly intricate, making misjudgment highly likely based solely on human experience. Summary of the Invention
[0003] This invention provides a wafer defect detection method, system, and storage medium based on image recognition to solve the above-mentioned technical problems.
[0004] In a first aspect, the present invention provides a wafer defect detection method based on image recognition, the method comprising the following steps: A defect analysis space is constructed based on a preset set of wafer defect points of the same specifications as the wafer to be inspected, and a mechanical motion library for the process equipment used to process the wafer to be inspected is established. The surface image of the wafer to be inspected is acquired, and the surface defect coordinates of the wafer to be inspected are identified and extracted from the surface image using image recognition. The surface defect coordinates are then mapped to the defect analysis space to generate defect point cloud data. Calculate the spatial distance between any two defect points in the defect point cloud data in the defect analysis space; Based on spatial distance and using the Kruskal algorithm, a topological network connecting all defect points is constructed. By extracting the geometric features of the topological network, a topological skeleton feature representing the defect distribution pattern is generated. The defect point cloud data is transformed to the spatial frequency domain. In the spatial frequency domain, the periodic array features in the defect point cloud data are identified by detecting the peak value of the signal. The corresponding candidate mechanical motion equations are retrieved from the mechanical motion library by combining the topological skeleton features and the periodic array features. The theoretical mechanical trajectory is generated in the defect analysis space by inverse trajectory fitting based on the kinematic equation constraints and the candidate mechanical motion equations. Based on defect point cloud data, and by minimizing the geometric distance residual between the theoretical mechanical trajectory and the actual defect distribution on the surface of the wafer to be inspected, the matching confidence of the actual defect distribution and the candidate mechanical motion equation is calculated. When the matching confidence level meets the preset threshold, a defect diagnosis report for the wafer to be inspected is generated based on the machine component information of the process equipment corresponding to the successfully matched mechanical motion equation.
[0005] Optionally, calculating the spatial distance between any two defect points in the defect point cloud data in the defect analysis space includes the following steps: The geometric center of the defect analysis space is used as the wafer rotation center; For any two defect points in the defect point cloud data, calculate the Euclidean distance between the two defect points and calculate the coordinates of the midpoint of the virtual connecting edge between the two defect points; Construct a radial reference axis pointing from the wafer rotation center to the midpoint coordinates. Project the Euclidean distance onto the radial reference axis to obtain the radial component length, and project the Euclidean distance onto the direction perpendicular to the radial reference axis to obtain the tangential component length. Determine the machine process type of the preceding process of the wafer to be inspected. If the machine process type is a rotary process, set a radial penalty coefficient greater than the preset reference value. If the machine process type is a linear scanning process, set a radial penalty coefficient equal to the preset reference value. The radial component length is weighted and amplified using a radial penalty coefficient. The square root of the sum of the squares of the weighted radial component length and the tangential component length is then used to obtain the spatial distance between the two defect points.
[0006] Optionally, the step of constructing a topological network connecting all defect points based on spatial distance and using the Kruskal algorithm, and generating a topological skeleton feature representing the defect distribution pattern by extracting the geometric features of the topological network, includes the following steps: Based on spatial distance, the Kruskal algorithm is used to sequentially connect the defect points in the defect point cloud data until all defect points are connected to the connected graph without forming closed loops, thus forming an initial topology network. The distribution data of edge lengths of all connected edges in the initial topology network are statistically analyzed, and the truncation threshold is calculated based on the statistical characteristic values of the edge length distribution data. By using a truncation threshold to traverse and cut off the connecting edges in the initial topology network whose side length is greater than the truncation threshold, the initial topology network is decomposed into several locally connected subgraphs. For each locally connected subgraph, the linearity parameter and elongation parameter are calculated by combining the main path of the locally connected subgraph and the node coordinate sequence on the main path. The linearity parameter and elongation parameter are then combined into a topological skeleton feature representing the defect distribution pattern.
[0007] Optionally, the step of calculating the truncation threshold based on the statistical characteristic values of the edge length distribution data of all connected edges in the initial statistical topology network includes the following steps: Construct the histogram distribution of the weights of all connected edges in the initial topology network, and fit the histogram distribution to a probability density function using a Gaussian mixture model; A first peak interval and a second peak interval are identified in the probability density function, wherein the first peak interval represents a greater degree of connectivity than the second peak interval; Determine the probability density minimum point between the first peak interval and the second peak interval, and define the side length of the connecting edge corresponding to the minimum point as the basic split point; Obtain the process resolution of the preceding process steps of the wafer to be inspected, use the process resolution to weight and correct the basic cleavage points, and use the corrected basic cleavage points as the cutoff threshold.
[0008] Optionally, the step of transforming the defect point cloud data to the spatial frequency domain, identifying the periodic array features in the defect point cloud data by detecting signal peaks in the spatial frequency domain, and retrieving the corresponding candidate mechanical motion equations from the mechanical motion library by combining the topological skeleton features and the periodic array features includes the following steps: The defect point cloud data is mapped into a two-dimensional density matrix, and a two-dimensional discrete Fourier transform is performed on the two-dimensional density matrix after applying the Hanning window to transform the density distribution of the two-dimensional density matrix in the spatial domain into a spectral amplitude matrix in the frequency domain. The enhanced spectrum is obtained by performing a logarithmic transformation on the spectral amplitude matrix and applying a high-pass filter to remove non-periodic background noise components. Search for high-frequency bright spots with concentrated energy in the spectrum and calculate the spatial frequency vector and phase angle corresponding to the high-frequency bright spots; The spatial frequency vector is converted into a physical period parameter that characterizes the spacing between defects, and candidate mechanical motion equations with corresponding geometric properties are indexed in the mechanical motion library by combining the physical period parameter, phase angle, and topological skeleton features.
[0009] Optionally, the step of searching for high-frequency bright spots with concentrated energy in the spectrum and calculating the spatial frequency vector and phase angle corresponding to the high-frequency bright spots includes the following steps: Define a reference window that slides on the spectrogram, and a detection unit located at the center of the reference window; Calculate the average noise power of all spectral units within the reference window, excluding the detection unit; A constant false alarm rate threshold is set. If the spectral energy of the detection unit is higher than the average noise power multiplied by the constant false alarm rate threshold, the detection unit is determined to be a signal peak point, and the sub-pixel level coordinates of the signal peak point are calculated using the centroid method. The radial distance and polar angle direction of the signal peak point relative to the zero-frequency center are calculated based on sub-pixel level coordinates, and the radial distance and polar angle direction are respectively analyzed as spatial frequency vector and phase angle.
[0010] Optionally, the step of calculating the matching confidence of the actual defect distribution and the candidate mechanical motion equation based on defect point cloud data and by minimizing the geometric distance residual between the theoretical mechanical trajectory and the actual defect distribution on the surface of the wafer to be inspected includes the following steps: Based on the physical constraints of the process equipment used in the preceding process of the wafer to be tested, the boundary values of the equation parameters in the candidate mechanical motion equations are set, and a set of initial equation parameters are randomly initialized based on the boundary values. Extract the target point set corresponding to the candidate mechanical motion equations from the defect point cloud data; The objective optimization function is constructed based on the sum of the squared normal distances from each point in the target point set to the theoretical mechanical trajectory determined by the initial equation parameters; The initial equation parameters are iteratively updated using the Levenberg-Marquardt nonlinear least squares algorithm until the function value of the objective optimization function converges, thus obtaining the optimal fitting parameters. The optimal fitting parameters are substituted into the candidate mechanical motion equations to generate the optimal mechanical trajectory. The root mean square error of the residuals between the target point set and the optimal mechanical trajectory is calculated, and the normalized root mean square error of the residuals is used as the matching confidence.
[0011] Optionally, the step of iteratively updating the initial equation parameters using the Levenberg-Marquardt nonlinear least squares algorithm until the function value of the objective optimization function converges to obtain the optimal fitting parameters includes the following steps: During the iterative update of the initial equation parameters using the Levonberg-Marquardt nonlinear least squares algorithm, the Jacobian matrix of the objective optimization function relative to the current equation parameters is calculated. The damping factor is dynamically determined based on the current residual value of the objective optimization function; Solve the incremental normal equation containing the Jacobian matrix and damping factor to obtain the update step size of the equation parameters; The current equation parameters are corrected by updating the step size. If the corrected objective function meets the preset convergence accuracy, the iteration stops and the current equation parameters are output as the best-fit parameters. If the corrected objective function does not meet the convergence accuracy, the next iteration will continue.
[0012] In a second aspect, the present invention also provides a wafer defect detection system based on image recognition, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the wafer defect detection method based on image recognition as described in any one of the first aspects.
[0013] Thirdly, the present invention also provides a computer-readable storage medium storing instructions, characterized in that, when executed by a processor, the instructions cause the processor to be configured to perform the image recognition-based wafer defect detection method according to any one of the first aspects.
[0014] The beneficial effects of this invention are: This invention constructs a topological network and extracts its skeleton features to quantitatively describe the macroscopic distribution of defects at a geometric level. Furthermore, by analyzing defect point cloud data in the spatial frequency domain, it can identify spatially recurring defect array features caused by periodic abnormal equipment motion. Then, the macroscopic distribution pattern is combined with microscopic periodic features to match candidate fault source equations from a pre-defined mechanical motion library. Subsequent inverse trajectory fitting based on kinematic equation constraints and geometric distance residual minimization calculations ensure the confidence level of the diagnostic results, thereby achieving the effect of automatically matching faulty equipment after identifying wafer defects. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating a wafer defect detection method based on image recognition in one embodiment of this application.
[0016] Figure 2 This is a schematic diagram of wafer defects generated by a rotary process in one embodiment of this application.
[0017] Figure 3 This is a schematic diagram of wafer defects generated during the linear scanning process in one embodiment of this application. Detailed Implementation
[0018] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0019] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0020] Figure 1 This is a flowchart illustrating a wafer defect detection method based on image recognition in one embodiment. It should be understood that, although... Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1 At least some steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps. For example Figure 1 As shown, the wafer defect detection method based on image recognition disclosed in this invention specifically includes the following steps: S101. Construct a defect analysis space based on a preset set of wafer defect points of the same specifications as the wafer to be inspected, and establish a mechanical motion library for the process equipment used to process the wafer to be inspected.
[0021] By calling a preset defect point set that perfectly matches the specifications of the wafer under test, the effective analysis area on the wafer surface can be precisely defined. Simultaneously, a mechanical motion library is established to transform the mechanical actions in semiconductor processing into calculable mathematical models. This includes not only basic actions such as conventional wafer rotation and linear scanning, but also special trajectory equations caused by abnormal states such as robotic arm vibration and conveyor belt deviation. For example, for spin coating processes, the theoretical trajectory model needs to include mathematical descriptions of key parameters such as angular velocity and spin coating arm radius.
[0022] S102. Acquire a surface image of the wafer to be inspected, use image recognition to identify and extract the surface defect coordinates of the wafer to be inspected from the surface image, and map the surface defect coordinates to the defect analysis space to generate defect point cloud data.
[0023] The process involves using sophisticated optical sensors to capture differences in reflectivity or color anomalies on the wafer surface, transforming the physical surface morphology into a digitized grayscale image matrix. Image recognition algorithms (such as the YoLo series) are then used to denoise, enhance, and detect edges, locating each cluster of pixels suspected of being defects. These pixel coordinates are then converted to physical space coordinates. This process involves not only coordinate system translation and rotation but also correction for lens distortion to ensure that the mapped point cloud data accurately reflects the physical condition of the wafer surface. The generated defect point cloud data possesses geometric properties, preserving key information such as the spatial distribution density, relative position, and clustering morphology of defects.
[0024] S103. Calculate the spatial distance between any two defect points in the defect point cloud data in the defect analysis space.
[0025] S104. Based on spatial distance and using the Kruskal algorithm, a topological network connecting all defect points is constructed. By extracting the geometric features of the topological network, a topological skeleton feature representing the defect distribution pattern is generated.
[0026] The Kruskal algorithm is used to traverse all possible edges in ascending order of distance, gradually connecting individual defect points into one or more connected subgraphs without forming closed loops. For each connected subgraph, the node sequence on its backbone path is extracted, and the straight-line distance between its endpoints and the geodesic distance along the network path are calculated. A linearity parameter is defined by the ratio of straight-line distance to geodesic distance; the closer this parameter is to 1, the more linear the defect distribution tends to be. Simultaneously, an extension rate parameter is calculated based on the network coverage area. These parameters together constitute the topological skeleton features.
[0027] S105. Transform the defect point cloud data to the spatial frequency domain. In the spatial frequency domain, identify the periodic array features in the defect point cloud data by detecting the peak value of the signal. Combine the topological skeleton features and the periodic array features to retrieve the corresponding candidate mechanical motion equations from the mechanical motion library.
[0028] In semiconductor processing equipment, malfunctions in components such as stepper motors, rollers, or pulse nozzles often lead to a strict periodic arrangement of defects on the wafer surface. By performing a two-dimensional discrete Fourier transform on the point cloud density matrix, the spatial distribution information is converted into a spectral amplitude matrix. Randomly distributed defects in the spectral diagram appear as diffuse background noise, while a periodic array of defects converges into high-energy signal peaks. By detecting the positions of these peaks and eliminating low-frequency background interference using a preset threshold, frequency features representing the period and direction of the defect arrangement can be extracted. In practice, the corresponding spatial period and arrangement direction angle are calculated using the peak coordinates. This periodic array feature is then combined with the topological skeleton feature to form a comprehensive feature vector. This vector serves as an index key for searching a mechanical motion database, quickly selecting candidate mechanical motion equations that conform to both geometric shape and periodicity.
[0029] S106. Based on kinematic equation constraints and candidate mechanical motion equations, a theoretical mechanical trajectory is generated in the defect analysis space by inverse trajectory fitting.
[0030] The process involves generating a theoretical mechanical trajectory in the defect analysis space based on the mathematical form of the candidate equations. During implementation, reasonable boundary conditions must be set for the motion equations according to the size limitations of the wafer under test and the actual travel range of the process equipment. Inverse fitting means the system attempts to adjust the free parameters in the equations so that the generated theoretical trajectory can pass through or approach the actual extracted defect point cloud to the greatest extent possible. Ultimately, a theoretical mechanical trajectory with clear physical meaning can be generated, which not only explains existing defects but also predicts the locations of undetected defects.
[0031] S107. Based on the defect point cloud data and by minimizing the geometric distance residual between the theoretical mechanical trajectory and the actual defect distribution on the surface of the wafer to be inspected, calculate the matching confidence of the actual defect distribution and the candidate mechanical motion equation.
[0032] The objective function is constructed using the least squares method, and then solved using the Levenberg-Marquardt iterative optimization algorithm to find the optimal parameter set that minimizes the geometric distance residual. After obtaining the optimal fitted trajectory, the root mean square error of the residuals of all target defect points relative to the trajectory is calculated and converted into a normalized confidence score. If most defect points are closely distributed on both sides of the theoretical trajectory and the residuals are minimal, the confidence score approaches 100%; conversely, if the point cloud is loose or deviates from the trajectory, the confidence score will decrease significantly.
[0033] S108. When the matching confidence level meets the preset threshold, a defect diagnosis report for the wafer to be inspected is generated based on the machine component information of the process machine corresponding to the successfully matched mechanical motion equation.
[0034] Specifically, when the matching confidence level meets a preset strict threshold, the system traces back to the corresponding metadata in the mechanical motion library based on the successfully matched mechanical motion equation, retrieving the specific process equipment and its internal component information associated with that equation. The diagnostic report will list in detail the faulty equipment number, the specific faulty component name, the deduced abnormal motion parameters, and a diagram of the affected wafer area, thereby significantly reducing production line downtime for troubleshooting. This allows equipment engineers to directly handle faulty components with clear maintenance guidelines, effectively reducing production capacity losses caused by blind troubleshooting.
[0035] In one embodiment, calculating the spatial distance between any two defect points in the defect point cloud data in the defect analysis space includes the following steps: The geometric center of the defect analysis space is used as the wafer rotation center; For any two defect points in the defect point cloud data, calculate the Euclidean distance between the two defect points and calculate the coordinates of the midpoint of the virtual connecting edge between the two defect points; Construct a radial reference axis pointing from the wafer rotation center to the midpoint coordinates. Project the Euclidean distance onto the radial reference axis to obtain the radial component length, and project the Euclidean distance onto the direction perpendicular to the radial reference axis to obtain the tangential component length. Determine the machine process type of the preceding process of the wafer to be inspected. If the machine process type is a rotary process, set a radial penalty coefficient greater than the preset reference value. If the machine process type is a linear scanning process, set a radial penalty coefficient equal to the preset reference value. The radial component length is weighted and amplified using a radial penalty coefficient. The square root of the sum of the squares of the weighted radial component length and the tangential component length is then used to obtain the spatial distance between the two defect points.
[0036] In this embodiment, refer to Figure 2 and Figure 3 In the semiconductor wafer manufacturing process, whether Figure 2 The concentric circle defects produced by the spin coating process shown are still... Figure 3 The linear defects generated by the linear scanning process shown exhibit distribution patterns closely related to the physical geometry of the wafer. Therefore, an edge detection algorithm is first used to accurately extract the circular outer contour of the wafer from the acquired wafer image. The least squares method is then used to fit this contour to determine the pixel coordinates of the center. These center coordinates are then defined as the origin O(0,0) of the entire defect analysis space, i.e., the wafer rotation center. Figure 2 The ring-shaped distribution presented in the image establishes a center of rotation, enabling subsequent analysis of defects based on radius and angle; for Figure 3 The horizontal scratches in the image are used as an absolute reference for judging the scratch eccentricity.
[0037] exist Figure 2 B's blue dot clouds or Figure 3 From the set of red linear points in B, arbitrarily select two defect points. and Their coordinates are respectively and First, based on standard spatial geometry principles, calculate the straight-line distance between these two points, i.e., the Euclidean distance. Meanwhile, to describe the positional relationship between these two points relative to the wafer center in polar coordinates, it is necessary to determine the midpoint of the line connecting them. The midpoint of the virtual connection edge is calculated using the midpoint coordinate formula. ,in , The midpoint of the virtual connection edge represents the average position of the line segment formed by these two points on the wafer, which can approximately characterize the orientation of the local region relative to the rotation center.
[0038] Next, a radial reference axis is constructed, starting from the wafer rotation center O and ending at the midpoint M of the line connecting the two points. This axis defines the radial direction of this local region, while the direction perpendicular to this axis is defined as the tangential direction. The Euclidean distance between the two defect points is then projected onto these two orthogonal directions. The calculation points... and The difference in projected lengths on the radial reference axis yields the radial component length. Similarly, by calculating the difference in projected lengths in the vertical direction, the tangential component length can be obtained. .like Figure 2 As shown in Figure A, the physical causes of defects generated by rotary processes are often related to centrifugal force or the trajectory of the rotating arm. These defects tend to distribute tangentially. Smaller and Larger; while Figure 3 In the linear scanning process of A, defects may extend in any direction.
[0039] Then, by reading data from the machine's process management system, it can be determined whether the current wafer has undergone a spin-type process (such as spin coating, cleaning, etc.). Figure 2 (Corresponding scenario) or linear scanning process (such as photolithography scanning, ion implantation, etc.) Figure 3 (Corresponding scenario). If the process is determined to be a rotary process, mechanical failures of such machines often result in defects distributed along the circumference. Defect points at different radii often belong to different fault sources. Therefore, a radial penalty coefficient greater than a preset baseline value (usually 1) needs to be set. This increases the radial distance, causing the algorithm to tend to ignore radially adjacent points and prioritize connecting tangentially adjacent points during subsequent connections. Conversely, if the process is determined to be a linear scanning process, the defect distribution is as follows: Figure 3 As shown in Figure B, the wafer is traversed in a straight line. In this case, the difference between radial and tangential directions has a relatively small impact on the causal analysis; therefore, the radial penalty coefficient is set equal to a preset baseline value. Through this parameter adjustment based on the process mechanism, the algorithm can mathematically simulate the anisotropy of the physical world, ensuring a high degree of consistency between the distance metric and the mechanical motion characteristics of the machine tool.
[0040] After obtaining the radial component, tangential component, and radial penalty coefficient determined according to the process type, the final spatial distance calculation is performed. The new spatial distance is calculated according to the formula... ,in This is the radial penalty coefficient. For Figure 2 The rotating wafer shown, due to Set to a large value, for any two points that differ slightly in the radial direction, its calculated value is... Both will increase significantly, making it difficult to connect points on rings of different radii (even if they are physically close) when constructing the subsequent topology network, while points on the same ring (tangentially adjacent) are easily connected, thus perfectly reconstructing the network. Figure 2 The ring-shaped skeleton in B. For Figure 3 The linear process wafer shown, due to Without being magnified, the distance calculation is degraded to the standard Euclidean distance, which can accurately reflect... Figure 3 The density of transverse straight defects in section B.
[0041] In one implementation, a topological network connecting all defect points is constructed based on spatial distance using the Kruskal algorithm. The process of generating a topological skeleton feature representing the defect distribution pattern by extracting the geometric features of the topological network includes the following steps: Based on spatial distance, the Kruskal algorithm is used to sequentially connect the defect points in the defect point cloud data until all defect points are connected to the connected graph without forming closed loops, thus forming an initial topology network. The distribution data of edge lengths of all connected edges in the initial topology network are statistically analyzed, and the truncation threshold is calculated based on the statistical characteristic values of the edge length distribution data. By using a truncation threshold to traverse and cut off the connecting edges in the initial topology network whose side length is greater than the truncation threshold, the initial topology network is decomposed into several locally connected subgraphs. For each locally connected subgraph, the linearity parameter and elongation parameter are calculated by combining the main path of the locally connected subgraph and the node coordinate sequence on the main path. The linearity parameter and elongation parameter are then combined into a topological skeleton feature representing the defect distribution pattern.
[0042] In this implementation, Kruskal's algorithm effectively avoids path deviations caused by local greedy strategies. Kruskal's algorithm first constructs a vertex set by treating each independent defect point as a vertex in graph theory, and defines the calculated spatial distance between any two vertices as the weight of the connecting edge. During execution, all possible connecting edges are first strictly sorted according to their weight values from smallest to largest, forming a candidate edge sequence. This sequence is then traversed sequentially, attempting to add the current connecting edge to the network being constructed. During this process, it is crucial to continuously monitor whether a newly added edge forms a closed loop with existing edges. If a loop is formed, it indicates a redundant path, and the edge is discarded; otherwise, it is retained. This iterative process continues until all defect points are connected to the same connected graph, or all candidate edges have been traversed, resulting in an initial topology network that is a tree structure without any loops. Furthermore, while traditional Kruskal's algorithm assumes space is isotropic, this implementation lengthens the radial distance and compresses the tangential distance through a radial penalty coefficient. The Kruskal algorithm connects the concentric circles at the connection points in accordance with the rotation of the machine, thus automatically connecting the discontinuous concentric circles more perfectly, without mistakenly connecting them to adjacent noise points.
[0043] After the initial topology network is formed, although all points are connected, it contains both short edges representing the actual defect morphology and spurious long edges that cross non-defect regions to maintain connectivity. To distinguish spurious long edges, statistical analysis of the weight of each edge in the network is required. First, all elements in the edge set are traversed to extract the edge length sequence. The arithmetic mean and standard deviation of this sequence are calculated using statistical methods; these two parameters reflect the average density and dispersion of the current wafer surface defect distribution, respectively. Then, a truncation threshold is constructed by combining the average density and dispersion and based on the assumption of normal distribution or the Chebyshev inequality principle. Next, each connecting edge in the initial topology network is scanned twice, and the weight of each edge is compared with the truncation threshold one by one. Once an edge is found to exceed the truncation threshold, it is determined that the edge connects two unrelated independent defect regions, and a truncation operation is performed to remove it from the edge set. As all excessively long connecting edges are removed, the tree structure splits into several unconnected locally connected subgraphs. Each sub-image essentially represents an independent aggregate of defects, such as a complete scratch, an aggregate of particles, or a localized spot.
[0044] For any subgraph, graph theory algorithms are first used to find the two farthest endpoints in the subgraph, and the path connecting these two points is defined as the trunk path. The coordinate sequences of all nodes on the trunk path are extracted, and the geodesic distance along the topological connection (the sum of all edge lengths on the path) is calculated. Simultaneously, the straight-line distance between these two endpoints in Euclidean space is calculated. The ratio of these two distance indices is defined as a linearity parameter, reflecting the curvature of the defect. When the linearity parameter approaches 1, it indicates that the defect is close to a straight line; when the linearity parameter is small, it indicates that the defect is curled or clustered. Furthermore, combining the length of the trunk path with the total number of nodes in the subgraph, the ratio of the straight-line distance to the total number of nodes is used as the spread parameter, which describes the relationship between the defect's extension trend and density in space. Finally, the linearity parameter and the spread parameter are combined into a feature vector to form the topological skeleton feature. The topological skeleton features are rotationally and scaling invariant. Even if defects appear in different locations or have different sizes on the wafer, as long as their morphological nature remains unchanged, their feature parameters can remain stable, thereby greatly improving the accuracy of matching with standard trajectory models in the mechanical motion library.
[0045] In one implementation, the distribution data of the edge lengths of all connected edges in the initial topology network are statistically analyzed, and the truncation threshold is calculated based on the statistical characteristic values of the edge length distribution data, including the following steps: Construct the histogram distribution of the weights of all connected edges in the initial topology network, and fit the histogram distribution to a probability density function using a Gaussian mixture model; A first peak interval and a second peak interval are identified in the probability density function, wherein the first peak interval represents a greater degree of connectivity than the second peak interval; Determine the probability density minimum point between the first peak interval and the second peak interval, and define the side length of the connecting edge corresponding to the minimum point as the basic split point; Obtain the process resolution of the preceding process steps of the wafer to be inspected, use the process resolution to weight and correct the basic cleavage points, and use the corrected basic cleavage points as the cutoff threshold.
[0046] In this implementation, after the initial topology network is constructed, all connecting edges are traversed and their weight values are extracted. The range of values is divided into several equally wide intervals, and the number of edges falling into each interval is counted, thus drawing a histogram reflecting the frequency distribution of edge lengths. Then, a Gaussian mixture model is introduced to smoothly fit the histogram. The Gaussian mixture model is based on a core assumption: the distribution of the overall data is a linear superposition of several Gaussian distributions. The fitted probability density function is expressed as follows: , where x represents the length variable of the connecting edge, and K is the number of Gaussian components in the mixture (usually set to 2, corresponding to signal and noise respectively). These are the mixing weight coefficients for the k-th component, where N represents the Gaussian density function. and These correspond to the mean and standard deviation of the k-th component, respectively. These parameters are iteratively optimized using the expectation-maximization algorithm until the likelihood between the model and the observed data is maximized.
[0047] Typically, the fitted probability density function curve exhibits a bimodal or multimodal shape, with each peak representing a group of interconnected edges with similar lengths. By calculating the first and second derivatives of the function, all maxima on the curve, i.e., peak centers, can be precisely located. In the physical context of wafer defect distribution, shorter edge lengths indicate that two defect points are extremely close in space, with a strong geometric connection, and are highly likely to be components of the same defect entity; while longer edge lengths indicate that the points are far apart, with loose connections, usually spanning background connections across different defect clusters. Therefore, logically, the algorithm defines the region containing the smaller peak center as the first peak interval, which clusters short and dense connections in the network, representing strong connectivity; and the region containing the larger peak center is defined as the second peak interval, which contains long and sparse connections, representing weak connectivity.
[0048] Between the first and second peak intervals of the probability density function, there must exist a trough region of probability density, representing a fuzzy transition zone that is neither entirely tightly connected nor entirely loosely connected. According to Bayesian decision theory, the lowest point at the intersection of two probability distributions often corresponds to the optimal decision boundary. Therefore, it is necessary to search for the minimum point of the probability density function within the numerical range defined by the first and second peak mean values. That is, to find a specific location where the first derivative of the function is zero and the second derivative is greater than zero. After finding this point, the side length corresponding to the minimum point is directly defined as the basic segmentation point. Furthermore, the process resolution of the wafer to be inspected in the preceding process steps needs to be obtained from the factory's manufacturing execution system. This parameter represents the smallest feature size that the process can theoretically form or resolve. Using the process resolution as a physical benchmark, the statistically derived basic segmentation points are weighted and corrected to calculate the final truncation threshold used for network pruning. This effectively prevents oversegmentation or undersegmentation caused by data fluctuations, ensuring that the final threshold is not only statistically reasonable but also physically feasible.
[0049] In one embodiment, the defect point cloud data is transformed to the spatial frequency domain. In the spatial frequency domain, periodic array features in the defect point cloud data are identified by detecting signal peaks. The corresponding candidate mechanical motion equations are retrieved from the mechanical motion library by combining the topological skeleton features and the periodic array features. The steps include the following: The defect point cloud data is mapped into a two-dimensional density matrix, and a two-dimensional discrete Fourier transform is performed on the two-dimensional density matrix after applying the Hanning window to transform the density distribution of the two-dimensional density matrix in the spatial domain into a spectral amplitude matrix in the frequency domain. The enhanced spectrum is obtained by performing a logarithmic transformation on the spectral amplitude matrix and applying a high-pass filter to remove non-periodic background noise components. Search for high-frequency bright spots with concentrated energy in the spectrum and calculate the spatial frequency vector and phase angle corresponding to the high-frequency bright spots; The spatial frequency vector is converted into a physical period parameter that characterizes the spacing between defects, and candidate mechanical motion equations with corresponding geometric properties are indexed in the mechanical motion library by combining the physical period parameter, phase angle, and topological skeleton features.
[0050] In this embodiment, since the original defect point cloud is merely a series of discrete coordinates lacking continuous grayscale information, direct spectral analysis is not only difficult but also prone to losing spatial distribution details. Therefore, it is first necessary to construct a two-dimensional discrete grid that strictly corresponds to the physical dimensions of the wafer to be inspected. By traversing all defect point coordinates and counting the number of defects falling into each grid cell, a two-dimensional density matrix D(x,y) reflecting the spatial distribution density is constructed. However, directly performing a Fourier transform on this matrix will generate severe high-frequency noise due to abrupt changes in grayscale values at image edges, a phenomenon known as spectral leakage, which will seriously interfere with the extraction of the true periodic signal. Therefore, a two-dimensional Hanning window function W(x,y) must be introduced to preprocess the density matrix with weights, gradually attenuating the values in the edge regions to zero to generate a smooth windowed matrix. Based on this, the two-dimensional discrete Fourier transform formula is applied. The density distribution in the spatial domain is transformed into a complex spectrum matrix in the frequency domain, where x,y are spatial coordinates, u,v are frequency coordinates, and M,N are grid sizes.
[0051] Typically, the dynamic range of the original spectral amplitude is extremely wide. The DC component representing the overall average density and the slowly changing low-frequency background energy are often several orders of magnitude higher than the high-frequency components representing periodic texture, making it difficult for algorithms to identify key array features. Therefore, a logarithmic transformation formula is first used. A nonlinear mapping is applied to the amplitude matrix, where |F(u,v)| represents the spectral amplitude. Then, considering that aperiodic background noise is typically concentrated in the low-frequency region, a high-pass filter H(u,v) is designed and applied. Through calculation... The low-frequency energy in the central region is forcibly attenuated while the high-frequency components in the periphery are preserved and enhanced, resulting in an enhanced spectrogram. Each high-frequency bright spot in the enhanced spectrogram corresponds to a specific periodic texture structure in the spatial domain, and its position contains both frequency and direction information. A local maximum search algorithm is used to scan the entire spectral plane to identify signal peaks with significantly higher grayscale values than the surrounding background. The position coordinates of these peaks in the frequency domain are then extracted. and centered at the zero frequency in the frequency domain Establish a vector analysis model with the origin as the reference point.
[0052] First, calculate the Euclidean distance of the peak point relative to the center, i.e., the magnitude of the spatial frequency vector. This parameter directly quantifies the repetition frequency of defects in their spatial distribution; the farther away from the center, the shorter the spatial period. Simultaneously, the angle between the peak point coordinate vector and the horizontal axis, i.e., the phase angle, is calculated. This parameter precisely characterizes the alignment orientation of the defect array on the wafer surface. It utilizes a pre-calibrated pixel resolution and physical size conversion factor. The calculated spatial frequency vector magnitude is converted into a physical periodic parameter characterizing the spacing between defects in the actual physical world. The calculation formula is as follows: This parameter directly corresponds to the mechanical stroke of the equipment component, such as the single-step distance of a stepper motor, the circumference of a conveyor belt roller, or the pitch of a lead screw. Subsequently, this physical period parameter, phase angle, and topological skeleton features are combined to construct a multi-dimensional feature query vector. This vector is then used for deep indexing in a pre-defined mechanical motion library to filter out candidate mechanical motion equations that produce similar trajectories in geometric shape and match the physical period in motion parameters.
[0053] In one implementation, searching for high-frequency bright spots with concentrated energy in the spectrum and calculating the spatial frequency vector and phase angle corresponding to the high-frequency bright spots includes the following steps: Define a reference window that slides on the spectrogram, and a detection unit located at the center of the reference window; Calculate the average noise power of all spectral units within the reference window, excluding the detection unit; A constant false alarm rate threshold is set. If the spectral energy of the detection unit is higher than the average noise power multiplied by the constant false alarm rate threshold, the detection unit is determined to be a signal peak point, and the sub-pixel level coordinates of the signal peak point are calculated using the centroid method. The radial distance and polar angle direction of the signal peak point relative to the zero-frequency center are calculated based on sub-pixel level coordinates, and the radial distance and polar angle direction are respectively analyzed as spatial frequency vector and phase angle.
[0054] In this embodiment, since background noise in the spectrogram often exhibits a non-uniform distribution, a globally uniform threshold is insufficient to cover both low-noise and high-noise areas. Therefore, a sliding reference window with local sensing capabilities needs to be defined. This window is typically set as a square or rectangular structure, with its size planned according to the expected signal spot size to ensure coverage of the signal and its surrounding background area. At the geometric center of the window, an independent spectral grid cell is explicitly designated as the detection unit, i.e., the candidate target point to be determined. As the reference window performs a step-by-step sliding scan across the entire two-dimensional spectral plane, each spectral cell takes turns becoming a detection unit and establishes a temporary statistical correlation with its surrounding local environment. Within the local area covered by the reference window, to obtain a clean noise baseline, the detection unit located at the center must first be removed from the statistical sample to prevent potential target signal energy from contaminating the background estimate.
[0055] The remaining spectral units within the reference window, excluding the detection unit, are traversed; these units collectively constitute the noise estimation sample set. The average noise power of the current local environment is calculated by accumulating the spectral intensity values of all pixels in the sample set and taking their arithmetic mean. Then, a constant false alarm rate (CFAR) threshold coefficient is set, which determines the balance between detection sensitivity and false alarm rate. The spectral energy of the detection unit is compared with the weighted noise benchmark; if the spectral energy is higher than the average noise power multiplied by the CFAR threshold, the unit is determined to be a valid signal peak. To overcome the resolution limitations caused by spectral grid discretization, the centroid method is applied to extract sub-pixel-level coordinates for regions determined to be peaks. The zero-frequency center coordinates of the spectrum are established. This point represents the center of the DC component of the image. The calculated high-precision signal peak coordinates are then used. A spatial frequency vector is constructed, pointing from the zero-frequency center to the signal peak. Based on analytical geometry principles, the modulus of this vector in the frequency domain plane, i.e., the radial distance, is calculated. This parameter directly corresponds to the spatial frequency of the defect arrangement on the wafer surface. Simultaneously, the angle between this vector and the horizontal axis, i.e., the polar angle, is calculated. These two parameters complete the transformation from abstract image coordinates to concrete physical properties: the radial distance accurately measures the density (period) of the defect array, while the polar angle precisely indicates the direction of the defect arrangement's extension.
[0056] In one implementation, the calculation of the matching confidence between the actual defect distribution and the candidate mechanical motion equations based on defect point cloud data and by minimizing the geometric distance residual between the theoretical mechanical trajectory and the actual defect distribution on the surface of the wafer to be inspected includes the following steps: Based on the physical constraints of the process equipment used in the preceding process of the wafer to be tested, the boundary values of the equation parameters in the candidate mechanical motion equations are set, and a set of initial equation parameters are randomly initialized based on the boundary values. Extract the target point set corresponding to the candidate mechanical motion equations from the defect point cloud data; The objective optimization function is constructed based on the sum of the squared normal distances from each point in the target point set to the theoretical mechanical trajectory determined by the initial equation parameters; The initial equation parameters are iteratively updated using the Levenberg-Marquardt nonlinear least squares algorithm until the function value of the objective optimization function converges, thus obtaining the optimal fitting parameters. The optimal fitting parameters are substituted into the candidate mechanical motion equations to generate the optimal mechanical trajectory. The root mean square error of the residuals between the target point set and the optimal mechanical trajectory is calculated, and the normalized root mean square error of the residuals is used as the matching confidence.
[0057] In this embodiment, the movement of any mechanical component in semiconductor manufacturing is constrained by physical limits, such as the length of a rotating arm, the maximum speed of a motor, or the travel range of a stepper stage. Therefore, before invoking candidate mechanical motion equations, the hardware specification database of the process equipment must be consulted to clarify the valid value range of each equation parameter. Within this physical constraint framework, a set of initial equation parameters is generated using a uniformly distributed random number generator. This initialization strategy, which incorporates physical boundaries, not only prevents the algorithm from wasting computational resources in meaningless parameter spaces but also provides a reasonable and feasible search starting point for subsequent nonlinear optimization algorithms. Then, it is necessary to accurately extract the target point set related to the current candidate motion equation from the massive defect point cloud data, thereby constructing a highly pure fitting sample set that effectively isolates background noise and interference from other irrelevant defects.
[0058] After determining the theoretical mechanical trajectory equations parameterized from the target point set, the core task is to quantify the deviation between the actual observation data and the theoretical model. For each defect point in the point set, the shortest geometric distance from it to the theoretical trajectory curve, i.e., the normal distance, is calculated. Subsequently, the normal distances of all points are squared and summed to construct the objective optimization function. The smaller the value of the objective optimization function, the stronger the ability of the theoretical trajectory to pass through the center of the point cloud, and the higher the fit. The normal distance is chosen instead of simply the y-axis or x-axis distance because the distribution of wafer defects often has arbitrary directionality, and the normal distance can objectively reflect the spatial fit between the point and the curve. Since the mechanical motion equations are usually highly nonlinear, the traditional gradient descent method has a slow convergence speed and is prone to oscillation, while the Gauss-Newton method is extremely unstable when the matrix is singular. The Levenberg-Marquardt algorithm combines the advantages of these two methods, introducing a damping factor to dynamically adjust the search step size and direction. In each iteration step t, the Jacobian matrix J of the objective optimization function is calculated, and the incremental equation is solved. ,in The damping coefficient is... Let be the equation parameters and r be the residual vector. The calculated increment is used to update the current parameters. If the new objective function value decreases, the damping coefficient is decreased to accelerate convergence; if it increases, the damping coefficient is increased to ensure stability. This process is repeated until the change in parameters or the decrease in the function value falls below a preset convergence threshold, at which point the optimal fitted parameters are finally output.
[0059] The optimized fitting parameters are substituted into the candidate mechanical motion equations to generate a definite optimal mechanical trajectory. Then, each point in the target point set is iterated again, and the residual normal distance from that point to the optimal trajectory is calculated, along with the root mean square error. To transform this absolute value into an intuitive probability score, normalization is introduced. Specifically, a baseline error value based on process tolerance can be set, and the matching confidence level can be calculated using an exponential decay model. This value ranges from 0 to 1; a value closer to 1 indicates a high degree of fit between the defect distribution and the mechanical motion model, while a value closer to 0 indicates a matching failure.
[0060] In one implementation, extracting the target point set corresponding to the candidate mechanical motion equation from the defect point cloud data includes the following steps: A virtual center trajectory line is generated in the defect analysis space based on the candidate mechanical motion equations, and a lateral tolerance bandwidth perpendicular to the virtual center trajectory line is set according to the physical size of the harmful abrasive particles in the previous process. A kinematic tubular neighborhood with lateral tolerance bandwidth is constructed along the virtual center trajectory line, and all defect points whose spatial coordinates fall within the kinematic tubular neighborhood are selected from the defect point cloud data as the initial point set. Obtain the optical scattering intensity of each defect point in the initial selection point set, and discretize the virtual center trajectory line into several continuous trajectory arc segments; Calculate the local variance of the optical scattering intensity value of the defect points contained in each trajectory arc segment. If the local variance exceeds the preset optical consistency threshold, it is determined that there are foreign source noise points in the trajectory arc segment. For trajectory arcs with heterogeneous noise, an outlier removal operation based on optical scattering intensity values is performed, and all remaining defective points are aggregated into a target point set corresponding to the candidate mechanical motion equations.
[0061] In this embodiment, the candidate mechanical motion equations are first analyzed as parametric curves extending continuously in the defect analysis space. This curve represents the path swept by the center point of the mechanical component causing the defect under ideal conditions, and is defined as the virtual center trajectory line. However, the actual physical damage process is not a mathematically narrow line, but a damage band with width caused by particles or components of specific physical dimensions. Therefore, it is necessary to retrieve the nominal physical diameter of the damaging abrasive particles or contact components from the wafer pre-process database. Based on this physical dimension, the lateral extension range perpendicular to both sides of the virtual center trajectory line is set, i.e., the lateral tolerance bandwidth. The calculation formula is set as follows: ,in This is a safety amplification factor set based on process jitter. Using the virtual center trajectory line as the central axis and the lateral tolerance bandwidth as the radius, a strip-shaped region extending along the trajectory, i.e., a kinematic tubular neighborhood, is generated in the 3D or 2D defect analysis space. This neighborhood simulates all the physical space that the mechanical component may cover during its movement. Then, each discrete point in the defect point cloud data is traversed, and the shortest Euclidean distance from that point to the virtual center trajectory line is calculated. This distance is compared with the lateral tolerance bandwidth. If the shortest Euclidean distance is less than or equal to the lateral tolerance bandwidth, the point is determined to fall within the harmful range and is included in the initial selection set; otherwise, it is discarded.
[0062] Each defect point in the initial selection set, in addition to its spatial coordinates, carries an optical scattering intensity value recorded by the detection equipment. This value directly reflects the defect's depth, roughness, or material composition. To accurately assess the optical uniformity of defects distributed along the trajectory, the long virtual center trajectory line needs to be logically divided into several continuous and short trajectory segments. The discretization step size is typically set based on the temporal resolution or spatial sampling rate of the mechanical motion. Subsequently, based on the spatial projection relationship, each defect point in the initial selection set is assigned to the specific trajectory segment corresponding to its spatial location. For each trajectory segment, the optical scattering intensity values of all defect points falling within it are collected to construct a local intensity sample set. The arithmetic mean of this sample set is then calculated. and local variance, which characterizes the degree of data dispersion ,in The number of points within the arc segment. Let be the intensity value of the j-th point. The calculated local variance is compared with the preset optical consistency threshold. If the local variance of a certain arc segment significantly exceeds the optical consistency threshold, it means that there are defect points with huge differences in optical properties mixed in the region, and it is determined that there are foreign source noise points in the trajectory arc segment.
[0063] For trajectory segments identified as containing heterogeneous noise, instead of accepting all points within them, a statistical filtering algorithm is applied for cleaning. A retention interval is set based on the local intensity mean of the segment. Each defect point within the segment is examined, and outliers whose optical scattering intensity values fall outside this interval are considered interference noise and removed. Only inliers that conform to the local principal distribution characteristics are retained. After cleaning all segments, all remaining defect points that have passed spatial geometric screening and optical consistency verification are re-aggregated to form the final target point set corresponding to the candidate mechanical motion equations.
[0064] In one implementation, the initial equation parameters are iteratively updated using the Levenberg-Marquardt nonlinear least squares algorithm until the function value of the objective optimization function converges, obtaining the optimal fitting parameters through the following steps: During the iterative update of the initial equation parameters using the Levonberg-Marquardt nonlinear least squares algorithm, the Jacobian matrix of the objective optimization function relative to the current equation parameters is calculated. The damping factor is dynamically determined based on the current residual value of the objective optimization function; Solve the incremental normal equation containing the Jacobian matrix and damping factor to obtain the update step size of the equation parameters; The current equation parameters are corrected by updating the step size. If the corrected objective function meets the preset convergence accuracy, the iteration stops and the current equation parameters are output as the best-fit parameters. If the corrected objective function does not meet the convergence accuracy, the next iteration will continue.
[0065] In this implementation, in each iteration, for the current parameter vector This requires calculating the partial derivative of each residual component in the objective function with respect to each model parameter. This constitutes a function of size [missing value]. The Jacobian matrix J is given by N, where N is the number of target defect points and m is the number of parameters to be optimized. The elements in the matrix are... The fitting residuals characterize the i-th defect point For the j-th parameter How sensitive are the changes? In practical calculations, if the equations of motion are too complex to be sign-differentiated, the central difference method or forward difference method is usually used for numerical approximation.
[0066] Dynamically determining the damping factor is the key mechanism by which the Levonberg-Marquardt algorithm can balance the stability of gradient descent and the fast convergence of Gauss-Newton. When the damping factor is large, the algorithm behaves similarly to gradient descent, with a small step size but guaranteed error reduction; when the damping factor is small... When the algorithm is very small, its behavior is similar to the Gauss-Newton method, with extremely fast convergence but requiring approximate accuracy. Before each iteration, it is necessary to evaluate how well the current model fits the data. This is typically calculated by comparing the actual descent of the objective function with the descent predicted based on the linear approximation. A high gain ratio indicates a good local linear approximation, allowing for a reduction in the damping factor to accelerate convergence; a low or even negative gain ratio indicates a large approximation bias, requiring an increase in the damping factor to increase the weight of the diagonal matrix and force the algorithm to steadily advance along the gradient descent direction. After obtaining the Jacobian matrix and the damping factor, a linearized incremental normal equation is constructed. Where I is the identity matrix, and r is the current residual vector. This is the parameter update step size vector to be determined. The left-hand matrix of this equation... This is called an approximation of the Hessian matrix, where The term is the Levenberg-Marquardt correction term, which guarantees that even when In the near-singular case, the coefficient matrix remains positive definite and invertible. Solving this system of linear equations using Gaussian elimination or Cholliski decomposition yields a unique solution. Obtain step size Next, these new parameters are superimposed onto the current parameter vector. Then, it's necessary to verify whether this new set of parameters is truly effective, i.e., to calculate the new objective function value based on the new parameter vector. If the new objective function value is less than the current objective function value, it indicates that this update step was successful, the error has indeed decreased, or the decrease in error is extremely small, or the change in parameters is negligible. In this case, the algorithm is considered to have converged. At this point, the iteration loop is immediately stopped, and the new parameter vector is output as the final optimal fitting parameters.
[0067] If the corrected objective function does not meet the convergence accuracy requirement—that is, the newly calculated error increases or the decrease is insufficient—it means the current step size is too large or the direction is inaccurate, requiring a next iteration for correction. In this case, first, the previous parameter update is cancelled, leaving the original parameters unchanged. Then, based on the damping factor adjustment strategy, the damping factor is significantly increased to make it more biased towards the conservative gradient descent strategy. The normal equation is reconstructed using the increased damping factor to solve for a new, smaller step size that is more biased towards the gradient direction. Subsequently, the parameters are updated again and the error is evaluated until a step size that significantly decreases the objective function is found, or the preset maximum number of iterations is reached to prevent an infinite loop.
[0068] The present invention also discloses a wafer defect detection system based on image recognition, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the wafer defect detection method based on image recognition described above.
[0069] The processor can be a central processing unit (CPU). Of course, depending on the actual use, it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it.
[0070] The memory can be an internal storage unit of a computer device, such as a hard disk or RAM, or an external storage device, such as a plug-in hard disk, smart memory card (SMC), secure digital card (SD), or flash memory card (FC) provided on the computer device. Furthermore, the memory can be a combination of internal storage units and external storage devices of a computer device. The memory is used to store computer programs and other programs and data required by the computer device. The memory can also be used to temporarily store data that has been output or will be output. This application does not limit this.
[0071] The present invention also discloses a computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the image recognition-based wafer defect detection method described in any of the above embodiments.
[0072] The computer program can be stored in a machine-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The machine-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the machine-readable medium includes, but is not limited to, the above-mentioned components.
[0073] The image recognition-based wafer defect detection method described in the above embodiments is stored in the computer-readable storage medium and loaded and executed on the processor to facilitate the storage and application of the above method.
[0074] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of protection of this application is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.
[0075] One or more embodiments in this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments in this application should be included within the protection scope of this application.
Claims
1. A wafer defect detection method based on image recognition, characterized in that, Includes the following steps: A defect analysis space is constructed based on a preset set of wafer defect points of the same specifications as the wafer to be inspected, and a mechanical motion library for the process equipment used to process the wafer to be inspected is established. The surface image of the wafer to be inspected is acquired, and the surface defect coordinates of the wafer to be inspected are identified and extracted from the surface image using image recognition. The surface defect coordinates are then mapped to the defect analysis space to generate defect point cloud data. Calculate the spatial distance between any two defect points in the defect point cloud data in the defect analysis space; Based on spatial distance and using the Kruskal algorithm, a topological network connecting all defect points is constructed. By extracting the geometric features of the topological network, a topological skeleton feature representing the defect distribution pattern is generated. The defect point cloud data is transformed to the spatial frequency domain. In the spatial frequency domain, the periodic array features in the defect point cloud data are identified by detecting the peak value of the signal. The corresponding candidate mechanical motion equations are retrieved from the mechanical motion library by combining the topological skeleton features and the periodic array features. The theoretical mechanical trajectory is generated in the defect analysis space by inverse trajectory fitting based on the kinematic equation constraints and the candidate mechanical motion equations. Based on defect point cloud data, and by minimizing the geometric distance residual between the theoretical mechanical trajectory and the actual defect distribution on the surface of the wafer to be inspected, the matching confidence of the actual defect distribution and the candidate mechanical motion equation is calculated. When the matching confidence level meets the preset threshold, a defect diagnosis report for the wafer to be inspected is generated based on the machine component information of the process equipment corresponding to the successfully matched mechanical motion equation.
2. The wafer defect detection method based on image recognition according to claim 1, characterized in that, The calculation of the spatial distance between any two defect points in the defect point cloud data in the defect analysis space includes the following steps: The geometric center of the defect analysis space is used as the wafer rotation center; For any two defect points in the defect point cloud data, calculate the Euclidean distance between the two defect points and calculate the coordinates of the midpoint of the virtual connecting edge between the two defect points; Construct a radial reference axis pointing from the wafer rotation center to the midpoint coordinates. Project the Euclidean distance onto the radial reference axis to obtain the radial component length, and project the Euclidean distance onto the direction perpendicular to the radial reference axis to obtain the tangential component length. Determine the machine process type of the preceding process of the wafer to be inspected. If the machine process type is a rotary process, set a radial penalty coefficient greater than the preset reference value. If the machine process type is a linear scanning process, set a radial penalty coefficient equal to the preset reference value. The radial component length is weighted and amplified using a radial penalty coefficient. The square root of the sum of the squares of the weighted radial component length and the tangential component length is then used to obtain the spatial distance between the two defect points.
3. The wafer defect detection method based on image recognition according to claim 1, characterized in that, The process of constructing a topological network connecting all defect points based on spatial distance and using the Kruskal algorithm, and generating a topological skeleton feature representing the defect distribution pattern by extracting the geometric features of the topological network, includes the following steps: Based on spatial distance, the Kruskal algorithm is used to sequentially connect the defect points in the defect point cloud data until all defect points are connected to the connected graph without forming closed loops, thus forming an initial topology network. The distribution data of edge lengths of all connected edges in the initial topology network are statistically analyzed, and the truncation threshold is calculated based on the statistical characteristic values of the edge length distribution data. By using a truncation threshold to traverse and cut off the connecting edges in the initial topology network whose side length is greater than the truncation threshold, the initial topology network is decomposed into several locally connected subgraphs. For each locally connected subgraph, the linearity parameter and elongation parameter are calculated by combining the main path of the locally connected subgraph and the node coordinate sequence on the main path. The linearity parameter and elongation parameter are then combined into a topological skeleton feature representing the defect distribution pattern.
4. The wafer defect detection method based on image recognition according to claim 3, characterized in that, The calculation of the truncation threshold based on the statistical characteristic values of the edge length distribution data of all connected edges in the initial statistical topology network includes the following steps: Construct the histogram distribution of the weights of all connected edges in the initial topology network, and fit the histogram distribution to a probability density function using a Gaussian mixture model; A first peak interval and a second peak interval are identified in the probability density function, wherein the first peak interval represents a greater degree of connectivity than the second peak interval; Determine the probability density minimum point between the first peak interval and the second peak interval, and define the side length of the connecting edge corresponding to the minimum point as the basic split point; Obtain the process resolution of the preceding process steps of the wafer to be inspected, use the process resolution to weight and correct the basic cleavage points, and use the corrected basic cleavage points as the cutoff threshold.
5. The wafer defect detection method based on image recognition according to claim 1, characterized in that, The process of transforming the defect point cloud data to the spatial frequency domain, identifying the periodic array features in the defect point cloud data by detecting signal peaks in the spatial frequency domain, and retrieving the corresponding candidate mechanical motion equations from the mechanical motion library by combining the topological skeleton features and the periodic array features includes the following steps: The defect point cloud data is mapped into a two-dimensional density matrix, and a two-dimensional discrete Fourier transform is performed on the two-dimensional density matrix after applying the Hanning window to transform the density distribution of the two-dimensional density matrix in the spatial domain into a spectral amplitude matrix in the frequency domain. The enhanced spectrum is obtained by performing a logarithmic transformation on the spectral amplitude matrix and applying a high-pass filter to remove non-periodic background noise components. Search for high-frequency bright spots with concentrated energy in the spectrum and calculate the spatial frequency vector and phase angle corresponding to the high-frequency bright spots; The spatial frequency vector is converted into a physical period parameter that characterizes the spacing between defects, and candidate mechanical motion equations with corresponding geometric properties are indexed in the mechanical motion library by combining the physical period parameter, phase angle, and topological skeleton features.
6. The wafer defect detection method based on image recognition according to claim 5, characterized in that, The process of searching for high-frequency bright spots with concentrated energy in the spectrum and calculating the spatial frequency vector and phase angle corresponding to the high-frequency bright spots includes the following steps: Define a reference window that slides on the spectrogram, and a detection unit located at the center of the reference window; Calculate the average noise power of all spectral units within the reference window, excluding the detection unit; A constant false alarm rate threshold is set. If the spectral energy of the detection unit is higher than the average noise power multiplied by the constant false alarm rate threshold, the detection unit is determined to be a signal peak point, and the sub-pixel level coordinates of the signal peak point are calculated using the centroid method. The radial distance and polar angle direction of the signal peak point relative to the zero-frequency center are calculated based on sub-pixel level coordinates, and the radial distance and polar angle direction are respectively analyzed as spatial frequency vector and phase angle.
7. The wafer defect detection method based on image recognition according to claim 1, characterized in that, The process of calculating the matching confidence of the actual defect distribution and the candidate mechanical motion equation based on defect point cloud data and by minimizing the geometric distance residual between the theoretical mechanical trajectory and the actual defect distribution on the surface of the wafer to be inspected includes the following steps: Based on the physical constraints of the process equipment used in the preceding process of the wafer to be tested, the boundary values of the equation parameters in the candidate mechanical motion equations are set, and a set of initial equation parameters are randomly initialized based on the boundary values. Extract the target point set corresponding to the candidate mechanical motion equations from the defect point cloud data; The objective optimization function is constructed based on the sum of the squared normal distances from each point in the target point set to the theoretical mechanical trajectory determined by the initial equation parameters; The initial equation parameters are iteratively updated using the Levenberg-Marquardt nonlinear least squares algorithm until the function value of the objective optimization function converges, thus obtaining the optimal fitting parameters. The optimal fitting parameters are substituted into the candidate mechanical motion equations to generate the optimal mechanical trajectory. The root mean square error of the residuals between the target point set and the optimal mechanical trajectory is calculated, and the normalized root mean square error of the residuals is used as the matching confidence.
8. The wafer defect detection method based on image recognition according to claim 7, characterized in that, The process of iteratively updating the initial equation parameters using the Levenberg-Marquardt nonlinear least squares algorithm until the objective function converges to obtain the optimal fitting parameters includes the following steps: During the iterative update of the initial equation parameters using the Levonberg-Marquardt nonlinear least squares algorithm, the Jacobian matrix of the objective optimization function relative to the current equation parameters is calculated. The damping factor is dynamically determined based on the current residual value of the objective optimization function; Solve the incremental normal equation containing the Jacobian matrix and damping factor to obtain the update step size of the equation parameters; The current equation parameters are corrected by updating the step size. If the corrected objective function meets the preset convergence accuracy, the iteration stops and the current equation parameters are output as the best-fit parameters. If the corrected objective function does not meet the convergence accuracy, the next iteration will continue.
9. A wafer defect detection system based on image recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the wafer defect detection method based on image recognition as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing instructions thereon, characterized in that, When executed by a processor, this instruction causes the processor to be configured to perform the image recognition-based wafer defect detection method according to any one of claims 1 to 8.