Process industry process parameter recommendation method based on anti-fact interpretation

By using Cross&ResNet and WGAN-GP models for counterfactual explanations in the process industry, it solves the problem of difficult to capture the impact of process parameter interactions and feature changes, improves the interpretability of process parameter optimization and the accuracy of quality control, and helps experts Understand and adjust process parameters to optimize product quality.

CN118657241APending Publication Date: 2024-09-17TONGJI UNIV
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410668231.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In the process industry, existing technologies are difficult to effectively capture the interaction between process parameters and the impact of feature changes on quality output, resulting in insufficient interpretability and reliability of quality prediction models, especially in the face of multiple varieties and specifications. , How to optimize process parameters to control product quality in a complex production environment with multiple processes is a challenge.

Method used

Using a method based on counterfactual interpretation, we build quality prediction and counterfactual generation models through Cross&ResNet and WGAN-GP, obtain counterfactual samples, and evaluate and screen through effectiveness, feature proximity, feature sparsity, and data manifold proximity to assist Experts analyze the adjustment direction or range of key process parameters.

Benefits of technology

It improves the optimization ability of process parameter combinations, helps experts understand the model decision-making process, provides potential reasons for quality fluctuations, enhances the transparency and reliability of the model, and ensures the accuracy and operability of quality control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657241A
    Figure CN118657241A
Patent Text Reader

Abstract

The invention discloses a process industry technological parameter recommendation method based on anti-fact explanation, and relates to the technical field of technological parameter recommendation, and the method comprises the steps: obtaining a product quality data set, and carrying out the preprocessing operation of the data set; dividing the data set after data preprocessing into a training set and a test set; constructing a product quality prediction model based on Crosss; an anti-fact generation model is constructed based on the WGAN-GP and the Crosss; an anti-fact sample is obtained through a generator, and the generated anti-fact sample is evaluated and screened from validity, feature proximity, feature sparsity and feature data manifold proximity to obtain the anti-fact sample. According to the process industry technological parameter recommendation method based on the anti-fact explanation, the optimal technological parameter combination is searched in the technological parameter feature space through the anti-fact explanation, and experts are assisted in analyzing the adjustment direction or range of key technological parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of process parameter recommendation, and in particular to a method for recommending process parameters in a process industry based on counterfactual explanation. Background Art

[0002] At present, process industry control systems are becoming increasingly complex, integrated, dynamic, and intelligent. In the manufacturing process of process industry, there are problems such as large fluctuations in production status, complex processes, many constraints on process quality control, and difficulties in mechanism integration. For example, the production of rubber tires in process industry requires processes such as rubber mixing, calendering, cutting and molding, vulcanization, and inspection. Taking the mixing process as an example, the mixing process needs to be determined according to different rubber material requirements and formula characteristics. The effective and precise control of temperature, time, and power parameters in the process will affect the quality of the mixed rubber. Facing complex market demands, a process of process setting and optimization will be experienced before formal production. Therefore, facing the common characteristics of multiple varieties, multiple specifications, and multiple processes in process industries, how to control product quality and optimize process parameters is a challenging problem.

[0003] In recent years, research on product quality prediction has been widely carried out, aiming to discover the correlation between process parameters and quality parameters from production data, establish prediction models through easily measurable process parameters, predict difficult-to-measure quality parameters and possible problems in the production process, so as to take measures in advance for intervention and adjustment. In 2020, Li et al. used convolutional neural networks to predict the tensile strength of hot-rolled strip, and characterized the complex interactions between influencing factors by converting one-dimensional data into two-dimensional data. In 2020, Lee et al. combined convolutional neural networks and recurrent neural networks to process spatial and time series information, and combined transient and steady-state characteristics in the production process to predict the temperature distribution of the steelmaking continuous casting process. In 2021, Feng et al. proposed an encoder-decoder method based on dual attention, which captures the influence of process parameters on quality parameters at different time points by embedding a dual attention mechanism in LSTM to achieve fine-grained quality prediction.

[0004] At present, the quality prediction model based on machine learning can achieve high performance, but the machine learning model relies on the computational representation of the data, and the final prediction is determined by the representation features. As the complexity of the model continues to increase, experts cannot understand the behavior of the model in making predictions (especially when it is inconsistent with the expert judgment), and it is difficult to directly use the model for production decisions. The interpretability of machine learning models has attracted attention, and a series of explainable artificial intelligence methods have emerged. By explaining the behavior predicted by the model, the transparency and reliability of the model are improved, and the semantic information implicit in the data is obtained. As an alternative to knowledge-driven models, explainable artificial intelligence can discover patterns and anomalies in the production process, make explanations that experts can understand, promote interaction between models and experts, and help experts understand the reasons, influencing factors and potential limitations of the model's judgments. In 2022, Janne et al. established a prediction model for surface defects of steel plates through gradient boosting trees, and used the SHAP method to find the potential correlation between process parameters and surface defects, and gave a local explanation of the model's prediction behavior in the form of feature contribution size. In 2024, Gim et al. used artificial neural networks to model the relationship between process parameters and injection molding in-mold conditions and the relationship between in-mold conditions and quality parameters, and used the feature attribution method SHAP to explain the impact of different features on predictions, and proportionally weighted the features with high influence to optimize process parameters. In 2023, Klein et al. used neural networks to model data in different modes (such as images, time series data, tabular data, etc.) in the field of perovskite semiconductor film processing, and deployed a variety of counterfactual explanation models to extract different modes in the data and present them as human-understandable concepts. These concepts can be converted into actionable conclusions by material scientists to reduce significant fluctuations in quality. In 2023, Barraza et al. proposed a sparse counterfactual generation network combined with feature selection for fault diagnosis problems in the field of natural gas amine processing. The network contains two branches, which respectively realize feature selection and counterfactual generation. The generated counterfactual samples are used to evaluate the necessity of each feature.

[0005] In summary, it can be seen that explainable artificial intelligence methods are widely used in fields such as process quality control, helping experts understand the internal mechanisms of the model and optimize the model and production process. Feature attribution-based methods such as SHAP can find key process parameters for quality defects or fault diagnosis in production, and give the contribution of different features to the model output in the form of feature importance. However, it is impossible to capture the interaction between features, nor to reveal the impact of feature changes on other features and model outputs. Counterfactual-based methods can explore the impact of different combinations of process parameters on quality within a reasonable range of feature space, and provide new insights into the potential causes of quality fluctuations in production. However, many researchers have not fully considered the four specifications for the existence of counterfactual explanations: validity, proximity, data manifold proximity, and sparsity.

[0006] Validity. A valid counterfactual sample is a situation that is opposite to the actual prediction of the model, that is, when the model makes a certain prediction, but in reality, if some input features have changed, the model should make a prediction opposite to the original prediction. In this case, analyzing counterfactual samples can provide a deeper understanding of the model's decision-making process and the model's dependence on input features.

[0007] Proximity. Given an input x, its counterfactual explanation x cf It is generated with minimal intervention, two data points are adjacent in the feature space, and the output moves towards the preset target.

[0008] Data manifold proximity. The feature combination generated by the counterfactual sample may not exist in the training data, which leads to trust issues. The counterfactual sample may be unrealistic or be identified as an outlier in the real data. Therefore, in addition to satisfying data proximity, the data manifold constraint is introduced to make the counterfactual sample close to the distribution of the real data in the low-dimensional manifold space.

[0009] Sparsity. Ideally, counterfactuals with fewer altered features are easier to understand and interpret, so sparsity is also an important factor. Summary of the invention

[0010] In view of the above-mentioned problems, the present invention is proposed.

[0011] Therefore, the technical problem solved by the present invention is to predict the product quality in the process industry and recommend process parameters for production batches with quality defects.

[0012] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for recommending process parameters of process industries based on counterfactual explanation, comprising:

[0013] Obtain a product quality data set and preprocess the data set; divide the preprocessed data set into a training set and a test set; build a product quality prediction model based on Cross&ResNet, and use the training set to train the Cross&ResNet model to obtain the optimal quality prediction model; build a counterfactual generation model based on WGAN-GP and Cross&ResNet, and use the training set to train the generator and discriminator in WGAN-GP to obtain the optimal generator; obtain counterfactual samples through the generator, and evaluate and screen the generated counterfactual samples from the perspective of effectiveness, feature proximity, feature sparsity, and feature data manifold proximity to obtain counterfactual samples to assist experts in analyzing the adjustment direction or range of key process parameters.

[0014] As a preferred solution of the process parameter recommendation method for process industry based on counterfactual explanation described in the present invention, wherein: the acquisition of product quality data set includes calculating the Euclidean distance between data samples by DBSCAN clustering algorithm, and removing outlier abnormal data;

[0015] The missing data in the dataset were supplemented by the mean method;

[0016] For the quality prediction model, the Min-Max normalization method is used to map the data to [0,1] to eliminate the influence of parameter dimension on the prediction results;

[0017] For WGAN-GP, continuous features use BGMM to estimate the number of implicit patterns and standardize them, and discrete features use one-hot encoding.

[0018] As a preferred solution of the process industry process parameter recommendation method based on counterfactual explanation described in the present invention, wherein: the division into training set and test set; including 80% of the product quality data set after data preprocessing operation as training set and 20% as test set.

[0019] As a preferred solution of the process parameter recommendation method for process industries based on counterfactual explanations described in the present invention, wherein: the construction of the product quality prediction model includes selecting important process parameters in the production process as input features of the Cross part in the Cross&ResNet model, and learning effective feature crossovers under a finite order through the cross network;

[0020] The remaining process parameters are used as input features of the ResNet part in the Cross&ResNet model. The discrete process parameters use EmbeddingLayer to learn low-dimensional embedding vectors and learn higher-level features of the input data.

[0021] Hyperparameters were determined by grid search method;

[0022] The number of neurons in each hidden layer of the neural network is determined by particle swarm algorithm;

[0023] The quality prediction model is built based on Cross&ResNet. The model is trained in the training set according to the set hyperparameters, and the mean square error loss function is minimized using the gradient descent method, which is expressed as:

[0024]

[0025] Among them, y pred represents the quality parameter of the prediction, y real Represents the actual quality parameters; after training, the optimal quality prediction model is obtained.

[0026] As a preferred embodiment of the process parameter recommendation method for process industry based on counterfactual explanation described in the present invention, the counterfactual generation model is constructed by constructing a generator through a fully connected network with residual connections, and converting the process parameter x, the manufacturing standard y of the quality parameter into std And the prediction result y of the quality prediction model pred Introduce random noise z as a condition, and use Tanh and Gumbel Softmax as activation functions;

[0027] During the generator training process, the validity loss term L is introduced to make the generated data meet the counterfactual characteristics v and the sparsity loss term L s , expressed as:

[0028]

[0029] Among them, y cf Represents the quality prediction model for the generator to generate data x cf The prediction results are measured using RMSE. cf and std The gap between them is calculated by L1 norm and L0 norm to calculate sparsity, where C represents the continuous feature subset, D represents the discrete feature subset, and |·| represents the number of elements in the set;

[0030] The objective function of the generator is expressed as:

[0031]

[0032] Among them, λ v and λ s Represent the weights k of the validity loss term and the sparsity loss term respectively;

[0033] The discriminator is constructed through a fully connected network, and a gradient penalty term is introduced to constrain the gradient of the discriminator. The objective function of the discriminator is expressed as:

[0034]

[0035] Among them, p data and p G Respectively represent the distribution of real data and generator generated data, p f It is right data and p G The random distribution generated by random interpolation simulation between two distributions, λ g Represents the weight of the gradient penalty term;

[0036] Set hyperparameters;

[0037] A counterfactual generation model is constructed based on WGAN-GP and Cross&ResNet. The model is trained in the training set according to the set hyperparameters. While minimizing the loss of the generator and discriminator, the loss values ​​of both are stabilized. After completing the training, the optimal counterfactual generation model is obtained.

[0038] As a preferred solution of the process parameter recommendation method for process industries based on counterfactual explanations described in the present invention, wherein: the obtaining of counterfactual samples by the generator includes inputting the process parameters in the actual production process into the counterfactual generation model, and generating a candidate set of counterfactual samples by repeated iterations;

[0039] Calculate the validity, proximity and data manifold proximity of each sample and remove invalid candidates;

[0040] The samples are ranked by a double ranking selection method, and the two indicators of double ranking selection are effectiveness and proximity of equal-weighted aggregation and data manifold proximity;

[0041] Through the post-sparse enhancement operation of the greedy algorithm, the adjacent continuous features are greedily restored to their original values ​​until the predicted quality parameters fluctuate significantly, thus obtaining the optimal counterfactual explanation. The counterfactual samples are used to assist experts in analyzing the key process parameters that lead to quality defects and give recommended adjustment directions or adjustment ranges.

[0042] As a preferred solution of the process parameter recommendation method for process industries based on counterfactual explanations described in the present invention, the computational effectiveness index represents the degree of improvement of the prediction results of counterfactual samples in the quality prediction model relative to the real data, and the model encourages the prediction results of counterfactual samples to be close to the preset target value, which is expressed as:

[0043]

[0044] Among them, ||·||2 represents the Euclidean distance between two features. The closer the quality parameter is to the target value, the smaller the index is. At the same time, if the index is greater than 1, it means that the quality parameter of the counterfactual sample deviates more from the target than the real data, and it will not be adopted.

[0045] Calculate the feature proximity index, which is used to measure the counterfactual samples With the real data x i Gao's distance It is expressed as:

[0046]

[0047] Among them, median(·) represents the median calculation, MAD krepresents the median absolute deviation of feature k, m(· represents the Manhattan distance weighted by the inverse of the median absolute deviation, and g(·) calculates the distances of different feature dimensions separately and sums the distances of features of different dimensions.

[0048] As a preferred solution of the process parameter recommendation method for process industry based on counterfactual explanation described in the present invention, wherein: the calculation characteristic data manifold proximity index, the data manifold characterizes the distribution characteristics of data in high-dimensional space, if the sample is located on the data manifold, it is more similar to the sample in the real data, expressed as:

[0049]

[0050] in, represents the K samples from the real data that are closest to the counterfactual sample.

[0051] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the process industry process parameter recommendation method based on counterfactual interpretation are implemented as described above.

[0052] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the process industry process parameter recommendation method based on counterfactual interpretation as described above.

[0053] Beneficial effects of the present invention: The process industry process parameter recommendation method based on counterfactual interpretation provided by the present invention searches for the optimal process parameter combination in the process parameter feature space through counterfactual interpretation, and assists experts in analyzing the adjustment direction or range of key process parameters. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0055] Figure 1 An overall flow chart of a method for recommending process parameters for a process industry based on counterfactual interpretation provided by an embodiment of the present invention.

[0056] Figure 2 A network structure diagram of a quality prediction model based on Cross&ResNet in a process industry process parameter recommendation method based on counterfactual explanation provided by an embodiment of the present invention.

[0057] Figure 3A method for recommending process parameters in a process industry based on counterfactual explanations is provided in accordance with an embodiment of the present invention, wherein a quality prediction model after training is used to predict the weight after cooling and the actual value thereof.

[0058] Figure 4 A relative error of the weight after cooling predicted by a trained quality prediction model in a process industry process parameter recommendation method based on counterfactual explanation provided by an embodiment of the present invention.

[0059] Figure 5 A network structure diagram of a counterfactual generation model in a method for recommending process parameters in a process industry based on counterfactual explanations provided by an embodiment of the present invention.

[0060] Figure 6 An embodiment of the present invention provides a method for recommending process parameters for a process industry based on counterfactual interpretation, and provides the relative error between the predicted value of a counterfactual sample and the actual production sample and the manufacturing standard. DETAILED DESCRIPTION

[0061] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0062] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0063] Example 1

[0064] Reference Figure 1-Figure 6 , which is an embodiment of the present invention, provides a method for recommending process parameters in a process industry based on counterfactual explanation, comprising:

[0065] S1. Obtain product quality data set and perform preprocessing operations on the data set;

[0066] S2, dividing the data set after data preprocessing into a training set and a test set;

[0067] S3. Build a product quality prediction model based on Cross&ResNet, and use the training set to train the Cross&ResNet model to obtain the optimal quality prediction model;

[0068] S4. Construct a counterfactual generation model based on WGAN-GP and Cross&ResNet, and use the training set to train the generator and discriminator in WGAN-GP to obtain the optimal generator;

[0069] S5. Obtain counterfactual samples through the generator, and evaluate and screen the generated counterfactual samples from several aspects such as effectiveness, feature proximity, feature sparsity, and feature data manifold proximity to obtain counterfactual samples to assist experts in analyzing the adjustment direction or range of key process parameters.

[0070] Furthermore, the data preprocessing operation in step S1 specifically includes the following steps:

[0071] S11. Calculate the Euclidean distance between data samples through the DBSCAN clustering algorithm and remove outlier data;

[0072] S12. Supplement missing data in the dataset by using the mean method;

[0073] S13. For the quality prediction model, the Min-Max normalization method is used to map the data to [0,1] to eliminate the influence of the parameter dimension on the prediction results;

[0074] S14. For WGAN-GP, continuous features use BGMM to estimate the number of implicit patterns and standardize them, and discrete features use one-hot encoding.

[0075] Furthermore, the step S2 specifically includes the following steps:

[0076] S2 uses 80% of the product quality data set after data preprocessing as a training set and 20% as a test set.

[0077] Furthermore, the step S3 specifically includes the following steps:

[0078] S31. Select important process parameters in the production process as the input features of the Cross part in the Cross&ResNet model, and learn effective feature crossover under a limited order through the cross network to improve the memory ability of important features;

[0079] S32. The remaining process parameters are used as input features of the ResNet part in the Cross&ResNet model. The discrete process parameters use EmbeddingLayer to learn low-dimensional embedding vectors and learn higher-level features of the input data, so that the model can understand more complex and abstract feature combinations.

[0080] S33, determine the hyperparameters such as the number of cross network layers, the number of hidden layers of the neural network, the batch size and the learning rate by grid search method;

[0081] S34, determining the number of neurons in each hidden layer of the neural network by using a particle swarm algorithm;

[0082] S35. Build a quality prediction model based on Cross&ResNet, train the model in the training set according to the set hyperparameters, and use the gradient descent method to minimize the mean square error loss function. The formula is as follows:

[0083]

[0084] Among them, y pred represents the quality parameter of the prediction, y real Represents the actual quality parameter. After training, the optimal quality prediction model is obtained.

[0085] Furthermore, the step S4 specifically includes the following steps:

[0086] S41, construct a generator through a fully connected network with residual connections, and transform the process parameters x, the manufacturing standard y of the quality parameters std And the prediction result y of the quality prediction model pred Random noise z is introduced as a condition, and Tanh and GumbelSoftmax are used as activation functions.

[0087] S42. During the generator training process, the validity loss term L is introduced to make the generated data meet the counterfactual characteristics v and the sparsity loss term L s , the formula is as follows:

[0088]

[0089] Among them, y cf Represents the quality prediction model for the generator to generate data x cf The prediction results are measured using RMSE. cf and std The gap between them is calculated by L1 norm and L0 norm, where C represents the continuous feature subset, D represents the discrete feature subset, |·| represents the number of elements in the set, and the objective function formula of the generator is as follows:

[0090]

[0091] Among them, λ v and λ s Represent the weights of the validity loss term and the sparsity loss term respectively.

[0092] S43. The discriminator is constructed through a fully connected network, and a gradient penalty term is introduced to constrain the gradient of the discriminator so that it remains within a reasonable range, thereby achieving Lipschitz continuity. The objective function formula of the discriminator is as follows:

[0093]

[0094] Among them, p data and p G Respectively represent the distribution of real data and generator generated data, p f It is right data and p G The random distribution generated by random interpolation simulation between two distributions, λ g Represents the weight of the gradient penalty term.

[0095] S44, set hyperparameters such as learning rate, batch size, optimization algorithm, neurons in each hidden layer of the generator and discriminator, gradient penalty weight, validity loss weight, and sparsity loss weight;

[0096] S45. Construct a counterfactual generation model based on WGAN-GP and Cross&ResNet, and train the model in the training set according to the set hyperparameters, while minimizing the loss of the generator and the discriminator, making the loss values ​​of both tend to be stable. After completing the training, the optimal counterfactual generation model is obtained.

[0097] Furthermore, the step S5 specifically includes the following steps:

[0098] S51, inputting the process parameters in the actual production process into the counterfactual generation model, and generating a certain batch of counterfactual sample candidate sets through repeated iterations;

[0099] S52, calculating the three indicators of validity, proximity and data manifold proximity of each sample, and eliminating invalid candidates;

[0100] S53, sorting the samples by a double sorting selection method, where the two indicators of double sorting selection are effectiveness and proximity of equal-weighted aggregation and closeness of data manifold;

[0101] S54. Perform post-sparse enhancement operations through a greedy algorithm to greedily restore adjacent continuous features to their original values ​​until the predicted quality parameters fluctuate significantly, thereby obtaining the optimal counterfactual explanation. Counterfactual samples are used to assist experts in analyzing the key process parameters that lead to quality defects, and to provide recommended adjustment directions or adjustment ranges.

[0102] Furthermore, the three index calculation process in step S52 specifically includes the following steps:

[0103] S521. Calculate the effectiveness index. The effectiveness indicates the degree of improvement of the prediction results of the counterfactual samples in the quality prediction model relative to the real data. The model encourages the prediction results of the counterfactual samples to be close to the preset target value. The formula is as follows:

[0104]

[0105] Among them, ||·||2 represents the Euclidean distance between two features. The closer the quality parameter is to the target value, the smaller the index is. At the same time, if the index is greater than 1, it means that the quality parameter of the counterfactual sample deviates more from the target than the real data, and it will not be adopted.

[0106] S522. Calculate feature proximity index, which is used to measure counterfactual samples. With the real data x i Gao's distance The formula is as follows:

[0107]

[0108] Among them, median(·) represents the median calculation, MAD k represents the median absolute deviation of feature k, m(· represents the Manhattan distance weighted by the inverse of the median absolute deviation, and g(·) calculates the distances of different feature dimensions separately and sums the distances of features of different dimensions.

[0109] S523. Calculate the characteristic data manifold proximity index. The data manifold characterizes the distribution characteristics of data in high-dimensional space. If a sample is located on the data manifold, it is more similar to the sample in the real data because they share similar structure and distribution characteristics. The formula is as follows:

[0110]

[0111] in, represents the K samples from the real data that are closest to the counterfactual sample.

[0112] Example 2

[0113] An embodiment of the present invention is different from the first two embodiments in that:

[0114] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0115] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0116] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0117] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0118] Example 3

[0119] Reference Figure 1-Figure 6 , which is an embodiment of the present invention, provides a method for recommending process parameters in process industries based on counterfactual explanation. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0120] S1. Obtain product quality data set and perform preprocessing operations on the data set;

[0121] S2, dividing the data set after data preprocessing into a training set and a test set;

[0122] S3. Build a product quality prediction model based on Cross&ResNet, and use the training set to train the Cross&ResNet model to obtain the optimal quality prediction model;

[0123] S4. Construct a counterfactual generation model based on WGAN-GP and Cross&ResNet, and use the training set to train the generator and discriminator in WGAN-GP to obtain the optimal generator;

[0124] S5. Obtain counterfactual samples through the generator, and evaluate and screen the generated counterfactual samples from several aspects such as effectiveness, feature proximity, feature sparsity, and feature data manifold proximity to obtain counterfactual samples to assist experts in analyzing the adjustment direction or range of key process parameters.

[0125] In this embodiment, the data comes from the tread extrusion production line of a tire manufacturing company, including 13958 sets of production data, each set of data includes 20 continuous features such as extruder screw speed, extrusion temperature, line speed, uphill speed, cooling section speed and downhill speed, discrete feature formula, and quality parameter weight after cooling.

[0126] Preprocess the data set:

[0127] S11. Calculate the Euclidean distance between data samples through the DBSCAN clustering algorithm and remove outlier data;

[0128] S12. Supplement missing data in the dataset by using the mean method;

[0129] S13. For the quality prediction model, the Min-Max normalization method is used to map the data to [0,1] to eliminate the influence of the parameter dimension on the prediction results;

[0130] S14. For WGAN-GP, continuous features use BGMM to estimate the number of implicit patterns and standardize them, and discrete features use one-hot encoding.

[0131] Then S2 uses 80% of the product quality data set after data preprocessing as a training set and 20% as a test set.

[0132] The quality prediction model structure based on Cross&ResNet proposed in this invention is as follows: Figure 2 As shown, it includes a cross network, a ResNet network and a fully connected layer.

[0133] When training a specific quality prediction model, the proposed model can be run on open source Python 3.7.16, PyTorch framework, NVIDIA Tesla T4×4, and Ubuntu 20.04.1 LTS.

[0134] The quality prediction model training process specifically includes the following steps:

[0135] S31. Select important process parameters in the production process as the input features of the Cross part in the Cross&ResNet model, and learn effective feature crossover under a limited order through the cross network to improve the memory ability of important features;

[0136] S32. The remaining process parameters are used as input features of the ResNet part in the Cross&ResNet model. The discrete process parameters use EmbeddingLayer to learn low-dimensional embedding vectors and learn higher-level features of the input data, so that the model can understand more complex and abstract feature combinations.

[0137] S33, determine the hyperparameters such as the number of cross network layers, the number of hidden layers of the neural network, the batch size and the learning rate by grid search method;

[0138] S34, determining the number of neurons in each hidden layer of the neural network by using a particle swarm algorithm;

[0139] S35. Build a quality prediction model based on Cross&ResNet, train the model in the training set according to the set hyperparameters, and use the gradient descent method to minimize the mean square error loss function. The formula is as follows:

[0140]

[0141] where y pred represents the quality parameter of the prediction, y real Represents the actual quality parameter. After training, the optimal quality prediction model is obtained.

[0142] This embodiment predicts product quality data. After training is completed, the test set is input into the trained quality prediction model for testing, and five indicators, namely, average error, average relative error, percentage of relative error less than 1%, percentage of relative error less than 5%, and percentage of relative error less than 10%, are calculated. The results are shown in Table 1. The average relative error of the 2232 test sets is 9.9%, 76% of the data has a relative error of less than 10%, and more than half of the data has a relative error of less than 5%, indicating that the model has a high accuracy in predicting the weight after cooling.

[0143] Table 1 Quality prediction model performance evaluation indicators

[0144]

[0145] At the same time, 100 sets of data are randomly selected from the test set and displayed in the form of a line graph to observe the prediction results, such as Figure 3 and Figure 4 As shown in the figure, the error between the predicted value and the true value is small, and the change trend is basically consistent.

[0146] The structure of the counterfactual generation model based on WGAN-GP and Cross&ResNet proposed in this paper is as follows: Figure 5 As shown, the construction and training process specifically includes the following steps:

[0147] S41, construct a generator through a fully connected network with residual connections, and transform the process parameters x, the manufacturing standard y of the quality parameters std And the prediction result y of the quality prediction model pred Random noise z is introduced as a condition, and Tanh and GumbelSoftmax are used as activation functions.

[0148] S42. During the generator training process, the validity loss term L is introduced to make the generated data meet the counterfactual characteristics v and the sparsity loss term L s , the formula is as follows:

[0149]

[0150] Among them, y cf Represents the quality prediction model for the generator to generate data x cf The prediction results are measured using RMSE. cf and std The gap between them is calculated by L1 norm and L0 norm, where C represents the continuous feature subset, D represents the discrete feature subset, |·| represents the number of elements in the set, and the objective function formula of the generator is as follows:

[0151]

[0152] Among them, λ v and λ s Represent the weights of the validity loss term and the sparsity loss term respectively.

[0153] S43. The discriminator is constructed through a fully connected network, and a gradient penalty term is introduced to constrain the gradient of the discriminator so that it remains within a reasonable range, thereby achieving Lipschitz continuity. The objective function formula of the discriminator is as follows:

[0154]

[0155] Among them, p data and p G Respectively represent the distribution of real data and generator generated data, p f It is right data and p G The random distribution generated by random interpolation simulation between two distributions, λ g Represents the weight of the gradient penalty term.

[0156] S44, set hyperparameters such as learning rate, batch size, optimization algorithm, neurons in each hidden layer of the generator and discriminator, gradient penalty weight, validity loss weight, and sparsity loss weight;

[0157] S45. Construct a counterfactual generation model based on WGAN-GP and Cross&ResNet, and train the model in the training set according to the set hyperparameters, while minimizing the loss of the generator and the discriminator, making the loss values ​​of both tend to be stable. After completing the training, the optimal counterfactual generation model is obtained.

[0158] After the counterfactual generation model is trained, counterfactual explanations are generated for data in the dataset with a quality deviation higher than 10% and screened by the evaluation algorithm, which specifically includes the following steps:

[0159] S51, inputting the process parameters in the actual production process into the counterfactual generation model, and generating a certain batch of counterfactual sample candidate sets through repeated iterations;

[0160] S52, calculating the three indicators of validity, proximity and data manifold proximity of each sample, and eliminating invalid candidates;

[0161] S53, sorting the samples by a double sorting selection method, where the two indicators of double sorting selection are effectiveness and proximity of equal-weighted aggregation and closeness of data manifold;

[0162] S54. Perform post-sparse enhancement operations through a greedy algorithm to greedily restore adjacent continuous features to their original values ​​until the predicted quality parameters fluctuate significantly, thereby obtaining the optimal counterfactual explanation. Counterfactual samples are used to assist experts in analyzing the key process parameters that lead to quality defects, and to provide recommended adjustment directions or adjustment ranges.

[0163] In this embodiment, the quality of the counterfactual sample is evaluated from three indicators: the mean relative error (MRE), the maximum mean difference (MMD), and the mean Gouraud distance (MGD) between the quality parameter and the manufacturing standard. The formula is as follows:

[0164]

[0165] Where M and N represent the size of the counterfactual sample dataset and the real dataset, respectively, and k(·,·) represents the kernel function. MRE evaluates the effectiveness of counterfactual samples. The goal of counterfactual explanation is to improve product quality. Therefore, it is hoped that the prediction results of counterfactual samples in the prediction model have a smaller relative error with the manufacturing standard. MMD evaluates the distribution difference between the real dataset and the counterfactual sample dataset. The smaller the value, the smaller the distribution difference between the two datasets. The experimental goal is to make the distribution of the two datasets as similar as possible. MGD is used to comprehensively evaluate the differences between counterfactual samples and original data in continuous and discrete variables, and to evaluate the proximity and sparsity of the two. The experimental results are shown in Table 2.

[0166] Table 2 Performance evaluation of counterfactual generation model

[0167]

[0168] Randomly extract 100 sets of data from the data set, compare the relative errors between the counterfactual sample prediction values ​​and the actual production samples and the manufacturing standards, and display them in the form of a line graph, such as Figure 6 As shown, compared with the actual production samples, the relative errors of the counterfactual samples are reduced to a certain extent. Table 3 shows the counterfactual samples generated by three examples. For example, the result of the model's recommendation for the process parameters of Example 1 is to appropriately reduce the size of the screw speed 1. The method proposed by the present invention not only has a high accuracy in quality prediction, but also can quickly give the adjustment direction or range of key process parameters in combination with the counterfactual generation model.

[0169] Table 3 Comparative analysis of examples and counterfactual samples

[0170]

[0171] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for recommending process parameters in process industries based on counterfactual explanations, It is characterized in that include: Obtain product quality data sets and perform preprocessing operations on the data sets; Divide the preprocessed data set into a training set and a test set; Build a product quality prediction model based on Cross&ResNet, and use the training set to train the Cross&ResNet model to obtain the optimal quality prediction model; A counterfactual generation model is built based on WGAN-GP and Cross&ResNet. The generator and discriminator in WGAN-GP are trained using the training set to obtain the optimal generator. Counterfactual samples are obtained through the generator, and the generated counterfactual samples are evaluated and screened from the perspective of effectiveness, feature proximity, feature sparsity, and feature data manifold proximity to obtain counterfactual samples to assist in analyzing the adjustment direction or range of key process parameters.

2. The process parameter recommendation method for process industry based on counterfactual explanation according to claim 1, Features: The obtaining of the product quality data set includes calculating the Euclidean distance between data samples by using the DBSCAN clustering algorithm and removing outlier abnormal data; The missing data in the data set are supplemented by the mean method. For the quality prediction model, the Min-Max normalization method is used to map the data to [0,1] to eliminate the influence of the parameter dimension on the prediction results. At the same time, for WGAN-GP, continuous features use BGMM to estimate the number of implicit patterns and standardize them, and discrete features use one-hot encoding.

3. The process parameter recommendation method for process industry based on counterfactual explanation as claimed in claim 2, Features: The division is into a training set and a test set; Including the product quality data set after data preprocessing operations, 80% is used as a training set and 20% is used as a test set.

4. The process parameter recommendation method for process industry based on counterfactual explanation as claimed in claim 3, Features: The construction of the product quality prediction model includes selecting important process parameters in the production process as input features of the Cross part in the Cross&ResNet model, and learning effective feature crossover under a finite order through the cross network; The remaining process parameters are used as input features of the ResNet part in the Cross&ResNet model. The discrete process parameters use EmbeddingLayer to learn low-dimensional embedding vectors and learn higher-level features of the input data. Hyperparameters were determined by grid search method; The number of neurons in each hidden layer of the neural network is determined by particle swarm algorithm; The quality prediction model is built based on Cross&ResNet. The model is trained in the training set according to the set hyperparameters, and the mean square error loss function is minimized using the gradient descent method, which is expressed as: Among them, y pred represents the quality parameter of the prediction, y real Represents the actual quality parameters; after training, the optimal quality prediction model is obtained.

5. The process parameter recommendation method for process industry based on counterfactual explanation according to claim 4, Features: The counterfactual generation model is constructed by constructing a generator through a fully connected network with residual connections, and transforming the process parameters x, the manufacturing standard y of the quality parameters std And the prediction result y of the quality prediction model pred Introduce random noise z as a condition, and use Tanh and Gumbel Softmax as activation functions; During the generator training process, the validity loss term L is introduced to make the generated data meet the counterfactual characteristics v and the sparsity loss term L s , expressed as: Among them, y cf Represents the quality prediction model for the generator to generate data x cf The prediction results are measured using RMSE. cf and std The gap between them is calculated by L1 norm and L0 norm to calculate sparsity, where C represents the continuous feature subset, D represents the discrete feature subset, and |·| represents the number of elements in the set; The objective function of the generator is expressed as: Among them, λ v and λ s Represent the weights k of the validity loss term and the sparsity loss term respectively; The discriminator is constructed through a fully connected network, and a gradient penalty term is introduced to constrain the gradient of the discriminator. The objective function of the discriminator is expressed as: Among them, p data and p G Respectively represent the distribution of real data and generator generated data, p f It is right data and p G The random distribution generated by random interpolation simulation between two distributions, λ g Represents the weight of the gradient penalty term; Set hyperparameters; A counterfactual generation model is constructed based on WGAN-GP and Cross&ResNet. The model is trained in the training set according to the set hyperparameters. While minimizing the loss of the generator and discriminator, the loss values ​​of both are stabilized. After completing the training, the optimal counterfactual generation model is obtained.

6. The process parameter recommendation method for process industry based on counterfactual explanation according to claim 5, Features: The obtaining of counterfactual samples by the generator includes inputting process parameters in the actual production process into the counterfactual generation model, and generating a candidate set of counterfactual samples through repeated iterations; Calculate the validity, proximity and data manifold proximity of each sample and remove invalid candidates; The samples are ranked by a double ranking selection method, and the two indicators of double ranking selection are effectiveness and proximity of equal-weighted aggregation and data manifold proximity; Through the post-sparse enhancement operation of the greedy algorithm, the adjacent continuous features are greedily restored to their original values ​​until the predicted quality parameters fluctuate significantly, thus obtaining the optimal counterfactual explanation. The counterfactual samples are used to assist experts in analyzing the key process parameters that lead to quality defects and give recommended adjustment directions or adjustment ranges.

7. The process parameter recommendation method for process industry based on counterfactual explanation according to claim 6, Features: The computational effectiveness index indicates the degree of improvement of the prediction results of counterfactual samples in the quality prediction model relative to the real data. The model encourages the prediction results of counterfactual samples to be close to the preset target value, which is expressed as: Among them, ||·|| 2 It represents the Euclidean distance between two features. The closer the quality parameter is to the target value, the smaller the index is. If the index is greater than 1, it means that the quality parameter of the counterfactual sample deviates from the target more than the real data, and it will not be adopted. Calculate the feature proximity index, which is used to measure the counterfactual samples With the real data x i Gao's distance It is expressed as: MAD k =median j∈D (|x jk -median l∈D (x lk )|) Among them, median(·) represents the median calculation, MAD k represents the median absolute deviation of feature k, m(·) represents the Manhattan distance weighted by the inverse of the median absolute deviation, and g(·) calculates the distances of different feature dimensions separately and sums the distances of features of different dimensions.

8. The process parameter recommendation method for process industry based on counterfactual explanation according to claim 7, Features: The calculation characteristic data manifold proximity index, the data manifold characterizes the distribution characteristics of data in high-dimensional space. If the sample is located on the data manifold, it is more similar to the sample in the real data, which is expressed as: in, represents the K samples from the real data that are closest to the counterfactual sample.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method for recommending process parameters for a process industry based on counterfactual explanation according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method for recommending process parameters for a process industry based on counterfactual explanation according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Fault diagnosis and suggestion method based on interpretable artificial intelligence and large model

    CN120338140A

  • Chemical process flow analog simulation method and system based on big data

    CN121683240A

  • Chemical safety decision-making method and system based on causal reasoning

    CN122245518A

  • Cold-rolled strip steel plate shape control method and system and medium

    CN122625487A