Method, device and storage medium for aligning a semiconductor layout with an optical image

By extracting structural feature maps from the design layout and detecting optical images and performing iterative optimization, combined with process parameters and cross-attention mechanisms, the cross-domain alignment problem between the layout and optical images in semiconductor manufacturing was solved, achieving high-precision and robust alignment results, supporting subsequent defect detection and process analysis.

CN122636675APending Publication Date: 2026-08-25SKYVERSE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611001185.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-07
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

In existing technologies, cross-domain alignment between design layouts and optical inspection images during semiconductor manufacturing suffers from grayscale differences and interference from low-confidence regions such as defects and noise, resulting in low alignment accuracy and poor robustness.

Method used

By extracting structural feature maps from the design layout and the detection optical image respectively, initial alignment is performed to obtain the initial parameters of the spatial transformation. The spatial transformation parameters are then updated iteratively, and multiple reference image samples are constructed in combination with process parameters. The alignment process is optimized using a cross-attention mechanism and a pixel-level uncertainty weighted loss function.

Benefits of technology

It significantly improves the high-precision and robust alignment of semiconductor layouts and optical patterns under complex process conditions, providing accurate geometric correspondence and laying the foundation for subsequent defect detection and process analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122636675A_ABST
    Figure CN122636675A_ABST
Patent Text Reader

Abstract

The application discloses a kind of semiconductor layout and optical chart alignment method, equipment and storage medium, the method includes: obtaining design layout, detecting optical image and process parameter related to semiconductor manufacturing or detection;Respectively extract the structural feature map of design layout and detection optical image, and carry out initial alignment based on two structural feature maps, obtain the initial parameter of spatial transformation;Based on initial parameter, the parameter of spatial transformation is updated by iteration until convergence, and iterative updating includes: based on the current spatial transformation parameter, the design layout is transformed, and a plurality of reference image samples are constructed in combination with process parameter, and then according to the statistical distribution of a plurality of reference image samples, the parameter of spatial transformation is updated;Output final spatial transformation parameter and alignment result;The application improves the alignment accuracy of layout and optical image under complex process conditions by structural feature initial alignment, multiple reference image generation guided by process parameter and statistical distribution updating.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of semiconductor manufacturing technology, and in particular to a method, apparatus and storage medium for aligning a semiconductor layout with an optical pattern. Background Technology

[0002] In semiconductor manufacturing, wafer defect detection is a crucial step in ensuring product yield and process stability. The detection process typically requires high-precision alignment between the design layout and the actual acquired wafer images to identify discrepancies between the layout and the actual structure.

[0003] In real-world industrial settings, the formation of inspection optical images is influenced by complex lithography and imaging processes. These include image blurring caused by focal length shifts in the lithography system, linewidth and contrast variations due to exposure dose changes, spatial blurring caused by the optical system's point spread function, sensor noise, deformation caused by wafer thermal and mechanical stress, and superposition errors between multilayer structures. Therefore, the actual acquired wafer inspection optical images differ significantly from the designed layout in terms of grayscale distribution, edge sharpness, local structural morphology, noise performance, and defect distribution.

[0004] Conventional image alignment methods are typically suitable for registration between images of the same type, such as two optical images, two camera images, or images from different times within the same imaging modality. These images usually have similar grayscale distributions, texture representations, and noise characteristics. However, the alignment between the design layout and the optical inspection image involved in this invention is a cross-domain alignment: the design layout represents an idealized, regular geometric structure, while the optical inspection image is affected by the optical system, sensor, process conditions, and actual defects, resulting in significant differences in the imaging domain between the two.

[0005] Existing technologies have schemes for generating rendered or simulated images based on design layouts for comparison or alignment with detection optical images. However, these schemes typically rely on a single rendered image or fixed simulation results, making it difficult to adapt to complex and changing process conditions. Furthermore, the stability and robustness of the alignment results still need to be improved under conditions of defects, noise, or blurred areas. Summary of the Invention

[0006] In view of this, this application provides a method, apparatus and storage medium for aligning semiconductor layouts and optical images, in order to solve the problems of low alignment accuracy and poor robustness caused by cross-domain grayscale differences and low-confidence region interference such as defects and noise between the design layout and the optical image of optical inspection.

[0007] To solve the above-mentioned technical problems, one technical solution adopted in this application is: providing a method for aligning a semiconductor layout with an optical pattern, comprising: To obtain design layouts, inspect optical images, and process parameters related to semiconductor manufacturing or inspection; The structural feature maps of the design layout and the detection optical image are extracted respectively, and the initial alignment is performed based on the two obtained structural feature maps to obtain the initial parameters of the spatial transformation; Based on the initial parameters, the parameters of the spatial transformation are updated iteratively until convergence. Each iteration update includes: transforming the design layout based on the current spatial transformation parameters, constructing multiple reference image samples in combination with process parameters, and then updating the parameters of the spatial transformation based on the statistical distribution of the multiple reference image samples. Output the final spatial transformation parameters, and output the alignment results generated based on the final spatial transformation parameters and the corresponding confidence evaluation data.

[0008] As a further improvement to this application, structural feature maps of the design layout and the detection optical image are extracted separately, and initial alignment is performed based on the two obtained structural feature maps to obtain initial parameters for spatial transformation, including: Preprocessing of design layouts and detection of optical images; Low-frequency separation and high-frequency enhancement are performed on the preprocessed design layout and detection optical image respectively to obtain the high-frequency structural components corresponding to the design layout and detection optical image respectively. The gradient magnitudes of the high-frequency structural components of the design layout and the detection optical image are calculated based on the gradient operator to obtain the structural feature maps of the design layout and the detection optical image. In the structural feature map of the detected optical image, a search region is set, and the structural similarity between the structural feature map and the structural feature map of the design layout is calculated by sliding window. The candidate position with the highest similarity is used as the initial alignment result. The initial parameters of the spatial transformation are determined based on the initial alignment results.

[0009] As a further improvement to this application, low-frequency separation and high-frequency enhancement are performed on the preprocessed design layout and detection optical image, respectively, including: Gaussian low-pass filtering is used to extract the low-frequency components of the design layout and the detection optical image, respectively; Subtract the corresponding low-frequency components from the preprocessed design layout to obtain the high-frequency structural components of the design layout. The high-frequency structural components of the detection optical image are obtained by subtracting the corresponding low-frequency components from the preprocessed detection optical image.

[0010] As a further improvement of this application, the gradient magnitudes of the high-frequency structural components of the design layout and the detection optical image are calculated based on the gradient operator to obtain structural feature maps of the design layout and the detection optical image, including: The Sobel operator was used to calculate the horizontal and vertical gradients of the high-frequency structural components, respectively. The gradient magnitude is calculated based on the horizontal and vertical gradients to obtain the structural feature map.

[0011] As a further improvement of this application, a search region is set in the structural feature map of the detected optical image, and the structural similarity between the structural feature map and the design layout is calculated using a sliding window method. The candidate position with the highest similarity is used as the initial alignment result, including: Normalized cross-correlation is used as the matching score. Within the search area, each candidate position is traversed in a sliding window manner to calculate the normalized cross-correlation value between the structural features of each candidate position and the structural feature map of the design layout. The candidate position with the highest normalized cross-correlation value is used as the initial alignment result.

[0012] As a further improvement to this application, the design layout is transformed based on the current spatial transformation parameters, and multiple reference image samples are constructed in conjunction with process parameters, including: The design layout is spatially transformed using the current spatial transformation parameters to obtain the transformed design layout. Based on the cross-attention mechanism, the transformed design layout and process parameters are fused and repeatedly input into a pre-trained reference image generation model to obtain multiple reference image samples.

[0013] As a further improvement to this application, the transformed design layout and process parameters are fused based on a cross-attention mechanism, including: The spatial features of the design layout are used as query features, and the features of the encoded process parameters are used as key and value features, and cross-attention computation is performed.

[0014] As a further improvement to this application, the parameters of the spatial transformation are updated based on the statistical distribution of multiple reference image samples, including: The mean pixel value at each pixel location is calculated based on multiple reference image samples and used as the mean of the reference images; The variance of the pixel value at each pixel location is calculated based on the mean of the reference image and multiple reference image samples, which serves as the pixel-level uncertainty. A weighted loss function is constructed by weighting the pixel error between the mean of the detection optical image and the reference image using pixel-level uncertainty; The parameters of the spatial transformation are updated by minimizing the weighted loss function.

[0015] As a further improvement to this application, the calculation process for pixel-level uncertainty is expressed as follows: ; ; in, Represents the coordinates of a pixel. Indicates the number of reference image samples. Indicates the first A reference image sample at pixel location Pixel value at that location, Indicates the pixel position of the reference image sample. The average pixel value at that location. Indicates pixel position Pixel-level uncertainty at the location.

[0016] As a further improvement to this application, the weighted loss function is expressed as: ; in, This represents the weighted loss function. Indicates the detection of optical image at pixel position Pixel value at that location, This is a preset stability term.

[0017] As a further improvement to this application, the alignment result generated based on the final spatial transformation parameters and the corresponding confidence evaluation data are output, including: The output includes the final design layout, the final reference image sample, and the final pixel-level uncertainty reflecting the reliability of each pixel position, all obtained based on the final spatial transformation parameters.

[0018] To solve the above-mentioned technical problems, another technical solution adopted in this application is: providing an alignment device for semiconductor layout and optical pattern, comprising: The acquisition module is used to acquire design layouts, inspection optical images, and process parameters related to semiconductor manufacturing or inspection. The extraction module is used to extract the structural feature maps of the design layout and the detection optical image respectively, and to perform initial alignment based on the two obtained structural feature maps to obtain the initial parameters of the spatial transformation; The update module is used to iteratively update the parameters of the spatial transformation based on the initial parameters until convergence. Each iteration update includes: transforming the design layout based on the current spatial transformation parameters, constructing multiple reference image samples in combination with process parameters, and then updating the parameters of the spatial transformation based on the statistical distribution of the multiple reference image samples. The output module is used to output the final spatial transformation parameters, and to output the alignment results generated based on the final spatial transformation parameters and the corresponding confidence evaluation data.

[0019] To solve the above-mentioned technical problems, another technical solution adopted in this application is: to provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the alignment method of semiconductor layout and optical pattern as described above.

[0020] To solve the above-mentioned technical problems, another technical solution adopted in this application is to provide a computer-readable storage medium storing a computer program thereon, wherein when the program is executed by a processor, it implements the alignment method of semiconductor layout and optical pattern as described above.

[0021] Compared to existing technologies, this invention extracts structural feature maps from the design layout and the detection optical image separately and performs initial alignment to obtain initial parameters for spatial transformation. This effectively reduces the impact of cross-domain grayscale differences on coarse registration, providing reliable initial values ​​for subsequent iterative optimization and avoiding getting trapped in local optima. Then, during the iterative update process, the design layout is transformed based on the current spatial transformation parameters, and multiple reference image samples are constructed in conjunction with process parameters. This allows the generated reference images to adapt to changes in process conditions, improving the ability to model imaging differences under complex process conditions. Furthermore, the spatial transformation parameters are updated based on the statistical distribution of multiple reference image samples. Utilizing statistical distribution information, low-confidence regions can be effectively identified, allowing confident regions to dominate parameter updates, while interference from defective, noise, and blurred regions is suppressed, significantly improving the robustness and stability of alignment. Finally, the final spatial transformation parameters are output, providing accurate geometric correspondence for subsequent defect detection and process analysis. Through the above combined scheme, this invention achieves high-precision, high-robust alignment of the layout and optical image under complex process conditions and interference. Attached Figure Description

[0022] Figure 1 This is a schematic flowchart of one embodiment of the method for aligning semiconductor layout and optical pattern according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the functional modules of one embodiment of the alignment device for semiconductor layout and optical pattern according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0024] The terms "first," "second," and "third" in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indications also change accordingly. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.

[0025] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0026] Figure 1 This is a schematic flowchart illustrating the method for aligning semiconductor layouts and optical patterns according to an embodiment of the present invention. It should be noted that if substantially the same result is achieved, the method in this embodiment is not necessarily identical. Figure 1 The illustrated process sequence is limited. For example... Figure 1 As shown, the method for aligning the semiconductor layout with the optical pattern includes the following steps: Step S1: Obtain the design layout, inspect the optical images, and obtain the process parameters related to semiconductor manufacturing or inspection.

[0027] Specifically, the testing equipment acquires three types of data: design layout, optical images, and process parameters. Design layout: (Note:) This is an ideal graphic exported from a semiconductor design database, typically in GDSII or OASIS format. In this embodiment, for ease of processing, the design layout is first rasterized into a binary or grayscale image with a pixel resolution matching the resolution of the actual optical inspection image.

[0028] Detecting optical images: denoted as This is an image of the wafer surface taken directly by a scanning electron microscope (SEM) or optical inspection equipment. The image contains the actual pattern formed by process steps such as photolithography and etching, as well as information such as noise, blur, defects, and deformation.

[0029] Process parameters: denoted as These parameters are related to the semiconductor manufacturing or testing process and are key factors affecting the final presentation of the optical image. In this embodiment, the process parameters... Specifically, it includes at least one of the following: the focal length parameter (defocus, reflecting the degree of defocus) of the lithography system, the exposure dose parameter (dose, affecting linewidth and contrast), the point spread function parameter (PSF, used to describe optical blur) of the optical system, the type of pattern layer currently being detected (such as polysilicon layer, metal layer, reflecting different texture features), and the global deformation parameter of the wafer (caused by thermal or mechanical stress).

[0030] Step S2: Extract the structural feature maps of the design layout and the detection optical image respectively, and perform initial alignment based on the two obtained structural feature maps to obtain the initial parameters of the spatial transformation.

[0031] It should be noted that, due to the design layout... and detection of optical images Significant differences exist between imaging domains (e.g., a layout is an idealized geometry, while an optical image is a blurred, noisy grayscale image), making direct grayscale matching highly prone to failure. Therefore, to quickly and robustly obtain an initial spatial transformation parameter... This provides a good starting point for subsequent fine-tuning. After obtaining the above data, the design layout is extracted respectively. and detection of optical images The structural feature diagram, denoted as and Structural feature maps are a representation that is insensitive to changes in grayscale but sensitive to changes in edges and local structures. Then, based on the two obtained structural feature maps... and Perform initial alignment. A typical implementation involves: using a large detection optical image structure feature map... The above uses a sliding window to traverse and search, displaying the structural feature maps of the design layout. Using this as a template, the similarity between each window position and the template is calculated (e.g., normalized cross-correlation NCC), and the candidate position with the highest similarity is used as the initial alignment result. Finally, based on this optimal matching position, the initial parameters of the spatial transformation are determined. For example, if only translation transformation is considered, the initial alignment parameters... ,in and These represent displacements in the horizontal and vertical directions, respectively.

[0032] Step S3: Based on the initial parameters, iteratively update the parameters of the spatial transformation until convergence. Each iteration update includes: transforming the design layout based on the current spatial transformation parameters, constructing multiple reference image samples in combination with process parameters, and then updating the parameters of the spatial transformation based on the statistical distribution of the multiple reference image samples.

[0033] Specifically, obtaining initial parameters Then, the core fine alignment iteration process begins. This process is based on... Using the initial values, the parameters of the spatial transformation are iteratively updated until convergence. This iterative process consists of two phases: Phase 1: Spatial transformation parameters based on the current iteration round (during the first iteration) ), regarding the original design layout Perform a spatial transformation to obtain the transformed design layout. Then, combined with the previously obtained process parameters... Construct multiple reference image samples The "reference image" here refers to an image that, starting from the design layout, should appear after undergoing specific processes and imaging conditions. The purpose of constructing multiple samples is to explore the randomness or variability in the generation process, providing a data foundation for subsequent uncertainty estimation.

[0034] Second stage: After obtaining multiple reference image samples Then, the parameters of the spatial transformation are updated based on the statistical distribution of these samples. Specifically, the statistical characteristics of each pixel location are first calculated, such as the mean and variance. (Mean image) The variance image represents the most likely reference image. This quantifies the uncertainty of the model at different pixel locations. A larger variance indicates greater variation at that location across different generated samples, and thus, greater uncertainty in the model's prediction. Subsequently, this pixel-level uncertainty is utilized... For detecting optical images Mean of reference image The differences (i.e., errors) between the pixels are weighted. For example, when calculating the loss function, pixels with high uncertainty (such as defects or noisy regions) are given lower weights, thus reducing their adverse impact on the parameter update direction. Finally, by minimizing this weighted loss function, new spatial transformation parameters that make the current transformation more accurate are calculated. And then proceed to the next iteration.

[0035] Step S4: Output the final spatial transformation parameters, and output the alignment results and corresponding confidence evaluation data generated based on the final spatial transformation parameters.

[0036] Specifically, when the iterative process converges (for example, the change in the loss function is less than a preset threshold after multiple consecutive iterations, or the maximum number of iterations is reached), the current optimal spatial transformation parameters are... This parameter is output as the final result. The design layout was described precisely. With detection of optical images The geometric correspondence between them can be used for subsequent tasks such as defect detection, dimensional measurement, or process deviation analysis. In addition, it also outputs alignment results generated based on the final spatial transformation parameters and corresponding confidence evaluation data, such as the final design layout, the final reference image, and the pixel-level uncertainty distribution of the final reference image generated based on the final spatial transformation parameters.

[0037] This embodiment extracts structural feature maps from the design layout and the detection optical image separately and performs initial alignment to obtain initial parameters for spatial transformation. This effectively reduces the impact of cross-domain grayscale differences on coarse registration, providing reliable initial values ​​for subsequent iterative optimization and avoiding getting trapped in local optima. Then, during the iterative update process, the design layout is transformed based on the current spatial transformation parameters, and multiple reference image samples are constructed in conjunction with process parameters. This allows the generated reference images to adapt to changes in process conditions, improving the ability to model imaging differences under complex process conditions. Furthermore, the spatial transformation parameters are updated based on the statistical distribution of multiple reference image samples. Utilizing statistical distribution information, low-confidence regions can be effectively identified, allowing the update of parameters to be dominated by confident regions, while interference from defective, noise, and blurred regions is suppressed, significantly improving the robustness and stability of the alignment. Finally, the final spatial transformation parameters are output, providing accurate geometric correspondence for subsequent defect detection and process analysis. This invention, through the above combined scheme, achieves high-precision, highly robust alignment of the layout and optical image under complex process conditions and interference.

[0038] Furthermore, since sensor noise, local grayscale fluctuations, and imaging brightness variations may exist in the detection optical image, template matching based directly on the original grayscale image is easily affected by differences in imaging conditions. Therefore, step S2 specifically includes: 1. Preprocess the design layout and inspect the optical images.

[0039] Specifically, regarding the acquired design map and detection of optical images Preprocessing is performed to eliminate noise and global grayscale differences from the image acquisition process. Specific operations include: Denoising: Use median filtering or Gaussian filtering to smooth the image and reduce the impact of sensor noise (such as shot noise).

[0040] Gray-level normalization: linearly mapping the gray-level values ​​of an image to a uniform range, for example... This eliminates differences in overall brightness caused by variations in light intensity or device gain. After preprocessing, the preprocessed design layout is obtained. and detection of optical images .

[0041] Furthermore, preprocessing may also include mean normalization, variance normalization, grayscale stretching, noise filtering, or a combination thereof. It should be noted that this invention does not limit the specific preprocessing algorithm; any algorithm that can reduce image grayscale differences and enhance the stability of subsequent structure extraction can be considered an optional implementation of this invention.

[0042] 2. Perform low-frequency separation and high-frequency enhancement on the preprocessed design layout and detection optical image respectively to obtain the high-frequency structural components corresponding to the design layout and detection optical image respectively.

[0043] Furthermore, the steps of performing low-frequency separation and high-frequency enhancement on the preprocessed design layout and detection optical image respectively to obtain the high-frequency structural components corresponding to the design layout and detection optical image specifically include: 2.1. Gaussian low-pass filtering is used to extract the low-frequency components of the design layout and the detection optical image respectively.

[0044] Specifically, to further reduce low-frequency background variations and highlight the edges of graphic structures, this embodiment performs low-frequency separation on the preprocessed image. (For the detection optical image) and design map Gaussian low-pass filtering was performed separately to obtain the low-frequency components: ; ; in, This represents the Gaussian filter scaling parameter. Represents Gaussian filtering operation. Indicates detection of optical images The low-frequency components obtained after Gaussian low-pass filtering (after preprocessing) Indicates the design layout The low-frequency components are obtained after Gaussian low-pass filtering (after preprocessing). The low-frequency components mainly reflect the slowly changing background, overall brightness changes, and large-scale grayscale changes in the image.

[0045] 2.2 Subtract the corresponding low-frequency components from the preprocessed design layout to obtain the high-frequency structural components of the design layout.

[0046] 2.3 Subtract the corresponding low-frequency component from the preprocessed detection optical image to obtain the high-frequency structural component of the detection optical image.

[0047] Specifically, the high-frequency structural components are obtained by subtracting the preprocessed image from its corresponding low-frequency components: ; ; in, Indicates detection of optical images High-frequency structural components, Indicates the design layout The high-frequency structural components mainly contain information such as graphic edges, line contours, and local structural changes. This processing reduces the differences between the detection optical image and the design layout caused by variations in brightness, background, or imaging style, allowing subsequent matching to focus more on the graphic structure itself rather than the original grayscale values.

[0048] 3. Based on the gradient operator, calculate the gradient magnitude of the high-frequency structural components of the design layout and the detection optical image respectively, and obtain the structural feature maps of the design layout and the detection optical image.

[0049] Furthermore, the steps of calculating the gradient magnitudes of the high-frequency structural components of the design layout and the detection optical image based on the gradient operator to obtain the structural feature maps of the design layout and the detection optical image specifically include: 3.1 The Sobel operator is used to calculate the horizontal and vertical gradients of the high-frequency structural components.

[0050] Specifically, after obtaining the high-frequency structural components, this embodiment further extracts structural features based on gradient operators. Taking the detection of optical images as an example, the horizontal gradient can be calculated using the Sobel operator. and vertical gradient : ; .

[0051] 3.2. Calculate the gradient magnitude based on the horizontal and vertical gradients to obtain the structural feature map. Specifically, based on the horizontal gradient... and vertical gradient Calculate gradient magnitude The structural feature map of the detected optical image is obtained: ; Correspondingly, the design layout can also be... high frequency components Perform the same process to obtain the design layout. Structural feature diagram Structural feature maps are used to represent edges or locations with strong structural changes in an image. Compared to the original grayscale image, structural feature maps are less sensitive to overall brightness changes and are more suitable for initial matching between the design layout and the detection optical image. It should be noted that the gradient operator is not limited to the Sobel operator; the Scharr operator, Prewitt operator, Laplacian operator, or other derivative operators can also be used.

[0052] Furthermore, since isolated noise points or local anomalous responses may exist in the detection optical image, this embodiment can further smooth the structural feature map after obtaining it. For example, a Gaussian filter can be used to slightly smooth the structural feature map: ; in, This represents the smoothing scale of the structure graph. Smoothing can suppress isolated noise responses and make the edge responses in the structure feature map more continuous, thereby improving the stability of subsequent sliding window matching.

[0053] 4. Set a search area in the structural feature map of the detected optical image, calculate the structural similarity between the structural feature map and the design layout using a sliding window method, and take the candidate position with the highest similarity as the initial alignment result.

[0054] Furthermore, the steps of setting a search region in the structural feature map of the detected optical image, calculating the structural similarity between the structural feature map and the design layout using a sliding window method, and taking the candidate position with the highest similarity as the initial alignment result, specifically include: 4.1. Normalized cross-correlation is used as the matching score. Within the search area, each candidate position is traversed in a sliding window manner to calculate the normalized cross-correlation value between the structural features of each candidate position and the structural feature map of the design layout.

[0055] Specifically, in obtaining the structural feature map of the design layout and detection of optical image structural feature maps Then, sliding window matching is performed based on the structural feature map.

[0056] First, set the search area: In In the process, based on prior information (e.g., knowing roughly that the design layout is located in the central region of the detection image), a reasonable search range is set, for example, the search area is set to... and This is to improve matching efficiency and avoid false matches.

[0057] Then, structural similarity is calculated: within the search region, every possible starting position is traversed using a sliding window approach. For each window position, the sub-image within that window is extracted. And calculate its relationship with the template. The structural similarity between them. In this embodiment, normalized cross-correlation is used as the similarity measure. The range of normalized cross-correlation is... It is invariant to linear brightness changes, making it very suitable for this scenario. Normalized cross-correlation is used as the matching score. : ; in, This indicates the structural features corresponding to the current candidate window in the detected optical image. This indicates the structural features corresponding to the design layout. This represents normalized cross-correlation. A higher matching score indicates a greater structural similarity between the candidate region and the design layout. Besides normalized cross-correlation, structural matching can also employ cross-correlation, Chamfer distance, structural similarity metrics, or other similarity functions based on edge / gradient responses. This invention does not limit the specific matching metric used.

[0058] 4.2. The candidate position with the highest normalized cross-correlation value is used as the initial alignment result.

[0059] Specifically, the initial alignment result is determined by identifying the window position with the highest normalized cross-correlation score after the traversal. This position is considered the most likely location of the design layout in the detected optical image.

[0060] 5. Determine the initial parameters of the spatial transformation based on the initial alignment results.

[0061] Specifically, based on this optimal matching position, the initial parameters of the spatial transformation are determined. Assuming a translation transformation model is used, and the top-left corner of the detection image is the origin, while the original design layout was located at the origin of its own coordinate system, then the initial translation parameters are... It is equal to the coordinates of the top left corner of the best matching window.

[0062] This embodiment significantly improves the robustness of initial alignment through the above-described refined structural feature extraction and matching process, effectively avoiding matching failures caused by grayscale differences and local interference.

[0063] Furthermore, step S3, which involves transforming the design layout based on the current spatial transformation parameters and constructing multiple reference image samples in conjunction with process parameters, specifically includes: 1. Use the current spatial transformation parameters to perform spatial transformation on the design layout to obtain the transformed design layout.

[0064] Specifically, using the spatial transformation parameters of the current iteration round Regarding the original design map Perform spatial transformation.

[0065] In one implementation, when the spatial change is mainly translation, a translation transformation can be used, expressed as: ,in Initial translation parameters Used as the initial value for translation transformation.

[0066] In another implementation, the spatial transformation can also take the form of an affine transformation, expressed as: ,in, This represents a linear transformation matrix, which can include geometric transformations such as rotation, scaling, and shearing. This represents the translation vector.

[0067] In another embodiment, to compensate for local wafer deformation, non-uniform offset caused by the process, or local structural distortion, the spatial transformation can be further represented as a non-rigid deformation: ,in, Indicates position The displacement field at a given location can be predicted using grid control points, spline interpolation, optical flow models, or neural networks.

[0068] For the output image Each pixel position in ,pass Find it in the input design layout. The corresponding position is then determined, and the pixel value at that position is obtained using methods such as bilinear interpolation. The result is... It is a spatial method for detecting optical images. The initial alignment of the design layout.

[0069] 2. Based on the cross-attention mechanism, the transformed design layout and process parameters are fused and repeatedly input into the pre-trained reference image generation model to obtain multiple reference image samples.

[0070] It should be noted that traditional generation methods typically treat process parameters as simple conditional vectors concatenated, which fails to effectively model the differentiated impact of parameters on different spatial regions. To address this issue, this embodiment introduces a cross-attention mechanism, specifically: (1) Feature extraction: First, the transformed design layout is extracted. Input a feature extraction network (e.g., a convolutional neural network or a visual Transformer) to obtain its spatial feature map. The feature vector at each location can be viewed as a "query". Simultaneously, the process parameters... (Essential parameters such as focal length, dose, and layer type) are encoded into a feature vector through a parametric encoding network (e.g., a multilayer perceptron, MLP). And use them as “key” and “value”.

[0071] (2) Cross-attention fusion: Next, cross-attention computation is performed. Its core formula is: ,in (Design layout features) (Process parameter characteristics) This is the scaling factor. This process can be understood as: for each spatial location in the design layout (each... The model will calculate its characteristics in relation to global process parameters ( The correlation between the features () is used to obtain an attention weight. Then, this weight is used to apply attention to the process parameter features () A weighted sum is performed to generate a new feature that incorporates process information and is spatially relevant. For example, in areas with densely packed edges, the model might assign a higher attention weight to the "focal length" parameter to better simulate the blur effect; while in large, flat areas, its weight would be reduced.

[0072] (3) Generate multiple samples: Combine the fused features The image is fed into an image decoder network, which upsamples step-by-step to generate the final reference image. To obtain multiple reference image samples, randomness is introduced during the generation process. For example, random noise can be added to the input of the decoder or to intermediate feature layers. (e.g., Gaussian noise). By sampling different noises multiple times. and will By inputting each noise sample into the decoder, multiple reference image samples can be obtained. These samples, while maintaining overall structural consistency, differ in details (such as texture and local contrast), reflecting the distribution of the model among different possible imaging results.

[0073] This embodiment utilizes a cross-attention mechanism to enable adaptive modulation of process parameters based on different spatial structures of the design layout, greatly improving the fidelity and diversity of the generated images; through multiple sampling, it provides a data foundation for subsequent uncertainty estimation.

[0074] Furthermore, the step of fusing the transformed design layout with process parameters based on the cross-attention mechanism includes: using the spatial features of the design layout as query features, using the features of the encoded process parameters as key features and value features, and performing cross-attention computation.

[0075] Specifically, let's consider the design layout after spatial transformation. The size is After passing through the feature extraction network, a spatial feature map is obtained. ,in It's the number of channels. Flattened, it is a series of feature vectors representing spatial locations, i.e. ,in It refers to the number of spatial locations.

[0076] Set process parameters It is 3D vectors (e.g., embeddings containing focal length, dose, PSF width, and layer type) are encoded by a network After encoding, the feature vector of process parameters is obtained. To perform cross-attention computation, it is copied or extended to These are identical vectors, or can be viewed as a sequence of length 1. To construct... and ,Will Through two different linear transformation matrices and Mapping to Same feature dimension, i.e. , .

[0077] Then, the calculation process across attention is as follows: (1) Calculate the attention score: for each query vector (Corresponding to a spatial location), calculate its relationship with the key. The dot product, divided by the scaling factor The attention score is obtained as follows: .because There is only one (because the global process parameter is treated as a token), so It is a scalar.

[0078] (2) Calculate attention weights: for all spatial locations Apply the softmax function (or apply it to a single) Applying the sigmoid function (depending on the implementation) yields normalized attention weights. . This reflects the effect of process parameters on the first The importance of a spatial location.

[0079] (3) Weighted summation: Finally, the features after fusion ,in It is a value vector. That is, each spatial location receives a weighted, modulated feature based on its correlation with process parameters. Ultimately, all... Reorganized into spatial feature map , which serves as the input to the decoder.

[0080] This cross-attention mechanism, which uses spatial features as queries and global parameters as keys / values, achieves a form of "soft selection" or "soft modulation." It allows the network to automatically learn which key information from process parameters to "pay attention to" for different structures within the layout (e.g., isolated lines vs. dense arrays). For example, for dense regions, the model might focus more on dose parameters to simulate linewidth variations; for edge regions, it might focus more on focal length and PSF to simulate blur levels. This is more flexible and efficient than simply concatenating parameter vectors to the features of each pixel, significantly improving the model's adaptability to various process variations.

[0081] Furthermore, step S3, which involves updating the parameters of the spatial transformation based on the statistical distribution of multiple reference image samples, specifically includes: 1. Calculate the pixel mean at each pixel location based on multiple reference image samples, and use it as the reference image mean.

[0082] Specifically, based on the generated One reference image sample Calculate the position of each pixel The average pixel value is used as the final reference image. The mean image represents the most typical imaging result under given design layout and process parameters.

[0083] 2. Calculate the variance of the pixel value at each pixel location based on the mean of the reference image and multiple reference image samples, as the pixel-level uncertainty.

[0084] Specifically, based on the mean of the reference image And multiple reference image samples, calculate the position of each pixel. Pixel value variance This variance is then used as the pixel-level uncertainty at that location. A larger variance indicates more dispersed predictions from different samples at that location, resulting in lower model confidence. These high-uncertainty areas often correspond to defects not present in the design layout, strong noise, or complex process variations that the generative model cannot accurately model.

[0085] The calculation process for pixel-level uncertainty is expressed as follows: ; ; in, Represents the coordinates of a pixel. Indicates the number of reference image samples. Indicates the first A reference image sample at pixel location Pixel value at that location, Indicates the pixel position of the reference image sample. The average pixel value at that location. Indicates pixel position Pixel-level uncertainty at the location.

[0086] 3. Utilize pixel-level uncertainty to weight the pixel error between the mean of the detected optical image and the reference image, and construct a weighted loss function.

[0087] Specifically, using the calculated pixel-level uncertainty We construct a weighted loss function. The goal of this loss function is to measure the current transformation parameters. Below, the mean of the generated reference image Compared with actual detection optical images The difference lies in dividing the contribution of each pixel's error by the uncertainty of that pixel. This indicates that: exist In small regions (high-confidence regions), the error term has a high weight, dominates gradient calculation, and drives spatial transformation parameters. Update in the right direction.

[0088] exist In large regions (low-confidence regions, such as defects or strong noise points), the weight of the error term is suppressed, making these regions almost negligible. The update will have an impact.

[0089] The weighted loss function is expressed as: ; in, This represents the weighted loss function. Indicates the detection of optical image at pixel position Pixel value at that location, This is a preset stability term. It is a very small positive number (e.g.) (), used to prevent numerical instability caused by a denominator of zero.

[0090] 4. Update the parameters of the spatial transformation by minimizing the weighted loss function.

[0091] Specifically, the weighted loss function described above is minimized using gradient descent or its variants (such as the Adam optimizer). In each iteration, the loss function is calculated with respect to the spatial transformation parameters. The gradient is calculated and updated along the direction of gradient descent. The value of . Since the gradient in the low-confidence region is effectively suppressed, the parameter update mainly depends on those regions with high confidence in the generative model and clear structure. After multiple iterations, It will converge to a value that optimally aligns the high-confidence regions.

[0092] This embodiment creatively solves the problem of unstable alignment results in areas with defects, noise, blur, or local process fluctuations by introducing pixel-level uncertainty based on multiple generation and weighting the loss function. This allows the alignment process to "focus" on reliable areas and "ignore" interference areas, greatly improving the robustness of the overall alignment.

[0093] It should be understood that the above embodiments mainly describe the inference phase (i.e., generating model parameters). Fixed, only optimize spatial transformation parameters How to use an uncertainty-weighted loss function for alignment. However, in the training phase of the reference image generation model or in certain specific application scenarios, introducing additional regularization terms, or even simultaneously affecting the parameters of the generation model, is problematic. and spatial transformation parameters Joint optimization can yield better performance.

[0094] Therefore, in some embodiments, to avoid spatial transformation Unreasonable geometric deformations (such as excessive distortion or non-physical local stretching) can be addressed by adding a regularization term to the uncertainty-weighted loss function. At this point, the optimization objective is expressed as: ; in, This represents the spatial transformation regularization term. Depending on the different transformation methods... It can take different specific forms: Translation / Affine Transformation: It can be a transformation parameter Norm, i.e. It is used to constrain translation, rotation angle, scaling factor, etc., so as to avoid producing transformations that do not conform to physical reality. Nonlinear deformation (displacement field): if Represented as a dense displacement field ,but The gradient smoothing term of the displacement field can be taken, for example. This encourages smooth displacement changes between adjacent pixels, preventing discontinuous, jagged deformations, which aligns with the typically continuous and smooth characteristics of wafer deformation in semiconductor manufacturing.

[0095] It is the regularization term weight coefficient, which is a positive number. The larger the value, the stronger the penalty for deformation, and the smoother and more conservative the resulting transformation; The smaller the value, the more the model tends to fit the data through more complex deformations.

[0096] This embodiment introduces regularization terms. This effectively constrains the smoothness of spatial transformations and limits excessive or unreasonable geometric deformations, thereby improving the physical reliability and generalization ability of alignment results. This is especially important when dealing with wafer edge regions or regions with local process fluctuations, as it prevents the model from incorrectly fitting imaging differences or noise as complex geometric distortions.

[0097] In other embodiments, during the model training phase, or in certain end-to-end application scenarios where there is no need to distinguish between training and inference, the present invention can also simultaneously adjust the spatial transformation parameters. and generating model parameters Perform joint optimization. The objective function at this point is: ; The objective function is mathematically identical to the one described above, but the range of the optimization variables has changed. In this case, not only the spatially varying parameters... It will be updated, referencing parameters such as convolutional kernel weights and projection matrices across attention layers within the image generation model. It will also be updated together. This means that the reference image generation model will be updated for the current specific detected image. and process parameters Adaptive adjustments are made to better fit the imaging characteristics of the specific sample. When spatial transformation... and generative models Simultaneous optimization allows for a clearer breakdown of error sources. If the error in a certain area is corrected by adjusting... This can be eliminated by changing the geometric position, and the optimizer will prioritize adjusting it. If the error is difficult to eliminate through geometric transformation, then it needs to be eliminated through updating. This is explained by adjusting the imaging model. This mechanism helps to fundamentally distinguish between "true misalignment" and "imaging differences caused by unmodeled process variations".

[0098] This embodiment utilizes joint optimization to enable the generative model to perform online adaptive fine-tuning for the specific process state of the current wafer (e.g., slight defocusing or dosage deviations unique to this batch of wafers). Compared to using a fixed pre-trained model, this approach can generate more realistic reference images, thereby obtaining more accurate alignment results.

[0099] Furthermore, in some embodiments, the step of outputting the alignment result generated based on the final spatial transformation parameters and the corresponding confidence evaluation data specifically includes: The output includes the final design layout, the final reference image sample, and the final pixel-level uncertainty reflecting the reliability of each pixel position, all obtained based on the final spatial transformation parameters.

[0100] Specifically, after the iterative optimization converges and the final spatial transformation parameters are obtained, the following content is further output: 1. Final design layout: that is, the layout that applies the final spatial transformation parameters. The final design map This image has been compared with the detection optical image. Precise alignment is achieved in space, which can be directly used for overlay display or pixel-by-pixel comparison.

[0101] 2. Final reference image sample: Output at least one final reference image sample. Preferably, output the mean of the final reference image. This mean image is based on the final transformed design layout. and process parameters The generated image represents an image under ideal, defect-free conditions. By differentiating the original optical image from the inspection image, potential defect areas can be clearly highlighted.

[0102] 3. Final pixel-level uncertainty: Outputs the final pixel-level uncertainty distribution. It can be used to identify low-confidence areas and assist in subsequent defect judgment or manual review.

[0103] This embodiment provides more comprehensive information to the semiconductor inspection system by outputting aligned design layout, reference image, and uncertainty distribution. The final design layout and reference image are direct inputs for defect detection; while the pixel-level uncertainty distribution serves as an important confidence reference for the defect detection algorithm. For example, it allows for focused defect searching only in high-uncertainty regions or a lower detection threshold in low-uncertainty regions. This significantly improves the intelligence level and interpretability of the entire defect detection process. Outputting aligned design layout and uncertainty distribution allows downstream tasks to distinguish between genuine geometric deviations and anomalies (potentially defects) that the model cannot explain.

[0104] Figure 2 A schematic diagram illustrating the functional modules of an alignment device for semiconductor layouts and optical patterns according to an embodiment of the present invention is shown. Figure 3 As shown, the alignment device 20 for the semiconductor layout and the optical pattern includes: an acquisition module 21, an extraction module 22, an update module 23, and an output module 24. The acquisition module 21 is used to acquire design layouts, detection optical images, and process parameters related to semiconductor manufacturing or testing. Extraction module 22 is used to extract the structural feature maps of the design layout and the detection optical image respectively, and perform initial alignment based on the two obtained structural feature maps to obtain the initial parameters of spatial transformation; The update module 23 is used to iteratively update the parameters of the spatial transformation based on the initial parameters until convergence. Each iteration update includes: transforming the design layout based on the current spatial transformation parameters, constructing multiple reference image samples in combination with process parameters, and then updating the parameters of the spatial transformation based on the statistical distribution of the multiple reference image samples. Output module 24 is used to output the final spatial transformation parameters, and output the alignment results and corresponding confidence evaluation data generated based on the final spatial transformation parameters.

[0105] Optionally, the extraction module 22 performs operations to extract structural feature maps from the design layout and the detection optical image respectively, and performs initial alignment based on the two obtained structural feature maps to obtain initial parameters for spatial transformation, specifically including: Preprocessing of design layouts and detection of optical images; Low-frequency separation and high-frequency enhancement are performed on the preprocessed design layout and detection optical image respectively to obtain the high-frequency structural components corresponding to the design layout and detection optical image respectively. The gradient magnitudes of the high-frequency structural components of the design layout and the detection optical image are calculated based on the gradient operator to obtain the structural feature maps of the design layout and the detection optical image. In the structural feature map of the detected optical image, a search region is set, and the structural similarity between the structural feature map and the structural feature map of the design layout is calculated by sliding window. The candidate position with the highest similarity is used as the initial alignment result. The initial parameters of the spatial transformation are determined based on the initial alignment results.

[0106] Optionally, the extraction module 22 performs low-frequency separation and high-frequency enhancement operations on the preprocessed design layout and the detection optical image, respectively, specifically including: Gaussian low-pass filtering is used to extract the low-frequency components of the design layout and the detection optical image, respectively; Subtract the corresponding low-frequency components from the preprocessed design layout to obtain the high-frequency structural components of the design layout. The high-frequency structural components of the detection optical image are obtained by subtracting the corresponding low-frequency components from the preprocessed detection optical image.

[0107] Optionally, the extraction module 22 performs the operation of calculating the gradient magnitudes of the high-frequency structural components of the design layout and the detection optical image based on the gradient operator, respectively, to obtain the structural feature maps of the design layout and the detection optical image, specifically including: The Sobel operator was used to calculate the horizontal and vertical gradients of the high-frequency structural components, respectively. The gradient magnitude is calculated based on the horizontal and vertical gradients to obtain the structural feature map.

[0108] Optionally, the extraction module 22 performs the following operations: setting a search region in the structural feature map of the detected optical image, calculating the structural similarity between the structural feature map and the design layout using a sliding window method, and using the candidate position with the highest similarity as the initial alignment result. Specifically, this includes: Normalized cross-correlation is used as the matching score. Within the search area, each candidate position is traversed in a sliding window manner to calculate the normalized cross-correlation value between the structural features of each candidate position and the structural feature map of the design layout. The candidate position with the highest normalized cross-correlation value is used as the initial alignment result.

[0109] Optionally, the update module 23 performs operations to transform the design layout based on the current spatial transformation parameters and construct multiple reference image samples in conjunction with process parameters, specifically including: The design layout is spatially transformed using the current spatial transformation parameters to obtain the transformed design layout. Based on the cross-attention mechanism, the transformed design layout and process parameters are fused and repeatedly input into a pre-trained reference image generation model to obtain multiple reference image samples.

[0110] Optionally, update module 23 performs an operation to fuse the transformed design layout with process parameters based on a cross-attention mechanism, specifically including: The spatial features of the design layout are used as query features, and the features of the encoded process parameters are used as key and value features, and cross-attention computation is performed.

[0111] Optionally, the update module 23 performs the operation of updating the parameters of the spatial transformation based on the statistical distribution of multiple reference image samples, specifically including: The mean pixel value at each pixel location is calculated based on multiple reference image samples and used as the mean of the reference images; The variance of the pixel value at each pixel location is calculated based on the mean of the reference image and multiple reference image samples, which serves as the pixel-level uncertainty. A weighted loss function is constructed by weighting the pixel error between the mean of the detection optical image and the reference image using pixel-level uncertainty; The parameters of the spatial transformation are updated by minimizing the weighted loss function.

[0112] Optionally, the calculation process for pixel-level uncertainty is expressed as follows: ; ; in, Represents the coordinates of a pixel. Indicates the number of reference image samples. Indicates the first A reference image sample at pixel location Pixel value at that location, Indicates the pixel position of the reference image sample. The average pixel value at that location. Indicates pixel position Pixel-level uncertainty at the location.

[0113] Alternatively, the weighted loss function can be expressed as: ; in, This represents the weighted loss function. Indicates the detection of optical image at pixel position Pixel value at that location, This is a preset stability term.

[0114] Optionally, the output module 24 performs the operation of outputting the alignment result and corresponding confidence evaluation data generated based on the final spatial transformation parameters, specifically including: The output includes the final design layout, the final reference image sample, and the final pixel-level uncertainty reflecting the reliability of each pixel position, all obtained based on the final spatial transformation parameters.

[0115] For further details regarding the implementation techniques of each module in the alignment device for semiconductor layout and optical pattern in the above embodiments, please refer to the description in the alignment method for semiconductor layout and optical pattern in the above embodiments, which will not be repeated here.

[0116] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

[0117] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Figure 3 As shown, the computer device 30 includes a processor 31 and a memory 32 coupled to the processor 31. The memory 32 stores program instructions. When the program instructions are executed by the processor 31, the processor 31 performs the steps of the alignment method between the semiconductor layout and the optical pattern described in any of the above embodiments.

[0118] The processor 31 can also be referred to as a Central Processing Unit (CPU). The processor 31 may be an integrated circuit chip with signal processing capabilities. The processor 31 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor.

[0119] See Figure 4 , Figure 4This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. The computer-readable storage medium of this embodiment stores program instructions 41 capable of implementing the above-described alignment method between a semiconductor layout and an optical pattern. These program instructions 41 can be stored in the computer-readable storage medium in the form of a software product, including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, or computer devices such as computers, servers, mobile phones, and tablets.

[0120] In the several embodiments provided in this application, it should be understood that the disclosed computer devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0121] Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A method for aligning a semiconductor layout with an optical pattern, characterized in that, include: To obtain design layouts, inspect optical images, and process parameters related to semiconductor manufacturing or inspection; The structural feature maps of the design layout and the detection optical image are extracted respectively, and the initial alignment is performed based on the two obtained structural feature maps to obtain the initial parameters of the spatial transformation; Based on the initial parameters, the parameters of the spatial transformation are iteratively updated until convergence. Each iteration update includes: transforming the design layout based on the current spatial transformation parameters, constructing multiple reference image samples in combination with the process parameters, and then updating the parameters of the spatial transformation according to the statistical distribution of the multiple reference image samples. Output the final spatial transformation parameters, and output the alignment result and corresponding confidence evaluation data generated based on the final spatial transformation parameters.

2. The method for aligning semiconductor layouts and optical patterns according to claim 1, characterized in that, The process involves extracting structural feature maps from the design layout and the detection optical image, respectively, and performing initial alignment based on the two obtained structural feature maps to obtain initial parameters for spatial transformation, including: Preprocess the design layout and the detection optical image; Low-frequency separation and high-frequency enhancement are performed on the preprocessed design layout and the detection optical image respectively to obtain the high-frequency structural components corresponding to the design layout and the detection optical image respectively. The gradient magnitudes of the high-frequency structural components of the design layout and the detection optical image are calculated based on the gradient operator to obtain the structural feature maps of the design layout and the detection optical image. A search area is set in the structural feature map of the detected optical image. The structural similarity between the structural feature map and the structural feature map of the design layout is calculated by sliding window method, and the candidate position with the highest similarity is used as the initial alignment result. The initial parameters of the spatial transformation are determined based on the initial alignment results.

3. The method for aligning semiconductor layouts and optical patterns according to claim 2, characterized in that, The process of performing low-frequency separation and high-frequency enhancement on the preprocessed design layout and detection optical image includes: The low-frequency components of the design layout and the detection optical image are extracted using Gaussian low-pass filtering, respectively. Subtract the corresponding low-frequency component from the preprocessed design layout to obtain the high-frequency structural component of the design layout; The high-frequency structural components of the detection optical image are obtained by subtracting the corresponding low-frequency components from the preprocessed detection optical image.

4. The method for aligning semiconductor layouts and optical patterns according to claim 2, characterized in that, The step of calculating the gradient magnitudes of the high-frequency structural components of the design layout and the detection optical image based on the gradient operator to obtain the structural feature maps of the design layout and the detection optical image includes: The horizontal and vertical gradients of the high-frequency structural components are calculated using the Sobel operator. The gradient magnitude is calculated based on the horizontal and vertical gradients to obtain the structural feature map.

5. The method for aligning semiconductor layouts and optical patterns according to claim 2, characterized in that, The process involves setting a search region in the structural feature map of the detected optical image, calculating the structural similarity between the structural feature map and the design layout using a sliding window method, and using the candidate position with the highest similarity as the initial alignment result, including: Normalized cross-correlation is used as the matching score. Within the search area, each candidate position is traversed in a sliding window manner to calculate the normalized cross-correlation value between the structural features of each candidate position and the structural feature map of the design layout. The candidate position with the highest normalized cross-correlation value is used as the initial alignment result.

6. The method for aligning semiconductor layouts and optical patterns according to claim 1, characterized in that, The transformation of the design layout based on the current spatial transformation parameters, and the construction of multiple reference image samples in conjunction with the process parameters, includes: The design layout is spatially transformed using the current spatial transformation parameters to obtain the transformed design layout. Based on the cross-attention mechanism, the transformed design layout and the process parameters are fused and repeatedly input into a pre-trained reference image generation model to obtain multiple reference image samples.

7. The method for aligning semiconductor layouts and optical patterns according to claim 6, characterized in that, The process of fusing the transformed design layout with the process parameters based on the cross-attention mechanism includes: The spatial features of the design layout are used as query features, and the features of the encoded process parameters are used as key and value features, respectively, to perform cross-attention computation.

8. The method for aligning semiconductor layouts and optical patterns according to claim 1, characterized in that, The step of updating the parameters of the spatial transformation based on the statistical distribution of the multiple reference image samples includes: The mean pixel value at each pixel location is calculated based on the multiple reference image samples and used as the mean of the reference images; The pixel value variance at each pixel location is calculated based on the mean of the reference image and the multiple reference image samples, and is used as the pixel-level uncertainty. The pixel error between the mean of the detected optical image and the reference image is weighted using the pixel-level uncertainty to construct a weighted loss function; The parameters of the spatial transformation are updated by minimizing the weighted loss function.

9. The method for aligning semiconductor layouts and optical patterns according to claim 8, characterized in that, The calculation process for the pixel-level uncertainty is expressed as follows: ; ; in, Represents the coordinates of a pixel. Indicates the number of reference image samples. Indicates the first A reference image sample at pixel location Pixel value at that location, Indicates the pixel position of the reference image sample. The average pixel value at that location. Indicates pixel position Pixel-level uncertainty at the location.

10. The method for aligning a semiconductor layout with an optical pattern according to claim 9, characterized in that, The weighted loss function is expressed as follows: ; in, This represents the weighted loss function. Indicates the detection of optical image at pixel position Pixel value at that location, This is a preset stability term.

11. The method for aligning semiconductor layouts and optical patterns according to claim 8, characterized in that, The output, based on the final spatial transformation parameters, includes the alignment result and corresponding confidence assessment data, including: The output includes the final design layout, the final reference image sample, and the final pixel-level uncertainty reflecting the reliability of each pixel position, all obtained based on the final spatial transformation parameters.

12. A computer device, 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 program, it implements the alignment method of semiconductor layout and optical pattern as described in any one of claims 1 to 11.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the alignment method of the semiconductor layout and the optical pattern as described in any one of claims 1 to 11.