Intelligent identification method for defects of lithium niobate metasurface based on reactive ion beam etching
By collecting multimodal image data, generating physically driven synthetic samples, and designing domain-specific convolutional kernels, embedding physical constraints, multi-scale feature fusion and domain-adaptive transfer learning are achieved, and the sample annotation process is optimized. This solves the problem of insufficient feature capture in the identification of defects in lithium niobate metasurfaces of existing models, and realizes efficient and accurate defect identification and intelligent manufacturing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NAT UNIV OF DEFENSE TECH
- Filing Date
- 2026-01-19
- Publication Date
- 2026-04-24
AI Technical Summary
Existing ImageNet-pretrained CNN models cannot effectively capture the phase information of metasurface periodic structures, subtle changes in etching depth, and material anisotropy characteristics in lithium niobate metasurface defect identification, resulting in poor identification performance.
By collecting multimodal image data, generating physical-driven synthetic samples, designing domain-specific convolutional kernels, constructing a physical information neural network, embedding physical constraints, realizing multi-scale feature fusion and domain-adaptive transfer learning, optimizing the sample labeling process, establishing a closed-loop optimization mechanism, and deploying it to the production line for real-time defect identification.
It significantly improves the accuracy and generalization ability of lithium niobate metasurface defect identification, reduces data acquisition costs, improves model adaptability and identification efficiency, and realizes the transformation of intelligent manufacturing from passive detection to proactive prevention.
Smart Images

Figure CN121545153B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial inspection technology, specifically to a method for intelligent identification of defects on lithium niobate metasurfaces based on reactive ion beam etching. Background Technology
[0002] Intelligent defect identification of lithium niobate metasurfaces based on reactive ion beam etching is a key quality control step in integrated photonic chip manufacturing, involving scanning electron microscopy (SEM) image acquisition, convolutional neural network (CNN) feature learning, and multi-level defect classification. However, the poor data efficiency and limited domain generalization performance of traditional pre-trained models have become a core bottleneck commonly faced in materials science, especially in the data-scarce task of lithium niobate metasurface identification.
[0003] While current ImageNet-pretrained CNN models perform excellently in natural image processing, they face fundamental challenges in identifying defects in lithium niobate metasurfaces. The shallow convolutional kernels of these models are optimized for the texture and color of natural images, resulting in a severe mismatch with the grayscale nanoscale geometric features acquired by SEM / AFM. Pre-trained models cannot effectively capture the phase information of the metasurface's periodic structure, subtle variations in etching depth, and material anisotropy.
[0004] Therefore, we propose an intelligent defect identification method for lithium niobate metasurface based on reactive ion beam etching to address the aforementioned problems. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent defect recognition method for lithium niobate metasurfaces based on reactive ion beam etching, addressing the problem that the shallow convolution kernels of the models proposed in the background art are optimized for the texture and color of natural images, resulting in a serious mismatch with the grayscale nanoscale geometric features acquired by SEM / AFM. Furthermore, pre-trained models cannot effectively capture the phase information of the metasurface periodic structure, subtle changes in etching depth, and material anisotropy characteristics.
[0006] To achieve the above objectives, the present invention provides the following technical solution: a method for intelligent identification of defects in lithium niobate metasurface based on reactive ion beam etching, the specific steps of which are as follows:
[0007] S1. Collect multimodal image data, use scanning electron microscope and atomic force microscope to image the lithium niobate metasurface after reactive ion beam etching, obtain defect images, and label the reactive ion beam etching process parameters and lithium niobate material parameters corresponding to the defect images, and establish a ternary correlation database from image to parameter to defect type.
[0008] S2. Generate a physical-driven synthetic sample. Based on Monte Carlo ion bombardment simulation and finite element stress analysis, generate a synthetic defect image that conforms to the etching kinetics law and expand the ternary correlation database.
[0009] S3, Design-Specific Convolution Kernels: A dedicated feature extractor is constructed for the gray-scale geometric features of lithium niobate metasurfaces, including Gabor filter banks, edge-enhancing convolution kernels, and anisotropic elliptical receptive field convolution kernels.
[0010] S4. Construct a domain-specific pre-trained model and use a self-supervised learning method to train a convolutional neural network backbone model optimized for lithium niobate metasurface through contrastive learning and mask image modeling.
[0011] S5. Embed physical constraints and construct a physical information neural network. Embed the reactive ion beam etching kinetic equation and the constitutive relation of lithium niobate material into the convolutional neural network backbone model, and introduce physical residual constraint terms into the loss function.
[0012] S6. To achieve multi-scale feature fusion, an adaptive feature pyramid network is designed to fuse defect features at different scales, and the model is made lightweight through knowledge distillation.
[0013] S7. Establish a domain-adaptive transfer learning mechanism, adopt adversarial training to achieve unsupervised domain adaptation from the laboratory data domain to the production line data domain, and combine it with a continuous learning strategy to achieve online incremental updates of the model.
[0014] S8. Optimize the sample labeling process. Based on the active learning strategy of Bayesian uncertainty estimation, select high-information samples for priority labeling and use reactive ion beam etching process parameters as weak supervision labels to reduce labeling costs.
[0015] S9. Perform defect identification and closed-loop optimization. Deploy the trained model to the production line for real-time defect identification and classification. Perform root cause analysis based on the embedded physical knowledge module, generate process parameter optimization suggestions, and feed them back to the reactive ion beam etching equipment to form closed-loop control.
[0016] Preferably, step S1 is performed in the following manner:
[0017] S1.1. The lithium niobate metasurface sample after reactive ion beam etching was imaged using scanning electron microscopy and atomic force microscopy to obtain grayscale images and three-dimensional morphology data of the surface morphology. At least one defect type in the image data, such as etching inhomogeneity, sidewall roughness, microcracks, and material redeposition, was labeled. The spatial coordinates and geometric dimension feature parameters of the defects were recorded to obtain the original defect image dataset.
[0018] S1.2 Collect the reactive ion beam etching process parameters and lithium niobate material parameters corresponding to each image in the original defect image dataset. The process parameters include at least three of the following: ion beam energy, reactive gas flow rate, etching time, and vacuum chamber pressure. The material parameters include at least two of the following: crystal orientation, film thickness, and surface roughness. Establish the mapping relationship between the defect image and the parameters to obtain the ternary correlation data from image to parameter to defect type.
[0019] Preferably, step S2 is performed in the following manner:
[0020] S2.1 Extract process parameters and material parameters from the ternary correlation database, establish Monte Carlo ion bombardment simulation model and finite element stress analysis model, simulate the collision sputtering process and chemical reaction process between ions and lithium niobate surface, calculate the etching rate distribution, sidewall morphology evolution and redeposited particle distribution, calculate the stress field distribution and microcrack initiation location inside the metasurface structure, and perform bidirectional coupling iterative calculation of ion bombardment simulation and stress analysis to obtain comprehensive defect morphology prediction data;
[0021] S2.2. A physical rendering algorithm is used to convert the defect morphology prediction data into a synthetic defect image. Based on the imaging mechanism of scanning electron microscopy and atomic force microscopy, the contrast, noise and resolution characteristics of the real microscope are simulated. The synthetic defect image is automatically labeled, and the defect type, location coordinates and feature size parameters are extracted. The corresponding process parameter labels and material parameter labels are associated. After verifying the statistical consistency between the synthetic image and the original image, it is added to the ternary association database to obtain the expanded ternary association database.
[0022] Preferably, step S3 is implemented in the following manner:
[0023] S3.1 Perform feature statistical analysis on the grayscale images of lithium niobate metasurfaces in the expanded ternary association database. Use two-dimensional Fourier transform to extract the spatial frequency distribution of periodic structures. Use directional gradient histogram and structural tensor analysis to determine the dominant direction and anisotropy coefficient. Determine the preferred etching direction based on the crystal system symmetry of lithium niobate crystals. Based on the statistical results, design Gabor filter bank parameters, gradient operator type and weight distribution of edge-enhanced convolution kernels, and major and minor axis ratio and principal axis direction of anisotropic elliptical receptive field convolution kernels.
[0024] S3.2 Generate 12-20 Gabor kernel functions, multi-directional gradient detection convolution kernels, and 3-5 anisotropic convolution kernels according to the design parameters. Combine the three types of convolution kernels according to a parallel multi-channel architecture or a serial cascaded architecture. Set the Gabor filter bank parameters to fixed weights, and set the edge enhancement convolution kernel and anisotropic convolution kernel to learnable parameters. Use Xavier initialization or He initialization methods to set the initial weight values, add L2 regularization constraints, and obtain a dedicated feature extractor for lithium niobate metasurfaces.
[0025] Preferably, step S4 is performed in the following manner:
[0026] S4.1. Using the dedicated feature extractor obtained in step S3 as the encoder front end, sample defect images from the expanded ternary association database, perform random cropping, Gaussian blurring, and color dithering enhancement operations on the images to generate positive sample pairs. Based on the process parameter labels, use different images with ion beam energy differences of less than 50 eV and etching time differences of less than 20% as positive sample pairs. Use the SimCLR architecture to extract feature vectors and calculate cosine similarity. Set the NT-Xent contrast loss function, adjust the negative sample weights according to the Euclidean distance of the process parameters, and complete the contrast learning training.
[0027] S4.2. Based on the encoder trained by contrastive learning, the input image is divided into 12×12 pixel image blocks, and 50%-70% of the image blocks are randomly occluded. The occlusion probability of image blocks at the edge of the periodic structure is increased to 1.5 times the base probability. Features are extracted by the encoder and the occluded image blocks are reconstructed by the decoder. The mean squared error reconstruction loss function is set, and the contrastive learning loss and reconstruction loss are combined with weight coefficients of 0.5 and 0.5 to form the total loss function. The AdamW optimizer is used to train for 100 cycles, and the encoder weights are saved to obtain the pre-trained backbone model.
[0028] Preferably, step S5 is performed in the following manner:
[0029] S5.1 Extract the reactive ion beam etching kinetic equation and the anisotropic elastic constitutive relation of lithium niobate. Discretize the physical equation into tensor operations using the finite difference method. Insert a physical constraint layer after the 3rd and 5th convolutional layers of the pre-trained model in step S4. Map the convolutional features to the etching rate field, stress field components and damage variables through the feature mapping sub-layer. Calculate the theoretical defect morphology features by substituting them into the physical equation through the physical calculation sub-layer. After fusing the physical prediction features with the convolutional features, pass them to the subsequent network layers through the residual connection.
[0030] S5.2 Define the etching dynamics residual loss, constitutive relation residual loss, mass conservation residual loss, and momentum conservation residual loss. Calculate the deviation between the network prediction value and the theoretical value of the physical equation, and combine them with weighted coefficients of 0.35, 0.35, 0.20, and 0.10 to form the total physical residual loss. Combine the total physical residual loss with the contrastive learning loss and mask modeling loss from step S4 with weights of 0.3, 0.3, and 0.4 to form the overall loss function. Use the backpropagation algorithm to update the network parameters and obtain the training objective function of the physical information neural network.
[0031] Preferably, step S6 is performed in the following manner:
[0032] S6.1. Based on the physical information neural network in step S5, feature maps from the 2nd to 5th convolutional layers are extracted to construct a feature pyramid. The number of channels is uniformly adjusted to 256 using 1×1 convolution. Two-dimensional fast Fourier transform is performed on the input image to calculate the energy ratio of high frequency and low frequency. The defect scale type is determined based on the energy ratio. Multilayer perceptron is used to calculate the adaptive attention weights of each pyramid level. Bilinear interpolation upsampling is performed on the deep feature maps. The four feature maps are concatenated and fused by 3×3 convolution. The global pooling layer and the classification head are connected to obtain the teacher network model.
[0033] S6.2. Using the network from step S6.1 as the teacher model, design a student model with the MobileNetV3-Small architecture. Reduce the number of convolutional layers from 50 to 25 and halve the number of feature channels. Sample images from the ternary association database in batches and input them into both the teacher and student models. Extract the intermediate layer feature maps and the classification layer probability distribution. Set the soft label KL divergence loss, feature map mean square error loss, and hard label cross-entropy loss, and combine them with weights of 0.5, 0.3, and 0.2 as the total loss function. Train the model for 100 epochs using the SGD optimizer to obtain a lightweight defect recognition model.
[0034] Preferably, step S7 is implemented in the following manner:
[0035] S7.1. Using the lightweight model from step S6 as the source domain pre-trained model, the ternary association database is used as the source domain dataset and the images collected from the production line are used as the target domain dataset. A classifier and a domain discriminator branch are added after the feature extractor. Images are sampled from the two domains at a 1:1 ratio to form batches, with the batch size set to 64. A gradient inversion layer is inserted between the feature extractor and the domain discriminator. The initial value of the inversion factor is close to 0 and gradually increases to 1. The total loss function is constructed as a combination of classification loss and domain adversarial loss with weights of 0.7 and 0.3. The Adam optimizer is used to train for 50 epochs with an initial learning rate of 0.0001 to obtain the domain adaptive model.
[0036] S7.2. Set up an experience replay buffer with a capacity of 5000 images to store historical samples. Maintain the buffer using a reserve pool sampling algorithm. New images from the production line are added to the buffer with pseudo-labels or manual annotation based on a prediction confidence threshold of 0.95. When 500 new samples are added, an update is triggered. New and historical samples are mixed in a 3:1 ratio. The Fisher information matrix is calculated to estimate the importance of parameters. An elastic weight consolidation loss is set with a consolidation coefficient of 0.05. The SGD optimizer is used to train for 10 epochs with a learning rate of 0.001. The accuracy of the historical test set is evaluated every 1000 images. When the accuracy drops by more than 5%, the parameters are rolled back to obtain a continuously learning model.
[0037] Preferably, step S8 is performed in the following manner:
[0038] S8.1. Based on the continuous learning model in step S7, variational inference is introduced into the weight parameters. Monte Carlo Dropout technology is used to set the dropout rate to 0.25. 20 inferences are performed on the unlabeled images to calculate the prediction entropy and coefficient of variation. The combined weights of 0.6 and 0.4 are used to form a comprehensive uncertainty score. The top 100 images with the highest scores are selected and clustered into 10 clusters in the feature space using the K-means algorithm. The 10 images with the highest scores are selected from each cluster. The selected samples and process parameter information are pushed to the labeling queue and added to the experience playback buffer in step S7.2 after labeling.
[0039] S8.2 Extract the association rules between process parameters and defect types from the ternary association database, and construct a decision tree model using the CART algorithm. Input features include ion beam energy (50-500 eV), etching time (10-300 seconds), pressure (0.1-10 Pa), and gas molar ratio (1:0 to 1:3). Set the maximum depth to 5-8 and the minimum number of leaf nodes to 10-30. Use 5-fold cross-validation for training. Read the equipment process parameter logs and input them into the decision tree to obtain weakly supervised labels. When the prediction probability is ≥0.75, it is used as a pseudo-label for direct training; when it is 0.5-0.75, it is used as a reference label to assist manual annotation; when it is <0.5, it is completely manually annotated. Construct a total loss function that includes strong supervision loss, weak supervision loss, and KL divergence consistency loss combined with weights of 0.5, 0.3, and 0.2, with a strong-weak supervision sample ratio of 2:3.
[0040] Preferably, step S9 is performed in the following manner:
[0041] S9.1. Convert the model from step S8 to ONNX format and deploy it to the edge computing device. Configure the microscope image acquisition interface, set the acquisition frequency to 5-10 images per minute, and the image resolution to 2048×2048 to 4096×4096 pixels. Perform grayscale normalization, bilateral filtering, and CLAHE enhancement preprocessing on the images. Input the images into the model for inference to obtain the probability distribution of defect categories, location bounding boxes, and confidence levels. Set the recognition threshold to 0.9. Input the defect image blocks into the physical constraint layer of step S5 to extract the etching rate field and stress field. Inversely solve the dynamic equations to estimate the parameter deviations and generate a root cause analysis report containing the defect type, physical mechanism, parameter deviation range, and confidence level.
[0042] S9.2. Based on the root cause analysis report, Bayesian optimization is used to search for optimal parameters, Gaussian process regression is used to predict the defect rate, and the expected improvement is calculated using the acquisition function. Constraints are set as follows: ion beam energy 100-400 eV, etching time 30-180 seconds, pressure 0.5-5 Pa, flow rate 10-100 sccm, and oxygen molar ratio 0-0.75. Candidate solutions are generated for different defect types, and the solution with the greatest expected improvement and uncertainty less than 0.05 is selected. An optimization suggestion document is generated, including the current configuration, recommended configuration, adjustment range, expected reduction rate, and confidence level. This document is transmitted to the device controller via the MES interface using OPC UA or Modbus TCP. The confidence threshold for automatic mode is 0.85. 10-30 samples are monitored and evaluated using t-test or Wilcoxon test. When the p-value is less than 0.05 and the defect rate decreases, the new parameters are retained and the database is updated; otherwise, the process is rolled back. Historical data is accumulated and the strategy network is trained using DQN or DDPG.
[0043] Compared with the prior art, the beneficial effects of the present invention are:
[0044] 1. Step S2 systematically addresses the problem of scarce experimental data through physics-driven simulation and a physics-based rendering algorithm, providing large-scale domain-specific training data for deep learning models. The bidirectional coupled simulation model generates defect morphology prediction data that conforms to etching kinetics based on real process and material parameters. The physics-based rendering algorithm converts the prediction data into synthetic images with statistical characteristics of real microscopic images. Automated annotation and statistical verification processes ensure the quality and consistency of the synthetic data. This method expands the sample size of the ternary correlation database several times, covering extreme process conditions and rare defect patterns that are difficult to obtain experimentally, significantly improving the diversity and representativeness of the training data. Compared to traditional methods that rely solely on experimental acquisition, this physics-driven synthesis mechanism significantly reduces data acquisition costs while enhancing the model's generalization ability to defect patterns under unseen process conditions, laying a data foundation for high-precision training of subsequent defect recognition models.
[0045] 2. Step S3 constructs a dedicated feature extractor for lithium niobate metasurfaces through statistically driven parameter design and the synergistic combination of multiple types of convolutional kernels. Feature statistical analysis combines the crystallographic properties of the material with the frequency and spatial domain features of the image. The convolutional kernel parameter design obtains physical constraints and quantitative basis. The synergistic work of Gabor filter banks, edge-enhancing convolutional kernels, and anisotropic convolutional kernels enables the capture of periodic structural phase information, etching depth variations, and crystal anisotropy features. The hybrid parameter setting strategy combines the prior knowledge of fixed weights with the data-driven advantages of learnable parameters, giving the feature extractor domain specificity while maintaining adaptability to different defect types. Compared to the general convolutional kernels of natural image pre-trained models, this domain-specific feature extractor improves the ability to identify periodic structural defects with small etching depth variations, and the deep learning model obtains higher-quality feature input. Attached Figure Description
[0046] Figure 1 This is a diagram illustrating the method steps of the present invention. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0048] Example 1: Please refer to Figure 1 A smart method for identifying defects in lithium niobate metasurfaces based on reactive ion beam etching is described, with the following specific steps:
[0049] S1. Collect multimodal image data, use scanning electron microscope and atomic force microscope to image the lithium niobate metasurface after reactive ion beam etching, obtain defect images, and label the reactive ion beam etching process parameters and lithium niobate material parameters corresponding to the defect images, and establish a ternary correlation database from image to parameter to defect type.
[0050] S2. Generate physically driven synthetic samples. Based on Monte Carlo ion bombardment simulation and finite element stress analysis, generate synthetic defect images that conform to the etching kinetics law and expand the ternary correlation database.
[0051] S3, Design-Specific Convolution Kernels: A dedicated feature extractor is constructed for the gray-scale geometric features of lithium niobate metasurfaces, including Gabor filter banks, edge-enhancing convolution kernels, and anisotropic elliptical receptive field convolution kernels.
[0052] S4. Construct a domain-specific pre-trained model and use a self-supervised learning method to train a convolutional neural network backbone model optimized for lithium niobate metasurface through contrastive learning and mask image modeling.
[0053] S5. Embed physical constraints and construct a physical information neural network. Embed the reactive ion beam etching kinetic equation and the constitutive relation of lithium niobate material into the convolutional neural network backbone model, and introduce physical residual constraint terms into the loss function.
[0054] S6. To achieve multi-scale feature fusion, an adaptive feature pyramid network is designed to fuse defect features at different scales, and the model is made lightweight through knowledge distillation.
[0055] S7. Establish a domain-adaptive transfer learning mechanism, adopt adversarial training to achieve unsupervised domain adaptation from the laboratory data domain to the production line data domain, and combine it with a continuous learning strategy to achieve online incremental updates of the model.
[0056] S8. Optimize the sample labeling process. Based on the active learning strategy of Bayesian uncertainty estimation, select high-information samples for priority labeling and use reactive ion beam etching process parameters as weak supervision labels to reduce labeling costs.
[0057] S9. Perform defect identification and closed-loop optimization. Deploy the trained model to the production line for real-time defect identification and classification. Perform root cause analysis based on the embedded physical knowledge module, generate process parameter optimization suggestions, and feed them back to the reactive ion beam etching equipment to form closed-loop control.
[0058] In this embodiment: Step S1 establishes a ternary correlation database, solving the problem of the disconnect between image data and process parameters. Grayscale images and three-dimensional morphology data of the surface topography are acquired through multimodal collaborative imaging. Defects are structurally labeled and correlated with reactive ion beam etching process parameters and lithium niobate material parameters, forming a ternary data structure with clear physical meaning. This data organization method enables the model to learn the influence of process conditions on defect formation, improving root cause analysis capabilities and laying a data foundation for subsequent physical constraint embedding and process optimization.
[0059] Step S2 generates physically driven synthetic samples, addressing the issues of scarce experimental data and incomplete defect mode coverage. Based on a bidirectional coupling mechanism of Monte Carlo ion bombardment simulation and finite element stress analysis, the collision sputtering and stress evolution processes between ions and the lithium niobate surface are simulated, generating synthetic defect images that conform to etching kinetics. This method expands the training dataset to several times the original size, covering extreme process conditions and rare defect modes that are difficult to obtain experimentally, reducing data acquisition costs while improving the model's generalization ability to unseen defect modes.
[0060] Step S3 involves designing domain-specific convolutional kernels, addressing the issue of insufficient characterization of lithium niobate metasurface features by general pre-trained models. Through statistical analysis, the spatial frequency distribution, dominant orientation, and anisotropy coefficients of the lithium niobate metasurface are determined, leading to the design of Gabor filter banks, edge-enhancing convolutional kernels, and anisotropic elliptical receptive field convolutional kernels. This feature extractor accurately captures periodic structure phase information, etching depth variations, and crystal anisotropy features, improving the ability to identify periodic structural defects with small etching depth variations and overcoming the problem of general pre-trained models misclassifying such defects as normal surface textures.
[0061] Step S4 constructs a domain-specific pre-trained model, addressing the feature learning problem under conditions of insufficient labeled data. Through joint training using process parameter-guided contrastive learning and mask image modeling, the model learns domain-specific feature representations of lithium niobate metasurfaces even without a large amount of labeled data. Contrastive learning utilizes process parameter labels to generate positive sample pairs and adjusts the weights of negative samples, while mask image modeling enhances key feature learning by increasing the occlusion probability at the edges of periodic structures. This joint training mechanism improves the model's ability to characterize the defect features of lithium niobate metasurfaces.
[0062] Step S5 embeds physical constraints, addressing the issue of insufficient reliability in predicting abnormal process conditions by purely data-driven models. The reactive ion beam etching kinetics equations and material constitutive relations are transformed into tensor operations and inserted between convolutional layers. A physical residual constraint term is introduced into the loss function, ensuring that the model output conforms to fundamental physical laws such as mass and momentum conservation. This physical constraint embedding mechanism enables the model to infer reasonable defect characteristics based on physical laws even when faced with process parameter combinations not present in the training set, reducing the false alarm rate for abnormal process conditions and improving the physical rationality of the prediction results.
[0063] Step S6 achieves multi-scale feature fusion and model lightweighting, solving the problem of difficult deployment of complex models on edge devices. The adaptive feature pyramid network dynamically adjusts the contribution of features at different levels according to the frequency domain distribution of defect features, making the model's ability to identify defects at different scales more balanced. Knowledge distillation technology transfers the representational power of the teacher model to the lightweight student model, enabling the model to maintain high recognition accuracy while significantly reducing the number of parameters and computational cost, increasing inference speed several times, and reducing memory usage to less than half of the original model, meeting the real-time detection requirements of the production line.
[0064] Step S7 establishes a domain adaptation and continuous learning mechanism, addressing the performance degradation and knowledge forgetting issues of laboratory-trained models in production line environments. Domain adaptation aligns the feature distributions of the laboratory and production line data domains through adversarial training, overcoming domain shift problems caused by equipment differences and environmental changes. The continuous learning strategy, through experience replay and elastic weight consolidation, enables the model to incrementally learn new defect patterns without forgetting historical knowledge. The model's adaptation time under new process conditions is shortened from weeks to days, allowing it to continuously evolve along with production line process optimization and equipment upgrades.
[0065] Step S8 optimizes the sample annotation process, addressing the issue of low model iteration efficiency caused by limited annotation resources. Active learning prioritizes the annotation of high-information samples based on uncertainty quantification and clustering screening. Weakly supervised learning utilizes association rules between process parameters and defect types to generate pseudo-labels, enabling the participation of a large amount of readily available process log data in model training. This optimized framework reduces the amount of manual annotation required to achieve the same recognition accuracy to about one-third of the original amount, and shortens the annotation cycle from several weeks to several days, demonstrating practical advantages in industrial scenarios where annotation resources are limited.
[0066] Step S9 performs defect identification and closed-loop optimization, realizing a shift from passive detection to proactive prevention in intelligent manufacturing. The real-time defect identification module continuously monitors product quality during production, the physical root cause analysis module traces defects back to process parameter deviations and physical formation mechanisms, and the process optimization module searches for optimal parameters based on Bayesian optimization and feeds back to the reactive ion beam etching equipment via the MES interface. This closed-loop mechanism reduces defect detection response time from hours to minutes, shortens process parameter optimization cycles from weeks to days, continuously reduces batch defect rates, and steadily improves chip yield.
[0067] This invention, through a systematic technical solution involving nine steps, achieves improvements in recognition accuracy, generalization ability, deployment efficiency, data efficiency, and manufacturing quality, providing a technical means for the intelligent upgrading of lithium niobate photonic chip production lines.
[0068] Example 2: Please refer to Figure 1 The specific method for step S1 is as follows:
[0069] S1.1. The lithium niobate metasurface sample after reactive ion beam etching was imaged using scanning electron microscopy and atomic force microscopy to obtain grayscale images and three-dimensional morphology data of the surface morphology. At least one defect type in the image data, such as etching inhomogeneity, sidewall roughness, microcracks, and material redeposition, was labeled. The spatial coordinates and geometric dimension feature parameters of the defects were recorded to obtain the original defect image dataset.
[0070] S1.2 Collect the reactive ion beam etching process parameters and lithium niobate material parameters corresponding to each image in the original defect image dataset. The process parameters include at least three of the following: ion beam energy, reactive gas flow rate, etching time, and vacuum chamber pressure. The material parameters include at least two of the following: crystal orientation, film thickness, and surface roughness. Establish the mapping relationship between the defect image and the parameters to obtain the ternary correlation data from image to parameter to defect type.
[0071] In this embodiment: Step S1.1 addresses the problem of insufficient information dimensions in single imaging methods through the collaborative work of multimodal imaging devices. A scanning electron microscope acquires high-resolution grayscale images of surface morphology, providing lateral microstructural details, while an atomic force microscope simultaneously acquires three-dimensional morphological data, supplementing longitudinal precise depth information. The two modal data complement each other in spatial features, making the characterization of defect features more complete. In the defect annotation stage, key defect types such as uneven etching, sidewall roughness, microcracks, and material redeposition are annotated at the pixel level, recording spatial coordinates and geometric dimension parameters, transforming defect features from subjective descriptions into quantifiable structured data. A relative coordinate system is used to record the position of defects within the metasurface unit structure, establishing a unified spatial reference benchmark and providing standardized input data for subsequent model training. Compared to traditional single-microscope imaging methods, this collaborative imaging and structured annotation mechanism significantly improves the completeness and consistency of defect feature characterization, laying a data foundation for feature learning in deep learning models.
[0072] Step S1.2 addresses the disconnect between image data and manufacturing conditions in traditional methods by establishing a mapping relationship between defect images and process and material parameters. Key process conditions for each image are collected, including ion beam etching energy, reactive gas flow rate, etching time, and vacuum chamber pressure. Lithium niobate material parameters, such as crystal orientation, film thickness, and surface roughness, are also collected. A structured association between images and parameters is established through a database index, forming a ternary data structure with clear physical meaning. This mapping mechanism ensures that each defect sample contains not only surface morphology information but also a complete record of its formation conditions, providing necessary input data for subsequent root cause analysis based on physical constraints. Compared to traditional isolated image analysis methods, this ternary association data structure enables the model to learn the influence of process parameters on defect formation, establishing a causal chain from manufacturing conditions to defect patterns, and providing data support for intelligent process optimization.
[0073] Step S1 systematically constructs a domain-specific training dataset through multimodal collaborative imaging, structured annotation, and a ternary mapping mechanism, addressing the issues of single data dimension and lack of contextual information in traditional defect identification methods. The collaborative operation of multimodal imaging devices enables multidimensional representation of defect features, the structured annotation process transforms subjective descriptions into quantifiable geometric features, and the ternary association database establishes the causal relationship between defects and their formation conditions. This data organization method allows subsequent deep learning models to learn not only the apparent morphological features of defects but also the mapping rules between process parameters and defect types, providing a data foundation for physical constraint embedding and root cause analysis. Compared to traditional methods that only record defect images while ignoring manufacturing conditions, this database enhances the model's generalization ability to defect patterns under unseen process conditions, laying the data foundation for achieving a shift from passive detection to proactive prevention in intelligent manufacturing.
[0074] Example 3: Please refer to Figure 1 The specific method for step S2 is as follows:
[0075] S2.1 Extract process parameters and material parameters from the ternary correlation database, establish Monte Carlo ion bombardment simulation model and finite element stress analysis model, simulate the collision sputtering process and chemical reaction process between ions and lithium niobate surface, calculate the etching rate distribution, sidewall morphology evolution and redeposited particle distribution, calculate the stress field distribution and microcrack initiation location inside the metasurface structure, and perform bidirectional coupling iterative calculation of ion bombardment simulation and stress analysis to obtain comprehensive defect morphology prediction data;
[0076] S2.2. A physical rendering algorithm is used to convert the defect morphology prediction data into a synthetic defect image. Based on the imaging mechanism of scanning electron microscopy and atomic force microscopy, the contrast, noise and resolution characteristics of the real microscope are simulated. The synthetic defect image is automatically labeled, and the defect type, location coordinates and feature size parameters are extracted. The corresponding process parameter labels and material parameter labels are associated. After verifying the statistical consistency between the synthetic image and the original image, it is added to the ternary association database to obtain the expanded ternary association database.
[0077] In this embodiment, step S2.1 addresses the issues of high experimental data acquisition costs and incomplete defect mode coverage through a physics-driven simulation model. The Monte Carlo ion bombardment simulation model, based on a binary collision approximation algorithm, simulates the interaction between ions and lithium niobate surface atoms, accurately calculating the etching rate distribution, sidewall morphology evolution, and redeposited particle distribution. The finite element stress analysis model calculates the stress field distribution and microcrack initiation locations based on the material's anisotropic constitutive relation. The two models exchange data through bidirectional coupling iterative calculations. The ion bombardment simulation provides the etching depth distribution as the boundary condition for stress analysis, while the stress field calculated by stress analysis is fed back to the ion bombardment model, influencing microcrack initiation and sidewall morphology evolution. This coupling mechanism effectively recreates the interaction between ion physical sputtering and stress-driven damage during actual etching. Compared to traditional single simulation methods, this bidirectional coupling mechanism provides a more accurate characterization of the physical mechanism of defect formation, and the generated comprehensive defect morphology prediction data conforms to etching kinetics, providing a reliable physical basis for subsequent synthetic image generation.
[0078] Step S2.2 addresses the mismatch between the synthesized image and the actual microscopic image through a physically-based rendering algorithm. Based on the secondary electron emission model of scanning electron microscopy and the probe-sample contact mechanics model of atomic force microscopy, the imaging mechanism of real microscopes is simulated, including the influence of local surface tilt angle on secondary electron yield, detector noise characteristics, and scanner nonlinear errors, ensuring the synthesized image possesses the contrast, noise, and resolution characteristics of a real image. An automated annotation system extracts defect types, location coordinates, and feature size parameters from the synthesized image, associating them with corresponding process parameter labels and material parameter labels to form a complete three-dimensional data set. Statistical consistency verification employs the Kolmogorov-Smirnov test to compare grayscale distribution, power spectral density analysis to compare spatial frequency characteristics, and principal component analysis to compare high-dimensional feature space distribution, ensuring the statistical matching between the synthesized image and the original image. Compared to simple data augmentation methods, this physically-based rendering and statistical verification mechanism ensures that the synthesized image conforms to physical laws and possesses the statistical characteristics of a real image, providing high-quality samples for database expansion.
[0079] Step S2 systematically addresses the problem of scarce experimental data through physics-driven simulation and a physically-based rendering algorithm, providing large-scale, domain-specific training data for deep learning models. The bidirectionally coupled simulation model generates defect morphology prediction data that conforms to etching kinetics based on real process and material parameters. The physically-based rendering algorithm converts the prediction data into synthetic images with statistical characteristics of real microscopic images. Automated annotation and statistical verification processes ensure the quality and consistency of the synthetic data. This method expands the sample size of the ternary correlation database several times over, covering extreme process conditions and rare defect patterns that are difficult to obtain experimentally, significantly improving the diversity and representativeness of the training data. Compared to traditional methods that rely solely on experimental acquisition, this physics-driven synthesis mechanism significantly reduces data acquisition costs while enhancing the model's generalization ability to defect patterns under unseen process conditions, laying a data foundation for high-precision training of subsequent defect recognition models.
[0080] Example 4: Please refer to Figure 1 The specific method for step S3 is as follows:
[0081] S3.1 Perform feature statistical analysis on the grayscale images of lithium niobate metasurfaces in the expanded ternary association database. Use two-dimensional Fourier transform to extract the spatial frequency distribution of periodic structures. Use directional gradient histogram and structural tensor analysis to determine the dominant direction and anisotropy coefficient. Determine the preferred etching direction based on the crystal system symmetry of lithium niobate crystals. Based on the statistical results, design Gabor filter bank parameters, gradient operator type and weight distribution of edge-enhanced convolution kernels, and major and minor axis ratio and principal axis direction of anisotropic elliptical receptive field convolution kernels.
[0082] S3.2 Generate 12-20 Gabor kernel functions, multi-directional gradient detection convolution kernels, and 3-5 anisotropic convolution kernels according to the design parameters. Combine the three types of convolution kernels according to a parallel multi-channel architecture or a serial cascaded architecture. Set the Gabor filter bank parameters to fixed weights, and set the edge enhancement convolution kernel and anisotropic convolution kernel to learnable parameters. Use Xavier initialization or He initialization methods to set the initial weight values, add L2 regularization constraints, and obtain a dedicated feature extractor for lithium niobate metasurfaces.
[0083] In this embodiment: Step S3.1 provides domain knowledge guidance for the design of convolution kernel parameters through systematic feature statistical analysis. Two-dimensional Fourier transform is used to extract the spatial frequency distribution of the periodic structure of the lithium niobate metasurface, identifying the characteristic dimensions and periodic parameters of the metasurface units, and determining the wavelength parameter range of the Gabor filter bank. Oriented gradient histogram and structural tensor analysis are used to determine the dominant orientation and anisotropy coefficients of the image. Combined with the crystal system symmetry of lithium niobate, the preferred etching direction is determined, and accordingly, the gradient operator direction of the edge-enhanced convolution kernel and the principal axis direction of the anisotropic elliptical receptive field convolution kernel are set. This statistical analysis process combines the crystallographic properties of lithium niobate material with the image feature distribution, transforming the design of convolution kernel parameters from empirical adjustment to quantitative design based on domain knowledge, thus improving the matching degree between the convolution kernel and the morphological features of the lithium niobate metasurface.
[0084] Step S3.2 achieves comprehensive characterization of complex defect features through the synergistic combination of multiple types of convolutional kernels. 12-20 Gabor kernel functions are generated to cover different spatial frequencies and directions to capture the phase information of the metasurface periodic structure. Multi-directional gradient detection convolutional kernels identify edge features caused by changes in etching depth, and 3-5 anisotropic convolutional kernels characterize the morphological features caused by crystal anisotropy. The three types of convolutional kernels are combined according to a parallel multi-channel architecture or a serial cascaded architecture to achieve multi-scale, multi-directional, and multi-physical mechanism feature extraction. The Gabor filter bank parameters are set to fixed weights to maintain stable detection capability for periodic structures, while the edge enhancement convolutional kernel and anisotropic convolutional kernel are learnable parameters to adapt to morphological changes of different defect types. This hybrid parameter setting strategy balances the utilization of prior knowledge with the flexibility of data-driven approaches. L2 regularization constraints are added to prevent overfitting, and Xavier or He initialization methods are used to accelerate convergence. This field-specific feature extractor enhances the characterization capability of lithium niobate metasurface defects.
[0085] Step S3 constructs a dedicated feature extractor for lithium niobate metasurfaces through statistically driven parameter design and the synergistic combination of multiple types of convolutional kernels. Feature statistical analysis combines the crystallographic properties of the material with image frequency and spatial domain features, providing physical constraints and quantitative basis for the convolutional kernel parameter design. The collaborative work of Gabor filter banks, edge-enhancing convolutional kernels, and anisotropic convolutional kernels enables the capture of periodic structural phase information, etching depth variations, and crystal anisotropy features. The hybrid parameter setting strategy combines the prior knowledge of fixed weights with the data-driven advantages of learnable parameters, giving the feature extractor domain specificity while maintaining adaptability to different defect types. Compared to the general convolutional kernels of natural image pre-trained models, this domain-specific feature extractor improves the ability to identify periodic structural defects with small etching depth variations, providing the deep learning model with higher-quality feature input.
[0086] Example 5: Please refer to Figure 1 The specific method for step S4 is as follows:
[0087] S4.1. Using the dedicated feature extractor obtained in step S3 as the encoder front end, sample defect images from the expanded ternary association database, perform random cropping, Gaussian blurring, and color dithering enhancement operations on the images to generate positive sample pairs. Based on the process parameter labels, use different images with ion beam energy differences of less than 50 eV and etching time differences of less than 20% as positive sample pairs. Use the SimCLR architecture to extract feature vectors and calculate cosine similarity. Set the NT-Xent contrast loss function, adjust the negative sample weights according to the Euclidean distance of the process parameters, and complete the contrast learning training.
[0088] S4.2. Based on the encoder trained by contrastive learning, the input image is divided into 12×12 pixel image blocks, and 50%-70% of the image blocks are randomly occluded. The occlusion probability of image blocks at the edge of the periodic structure is increased to 1.5 times the base probability. Features are extracted by the encoder and the occluded image blocks are reconstructed by the decoder. The mean squared error reconstruction loss function is set, and the contrastive learning loss and reconstruction loss are combined with weight coefficients of 0.5 and 0.5 to form the total loss function. The AdamW optimizer is used to train for 100 cycles, and the encoder weights are saved to obtain the pre-trained backbone model.
[0089] In this embodiment: Step S4.1 addresses the lack of domain knowledge constraints in traditional self-supervised methods through process parameter-guided contrastive learning. The dedicated feature extractor from step S3 is used as the encoder front-end. Enhancement operations such as random cropping, Gaussian blurring, and color dithering are applied to the defect images to generate positive sample pairs. The SimCLR architecture is used to extract feature vectors and calculate cosine similarity. Process parameter labels are introduced as additional constraints, treating images with ion beam energy differences of less than 50 eV and etching time differences of less than 20% as positive sample pairs, thus bringing defects formed under similar process conditions closer together in the feature space. The weights of negative samples are adjusted based on the Euclidean distance of the process parameters, enabling the NT-Xent contrastive loss function to distinguish between feature differences caused by process condition differences and differences in actual defect types. Compared to traditional contrastive learning methods that rely solely on image enhancement to generate positive sample pairs, this process parameter-guided mechanism establishes a stronger correlation between the feature representations learned by the encoder and the etching physical process, improving the model's ability to distinguish defect patterns under different process conditions.
[0090] Step S4.2 enhances the model's ability to represent local features through joint training of masked image modeling and contrastive learning. The input image is divided into 12×12 pixel blocks, with 50%–70% of these blocks randomly occluded. The occlusion probability of blocks at the edges of periodic structures is increased to 1.5 times the base probability, allowing the model to focus on learning edge features more critical for defect identification. Features are extracted by the encoder and reconstructed by the decoder. A mean squared error reconstruction loss function is set, enabling the model to learn spatial relationships and local texture features between image blocks. The contrastive learning loss and reconstruction loss are combined with weights of 0.5 to form the total loss function. This joint training mechanism allows the model to learn both global semantic representations and capture local geometric details. The AdamW optimizer is used for training for 100 epochs, and the encoder weights are saved. Compared to self-supervised methods with a single training objective, this joint training mechanism enhances the encoder's ability to represent the periodic structure and local defect features of the lithium niobate metasurface, improving the model's learning efficiency under limited labeled data conditions.
[0091] Step S4 constructs a domain-specific pre-trained backbone model through joint training of process parameter-guided contrastive learning and mask image modeling. In the contrastive learning phase, positive sample pairs are generated using process parameter labels, and the weights of negative samples are adjusted to correlate the organization of the feature space with the etching physical process. In the mask image modeling phase, the learning of key features is enhanced by increasing the occlusion probability at the edges of periodic structures. The joint training mechanism combines the advantages of learning global semantic representation and local geometric details. The dedicated feature extractor from step S3 is used as the encoder front-end, allowing the pre-training process to fully utilize domain knowledge and physical constraints. Compared to the natural image pre-trained model, this domain-specific pre-trained backbone model demonstrates better characterization capabilities for the defect features of lithium niobate metasurfaces.
[0092] Example 6: Please refer to Figure 1 The specific method for step S5 is as follows:
[0093] S5.1 Extract the reactive ion beam etching kinetic equation and the anisotropic elastic constitutive relation of lithium niobate. Discretize the physical equation into tensor operations using the finite difference method. Insert a physical constraint layer after the 3rd and 5th convolutional layers of the pre-trained model in step S4. Map the convolutional features to the etching rate field, stress field components and damage variables through the feature mapping sub-layer. Calculate the theoretical defect morphology features by substituting them into the physical equation through the physical calculation sub-layer. After fusing the physical prediction features with the convolutional features, pass them to the subsequent network layers through the residual connection.
[0094] S5.2 Define the etching dynamics residual loss, constitutive relation residual loss, mass conservation residual loss, and momentum conservation residual loss. Calculate the deviation between the network prediction value and the theoretical value of the physical equation, and combine them with weighted coefficients of 0.35, 0.35, 0.20, and 0.10 to form the total physical residual loss. Combine the total physical residual loss with the contrastive learning loss and mask modeling loss from step S4 with weights of 0.3, 0.3, and 0.4 to form the overall loss function. Use the backpropagation algorithm to update the network parameters and obtain the training objective function of the physical information neural network.
[0095] In this embodiment: Step S5.1 integrates etching physics knowledge into the deep learning model architecture through the embedding of a physical constraint layer. The reactive ion beam etching kinetic equation and the anisotropic elastic constitutive relation of lithium niobate are extracted. The physical equations are discretized into tensor operations using the finite difference method. A physical constraint layer is inserted after the 3rd and 5th convolutional layers of the pre-trained model in step S4. The feature mapping sublayer maps the convolutional features to physical field quantities such as etching rate field, stress field components, and damage variables. The physical calculation sublayer substitutes the physical equations to calculate the theoretical defect morphology features. The physical prediction features are fused with the convolutional features and then passed to subsequent network layers via residual connections. This mechanism allows the model to consider both data-driven learning and physical constraints during feature extraction, alleviating the overfitting problem of pure data-driven methods when training samples are insufficient. Compared to traditional end-to-end convolutional neural networks, this physical constraint embedding mechanism improves the consistency between the model's prediction results and the etching physical process, and enhances the model's generalization ability to abnormal process conditions.
[0096] Step S5.2 enhances the model's adherence to physical constraints through joint optimization of multi-physics residual losses. Etching kinetics residual loss, constitutive relation residual loss, mass conservation residual loss, and momentum conservation residual loss are defined. The deviations between the network's predicted values and the theoretical values of the physical equations are calculated for each, and weighted by coefficients of 0.35, 0.35, 0.20, and 0.10 to form the total physical residual loss. This total physical residual loss is then combined with the contrastive learning loss and mask modeling loss from step S4, weighted by 0.3, 0.3, and 0.4, to form the overall loss function. The backpropagation algorithm is used to update the network parameters. This multi-objective optimization mechanism minimizes both data fitting error and physical equation residuals during model training, forcing the network output to satisfy the fundamental laws of etching kinetics and materials mechanics. Compared to training methods that rely solely on classification loss, this physical residual constraint mechanism improves the physical rationality of the model's predictions, making the model's confidence in identifying unseen defect patterns more reliable.
[0097] Step S5 constructs a physical information neural network training framework through physical constraint layer embedding and multiphysics residual loss. The physical constraint layer introduces etching dynamics equations and material constitutive relations during convolutional feature extraction, giving the feature representations clear physical meaning. The multiphysics residual loss constrains the network output to conform to fundamental physical laws such as mass and momentum conservation during training. The synergistic effect of both layers ensures that the model learning process balances data fitting with physical laws. This framework alleviates the problem of insufficient generalization ability of deep learning models in industrial applications due to limited training data. Even when faced with process parameter combinations not present in the training set, the model can still infer reasonable defect features based on physical constraints. Compared to purely data-driven convolutional neural networks, this physical information neural network improves both the accuracy and interpretability of lithium niobate metasurface defect identification.
[0098] Example 7: Please refer to Figure 1 The specific method for step S6 is as follows:
[0099] S6.1. Based on the physical information neural network in step S5, feature maps from the 2nd to 5th convolutional layers are extracted to construct a feature pyramid. The number of channels is uniformly adjusted to 256 using 1×1 convolution. Two-dimensional fast Fourier transform is performed on the input image to calculate the energy ratio of high frequency and low frequency. The defect scale type is determined based on the energy ratio. Multilayer perceptron is used to calculate the adaptive attention weights of each pyramid level. Bilinear interpolation upsampling is performed on the deep feature maps. The four feature maps are concatenated and fused by 3×3 convolution. The global pooling layer and the classification head are connected to obtain the teacher network model.
[0100] S6.2. Using the network from step S6.1 as the teacher model, design a student model with the MobileNetV3-Small architecture. Reduce the number of convolutional layers from 50 to 25 and halve the number of feature channels. Sample images from the ternary association database in batches and input them into both the teacher and student models. Extract the intermediate layer feature maps and the classification layer probability distribution. Set the soft label KL divergence loss, feature map mean square error loss, and hard label cross-entropy loss, and combine them with weights of 0.5, 0.3, and 0.2 as the total loss function. Train the model for 100 epochs using the SGD optimizer to obtain a lightweight defect recognition model.
[0101] In this embodiment: Step S6.1 addresses the imbalance in defect recognition capabilities across different sizes through adaptive multi-scale feature fusion. Building upon the physical information neural network of Step S5, feature maps from convolutional layers 2 to 5 are extracted to construct a feature pyramid. A 1×1 convolution is used to uniformly adjust the number of channels to 256. After bilinear interpolation upsampling of the deep feature maps, the four feature maps are concatenated and fused using a 3×3 convolution. An adaptive attention mechanism is introduced, performing a two-dimensional fast Fourier transform on the input image to calculate the proportion of high-frequency and low-frequency energy. The defect scale type is determined based on the energy proportion, and a multilayer perceptron is used to calculate the adaptive attention weights for each pyramid level. This mechanism enables the model to dynamically adjust the contribution of features at different levels based on the frequency domain distribution of defect features. Shallow feature maps capture detailed information about small defects such as microcracks, while deep feature maps represent the semantic information of large defects such as uneven etching. Compared to a fixed-weight feature pyramid network, this adaptive fusion mechanism makes the model's ability to recognize defects at different scales more balanced, improving the classification accuracy of the teacher network model.
[0102] Step S6.2 addresses the challenge of deploying complex models on edge devices using knowledge distillation. The network from step S6.1 is used as the teacher model, while a student model with the MobileNetV3-Small architecture is designed. The number of convolutional layers is reduced from 50 to 25, the number of feature channels is halved, and model parameters and computational complexity are significantly reduced. Images are batch-sampled from a ternary association database and simultaneously input into both the teacher and student models. Intermediate layer feature maps and classification layer probability distributions are extracted. Soft-label KL divergence loss, feature map mean squared error loss, and hard-label cross-entropy loss are set and combined with weights of 0.5, 0.3, and 0.2 to form the total loss function. Soft-label distillation enables the student model to learn the class probability distribution of the teacher model, feature map distillation enables the student model to learn the intermediate layer representation of the teacher model, and hard-label constraints ensure the student model's ability to fit the true labels. After training for 100 epochs using the SGD optimizer, the student model maintains high recognition accuracy while meeting the deployment requirements of industrial edge devices in terms of inference speed and memory usage.
[0103] Step S6 constructs a lightweight defect recognition model suitable for industrial deployment through adaptive multi-scale feature fusion and knowledge distillation. The adaptive feature pyramid network enables the teacher model to have balanced recognition capabilities for defects at different scales. Knowledge distillation transfers the representation capabilities of the teacher model to the lightweight student model, allowing the student model to maintain high recognition accuracy despite a significant reduction in parameters and computational cost. The joint training mechanism of soft label distillation, feature map distillation, and hard label constraints allows the student model to simultaneously learn the decision boundaries, intermediate representations, and true labels of the teacher model, mitigating the performance loss caused by model compression. Compared to deploying complex models directly on edge devices, this lightweight solution improves model inference speed by several times and reduces memory usage to less than half of the original model, meeting the response time requirements for real-time defect detection in lithium niobate metasurface production lines.
[0104] Example 8: Please refer to Figure 1 The specific method for step S7 is as follows:
[0105] S7.1. Using the lightweight model from step S6 as the source domain pre-trained model, the ternary association database is used as the source domain dataset and the images collected from the production line are used as the target domain dataset. A classifier and a domain discriminator branch are added after the feature extractor. Images are sampled from the two domains at a 1:1 ratio to form batches, with the batch size set to 64. A gradient inversion layer is inserted between the feature extractor and the domain discriminator. The initial value of the inversion factor is close to 0 and gradually increases to 1. The total loss function is constructed as a combination of classification loss and domain adversarial loss with weights of 0.7 and 0.3. The Adam optimizer is used to train for 50 epochs with an initial learning rate of 0.0001 to obtain the domain adaptive model.
[0106] S7.2. Set up an experience replay buffer with a capacity of 5000 images to store historical samples. Maintain the buffer using a reserve pool sampling algorithm. New images from the production line are added to the buffer with pseudo-labels or manual annotation based on a prediction confidence threshold of 0.95. When 500 new samples are added, an update is triggered. New and historical samples are mixed in a 3:1 ratio. The Fisher information matrix is calculated to estimate the importance of parameters. An elastic weight consolidation loss is set with a consolidation coefficient of 0.05. The SGD optimizer is used to train for 10 epochs with a learning rate of 0.001. The accuracy of the historical test set is evaluated every 1000 images. When the accuracy drops by more than 5%, the parameters are rolled back to obtain a continuously learning model.
[0107] In this embodiment: Step S7.1 addresses the performance degradation caused by the distribution difference between laboratory data and production line data through domain adaptive transfer learning. The lightweight model from step S6 is used as the source domain pre-trained model, with a ternary association database as the source domain dataset and production line images as the target domain dataset. A classifier and domain discriminator branch are added after the feature extractor. Images are sampled from the two domains at a 1:1 ratio to form batches. A gradient inversion layer is inserted between the feature extractor and the domain discriminator, with the inversion factor initially close to 0 and gradually increasing to 1, allowing the feature extractor to learn domain-invariant feature representations. The total loss function is constructed as a combination of classification loss and domain adversarial loss with weights of 0.7 and 0.3, and trained for 50 epochs using the Adam optimizer. This adversarial training mechanism ensures that the features extracted by the model have a similar distribution between the source and target domains, mitigating the domain shift problem caused by differences in microscope equipment, environmental noise, and changes in sample preparation conditions. Compared to directly deploying the laboratory-trained model to the production line, this domain adaptive mechanism improves the model's recognition accuracy on production line data and significantly reduces the data requirements for adapting to the new environment.
[0108] Step S7.2 addresses the model's forgetting issue when encountering new defect patterns during production line operation through a continuous learning mechanism. A 5000-image experience replay buffer stores historical samples, and a pooled sampling algorithm maintains sample diversity. New production line images are added to the buffer using pseudo-labels or manual annotation based on a prediction confidence threshold of 0.95. An update is triggered when 500 new samples are available, mixing new and historical samples in a 3:1 ratio. The Fisher information matrix is calculated to estimate parameter importance, and a resilient weight consolidation loss is used to control changes in important parameters. A consolidation coefficient of 0.05 balances new task learning with the retention of old knowledge. An SGD optimizer with a learning rate of 0.001 is used for 10 epochs of training. The accuracy on the historical test set is evaluated every 1000 images, and parameters are rolled back when the accuracy drops by more than 5%. This mechanism enables the model to incrementally learn defect patterns under new process conditions while maintaining its ability to identify already learned defect types. Compared to periodic full retraining, this continuous learning mechanism significantly reduces the computational resources and time costs required for model updates, and significantly accelerates the model's adaptation speed to changes in production line processes.
[0109] Step S7 constructs a model update mechanism adapted to the dynamic environment of the production line through domain adaptation and continuous learning. The domain adaptation stage aligns the feature distributions of the laboratory data domain and the production line data domain, enabling the model to overcome performance degradation caused by environmental differences. The continuous learning stage, through experience replay and elastic weight consolidation, allows the model to incrementally learn new defect patterns without forgetting historical knowledge. The adversarial training of the gradient reversal layer and the parameter importance estimation of the Fisher information matrix work synergistically, giving the model both domain generalization ability and knowledge accumulation capability. The pseudo-label mechanism reduces the need for manual annotation, and the parameter rollback strategy prevents catastrophic forgetting. Compared to statically deployed deep learning models, this dynamic update mechanism allows the model to continuously evolve along with the process optimization and equipment upgrades of the lithium niobate metasurface production line. The model's recognition accuracy remains stable during long-term operation, reducing manual intervention and model maintenance costs.
[0110] Example 9: Please refer to Figure 1 The specific method for step S8 is as follows:
[0111] S8.1. Based on the continuous learning model in step S7, variational inference is introduced into the weight parameters. Monte Carlo Dropout technology is used to set the dropout rate to 0.25. 20 inferences are performed on the unlabeled images to calculate the prediction entropy and coefficient of variation. The combined weights of 0.6 and 0.4 are used to form a comprehensive uncertainty score. The top 100 images with the highest scores are selected and clustered into 10 clusters in the feature space using the K-means algorithm. The 10 images with the highest scores are selected from each cluster. The selected samples and process parameter information are pushed to the labeling queue and added to the experience playback buffer in step S7.2 after labeling.
[0112] S8.2 Extract the association rules between process parameters and defect types from the ternary association database, and construct a decision tree model using the CART algorithm. Input features include ion beam energy (50-500 eV), etching time (10-300 seconds), pressure (0.1-10 Pa), and gas molar ratio (1:0 to 1:3). Set the maximum depth to 5-8 and the minimum number of leaf nodes to 10-30. Use 5-fold cross-validation for training. Read the equipment process parameter logs and input them into the decision tree to obtain weakly supervised labels. When the prediction probability is ≥0.75, it is used as a pseudo-label for direct training; when it is 0.5-0.75, it is used as a reference label to assist manual annotation; when it is <0.5, it is completely manually annotated. Construct a total loss function that includes strong supervision loss, weak supervision loss, and KL divergence consistency loss combined with weights of 0.5, 0.3, and 0.2, with a strong-weak supervision sample ratio of 2:3.
[0113] In this embodiment: Step S8.1 addresses the sample selection efficiency problem under limited annotation resources through an active learning mechanism. Based on the continuous learning model in Step S7, variational inference is introduced to the weight parameters. Monte Carlo Dropout is used with a dropout rate of 0.25. Twenty inferences are performed on unlabeled images, calculating prediction entropy and coefficient of variation, which are then combined with weights of 0.6 and 0.4 to form a comprehensive uncertainty score. This uncertainty quantification mechanism enables the model to identify samples with low prediction confidence, which often contain feature patterns that the model has not fully learned. After selecting the top 100 images, the K-means algorithm is used to cluster them into 10 clusters in the feature space, and the 10 images with the highest scores from each cluster are selected. This clustering and selection strategy ensures both high uncertainty and diverse sample coverage. The selected samples and process parameter information are pushed to the annotation queue and added to the experience replay buffer after annotation. Compared to random sampling annotation, this active learning mechanism makes each batch of labeled samples contribute more to the model's performance improvement. Under the same annotation budget, the model's recognition accuracy improves significantly faster, and the annotation efficiency is several times higher than traditional methods.
[0114] Step S8.2 addresses the issue of underutilized process parameter information through a weakly supervised learning mechanism. Association rules between process parameters and defect types are extracted from a ternary association database. A decision tree model is constructed using the CART algorithm. Input features include process parameters such as ion beam energy, etching time, pressure, and gas molar ratio. After training with 5-fold cross-validation, process parameter logs from the equipment are read and input into the decision tree to obtain weakly supervised labels. A hierarchical labeling strategy is set based on the predicted probability: probabilities ≥ 0.75 are used as pseudo-labels for direct training; probabilities between 0.5 and 0.75 are used as reference labels to assist manual labeling; and probabilities < 0.5 are entirely manually labeled. This strategy balances labeling cost and label quality. A total loss function is constructed, comprising strong supervision loss, weak supervision loss, and KL divergence consistency loss combined with weights of 0.5, 0.3, and 0.2, with a strong-to-weak supervision sample ratio of 2:3. The weak supervision loss constrains the model prediction to be consistent with the process parameter inference results, while the consistency loss reduces the noise introduced by pseudo-labels. Compared to methods that rely entirely on manual annotation, this weak supervision mechanism reduces the annotation workload to less than half of the original amount, significantly reduces the number of manually annotated samples required for model training, and significantly reduces annotation costs while maintaining recognition performance.
[0115] Step S8 constructs an efficient sample labeling optimization framework through active learning and weakly supervised learning. Active learning prioritizes labeling samples with the most information based on uncertainty quantification and clustering screening, concentrating limited labeling resources on the data most needed by the model. Weakly supervised learning generates pseudo-labels using association rules between process parameters and defect types, allowing a large amount of easily accessible process log data to participate in model training. The synergistic effect of uncertainty scoring, cluster diversity selection, hierarchical labeling strategy, and joint optimization using multiple loss functions simultaneously improves sample labeling efficiency and data utilization efficiency. Compared to traditional passive labeling and fully supervised learning methods, this optimization framework reduces the amount of manual labeling required to achieve the same recognition accuracy in lithium niobate metasurface production lines to about one-third of the original amount, shortens the labeling cycle from several weeks to several days, and accelerates model iteration speed.
[0116] Example 10: Please refer to Figure 1 The specific method for step S9 is as follows:
[0117] S9.1. Convert the model from step S8 to ONNX format and deploy it to the edge computing device. Configure the microscope image acquisition interface, set the acquisition frequency to 5-10 images per minute, and the image resolution to 2048×2048 to 4096×4096 pixels. Perform grayscale normalization, bilateral filtering, and CLAHE enhancement preprocessing on the images. Input the images into the model for inference to obtain the probability distribution of defect categories, location bounding boxes, and confidence levels. Set the recognition threshold to 0.9. Input the defect image blocks into the physical constraint layer of step S5 to extract the etching rate field and stress field. Inversely solve the dynamic equations to estimate the parameter deviations and generate a root cause analysis report containing the defect type, physical mechanism, parameter deviation range, and confidence level.
[0118] S9.2. Based on the root cause analysis report, Bayesian optimization is used to search for optimal parameters, Gaussian process regression is used to predict the defect rate, and the expected improvement is calculated using the acquisition function. Constraints are set as follows: ion beam energy 100-400 eV, etching time 30-180 seconds, pressure 0.5-5 Pa, flow rate 10-100 sccm, and oxygen molar ratio 0-0.75. Candidate solutions are generated for different defect types, and the solution with the greatest expected improvement and uncertainty less than 0.05 is selected. An optimization suggestion document is generated, including the current configuration, recommended configuration, adjustment range, expected reduction rate, and confidence level. This document is transmitted to the device controller via the MES interface using OPC UA or Modbus TCP. The confidence threshold for automatic mode is 0.85. 10-30 samples are monitored and evaluated using t-test or Wilcoxon test. When the p-value is less than 0.05 and the defect rate decreases, the new parameters are retained and the database is updated; otherwise, the process is rolled back. Historical data is accumulated and the strategy network is trained using DQN or DDPG.
[0119] In this embodiment, step S9.1 achieves a shift from passive detection to proactive tracing through real-time defect identification and physical root cause analysis. The model from step S8 is converted to ONNX format and deployed to an edge computing device. A microscope image acquisition interface is configured, with an acquisition frequency set to 5-10 images per minute. Images are preprocessed using grayscale normalization, bilateral filtering, and CLAHE enhancement before being input into the model for inference. The model outputs the defect category probability distribution, location bounding box, and confidence score, with an identification threshold of 0.9 to ensure detection reliability. The defect image block is input into the physical constraint layer of step S5 to extract the etching rate field and stress field. The kinetic equations are solved inversely to estimate parameter deviations, generating a root cause analysis report containing the defect type, physical mechanism, parameter deviation range, and confidence score. This mechanism allows defect identification to move beyond superficial classification and trace back to specific process parameter deviations and physical formation mechanisms. Compared to traditional manual inspection and experience-based judgment, this real-time identification and root cause analysis mechanism reduces the defect detection response time from hours to minutes, enabling process engineers to quickly locate the source of the problem and take corrective measures, reducing the spread of defect batches.
[0120] Step S9.2 achieves a shift from manual adjustment to intelligent decision-making through a closed-loop process optimization mechanism. Based on the root cause analysis report, Bayesian optimization is used to search for optimal parameters, Gaussian process regression predicts the defect rate, and the expected improvement is calculated using a data acquisition function. Within the constraints of process parameters such as ion beam energy, etching time, pressure, flow rate, and oxygen molar ratio, candidate solutions are generated for different defect types. The solution with the greatest expected improvement and an uncertainty of less than 0.05 is selected to generate an optimization suggestion document, which is transmitted to the equipment controller via the MES interface using OPC UA or Modbus TCP. An automatic mode confidence threshold of 0.85 balances optimization efficiency and safety. Statistical tests are used to evaluate 10-30 samples; if the p-value is less than 0.05 and the defect rate decreases, the new parameters are retained and the database is updated; otherwise, a rollback is implemented to prevent process deterioration. Historical data is accumulated and a reinforcement learning strategy network is used to gradually learn the long-term optimal process adjustment strategy. Compared to traditional trial-and-error parameter tuning methods, this intelligent optimization mechanism shortens the process parameter optimization cycle from several weeks to several days, improves parameter search efficiency several times, and ensures the stability and safety of the production line through the rollback mechanism.
[0121] Step S9 constructs a complete intelligent manufacturing quality control system through real-time identification, root cause analysis, and closed-loop optimization. The real-time defect identification module continuously monitors product quality during production, the physical root cause analysis module traces defects back to process parameter deviations and physical formation mechanisms, and the process optimization module automatically searches for optimal parameters based on the root cause analysis results and feeds them back to the equipment controller via the MES interface. Statistical verification and rollback mechanisms ensure the reliability of the optimization process, and a reinforcement learning strategy network enables the system to learn long-term optimal decisions from historical data. This closed-loop mechanism achieves full automation from defect discovery, cause diagnosis, solution generation to process adjustment, significantly reducing the need for manual intervention. Compared to traditional offline inspection and manual parameter tuning, this intelligent control system continuously reduces the batch defect rate of the lithium niobate metasurface production line, continuously improves process stability, and steadily increases chip yield, while reducing reliance on the experience of senior process engineers.
[0122] The contents not described in detail in this specification are existing technologies known to those skilled in the art.
[0123] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent identification of defects on lithium niobate metasurfaces based on reactive ion beam etching, characterized in that: The specific steps are as follows: S1. Collect multimodal image data, use scanning electron microscope and atomic force microscope to image the lithium niobate metasurface after reactive ion beam etching, obtain defect images, and label the reactive ion beam etching process parameters and lithium niobate material parameters corresponding to the defect images, and establish a ternary correlation database from image to parameters to defect type. S2. Generate a physical-driven synthetic sample. Based on Monte Carlo ion bombardment simulation and finite element stress analysis, generate a synthetic defect image that conforms to the etching kinetics law and expand the ternary correlation database. The specific method of step S2 is as follows: S2.1 Extract process parameters and material parameters from the ternary correlation database, establish Monte Carlo ion bombardment simulation model and finite element stress analysis model, simulate the collision sputtering process and chemical reaction process between ions and lithium niobate surface, calculate the etching rate distribution, sidewall morphology evolution and redeposited particle distribution, calculate the stress field distribution and microcrack initiation location inside the metasurface structure, and perform bidirectional coupling iterative calculation of ion bombardment simulation and stress analysis to obtain comprehensive defect morphology prediction data; S2.
2. A physical rendering algorithm is used to convert the defect morphology prediction data into a synthetic defect image. Based on the imaging mechanism of scanning electron microscope and atomic force microscope, the contrast, noise and resolution characteristics of real microscope are simulated. The synthetic defect image is automatically labeled, the defect type, location coordinates and feature size parameters are extracted, and the corresponding process parameter labels and material parameter labels are associated. After verifying the statistical consistency between the synthetic image and the original image, it is added to the ternary association database to obtain the expanded ternary association database. S3, Design-Specific Convolution Kernels: A dedicated feature extractor is constructed for the gray-scale geometric features of lithium niobate metasurfaces, including Gabor filter banks, edge-enhancing convolution kernels, and anisotropic elliptical receptive field convolution kernels. S4. Construct a domain-specific pre-trained model and use a self-supervised learning method to train a convolutional neural network backbone model optimized for lithium niobate metasurface through contrastive learning and mask image modeling. S5. Embed physical constraints and construct a physical information neural network. Embed the reactive ion beam etching kinetic equation and the constitutive relation of lithium niobate material into the convolutional neural network backbone model, and introduce physical residual constraint terms into the loss function. S6. To achieve multi-scale feature fusion, an adaptive feature pyramid network is designed to fuse defect features at different scales, and the model is made lightweight through knowledge distillation. S7. Establish a domain-adaptive transfer learning mechanism, adopt adversarial training to achieve unsupervised domain adaptation from the laboratory data domain to the production line data domain, and combine it with a continuous learning strategy to achieve online incremental updates of the model. S8. Optimize the sample labeling process. Based on the active learning strategy of Bayesian uncertainty estimation, select high-information samples for priority labeling and use reactive ion beam etching process parameters as weak supervision labels to reduce labeling costs. S9. Perform defect identification and closed-loop optimization. Deploy the trained model to the production line for real-time defect identification and classification. Perform root cause analysis based on the embedded physical knowledge module, generate process parameter optimization suggestions, and feed them back to the reactive ion beam etching equipment to form closed-loop control.
2. The intelligent identification method for lithium niobate metasurface defects based on reactive ion beam etching according to claim 1, characterized in that: The specific method of step S1 is as follows: S1.
1. The lithium niobate metasurface sample after reactive ion beam etching was imaged using scanning electron microscopy and atomic force microscopy to obtain grayscale images and three-dimensional morphology data of the surface morphology. At least one defect type in the image data, such as etching inhomogeneity, sidewall roughness, microcracks, and material redeposition, was labeled. The spatial coordinates and geometric dimension feature parameters of the defects were recorded to obtain the original defect image dataset. S1.2 Collect the reactive ion beam etching process parameters and lithium niobate material parameters corresponding to each image in the original defect image dataset. The process parameters include at least three of the following: ion beam energy, reactive gas flow rate, etching time, and vacuum chamber pressure. The material parameters include at least two of the following: crystal orientation, film thickness, and surface roughness. Establish the mapping relationship between the defect image and the parameters to obtain the ternary correlation data from image to parameter to defect type.
3. The intelligent identification method for lithium niobate metasurface defects based on reactive ion beam etching according to claim 2, characterized in that: The specific method of step S3 is as follows: S3.1 Perform feature statistical analysis on the grayscale images of lithium niobate metasurfaces in the expanded ternary association database. Use two-dimensional Fourier transform to extract the spatial frequency distribution of periodic structures. Use directional gradient histogram and structural tensor analysis to determine the dominant direction and anisotropy coefficient. Determine the preferred etching direction based on the crystal system symmetry of lithium niobate crystals. Based on the statistical results, design Gabor filter bank parameters, gradient operator type and weight distribution of edge-enhanced convolution kernels, and major and minor axis ratio and principal axis direction of anisotropic elliptical receptive field convolution kernels. S3.2 Generate 12-20 Gabor kernel functions, multi-directional gradient detection convolution kernels, and 3-5 anisotropic convolution kernels according to the design parameters. Combine the three types of convolution kernels according to a parallel multi-channel architecture or a serial cascaded architecture. Set the Gabor filter bank parameters to fixed weights, and set the edge enhancement convolution kernel and anisotropic convolution kernel to learnable parameters. Use Xavier initialization or He initialization methods to set the initial weight values, add L2 regularization constraints, and obtain a dedicated feature extractor for lithium niobate metasurfaces.
4. The intelligent identification method for lithium niobate metasurface defects based on reactive ion beam etching according to claim 3, characterized in that: The specific method of step S4 is as follows: S4.
1. Using the dedicated feature extractor obtained in step S3 as the encoder front end, sample defect images from the expanded ternary association database, perform random cropping, Gaussian blurring, and color dithering enhancement operations on the images to generate positive sample pairs. Based on the process parameter labels, use different images with ion beam energy differences of less than 50 eV and etching time differences of less than 20% as positive sample pairs. Use the SimCLR architecture to extract feature vectors and calculate cosine similarity. Set the NT-Xent contrast loss function, adjust the negative sample weights according to the Euclidean distance of the process parameters, and complete the contrast learning training. S4.
2. Based on the encoder trained by contrastive learning, the input image is divided into 12×12 pixel image blocks, and 50%-70% of the image blocks are randomly occluded. The occlusion probability of image blocks at the edge of the periodic structure is increased to 1.5 times the base probability. Features are extracted by the encoder and the occluded image blocks are reconstructed by the decoder. The mean squared error reconstruction loss function is set, and the contrastive learning loss and reconstruction loss are combined with weight coefficients of 0.5 and 0.5 to form the total loss function. The AdamW optimizer is used to train for 100 cycles, and the encoder weights are saved to obtain the pre-trained backbone model.
5. The intelligent identification method for lithium niobate metasurface defects based on reactive ion beam etching according to claim 4, characterized in that: The specific method of step S5 is as follows: S5.1 Extract the reactive ion beam etching kinetic equation and the anisotropic elastic constitutive relation of lithium niobate. Discretize the physical equation into tensor operations using the finite difference method. Insert a physical constraint layer after the 3rd and 5th convolutional layers of the pre-trained model in step S4. Map the convolutional features to the etching rate field, stress field components and damage variables through the feature mapping sub-layer. Calculate the theoretical defect morphology features by substituting them into the physical equation through the physical calculation sub-layer. After fusing the physical prediction features with the convolutional features, pass them to the subsequent network layers through the residual connection. S5.2 Define the etching dynamics residual loss, constitutive relation residual loss, mass conservation residual loss, and momentum conservation residual loss. Calculate the deviation between the network prediction value and the theoretical value of the physical equation, and combine them with weighted coefficients of 0.35, 0.35, 0.20, and 0.10 to form the total physical residual loss. Combine the total physical residual loss with the contrastive learning loss and mask modeling loss from step S4 with weights of 0.3, 0.3, and 0.4 to form the overall loss function. Use the backpropagation algorithm to update the network parameters and obtain the training objective function of the physical information neural network.
6. The intelligent identification method for lithium niobate metasurface defects based on reactive ion beam etching according to claim 5, characterized in that: The specific method of step S6 is as follows: S6.
1. Based on the physical information neural network in step S5, feature maps from the 2nd to 5th convolutional layers are extracted to construct a feature pyramid. The number of channels is uniformly adjusted to 256 using 1×1 convolution. Two-dimensional fast Fourier transform is performed on the input image to calculate the energy ratio of high frequency and low frequency. The defect scale type is determined based on the energy ratio. Multilayer perceptron is used to calculate the adaptive attention weights of each pyramid level. Bilinear interpolation upsampling is performed on the deep feature maps. The four feature maps are concatenated and fused by 3×3 convolution. The global pooling layer and the classification head are connected to obtain the teacher network model. S6.
2. Using the network from step S6.1 as the teacher model, design a student model with the MobileNetV3-Small architecture. Reduce the number of convolutional layers from 50 to 25 and halve the number of feature channels. Sample images from the ternary association database in batches and input them into both the teacher and student models. Extract the intermediate layer feature maps and the classification layer probability distribution. Set the soft label KL divergence loss, feature map mean square error loss, and hard label cross-entropy loss, and combine them with weights of 0.5, 0.3, and 0.2 as the total loss function. Train the model for 100 epochs using the SGD optimizer to obtain a lightweight defect recognition model.
7. The intelligent identification method for lithium niobate metasurface defects based on reactive ion beam etching according to claim 6, characterized in that: The specific method of step S7 is as follows: S7.
1. Using the lightweight model from step S6 as the source domain pre-trained model, the ternary association database is used as the source domain dataset and the images collected from the production line are used as the target domain dataset. A classifier and a domain discriminator branch are added after the feature extractor. Images are sampled from the two domains at a 1:1 ratio to form batches, with the batch size set to 64. A gradient inversion layer is inserted between the feature extractor and the domain discriminator. The initial value of the inversion factor is close to 0 and gradually increases to 1. The total loss function is constructed as a combination of classification loss and domain adversarial loss with weights of 0.7 and 0.
3. The Adam optimizer is used to train for 50 epochs with an initial learning rate of 0.0001 to obtain the domain adaptive model. S7.
2. Set up an experience replay buffer with a capacity of 5000 images to store historical samples. Maintain the buffer using a reserve pool sampling algorithm. New images from the production line are added to the buffer with pseudo-labels or manual annotation based on a prediction confidence threshold of 0.
95. When 500 new samples are added, an update is triggered. New and historical samples are mixed in a 3:1 ratio. The Fisher information matrix is calculated to estimate the importance of parameters. An elastic weight consolidation loss is set with a consolidation coefficient of 0.
05. The SGD optimizer is used to train for 10 epochs with a learning rate of 0.
001. The accuracy of the historical test set is evaluated every 1000 images. When the accuracy drops by more than 5%, the parameters are rolled back to obtain a continuously learning model.
8. The intelligent identification method for lithium niobate metasurface defects based on reactive ion beam etching according to claim 7, characterized in that: The specific method of step S8 is as follows: S8.
1. Based on the continuous learning model in step S7, variational inference is introduced into the weight parameters. Monte Carlo Dropout technology is used to set the dropout rate to 0.
25. 20 inferences are performed on the unlabeled images to calculate the prediction entropy and coefficient of variation. The combined weights of 0.6 and 0.4 are used to form a comprehensive uncertainty score. The top 100 images with the highest scores are selected and clustered into 10 clusters in the feature space using the K-means algorithm. The 10 images with the highest scores are selected from each cluster. The selected samples and process parameter information are pushed to the labeling queue and added to the experience playback buffer in step S7.2 after labeling. S8.2 Extract the association rules between process parameters and defect types from the ternary association database, and construct a decision tree model using the CART algorithm. Input features include ion beam energy (50-500 eV), etching time (10-300 seconds), pressure (0.1-10 Pa), and gas molar ratio (1:0 to 1:3). Set the maximum depth to 5-8 and the minimum number of leaf nodes to 10-30. Use 5-fold cross-validation for training. Read the equipment process parameter logs and input them into the decision tree to obtain weakly supervised labels. When the prediction probability is ≥0.75, it is used as a pseudo-label for direct training; when it is 0.5-0.75, it is used as a reference label to assist manual annotation; when it is <0.5, it is completely manually annotated. Construct a total loss function that includes strong supervision loss, weak supervision loss, and KL divergence consistency loss combined with weights of 0.5, 0.3, and 0.2, with a strong-weak supervision sample ratio of 2:
3.
9. The intelligent identification method for lithium niobate metasurface defects based on reactive ion beam etching according to claim 8, characterized in that: The specific method of step S9 is as follows: S9.
1. Convert the model from step S8 to ONNX format and deploy it to the edge computing device. Configure the microscope image acquisition interface, set the acquisition frequency to 5-10 images per minute, and the image resolution to 2048×2048 to 4096×4096 pixels. Perform grayscale normalization, bilateral filtering, and CLAHE enhancement preprocessing on the images. Input the images into the model for inference to obtain the probability distribution of defect categories, location bounding boxes, and confidence levels. Set the recognition threshold to 0.
9. Input the defect image blocks into the physical constraint layer of step S5 to extract the etching rate field and stress field. Inversely solve the dynamic equations to estimate the parameter deviations and generate a root cause analysis report containing the defect type, physical mechanism, parameter deviation range, and confidence level. S9.
2. Based on the root cause analysis report, Bayesian optimization is used to search for optimal parameters, Gaussian process regression is used to predict the defect rate, and the expected improvement is calculated using the acquisition function. Constraints are set as follows: ion beam energy 100-400 eV, etching time 30-180 seconds, pressure 0.5-5 Pa, flow rate 10-100 sccm, and oxygen molar ratio 0-0.
75. Candidate solutions are generated for different defect types, and the solution with the greatest expected improvement and uncertainty less than 0.05 is selected. An optimization suggestion document is generated, including the current configuration, recommended configuration, adjustment range, expected reduction rate, and confidence level. This document is transmitted to the device controller via the MES interface using OPC UA or Modbus TCP. The confidence threshold for automatic mode is 0.
85. 10-30 samples are monitored and evaluated using t-test or Wilcoxon test. When the p-value is less than 0.05 and the defect rate decreases, the new parameters are retained and the database is updated; otherwise, the process is rolled back. Historical data is accumulated and the strategy network is trained using DQN or DDPG.
Citation Information
Patent Citations
Self-supporting optical cable of high-corrosion-resistance rodent-damage-prevention non-metal optical unit
CN121028310A
Acid-resistant plate dark crack defect detection method and system
CN121164538A