Femtosecond laser process data generation method and system based on improved CTGAN
By improving the CTGAN model and combining multidimensional kernel density estimation and S4VM large-interval constraints, pseudo-samples that conform to physical laws are generated, solving the data sparsity and imbalance problem in femtosecond laser process parameter optimization, and improving the accuracy and efficiency of processing effect prediction.
Patent Information
- Application Number
- CN202511068249.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-14
AI Technical Summary
Existing technologies for optimizing femtosecond laser process parameters suffer from uneven distribution of orthogonal experimental data and sample sparsity, resulting in poor sample quality and affecting the accuracy of predicting the mapping relationship between process parameters and processing effects.
Sparse regions are identified by multidimensional kernel density estimation, the CTGAN generator is improved to generate interpolation parameters, and a discriminator and an auxiliary regressor are combined to generate pseudo samples that conform to physical laws using the large-margin constraint idea of S4VM. The results are then predicted using a two-level interval residual regression model.
It significantly improves the ability to model the mapping relationship between process parameters and processing morphology, reduces the cost of physical experiments, and improves the accuracy of processing effect prediction and process development efficiency.
Smart Images

Figure CN120950969A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to a method and system for generating femtosecond laser process data based on an improved CTGAN. Background Technology
[0002] In the field of precision manufacturing, femtosecond lasers, with their ultrashort pulses and ultra-high peak power, exhibit unique advantages in high-end manufacturing scenarios such as precision medical devices and aerospace components. Their processing effects (such as microgroove depth and surface roughness) are intricately coupled with process parameters such as laser power and scanning frequency, exhibiting complex nonlinear relationships. To improve processing efficiency and quality, constructing a precise mapping model between process parameters and processing effects becomes crucial, and this process highly depends on high-quality, evenly distributed process data.
[0003] Traditionally, the determination of femtosecond laser process parameters has relied heavily on trial-and-error experiments. This involves combining a limited number of process parameter levels using orthogonal experimental design to obtain raw process data. However, this approach has significant limitations: firstly, orthogonal experiments, limited by the number of levels and experimental costs, struggle to cover all process parameter combinations, resulting in a large number of uncovered blank areas in the parameter space and creating sample sparsity; secondly, even for covered parameter combinations, the corresponding target variable sample sizes are often unevenly distributed, leading to sample density imbalance.
[0004] With the application of machine learning methods in this field, data-driven modeling has gradually become an important means of optimizing process parameters. However, existing technologies still face many challenges. For example, while CTGAN-based data augmentation methods can handle numerical tabular data, they cannot accurately identify the true sparse regions in the parameter space. When local sparse samples are extremely scarce, they are prone to learning incorrect distribution characteristics, resulting in poor quality generated samples that are difficult to effectively supplement the deficiencies of the original data. At the same time, the data generated by traditional generative models often lacks physical rationality and deviates from the actual process parameter-effect mapping relationship, further affecting the accuracy of downstream prediction models and restricting the efficiency and reliability of femtosecond laser process parameter optimization. Summary of the Invention
[0005] To address the aforementioned issues, this invention proposes a femtosecond laser process data generation method and system based on an improved CTGAN. By using data augmentation, the method solves the problem of uneven distribution of orthogonal experimental data, supplements samples in key sparse regions, and enhances the model's ability to predict the mapping relationship between process parameters and processing effects.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: In a first aspect, the present invention provides a method for generating femtosecond laser process data based on an improved CTGAN, comprising: Collect process parameter samples and corresponding processing morphology samples for femtosecond laser processing, and screen out original sample pairs; The sparse regions of the process parameter space in the original sample pair are identified by multidimensional kernel density estimation, and sparse samples of process parameters are obtained based on the density threshold. The original sample pairs and sparse samples of process parameters are input into the improved CTGAN to generate interpolated process parameters. In the improved CTGAN, the generator is used to concatenate the random noise vector with the condition vector of the sparse samples to generate pseudo process parameters and corresponding pseudo processing morphology samples, forming pseudo sample pairs. The discriminator is used to calculate the distribution difference between the pseudo sample pairs and the original sample pairs. The auxiliary regressor introduces the S4VM large margin constraint idea and guides the generator to output pseudo sample pairs that conform to the physical laws of processing through the constraint loss function iteration. The filtered pseudo-sample pairs are merged with the original sample pairs and input into a two-level interval residual regression model to obtain the processing morphology prediction results.
[0007] Secondly, the present invention provides a femtosecond laser process data generation system based on an improved CTGAN, comprising: The raw data acquisition module is configured to collect process parameter samples and corresponding processing morphology samples of femtosecond laser processing, and filter out raw sample pairs. The sparse sample acquisition module is configured to identify sparse regions in the process parameter space of the original sample pair through multidimensional kernel density estimation, and obtain sparse samples of process parameters based on a density threshold. The interpolation module is configured to input the original sample pairs and sparse samples of process parameters into the improved CTGAN to generate interpolated process parameters. In the improved CTGAN, the generator is used to concatenate the random noise vector with the condition vector of the sparse samples to generate pseudo process parameters and corresponding pseudo processing morphology samples, forming pseudo sample pairs. The discriminator is used to calculate the distribution difference between the pseudo sample pairs and the original sample pairs. The auxiliary regressor introduces the S4VM large margin constraint idea and guides the generator to output pseudo sample pairs that conform to the physical laws of processing through the constraint loss function iteration. The prediction module is configured to merge the filtered pseudo-sample pairs with the original sample pairs and input them into a two-level interval residual regression model to obtain the processing morphology prediction results.
[0008] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the femtosecond laser process data generation method based on an improved CTGAN as described in the first aspect.
[0009] Fourthly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the femtosecond laser process data generation method based on an improved CTGAN described in the first aspect.
[0010] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention accurately identifies sparse regions in the space of process parameters through multidimensional kernel density estimation, solving the problem of uneven distribution of orthogonal experimental data. In the improved CTGAN, the generator specifically generates interpolation parameters, the discriminator ensures data consistency through distribution difference calculation, and the auxiliary regressor uses the large-margin constraint of S4VM to filter out pseudo-samples that conform to physical laws, significantly improving the quality of generated data. After merging samples, prediction by the mapping model strengthens the ability to model the mapping relationship between process parameters and processing morphology, reduces physical experiment costs, provides high-precision data support for femtosecond laser process parameter optimization, and improves the accuracy of processing effect prediction and process development efficiency.
[0011] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0012] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute a limitation thereof.
[0013] Figure 1 A main flowchart of a femtosecond laser process data generation method based on an improved CTGAN provided in an embodiment of the present invention; Figure 2 A flowchart illustrating an algorithm for a femtosecond laser process data generation method based on an improved CTGAN, provided in an embodiment of the present invention. Figure 3 A generator structure diagram in the improved CTGAN provided in this embodiment of the invention; Figure 4 This is a diagram of the discriminator structure in the improved CTGAN provided in an embodiment of the present invention; Figure 5 A diagram of the regressor structure in the improved CTGAN provided in this embodiment of the invention. Detailed Implementation
[0014] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0015] Example 1 like Figure 1As shown, this embodiment discloses a method for generating femtosecond laser process data based on an improved CTGAN, including the following steps: S1: Collect process parameter samples and corresponding processing morphology samples for femtosecond laser processing, and screen out original sample pairs; S2: Identify sparse regions in the process parameter space of the original sample pair through multidimensional kernel density estimation, and obtain sparse samples of process parameters based on density thresholds; S3: Input the original sample pairs and sparse samples of process parameters into the improved CTGAN to generate interpolated process parameters; in the improved CTGAN, the generator is used to concatenate the random noise vector with the condition vector of the sparse samples to generate pseudo process parameters and corresponding pseudo processing morphology samples, forming pseudo sample pairs; the discriminator is used to calculate the distribution difference between the pseudo sample pairs and the original sample pairs; the auxiliary regressor introduces the S4VM large margin constraint idea, and guides the generator to output pseudo sample pairs that conform to the physical laws of processing through the constraint loss function iteration; S4: Merge the filtered pseudo-sample pairs with the original sample pairs and input them into the two-level interval residual regression model to obtain the processing morphology prediction results.
[0016] Next, combined Figure 2 This embodiment provides a detailed description of a femtosecond laser process data generation method based on an improved CTGAN.
[0017] S1, collect and construct the original dataset consisting of process parameters and processing effects.
[0018] S 1.1: Defines the core process parameter range for femtosecond laser processing, including key variables such as laser power, scanning frequency, scanning speed, number of scans, and scan line spacing.
[0019] By designing orthogonal experiments, representative combinations are selected from different levels of various process parameters to form the parameter combinations to be tested; these process parameter combinations are input into an infrared femtosecond laser, and precise processing operations are carried out on the workpiece surface based on these combinations.
[0020] After processing, a confocal microscope or a high-precision handheld measuring device is used to collect target morphology parameters that reflect the processing effect, such as surface roughness and processing depth of the processed workpiece.
[0021] S1.2: Preprocess the collected femtosecond laser processing parameters and target morphology parameters to build a structured raw database.
[0022] Next, the data cleaning process is performed, which includes imputing missing values and removing outliers. Missing values can be imputed using preliminary methods such as mean imputation, median imputation, or nearest neighbor imputation; outliers can be identified and removed using preliminary methods such as standard deviation method or quartile method.
[0023] Finally, valid data samples with process optimization value were selected. These samples refer to complete combinations of process parameters and complete target morphology parameters that have a corresponding relationship, that is, the two data correspondences are correct and there are no missing data.
[0024] The original database of femtosecond laser processing technology constructed using S1 already contains effective "process parameter combination - target morphology parameter" pairs obtained from orthogonal experiments. However, due to the limitations of the orthogonal experimental design principle—not exhausting all parameter combinations and focusing on covering key parameter interactions with a small number of samples—the database naturally suffers from sparse distribution. On the one hand, orthogonal experiments can only cover some typical combinations in the parameter space, leaving a large number of parameter combinations not selected by the experimental design with blank data. On the other hand, due to experimental costs and sample size limitations, the distribution of target values for covered parameter combinations also exhibits local density imbalances, with very few samples for some reasonable combinations, making it difficult to support the model in learning stable patterns.
[0025] This sparsity leads to coverage gaps when subsequent models learn the mapping relationship between "process parameters and target values," limiting their predictive ability for combinations of unexperimented parameters. Therefore, an S2 kernel density estimation and distribution completion strategy is introduced to accurately identify and fill in the blank and low-density regions in the parameter-target value space, making the distribution of the process database closer to the global patterns of real-world processing scenarios. The core value of this completion process lies in enabling the model to learn more complete parameter interaction patterns and target value evolution rules, overcoming the limitations of orthogonal experimental sample size and coverage, and ultimately improving the prediction accuracy of processing effects across the entire parameter space (especially unexperimented parameters), providing more comprehensive data support for process optimization.
[0026] The implementation steps of S2 are as follows: S2.1 The femtosecond laser processing database is obtained through S1. For continuous process parameters and target morphology parameters, their distribution characteristics are first quantified using statistical methods. Then, a suitable kernel function (such as a Gaussian kernel) and bandwidth parameter are selected to estimate their joint probability density function. During this process, sparse regions of the multi-dimensional process parameter kernel density distribution are captured, laying the foundation for later completion of process features and vacuum regions in the target segment, thereby improving the predictive performance of the process parameters on the model.
[0027] Specifically, for multi-factor process parameters With target value Combined into dimensional vector A multidimensional probability density function is generated through multidimensional kernel density estimation, and then the bandwidth parameter is determined based on the Silverman empirical method. The multidimensional kernel density estimation and bandwidth determination method are as follows:
[0028] in, This provides the probability density of occurrence for the process parameter combination x, which reflects the typicality or scarcity of this specific parameter combination; n is the sample size, i.e., the number of data points in the dataset, and h represents the bandwidth. d represents the sample point, and d represents the data dimension. It's a multidimensional kernel used to smooth the contribution of each sample; a commonly used one is the Gaussian kernel, as shown below:
[0029] in, It is a standardized distance. It is the covariance matrix, which represents the correlation between data and can describe the interdependence between various processes in femtosecond laser processing. d is the number of process parameter types.
[0030] Bandwidth is a core hyperparameter in kernel density estimation, controlling the smoothness of the kernel function and directly affecting the probability density calculation results. For multidimensional global bandwidth, the Silverman rule is used to automatically select a suitable fixed bandwidth for each dimension. It can balance smoothness and accuracy, making the probability density calculation results more reasonable and truly reflecting the sparsity of the data distribution:
[0031] Where d is the data dimension, and n is the total number of samples. It is the sample standard deviation of the j-th dimension.
[0032] S2.2: In femtosecond laser process parameters, the current process parameter design is relatively simple, so a fixed bandwidth is sufficient. If there are many process types, an adaptive bandwidth calculation method can be used. The specific method is as follows: based on each sample point... Calculate local bandwidth ,in This represents the local density obtained based on the initial KDE estimation. This design results in larger bandwidth in sparse regions and smaller bandwidth in dense regions. After obtaining the bandwidths in each dimension, a bandwidth matrix H can be constructed:
[0033] For all training samples ,in Using multidimensional KDE:
[0034] The bandwidth matrix is bandwidth of each vector for:
[0035] S2.3: Under the joint KDE model, take the joint density estimate of all points in the training set. And set a low quantile threshold. Will be lower Points with high density are considered "sparse," therefore, false positive and false negative rates are considered. Given a density threshold... For any new sample ,like If the condition is met, it is considered abnormal; otherwise, it is considered normal. Defined on the labeled validation set: The set of positive (normal) samples is denoted as The total number of samples is The set of negative (abnormal) samples is denoted as The total number of samples is Therefore, we have: The actual number of cases is positive and is judged as normal; The number of false negatives is used, but the positive class is judged as an anomaly. The number of true negative instances, which are negative classes and are judged as abnormal; The number of false positives is high, but the negative classes are judged as normal. Therefore, the false positive rate and the false negative rate are defined as follows:
[0036] To simultaneously account for the different costs of "false positives" and "false negatives" in business operations, a weighted summation cost function is constructed:
[0037] in, The weights corresponding to "misjudgment" (classifying abnormal samples as normal) are: The weights for "missed detections" (classifying normal samples as abnormal). The threshold is determined based on the comprehensive cost function. The process is as follows: 1) For the joint training set Multi-kernel density estimation is performed to obtain the estimated density value for each point. .
[0038] 2) The training set Divide the data into K equal parts according to the quantiles, and take the density values corresponding to the K quantiles as... .
[0039] 3) For each candidate threshold In the labeled validation set Statistical analysis was performed separately. , , and calculate .
[0040] 4) Calculate the comprehensive cost according to formula (8). .
[0041] 5) Use traditional grid search to determine the optimal threshold.
[0042]
[0043] S2.4: Obtaining the optimal threshold Then, define the joint sparse region. ,in It also includes sample pairs that are sparse in both parameters and target values.
[0044] Label all imbalanced sample index sets that conform to the following sparsity criteria. ,in:
[0045] Will The target is extracted from all samples into a set. And sort in ascending order, with .
[0046] Based on the required number of categories n, the cut points are calculated for the sparse subsets of the target values using the quantile method according to the above formula, thus obtaining n discrete intervals for CTGAN classification. Specifically:
[0047] For all original samples ,according to The interval is assigned a category label, and then a one-hot vector matrix is encoded based on the category information, which serves as the conditional input for the generative adversarial network.
[0048] In S3, an improved CTGAN model is introduced to enhance the quality of femtosecond laser processing parameters. Its inputs are sample and sparse samples of process parameters. Through the collaborative efforts of various model components, interpolated process parameters are ultimately generated to meet diverse production needs.
[0049] S3.1: Using femtosecond laser micromachining processes with different material properties and processing requirements as the basic unit for generalizing process parameter knowledge, we extract laser process parameter instances from experimental data sources to construct an original dataset, which includes process parameter samples and sparse process parameter samples.
[0050] The process parameter generation model built on the improved CTGAN framework consists of three core components that work together: a generator module, which generates combinations of femtosecond laser process parameters that conform to physical laws; a discriminator module, which integrates a cross-attention mechanism to identify the validity of real process parameters and generated data; and an auxiliary regressor module, which uses the S4VM semi-supervised learning algorithm to ensure the mapping relationship between generated parameters and processing results.
[0051] like Figure 3 As shown, the generator is a random noise vector that follows a standard multidimensional Gaussian distribution. The conditional vector representing sparse samples of femtosecond laser process parameters The data is concatenated along the channel dimension and input to the generator's two fully connected layers, as follows:
[0052] Obtain an intermediate representation with 256 dimensions. .
[0053] For the two types of outputs of femtosecond laser processing parameters, numerical outputs are used to generate continuous pseudo-process parameters such as laser power and scanning speed:
[0054] It also provides categorical outputs to generate discretized target variable interval labels, which are used to identify the preset interval to which the processing morphology (such as surface roughness, processing depth, etc.) corresponding to the pseudo-process parameters belongs.
[0055]
[0056] Will and After concatenation, a complete feature vector containing parameters and interval constraints is formed. This vector is then fed into a pre-trained regression-classification co-predictor for filtering, yielding a safe prediction. The classification task verifies the rationality of the interval labels corresponding to the pseudo-process parameters, such as whether they conflict with known process rules. The regression task predicts specific processing morphology values based on the interval labels and pseudo-process parameters, evaluates their confidence level, and obtains pseudo-process parameters and corresponding pseudo-processing morphology samples that meet safety requirements, thus forming pseudo-sample pairs. Finally, the loss function is calculated using formula (15):
[0057] This includes a weighted sum of three terms: adversarial loss, conditional classification loss, and classification-regression co-prediction loss. Indicating resistance to loss, This represents a discriminator used to determine whether generated data is genuine. Let z represent the output of the generator, z represent the noise vector, and c represent the true label; This represents the cross-entropy loss in classification tasks. This represents the label probability predicted by the model; This represents the weight of the safety loss item. This indicates a loss that is predicted to be safe.
[0058] S3.2, Since traditional GAN models have limitations in capturing semantic information from tabular data and identifying which dimensions in the input vector belong to the same column, this embodiment improves the traditional discriminator architecture by incorporating techniques such as positional encoding and multi-head attention mechanisms from the Transformer model. Through these techniques, this embodiment can more accurately capture uniform and skewed data distributions.
[0059] The discriminator needs to engage in adversarial learning with the generator to continuously improve its ability to identify synthetic process parameter data. For example... Figure 4 As shown, the discriminator consists of two fully connected layers, each with 256 neurons. Each layer uses the LeakyReLU activation function, and Dropout is applied to alleviate overfitting. Furthermore, a gradient penalty mechanism is introduced to increase training constraints; however, since this technique operates independently on each training sample, batch normalization is not used to avoid dependencies between samples from the same batch.
[0060] In addition, a generative sample discrimination method based on a joint cross-attention mechanism is proposed, applicable to the discriminator structure in generative adversarial networks for femtosecond laser process parameters. This method aims to improve the discriminator's ability to identify structural differences in forged samples, and its core includes a context alignment and comparison mechanism between generated and real samples.
[0061] Specifically, variational Gaussian mixture (VGM) encoding is used on consecutive columns of the original sample pairs and pseudo-sample pairs. After dividing the target variable into sparse regions, one-hot encoding can be used directly. Subsequently, the encoding vector of each column is... The data is fed into a fully connected layer to generate a column embedding representation. The embedding function is defined as follows:
[0062] in, For trainable weight matrix, For paranoia, Indicates the first The column data consists of densely embedded vectors. Specifically, in the discriminator, a cross-attention module is introduced to reconstruct the representation of the column vectors in the context of the real original sample pairs using generated pseudo-samples. Let the features of the generated samples be... The characteristics of the real sample are The two are fused using a cross-attention mechanism that introduces a bias term, as follows:
[0063] in, For linear mapping matrix For the corresponding bias term, This is the scaling factor.
[0064] Therefore, the cross-attention matrix is calculated as follows:
[0065] The cross-attention output Compared with the original generated features By adding the residual connections and then connecting them to a LayerNormalization layer for stable training, a fused feature representation is formed:
[0066] Fusion features After being flattened, the input is fed into the discriminant subnetwork, which contains two fully connected layers and a LeakyReLU activation function, and outputs a scalar. Used to determine the authenticity of a sample:
[0067] In the loss design, the Wasserstein distance is used to generate the distribution. With the true distribution Optimization is performed, supplemented by gradient penalty to ensure Lipschitz continuity. The "real sample set" and "interpolated sample set" are concatenated, and then partitioned along the target value dimension. Divide the sample into equal intervals, and let the proportion of the mixed sample falling into the k-th interval be . Ideally uniformly distributed as Regular terms This is intended to encourage a more balanced distribution of mixed data across the entire domain, free from sparse clustering.
[0068]
[0069] in, This indicates that samples were taken from real samples. This represents a pseudo-sample generated by KDE interpolation. This represents the embedding representation after cross-attention fusion. This represents the discriminator scoring function. This represents the proportion of the synthetic sample in the k-th target interval. This represents the weighting coefficient.
[0070] S3.3: In addition to the discriminator, a shared multi-head self-attention backbone is introduced, simultaneously outputting regression and classification branches (discrete interval k), and then merging them. S4VM The idea of semi-supervised large intervals.
[0071] Let the input sequence tensor be the real original sample pair. ,in The sequence length is determined first by three sets of trainable mappings.
[0072]
[0073] in, Then along the feature dimension Evenly divided into Size tensor Each subtensor has a dimension of ,satisfy For the first Size, perform scaling dot product attention:
[0074] This step is performed independently within each head and can be done in parallel. The outputs of each head are then concatenated along the feature dimension. Then output the fusion matrix Mapping: To suppress the decay of deep information and stabilize training, residual connections and layer normalization are introduced. With input embedding Add element by element, then apply LayerNorm:
[0075] LayerNorm uses general affine transformation parameters. .
[0076] At the tail of the shared backbone network described in this embodiment, a set of parallel prediction branches is set up, and their structure and function are as follows:
[0077] The piecewise function Two prediction paths are defined simultaneously using a unified symbolic framework. This preserves the independent trainability of their respective network structures and parameters, while also facilitating a comprehensive description in the claims as "the same prediction function contains two output forms." These two prediction paths are trained based on real original sample pairs.
[0078] In the regression branch, an attention backbone network trained on real original samples is used to perform physical plausibility regression prediction on the generated pseudo-sample pairs. Specifically, this is used to predict the true or reasonable values of the processed morphology in the generated samples. By calculating the error between the predicted results of the generated samples and the true distribution, the sample pairs produced by the generator are constrained to more closely resemble the distribution pattern of the real samples in the continuous numerical dimension, ensuring that the generated data conforms to physical logic in the continuous mapping between process parameters and processing effects.
[0079] Specifically, for generating sample process parameters, the first step is to generate the sample... Inputting the embedding network yields high-dimensional hidden vectors. This allows the "accept / reject" concept of S4VM to be directly integrated into the regression branch. A trust threshold and sample splitting are performed, with a preset trust threshold. For each pseudo-sample calculate Acceptance set Refuse to gather The mean of the highest confidence scores obtained from all real samples in the early stages of training (epochs 1-2) is denoted as . ,set up . In the classification branch, for each discrete category In the real sample index set Summarize the labeled values and calculate:
[0080] If there are fewer than 5 true samples in a certain category, then the entire category is used. The global mean is used as a substitute to prevent the denominator from being too small. A constant is used. ,recommend Set up a safety interval The pseudo-sample weight is defined as:
[0081] This weighting is equivalent to the two-hinge mechanism of "accept / reject" samples in S4VM: accepted samples are given small weights, and rejected samples are penalized linearly according to their confidence level and distance from the safety margin. Based on this, the final safe regression loss is:
[0082] The first term represents the L1 supervision of the real samples, and the second term represents the pseudo-samples and their confidence class centers. The deviation, multiplied by the S4VM weights Final combined loss:
[0083] The classification branch compares the differences between the generated sample pairs and the real sample category distributions, constrains the generated sample pairs to fit reality in the discrete dimension, and obtains credible pseudo-sample pairs, ensuring that the category correlation between process parameters and processing effects conforms to physical laws.
[0084] The implementation steps of S4 are as follows: S4.1 proposes a two-level interval residual regression model. Specifically, this embodiment proposes a two-level inference mechanism of "coarse segmentation" and "fine regression" for continuous process indicators such as depth / roughness. The inference result consists of two parts: the central value of the discrete interval and the residual within the interval. This model can balance rapid positioning and fine adjustment. Figure 5 As shown.
[0085] Kernel density estimation is performed on historical labeled values (labeled processing morphology parameters corresponding to process parameters in the original data), and the continuous domain is divided into K non-overlapping regions based on probability troughs. Calculate and cache the center value for each interval. This transforms the original annotation into the form of "range index + range residual":
[0086] The original samples are processed by a multi-head self-attention encoder of a regression-classification co-predictor to obtain shared feature vectors. The following two-level interval residual regression model is used for prediction:
[0087] Classification branch outputs interval probability vector The residual within the output interval of the regression branch .
[0088] We take the top-k weighted average, where K is 3.
[0089] The final loss function is designed as follows:
[0090] It includes the classification cross-entropy loss and the L1 term of regression residuals only on real samples, where N is the total number of original sample pairs and credible pseudo sample pairs in the training set. The i-th sample is predicted to be in the possible interval. The probability of. The number of truly labeled samples, This represents the set of real sample indices. λ is a weighting coefficient used to balance the relative importance of classification and regression. It prevents unlabeled spurious samples from causing negative transfer to continuous predictions, ensuring the model's prediction accuracy on real samples.
[0091] S4.2, to statistically quantify the distributional differences between generated and real data, a maximum mean difference is introduced, mapping the original and generated datasets to a regenerated Hilbert space for comparison. Specifically, the original samples are compared... Pairs with generated pseudo samples Map to the regenerated Hilbert space (RKHS) defined by the kernel function and compute the difference in their distribution means.
[0092]
[0093] By comparing the MMD of generated data from different generation methods with real data, we can quantitatively evaluate the degree of fit between the synthetic data and the real data.
[0094] S4.3 Furthermore, to more intuitively demonstrate the overlap between the generated and real data distributions in the feature space, t-SNE dimensionality reduction and kernel density estimation techniques are introduced to generate two-dimensional probability density cloud maps for visual comparison. The dimensionality reduction visualization method uses the t-SNE algorithm to reduce the high-dimensional process parameter space to a two-dimensional plane, and kernel density estimation generates two-dimensional probability density cloud maps of the original and generated data, allowing for a direct comparison of their overlapping distributions in the feature space.
[0095] This specific embodiment obtains an original process database of initial laser process parameters and target variables such as roughness depth through orthogonal experiments, and preprocesses outliers. From the preprocessed database, kernel density estimation is performed based on the target variables and process distribution to adaptively determine sparse regions. One-hot encoding is applied to the sparse regions, and cross-attention is used to improve the discriminator. Finally, the S4VM dual-hinge strategy is used for limited training of generated samples, interpolating in the sparse regions to obtain high-quality sparse region process parameters. The generated new samples are synthesized with real samples for joint training, and validation is performed using a two-level interval residual regression model. Statistical indicators are used to evaluate the consistency of the generated data distribution. This not only solves the problem of unbalanced data distribution in orthogonal experiments but also significantly improves the predictive ability of machine learning models for processing effects, providing high-precision decision support for femtosecond laser process parameter optimization.
[0096] Example 2 This embodiment provides a femtosecond laser process data generation system based on an improved CTGAN, including: The raw data acquisition module is configured to collect process parameter samples and corresponding processing morphology samples of femtosecond laser processing, and filter out raw sample pairs. The sparse sample acquisition module is configured to identify sparse regions in the process parameter space of the original sample pair through multidimensional kernel density estimation, and obtain sparse samples of process parameters based on a density threshold. The interpolation module is configured to input the original sample pairs and sparse samples of process parameters into the improved CTGAN to generate interpolated process parameters. In the improved CTGAN, the generator is used to concatenate the random noise vector with the condition vector of the sparse samples to generate pseudo process parameters and corresponding pseudo processing morphology samples, forming pseudo sample pairs. The discriminator is used to calculate the distribution difference between the pseudo sample pairs and the original sample pairs. The auxiliary regressor introduces the S4VM large margin constraint idea and guides the generator to output pseudo sample pairs that conform to the physical laws of processing through the constraint loss function iteration. The prediction module is configured to merge the filtered pseudo-sample pairs with the original sample pairs and input them into a two-level interval residual regression model to obtain the processing morphology prediction results.
[0097] Example 3 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the femtosecond laser process data generation method based on an improved CTGAN as described in Embodiment 1 above.
[0098] Example 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the femtosecond laser process data generation method based on an improved CTGAN as described in Embodiment 1 above.
[0099] The steps or modules involved in Embodiments 2 to 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.
[0100] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating femtosecond laser process data based on an improved CTGAN, characterized in that, include: Collect process parameter samples and corresponding processing morphology samples for femtosecond laser processing, and screen out original sample pairs; The sparse regions of the process parameter space in the original sample pair are identified by multidimensional kernel density estimation, and sparse samples of process parameters are obtained based on the density threshold. The original sample pairs and sparse samples of process parameters are input into the improved CTGAN to generate interpolated process parameters. In the improved CTGAN, the generator is used to concatenate the random noise vector with the condition vector of the sparse samples to generate pseudo process parameters and corresponding pseudo processing morphology samples, forming pseudo sample pairs. The discriminator is used to calculate the distribution difference between the pseudo sample pairs and the original sample pairs. The auxiliary regressor introduces the S4VM large margin constraint idea and guides the generator to output pseudo sample pairs that conform to the physical laws of processing through the constraint loss function iteration. The filtered pseudo-sample pairs are merged with the original sample pairs and input into a two-level interval residual regression model to obtain the processing morphology prediction results.
2. The femtosecond laser process data generation method based on improved CTGAN as described in claim 1, characterized in that, The process parameter samples and corresponding processing morphology samples of femtosecond laser processing are collected, and original sample pairs are selected, specifically including: The process parameter sample includes laser power, scanning frequency, scanning speed, number of scans, and scan line spacing; The process parameter samples were combined at different levels through orthogonal experiments to construct a finite combination of process parameters. Based on the combination of process parameters, femtosecond laser processing is performed on the target material, and the surface roughness and processing depth after processing are measured as processing morphology samples. The collected process parameter samples and processing morphology samples are cleaned, outliers are removed and missing values are filled to form original sample pairs consisting of process parameter samples and corresponding processing morphology samples.
3. The femtosecond laser process data generation method based on improved CTGAN as described in claim 1, characterized in that, The process of identifying sparse regions in the process parameter space of the original sample pair through multidimensional kernel density estimation and obtaining sparse samples of process parameters based on a density threshold specifically includes: The process parameter samples and processing morphology samples in the original sample pairs are standardized to construct a joint data vector; A Gaussian kernel function is used for multidimensional kernel density estimation, and the bandwidth parameter is determined and the data distribution is smoothed by the Silverman rule. Calculate the global average density and mark regions where the data distribution density is lower than the global average density as potential sparse regions; Based on the labeled validation set, the candidate density threshold is determined by the quantile method. A comprehensive cost function is constructed by combining the false positive rate and the false negative rate. The optimal threshold is obtained by grid search. Samples with kernel density lower than the optimal threshold in the potential sparse region are marked as sparse samples of process parameters.
4. The femtosecond laser process data generation method based on improved CTGAN as described in claim 1, characterized in that, The generator is used to concatenate the random noise vector with the condition vector of the sparse sample to generate pseudo process parameters and corresponding pseudo processing morphology samples, forming pseudo sample pairs, specifically including: Sparse samples of process parameters are encoded into condition vectors; the condition vectors are concatenated with random noise vectors that follow a Gaussian distribution along the channel dimension to obtain the concatenated vector. The concatenated vector is input into a generator containing two fully connected layers, where the first layer generates initial pseudo-process parameters and the second layer obtains the corresponding target variable interval labels. The initial pseudo-process parameters and target variable interval labels are spliced together and input into a pre-trained regression-classification co-predictor for screening. Pseudo-process parameters and corresponding pseudo-processing morphology samples that meet the preset safety requirements are obtained, forming pseudo-sample pairs.
5. The femtosecond laser process data generation method based on improved CTGAN as described in claim 1, characterized in that, The discriminator is used to calculate the distributional difference between pseudo-sample pairs and original sample pairs, specifically including: Variational Gaussian mixture encoding is performed on continuous columns in pseudo-sample pairs and original sample pairs, and one-hot encoding is performed on discrete columns. The encoded column vectors are then passed through a fully connected layer to generate column embedding representations. Based on the cross-attention mechanism, the column embeddings of pseudo-sample pairs are fused with the column embeddings of original sample pairs, and the fused features are obtained through residual connections and layer normalization. The fused features are flattened and then input into a discriminant subnetwork containing two fully connected layers to obtain the Wasserstein distance score, which represents the distribution difference. The smaller the distance, the closer the distribution of the pseudo-sample pair is to that of the original sample pair.
6. The femtosecond laser process data generation method based on improved CTGAN as described in claim 1, characterized in that, The auxiliary regressor incorporates the S4VM large-margin constraint concept, guiding the generator to output pseudo-sample pairs that conform to the physical laws of processing through iterative constraint loss function. Specifically, it includes: A pre-set confidence threshold is used to input pseudo-sample pairs into a shared multi-head self-attention backbone network to obtain latent vectors. The confidence of each pseudo-sample pair is calculated, and pseudo-sample pairs with confidence scores higher than the threshold are assigned to the acceptance set, while those with scores lower than the threshold are assigned to the rejection set. Based on the S4VM dual-hinge strategy, small weights are assigned to the samples in the acceptance set, and the samples in the rejection set are linearly penalized according to the confidence level and the safety interval, thus filtering out pseudo-sample pairs that conform to the mapping law between process parameters and processing morphology.
7. The femtosecond laser process data generation method based on improved CTGAN as described in claim 1, characterized in that, The filtered pseudo-sample pairs are merged with the original sample pairs and input into a two-level interval residual regression model to obtain the processing morphology prediction results, specifically including: The filtered pseudo-sample pairs are merged with the original sample pairs into a joint training set, which is then input into a two-level interval residual regression model. The classification branch predicts the discrete region to which the target variable belongs, while the regression branch predicts the fine residual offset of the target value within the interval. Obtain the Top-K probability intervals of the classification output; combine the center values and regression residuals of each interval to calculate the final predicted value of the processed morphology.
8. A femtosecond laser process data generation system based on an improved CTGAN, characterized in that, include: The raw data acquisition module is configured to collect process parameter samples and corresponding processing morphology samples of femtosecond laser processing, and filter out raw sample pairs. The sparse sample acquisition module is configured to identify sparse regions in the process parameter space of the original sample pair through multidimensional kernel density estimation, and obtain sparse samples of process parameters based on a density threshold. The interpolation module is configured to input the original sample pairs and sparse samples of process parameters into the improved CTGAN to generate interpolated process parameters. In the improved CTGAN, the generator is used to concatenate the random noise vector with the condition vector of the sparse samples to generate pseudo process parameters and corresponding pseudo processing morphology samples, forming pseudo sample pairs. The discriminator is used to calculate the distribution difference between the pseudo sample pairs and the original sample pairs. The auxiliary regressor introduces the S4VM large margin constraint idea and guides the generator to output pseudo sample pairs that conform to the physical laws of processing through the constraint loss function iteration. The prediction module is configured to merge the filtered pseudo-sample pairs with the original sample pairs and input them into a two-level interval residual regression model to obtain the processing morphology prediction results.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the femtosecond laser process data generation method based on the improved CTGAN as described in any one of claims 1-7.
10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the femtosecond laser process data generation method based on an improved CTGAN as described in any one of claims 1-7.
Citation Information
Cited By
Femtosecond laser process parameter self-optimization method and system
CN121857530A
