Polymerization liquid viscosity prediction method based on carbon fiber polymerization process causality
By identifying the causal relationships in the carbon fiber polymerization process, constructing a causal graph and optimizing its structure to eliminate spurious correlation interference, and using a causal-constrained random forest model to predict the viscosity of the polymerization liquid, the problem of insufficient causal mechanism modeling and poor adaptability to dynamic changes is solved, achieving high-precision and robust viscosity prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV OF TECH
- Filing Date
- 2025-10-10
- Publication Date
- 2026-07-21
AI Technical Summary
Existing polymer liquid viscosity prediction models suffer from problems such as insufficient modeling of causal mechanisms, poor adaptability to dynamic changes, and weak model generalization ability in the carbon fiber production process. They are particularly difficult to achieve accurate predictions under high-dimensional spatiotemporal feature extraction and noise interference.
By identifying the causal relationships in the carbon fiber polymerization process, a causal graph is constructed and its structure is optimized to eliminate spurious correlation interference. A causal-constrained random forest model is used to predict the viscosity of the polymerization liquid, and a Bayesian posterior correction strategy is combined to ensure the physical interpretability and stability of the model.
It improves the accuracy and robustness of polymer liquid viscosity prediction, enhances the model's generalization ability under different operating conditions, and achieves high-precision prediction of polymer liquid viscosity.
Smart Images

Figure CN121459984B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of polymer liquid viscosity prediction technology, specifically relating to a method for predicting polymer liquid viscosity based on the causal relationship of the carbon fiber polymerization reaction process. Background Technology
[0002] Carbon fiber is a crucial material in key sectors such as defense and aerospace, and it also has a broad market in the civilian sector; currently, the demand for carbon fiber is experiencing rapid growth. The polymerization process is an indispensable step in carbon fiber production, and the viscosity of the polymerization solution directly affects the quality of the final product. With the increasing demand for high-performance materials, accurately and stably predicting the viscosity of the polymerization solution has become a major challenge for carbon fiber production engineers.
[0003] To address these challenges, researchers have proposed several improvement schemes: for example, using particle swarm optimization to optimize the parameters of the prediction model and improve the model optimization efficiency; integrating the XGBoost algorithm with thermodynamic constraints to improve the generalization ability of the prediction model under a wide range of operating conditions; and using k-nearest neighbor regression trees for feature selection to significantly improve the model prediction accuracy by identifying key physical property parameters.
[0004] However, these existing technologies still have some problems: polymerization reactions have multivariate coupling and nonlinear dynamic time-varying characteristics, and traditional prediction methods face two major bottlenecks: insufficient modeling of dynamic causal mechanisms and difficulty in extracting high-dimensional spatiotemporal features. Because the causal relationship between parameters such as temperature and pressure and viscosity has a time lag effect, and this time lag dynamically changes with the reaction process, static causal discovery methods struggle to capture such complex correlations. Furthermore, industrial sensor data is high-dimensional and significantly noisy; traditional data-driven methods rely on statistical correlations, which are easily affected by confounding factors, resulting in poor generalization ability and weak interpretability of polymerization liquid viscosity prediction models. Summary of the Invention
[0005] This invention proposes a method for predicting the viscosity of polymer liquid based on the causal relationship of the carbon fiber polymerization reaction process, which solves the problems of poor interpretability and insufficient adaptability to dynamic changes in existing polymer liquid viscosity prediction models.
[0006] To address the aforementioned technical problems, this invention provides a method for predicting the viscosity of a polymerization liquid based on the causal relationship of the carbon fiber polymerization reaction process, comprising the following steps:
[0007] Step S1: Identify the causal relationships between multiple variables during the carbon fiber polymerization reaction, generate a causal graph, construct a causal constraint matrix, modify the causal graph based on the causal constraint matrix, and optimize the structure of the causal graph;
[0008] Step S2: Calculate the causal contribution of each variable in the optimized causal graph, take the variables with causal contribution greater than a set threshold as causal features, eliminate the interference of spurious correlation between the causal features, and obtain a subset of causal invariant features;
[0009] Step S3: Construct a polymer liquid viscosity prediction model. The polymer liquid viscosity prediction model uses the structural prior of the optimized causal graph to quantify the individual causal effects of each causal invariant feature on the polymer liquid viscosity, thereby achieving the prediction of the polymer liquid viscosity.
[0010] Preferably, the step S1 of identifying the causal relationships among multiple variables during the carbon fiber polymerization reaction and generating a causal graph includes the following steps:
[0011] Step S11: Perform unconditional independence tests on the variables in the carbon fiber polymerization process, and conduct preliminary screening of the potential parent node set of each variable to obtain the candidate parent node set of each variable.
[0012] Step S12: Considering autocorrelation, the conditional independence detection method is used to further eliminate false parent nodes or noise nodes in the candidate parent node set;
[0013] Step S13: Using the set of candidate parent nodes as a condition set, calculate the residuals of the target variable and the corresponding candidate parent nodes under the given condition set through kernel regression. Determine whether there is a real nonlinear causal relationship between the target variable and the candidate parent nodes based on the dependency of the residuals in the high-dimensional feature space. If there is a dependency, retain the current parent node; otherwise, delete the current parent node from the set of candidate parent nodes.
[0014] Step S14: Construct a causal graph based on the relationships between variables.
[0015] Preferably, step S1 involves modifying the causal graph based on the causal constraint matrix to optimize its structure, including the following steps: constructing a causal constraint matrix based on domain knowledge of carbon fiber polymerization; identifying conflicting edges in the causal graph based on the causal constraint matrix; removing or modifying the conflicting edges; using domain knowledge of carbon fiber polymerization as a priori terms; and optimizing the structure of the modified causal graph using Bayesian optimization.
[0016] Preferably, in step S2, before calculating the causal contribution of each variable in the optimized causal graph, the time-series data in the polymerization reaction process is divided into multiple overlapping sliding windows according to the time delay of the edges in the causal graph.
[0017] Preferably, the calculation of the causal contribution of each variable in the optimized causal graph in step S2 includes the following steps:
[0018] Step S201: Perform causal inference within each window, identify significant causal edges that satisfy conditional constraints, and calculate the causal effect coefficient of each significant causal edge at each time point;
[0019] Step S202: Calculate the effect intensity of each significant causal edge at different lag time points, normalize the effect intensity, and obtain the time lag weights corresponding to each significant causal edge;
[0020] Step S203: Within each window, multiply the causal effect coefficient by the time delay weight and sum them up to obtain the causal contribution of the window.
[0021] Preferably, the expression for the causal contribution in step S2 is:
[0022] ;
[0023] In the formula, For the i-th process parameter Causal contribution For process parameters exist Variables at time; This represents the total number of time steps within the current window. For the i-th process parameter The causal effect coefficient; For the i-th process parameter exist The time delay weight at each moment.
[0024] Preferably, eliminating spurious correlation interference between the causal features in step S2 includes the following steps:
[0025] Step S211: Project the causal features onto the high-dimensional feature space through kernel mapping, calculate the absolute value of the weighted covariance of the causal features to determine the independence between the causal features, and determine that the causal features are independent when the absolute value of the weighted covariance approaches zero.
[0026] Step S212: For causal features determined to be independent: the sample data of the carbon fiber polymerization reaction process are divided into a treatment group and a control group. The pseudo-distribution space is reconstructed by constructing a sample weight matrix, so that the causal feature distributions of the treatment group and the control group tend to be consistent, and the pseudo-correlation interference between the causal features is eliminated.
[0027] Preferably, in step S211, the weight of each causal feature in the weighted covariance is optimized by minimizing the weighted covariance between causal features.
[0028] Preferably, the expression for the weighted covariance is:
[0029] ;
[0030] In the formula, Causal characteristics and The weighted covariance estimator; The weights of causal features; The total number of sample data; For the first The weights of each sample point; , They respectively represent the first Causal characteristics of individual sample points and The eigenvectors projected into a high-dimensional space using the kernel mapping method; j represents the index when calculating the global weighted covariance.
[0031] Preferably, the construction of the polymerization liquid viscosity prediction model in step S3 includes the following steps:
[0032] Step S31: Using a two-sample validation mechanism, the sample space consisting of the sample data of the variables involved in the carbon fiber polymerization process is randomly divided into a training set and an effect estimation set.
[0033] Step S32: Divide the training set into an experimental group and a control group according to the value of the target variable, and construct a causal tree using the training set. The node splitting criterion of the causal tree is to maximize the mean difference in viscosity between the treatment group and the control group.
[0034] Step S33: Based on the structure of the causal tree, place the samples in the effect estimation set into the corresponding leaf nodes. At each leaf node, calculate the difference in average viscosity between the treatment group and the control group samples, and use it as the individual treatment effect estimate.
[0035] Step S34: Generate multiple causal trees by randomly sampling samples and variables, and fuse the individual treatment effect estimates of multiple causal trees by weighted averaging to obtain the final predicted value of polymer liquid viscosity.
[0036] The beneficial effects of the present invention include at least the following:
[0037] 1. An improved causal discovery algorithm is used to identify the time-varying causal relationship between various process parameters and viscosity during the polymerization reaction. Combined with a Bayesian posterior correction strategy and thermodynamic mechanism knowledge, causal conflicts are eliminated and the physical interpretability of the model is improved.
[0038] 2. Through a dynamic causal feature selection mechanism, a subset of features that make a stable contribution to viscosity is adaptively selected based on the strength of the causal effect and the time delay parameter. Feature decorrelation technology is used to eliminate spurious correlation interference and enhance the generalization ability of the model under different working conditions.
[0039] 3. Construct a causal-constrained random forest model, using the maximization of the treatment effect as the splitting criterion, to accurately estimate the causal influence of each feature on viscosity, thereby achieving high-precision and robust prediction of the viscosity of the polymer solution. Attached Figure Description
[0040] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention;
[0041] Figure 2 This is a causal relationship diagram of process parameters during the polymerization reaction in an embodiment of the present invention;
[0042] Figure 3 This is a comparison chart of the prediction results of different prediction models in this embodiment of the invention. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0044] like Figure 1 As shown, this invention provides a method for predicting the viscosity of polymer liquid based on the causal relationship of the carbon fiber polymerization process. The core of this method lies in constructing a causal-driven prediction framework for the polymerization process. This framework systematically solves the challenges of traditional methods in modeling dynamic causal mechanisms and extracting high-dimensional spatiotemporal features. The method includes the following three key steps: dynamic causal relationship discovery, causal invariant feature subset extraction, and causal constraint random forest model construction, specifically including the following steps:
[0045] S1: Identify the causal relationships between multiple variables during the carbon fiber polymerization process, generate a causal graph, construct a causal constraint matrix, modify the causal graph based on the causal constraint matrix, and optimize the structure of the causal graph.
[0046] Specifically, traditional causal discovery algorithms face two major challenges when processing industrial time-series data: nonlinear relationships within the data and autocorrelation of variables. To address these issues, this invention proposes a dynamic causal discovery method based on the improved PCMCI+ algorithm. This method combines kernel conditional independence testing and lag window sensitivity analysis to accurately identify time-delay causal relationships among multiple variables, overcoming the dependence of traditional methods on linear relationships. The PCMCI+ algorithm operates in two core stages:
[0047] (1) PC (Peter-Clark) condition set filtering.
[0048] The PC algorithm, a causal discovery algorithm, is used to initialize a set of potential parent nodes for each target variable. The size of the potential parent node set is determined by the maximum lag time. Decide, The size is determined based on process priors or statistical analysis methods. Its size must cover the main dynamic memory of the system while avoiding excessive redundancy due to excessive size. This is achieved by identifying and estimating a specific process parameter variable. At any moment From the set of parent nodes, we can obtain a preliminary set of parent nodes. ,in τ represents the total number of process parameters; τ is the time delay, indicating that at time t, the value of a certain process parameter in the previous τ time steps is taken as the candidate parent node. The maximum time delay length is used to limit the upper limit of the number of time steps considered in the candidate parent node set, so as to ensure the coverage and rationality of the candidate parent nodes.
[0049] Subsequently, Each candidate parent node in the process is subjected to an unconditional independent test, i.e., the test... Whether or not Independent, among which This represents the value of the j-th process parameter at time t-τ. If a candidate node is statistically determined to be independent of the target variable, it is removed from the list. The process of removing nodes from the pool involves iterative sorting and filtering based on the correlation coefficients used in the independence test. Candidate nodes with significant independence are prioritized for removal and continue to be examined in subsequent iterations. In the next iteration, candidate nodes with significant independence from the previous round are removed again from the pool. The process of removing variables continues until no more variables can be removed, resulting in a preliminary estimate of the parent node set. .
[0050] (2) MCI instantaneous conditional independence detection.
[0051] In industrial time-series data, variables often exhibit autocorrelation, meaning that the current value of a variable is related to its values at past times. If variable A is correlated with variable B at time t−τ, this may not be because A is a direct cause of B, but rather because A at time t−τ is related to A at a more recent time t−τ′, and A at time t−τ′ is the true cause of B at time t. Based on the initial set of parent nodes obtained, MCI performs a conditional independence test again, excluding the variable currently being tested, to explore whether autocorrelation can explain the observed relationship. If the conditional independence hypothesis is rejected, it indicates that the time-series connection is a real causal association; otherwise, it suggests that it may simply be a noisy node.
[0052] make This indicates the removal of the currently tested variable. The resulting set is then tested again. Whether or not Independence. If the independence hypothesis can be rejected at a significant level, it indicates that the temporal connection may actually exist; otherwise, it means that there is no substantial association. In this embodiment of the invention, a connection probability is set. When the significance level is reached, it is considered significant. This can be considered a special case of synchronous connection. These steps allow for a better identification of the true causal relationship structure.
[0053] The PCMCI+ algorithm primarily tests linear relationships under standard conditions; however, causal relationships in polymerization processes are typically nonlinear. To address this issue, this invention also introduces the kernel conditional independence (KCI) method to enhance the ability to identify nonlinear relationships. KCI fits the target variables using kernel regression. and candidate parent nodes Conditional expectation given a condition set Z, where the target variable is... Let be the value of the nth process parameter at time t. For ease of explanation, Record , Record The expression for the condition set Z is:
[0054] ;
[0055] Indicates the set of candidate parent nodes Remove the current test variable. The remaining variables.
[0056] By estimation about Expectations and about Expectations Calculate the regression residuals:
[0057] ;
[0058] ;
[0059] These residuals represent the remaining information about the variables after controlling for the influence of the condition set Z.
[0060] The residual data are mapped to a high-dimensional feature space using the kernel method, and the Hilbert-Schmidt independence criterion (HSIC) is calculated to measure the statistical dependence between them.
[0061] If the null hypothesis H0: Rx⊥Ry (independence), and if HSIC is significantly greater than zero, then H0 is rejected, indicating that the residuals are still correlated, thus rejecting the independence hypothesis and determining that the causal relationship exists. and If it is still relevant, then it means and In the given The lower is not independent, therefore in Retained variables ;if and If they are unrelated, then it means and In the given Conditional independence, therefore variables from This method effectively identifies complex, nonlinear causal relationships that are difficult to capture using traditional linear methods, greatly improving the model's generalization ability.
[0062] Purely data-driven methods, even when discovering statistically significant causal relationships, may still uncover causal edges that violate physical laws, such as the inverse causal relationship of "polymer viscosity causes temperature change." To ensure the physical interpretability and credibility of the causal graph, this invention introduces a Bayesian posterior correction (BPR) strategy. By leveraging prior domain knowledge to constrain and correct the data-driven causal graph, contradictory edges are eliminated, thus improving the physical interpretability of the causal relationships.
[0063] First, define a causal graph adjacency matrix constructed from the PCMCI+ test results. Its elements Characteristic variables arrive The causal connections reflect the original causal structure obtained at the current stage of causal discovery.
[0064] At the same time, construct a domain constraint matrix. Its elements Characteristic variables arrive Causal legitimacy:
[0065] ;
[0066] For example, for the carbon fiber polymerization process, it is possible to set... , This excludes reverse causal relationships that violate the laws of thermodynamics.
[0067] Through the adjacency matrix With constraint matrix The Hadamard product operation identifies all causal edges that conflict with domain knowledge, yielding an adjacency matrix after removing or correcting conflicting edges. , non-zero elements Edges that violate domain constraints need to be iteratively corrected.
[0068] ;
[0069] In the formula, ⊙ represents the Hadamard product, which is the element-wise multiplication of matrices.
[0070] The corrected matrix As an initial form of Bayesian structure optimization, the Bayesian structure optimization model is used to... Optimize the structure:
[0071] ;
[0072] In the formula, Let G represent the posterior probability of a graph structure G given data D and prior knowledge constraint K, where G is the graph structure variable to be optimized in Bayesian structural optimization. For data likelihood terms, dependent on graph structure ; As prior knowledge terms, through the constraint matrix Implementing hard constraints:
[0073] .
[0074] This optimization process ensures that the final causal graph structure is not only statistically significant, but also physically reliable and interpretable. This approach deeply integrates data-driven discovery capabilities with the experience of domain experts, ultimately resulting in... Figure 2 As shown, a more robust and reliable causal model.
[0075] S2: Calculate the causal contribution of each variable in the optimized causal graph, take the variables with causal contribution greater than the set threshold as causal features, eliminate the interference of spurious correlation between causal features, and obtain a subset of causal invariant features.
[0076] Specifically, after obtaining the corrected causal graph, the structural prior knowledge it provides is used to extract a subset of features that have a stable causal influence on the viscosity of the polymerization liquid from the high-dimensional data. This step includes two key steps: dynamic causal feature selection and feature decorrelation.
[0077] Polymerization is a dynamic evolutionary process, and the causal influence of various process parameters on viscosity is not constant. For example, in the early stages of the reaction, the time lag effect of temperature on viscosity is relatively short, while in the later stages, the time lag increases significantly. Traditional static feature selection methods cannot capture this time-varying characteristic, which may lead to prediction biases in the model at different stages. Therefore, this invention proposes a dynamic causal feature selection method, including the following steps:
[0078] Step S201: Based on the time delay τ of the edges in the causal graph, divide the time series data into multiple overlapping sliding windows. The length of each window is dynamically adjusted according to the process dynamics of different reaction stages. For example, in the early stage of polymerization (0-90 minutes), the time delay effect of temperature on viscosity is relatively short. In the later stages of the reaction (90-800 minutes), the delay is increased to 15 minutes, and the window length is adjusted accordingly to 20 minutes.
[0079] Step S202: Within each sliding window, rerun the PCMCI+ algorithm, combined with BPR correction, to identify process parameters that have a significant causal contribution to viscosity in the current stage. A causal edge is considered significant if it passes the significance threshold in the conditional independence test, its effect coefficient remains significantly non-zero after bias correction, and it is robust under different hysteresis. For each significant causal edge, calculate the dynamic sequence of its causal effect coefficients. .
[0080] Step S203: For each significant causal edge, normalize it according to its significance level and effect strength at different lag times to obtain the corresponding time lag weight. In this embodiment, the absolute value normalization method is used, which involves taking the absolute value of the effect intensity at a certain lag time and then dividing it by the sum of the absolute values of all lag effect intensities within the window, thereby obtaining the normalized time lag weight:
[0081] ;
[0082] In the formula, This represents the time delay weight at a lag time t; Indicate process parameters The causal effect coefficient at this lag time; This represents the total number of lag steps within the sliding window.
[0083] Furthermore, by combining BPR correction to remove invalid or unreasonable time delays, optimized time delay weights are obtained, which reflect the relative importance of different time delays to causal contributions.
[0084] Step S204: Within each window, multiply the causal effect coefficient by the time delay weight and sum them up to obtain the comprehensive causal contribution of the feature within that window.
[0085] ;
[0086] In the formula, For the i-th process parameter Causal contribution For process parameters exist Variables at time; This represents the total number of time steps within the current window. For the i-th process parameter The causal effect coefficient; For the i-th process parameter exist The time delay weight at each moment.
[0087] This contribution measures the overall causal effect of a particular feature on the viscosity of the polymer solution over a specific time period.
[0088] Step S205: Set a causal effect threshold The retention contribution is higher than The causal features are identified, resulting in a subset of causal features that adapts to the response process. Simultaneously, the feature importance score from a random forest is introduced as an auxiliary indicator to verify the statistical significance of the selected causal features.
[0089] However, even with causal discovery and dynamic feature selection, spurious correlations may still exist among the obtained feature subsets due to unobserved confounding variables or other statistical artifacts. These non-causal associations can significantly interfere with the decision-making of the predictive model and reduce its reliability. This invention addresses this problem through a feature decorrelation technique based on sample reweighting, comprising the following steps:
[0090] Step S211: Determine the independence between features by introducing the Hilbert-Schmidt independence criterion (HSIC) as an independence test tool. HSIC can effectively capture nonlinear associations by measuring the statistical dependence between variables by mapping data to a high-dimensional kernel space.
[0091] Step S212: Once a significant correlation is found between causal features, the sample weights are solved by optimization. This minimizes the weighted covariance among causal features, thereby preserving true causal relationships while further eliminating spurious correlations. Specifically, the features to be evaluated... The values are divided into treatment and control groups. Discrete Grouped by 0 / 1; consecutive Then group them according to the mechanism threshold or quantile.
[0092] Experimental group: Take a specific value or range, such as high level, existence of a certain condition, eigenvalue = 1, etc.
[0093] Control group: Take another type of value or range, such as low level, missing condition, feature value = 0, etc.
[0094] Within the statistical learning framework, the pseudo-distribution space is reconstructed by adjusting the sample weights, so that the distributions of the two sets of samples on all other covariates are as consistent as possible.
[0095] The expression for calculating the weighted covariance is:
[0096] ;
[0097] In the formula, Causal characteristics and The weighted covariance estimator; The weights of causal features; The total number of sample data; For the first The weights of each sample point; , They respectively represent the first Causal characteristics of individual sample points and The eigenvectors projected into a high-dimensional space using the kernel mapping method; j represents the index when calculating the global weighted covariance.
[0098] when When the absolute value of the coefficient approaches zero, it indicates that the distributions of the two sets of features are highly similar in a statistical sense, meaning that their statistical dependence is weak and they can be judged as independent. Conversely, if the absolute value is large, it indicates that there is still a significant correlation between the features. This method can isolate the true causal impact of a single causal feature on viscosity from interference by non-causal associations of other factors. Through this process, the resulting feature subset can better reflect the true causal relationship between them and the target variable, thus laying a solid foundation for building a robust predictive model.
[0099] S3: Construct a polymer liquid viscosity prediction model. The polymer liquid viscosity prediction model utilizes the structural prior of the optimized causal graph to quantify the individual causal effects of each causal invariant feature on the polymer liquid viscosity, thereby achieving the prediction of polymer liquid viscosity.
[0100] Specifically, after obtaining a subset of causal invariant features and using a causal graph as a structural prior, a prediction model specifically for causal effect estimation is constructed: Causal-Constrained Random Forest (CIRF). Unlike traditional random forest models, CIRF employs a unique two-sample validation mechanism to ensure unbiased prediction. It randomly partitions the entire sample space into two independent subsets:
[0101] Training set: accounting for 50% of the total samples, specifically used to build the tree structure and determine the splitting strategy of nodes.
[0102] Effect estimation set: This comprises the remaining 50% of the total sample and is used independently to calculate the individual treatment effects at the leaf nodes.
[0103] This segmentation mechanism is crucial, effectively avoiding estimation bias and overfitting problems caused by data reuse in traditional models. The training set is responsible for learning the optimal tree structure, while the effect estimation set provides an independent data source to validate and quantify the causal effects revealed by the structure.
[0104] The core of CIRF causal trees lies in the node splitting criterion. Traditional regression trees aim to minimize the variance of samples within a node, making samples at the same leaf node as similar as possible. Causal trees, however, are entirely different; their goal is to maximize the difference in treatment effects between child nodes after a split. ,in For leaf nodes The treatment effect obtained from the estimation, For another leaf node The treatment effect is estimated in the causal tree. Specifically, the causal tree divides samples within a node into treatment and control groups based on the value of a certain causal feature. The causal tree is constructed using the partitioned training set, and the node splitting criterion is to maximize the mean difference in viscosity between the treatment and control groups. Subsequently, according to the structure of the causal tree, samples from the effect estimation set are placed into the corresponding leaf nodes. At each leaf node, the mean difference in viscosity between the two groups is calculated, i.e., the effect difference. The treatment effect at the leaf nodes is then calculated. The expression is:
[0105] ;
[0106] In the formula, This represents the average result value of the processed group samples under this node; This represents the average result value of the control group sample.
[0107] This method guides the recursive partitioning of causal trees by maximizing the difference in treatment effects among child nodes. This criterion enhances the model's ability to identify causal heterogeneity, revealing the different impacts of the same feature on the target variable in different data subgroups. This enables the model to capture subtle and complex relationships that are difficult for traditional models to detect, especially at critical moments when trends shift dramatically during aggregation reactions, thereby significantly improving the accuracy and robustness of predictions.
[0108] The final CIRF model is constructed by repeatedly generating n causal trees, each independently generated using randomly sampled samples and features. Each tree independently estimates the individual treatment effect at the leaf node level. The final prediction results are then fused by a weighted average of the outputs of all causal trees to obtain an overall estimate of the individual treatment effect.
[0109] To comprehensively verify the performance of the polymerization liquid viscosity prediction method based on the causal relationship of the carbon fiber polymerization process proposed in this invention, mean absolute error (MAE), root mean square error (RMSE), and goodness of fit (MMR) were selected. The three statistical indicators constitute a comprehensive evaluation system. MAE reflects the stability of the prediction, RMSE focuses on measuring the degree of deviation between the predicted value and the actual value, while... This characterizes the model's goodness of fit from the perspective of variance interpretation. Together, these three methods provide a comprehensive validation mechanism to evaluate the accuracy, stability, and reliability of the predictive model.
[0110] ;
[0111] ;
[0112] ;
[0113] In the above formula, The total number of observation samples; This is the predicted value for the viscosity of the polymerization liquid; This represents the actual viscosity of the polymerization solution.
[0114] MAE and RMSE are negatively correlated with the accuracy of polymer solution viscosity prediction. A smaller MAE value indicates a more stable prediction result from the polymer solution viscosity prediction model, while a smaller RMSE value indicates a more accurate prediction result. When the value approaches 1, it indicates that the model's ability to predict the viscosity of the polymer solution is at its optimal level.
[0115] To verify the superiority of the CIRF model, its predictive performance was compared with three representative time series prediction models: CAGRU, STL-GPR, and PIST-CVAE. CAGRU is a time series prediction model that combines a causal attention mechanism with a gated recurrent unit (GRU). It calculates the attention weights of key time points in the historical sequence through a sliding time window, focusing on periods that have a significant impact on the current prediction, and uses GRU to capture long-term dependencies in the time series, controlling the information flow through update and reset gates. STL-GPR uses a two-stage modeling approach. In the first stage, seasonal, trend, and residual STL decomposition splits the original viscosity sequence into seasonal, trend, and residual terms. In the second stage, Gaussian process regression constructs Gaussian regression process GPR models for the trend and seasonal terms respectively, using a combination of radial basis functions (RBF) and periodic kernels as the kernel function. PIST-CVAE is a generative model that integrates spatiotemporal features. Based on the conditional variational autoencoder (CVAE) framework, it encodes the spatiotemporal joint distribution of multi-sensor data through a parallel interactive structure, imposing temporal smoothness and spatial similarity constraints in the latent space to enhance prediction robustness. The comparison results are shown in Table 1.
[0116] Table 1 Comparison of Predictive Performance of Each Model
[0117]
[0118] As shown in Table 1, the CIRF model performs best across all evaluation metrics, exhibiting the smallest prediction error and the strongest fitting ability. This indicates that by deeply modeling causal relationships, the CIRF model can more accurately capture the complex dynamic evolution patterns in the aggregation process. This performance gap is primarily due to the limitations of traditional modeling methods in time series feature extraction; they can only construct a simple mapping between the current feature vector and the next time series label, failing to fully model the dynamic evolution patterns in the aggregation process data. The CAGRU model relies on a fixed-time-window attention mechanism, which is insufficiently adaptable to dynamic causal delays, leading to amplified prediction errors in the later stages of the reaction, resulting in inferior prediction performance compared to the CIRF method. The STL-GPR model alleviates periodic interference through seasonal trend decomposition but fails to effectively construct the nonlinear coupling relationships between process parameters, thus exhibiting significant prediction bias. The PIST-CVAE model, constrained by the static assumptions of the latent variable space, shows significant lag in response to dynamic events such as sudden changes in stirring current, making it unsuitable for dynamic delay scenarios and resulting in relatively poor prediction performance.
[0119] The prediction performance of the CIRF prediction model constructed in this embodiment of the invention was compared after removing the dynamic causal feature selection module and the feature removal and decorrelation module. The comparison results are shown in Table 2.
[0120] Table 2 Comparison of ablation experiments on model structures
[0121]
[0122] As shown in Table 2, the complete CIRF-Full model exhibits the best predictive performance. In contrast, the CIRF-Static model, which removes the dynamic causal feature selection module, shows a 37.1% increase in mean absolute error (MAE), a 36.3% increase in root mean square error (RMSE), and an 11.6% decrease in goodness of fit. This indicates a significant drop in predictive performance after removing the dynamic causal feature selection module. Dynamic causal feature selection effectively filters out a subset of features that contribute stably to viscosity, playing a crucial role in polymer viscosity prediction models. The CIRF-NoDecorr model, which removes the feature decorrelation module, shows a 27.4% increase in MAE, a 27.2% increase in RMS error, and a 7.0% decrease in goodness of fit. This demonstrates that spurious correlations significantly interfere with model decisions; adding a feature decorrelation module can reduce interference in model prediction decisions and improve predictive performance to some extent.
[0123] The prediction results of the CIRF model in this embodiment of the invention are compared with those of the PIST-CVAE model, STLGPR model, and CAGRU model. The comparison results are as follows: Figure 3 As shown. By Figure 3 The results show that the CIRF model has the highest agreement with the actual values, a high degree of fit, and virtually no lag or overshoot, exhibiting low prediction error and accurately capturing the trend of viscosity changes over time. The PIST-CVAE model's overall prediction trend is consistent with the actual values, effectively reflecting the main trend of viscosity change, but there are some deviations at certain troughs and peaks, especially in the middle and later stages where there is slight underfitting or lag, indicating insufficient local fitting. The STL-GPR model's predicted values fluctuate slightly more than the actual values, showing some overfitting, especially in the first half where fluctuations are severe, and the prediction error is large in the rapid change range, indicating poor stability. The CAGRU model's predicted values deviate significantly from the actual values in many places, especially in the middle section, exhibiting large fluctuations and lag, with a large overall fitting error and unstable local prediction fluctuations. In comparison, the STL-GPR and CAGRU models are somewhat lacking in identifying abrupt changes in viscosity, and their predicted curves deviate significantly from the actual values. Meanwhile, although the PIST-CVAE model performed well in some periods, its overall prediction accuracy was still lower than that of the CIRF model, showing a larger fluctuation range.
[0124] Although all models demonstrate good predictive ability for viscosity changes during the polymerization of polyacrylonitrile-based carbon fibers, significant differences exist in their prediction accuracy, particularly regarding the location of trend transitions. For identifying viscosity abrupt change points, PIST-CVAE and STL-GPR perform poorly, with CAGRU showing the worst performance, while the CIRF model proposed in this embodiment exhibits the best predictive effect.
[0125] In summary, the method proposed in this embodiment of the invention solves the problems of difficulty in extracting high-dimensional spatiotemporal features and low accuracy and poor stability in polymer liquid viscosity prediction in traditional viscosity prediction methods, thereby improving the interpretability of the model.
[0126] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described; only preferred embodiments of the present invention are illustrated. The descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. As long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0127] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this invention should be determined by the appended claims.
Claims
1. A method for predicting the viscosity of a polymerization liquid based on the causal relationship in the carbon fiber polymerization process, characterized in that: Step S1: Identify the causal relationships between multiple variables during the carbon fiber polymerization reaction, generate a causal graph, construct a causal constraint matrix, modify the causal graph based on the causal constraint matrix, and optimize the structure of the causal graph; Step S2: Calculate the causal contribution of each variable in the optimized causal graph, take the variables with causal contribution greater than a set threshold as causal features, eliminate the interference of spurious correlation between the causal features, and obtain a subset of causal invariant features; Before calculating the causal contribution of each variable in the optimized causal graph, the time-series data in the polymerization process is divided into multiple overlapping sliding windows based on the time delay of the edges in the causal graph. The calculation of the causal contribution of each variable in the optimized causal graph includes the following steps: Step S201: Perform causal inference within each window, identify significant causal edges that satisfy conditional constraints, and calculate the causal effect coefficient of each significant causal edge at each time point; Step S202: Calculate the effect intensity of each significant causal edge at different lag time points, normalize the effect intensity, and obtain the time lag weights corresponding to each significant causal edge; Step S203: Within each window, multiply the causal effect coefficient by the time delay weight and sum them up to obtain the causal contribution of the window; The expression for the causal contribution is: ; In the formula, For the i-th process parameter Causal contribution For process parameters exist Variables at time; This represents the total number of time steps within the current window. For the i-th process parameter The causal effect coefficient; For the i-th process parameter exist Time delay weights at each moment; Eliminating spurious correlation interference between the causal features includes the following steps: Step S211: Project the causal features onto the high-dimensional feature space through kernel mapping, calculate the absolute value of the weighted covariance of the causal features to determine the independence between the causal features, and determine that the causal features are independent when the absolute value of the weighted covariance approaches zero. Step S212: For causal features determined to be independent: the sample data of the carbon fiber polymerization reaction process are divided into a treatment group and a control group. The pseudo-distribution space is reconstructed by constructing a sample weight matrix to make the causal feature distribution of the treatment group and the control group more consistent, thereby eliminating the pseudo-correlation interference between the causal features. Step S3: Construct a polymer liquid viscosity prediction model. The polymer liquid viscosity prediction model uses the structural prior of the optimized causal graph to quantify the individual causal effects of each causal invariant feature on the polymer liquid viscosity, thereby achieving the prediction of the polymer liquid viscosity.
2. The method for predicting the viscosity of polymer liquid based on the causal relationship of carbon fiber polymerization process according to claim 1, characterized in that: Step S1, which involves identifying the causal relationships among multiple variables during the carbon fiber polymerization reaction and generating a causal graph, includes the following steps: Step S11: Perform unconditional independence tests on the variables in the carbon fiber polymerization process, and conduct preliminary screening of the potential parent node set of each variable to obtain the candidate parent node set of each variable. Step S12: Considering autocorrelation, the conditional independence detection method is used to further eliminate false parent nodes or noise nodes in the candidate parent node set; Step S13: Using the set of candidate parent nodes as a condition set, calculate the residuals of the target variable and the corresponding candidate parent nodes under the given condition set through kernel regression. Determine whether there is a real nonlinear causal relationship between the target variable and the candidate parent nodes based on the dependency of the residuals in the high-dimensional feature space. If there is a dependency, retain the current parent node; otherwise, delete the current parent node from the set of candidate parent nodes. Step S14: Construct a cause-effect graph based on the relationships between variables.
3. The method for predicting the viscosity of polymer liquid based on the causal relationship of carbon fiber polymerization process according to claim 1, characterized in that: Step S1 involves modifying the causal graph based on the causal constraint matrix to optimize its structure. This includes the following steps: constructing a causal constraint matrix based on domain knowledge of carbon fiber polymerization; identifying conflicting edges in the causal graph based on the causal constraint matrix; removing or modifying the conflicting edges; using domain knowledge of carbon fiber polymerization as a priori terms; and optimizing the structure of the modified causal graph using Bayesian optimization.
4. The method for predicting the viscosity of polymer liquid based on the causal relationship of carbon fiber polymerization process according to claim 1, characterized in that: In step S211, the weight of each causal feature in the weighted covariance is optimized by minimizing the weighted covariance between causal features.
5. The method for predicting the viscosity of polymer liquid based on the causal relationship of the carbon fiber polymerization reaction process according to claim 4, characterized in that: The expression for the weighted covariance is: ; In the formula, Causal characteristics and The weighted covariance estimator; The weights of causal features; The total number of sample data; For the first The weights of each sample point; , They respectively represent the first Causal characteristics of individual sample points and The feature vector is projected into a high-dimensional space using the kernel mapping method.
6. The method for predicting the viscosity of polymer liquid based on the causal relationship of carbon fiber polymerization process according to claim 1, characterized in that: The construction of the polymerization liquid viscosity prediction model in step S3 includes the following steps: Step S31: Using a two-sample validation mechanism, the sample space consisting of the sample data of the variables involved in the carbon fiber polymerization process is randomly divided into a training set and an effect estimation set. Step S32: Divide the training set into an experimental group and a control group according to the value of the target variable, and construct a causal tree using the training set. The node splitting criterion of the causal tree is to maximize the mean difference in viscosity between the treatment group and the control group. Step S33: Based on the structure of the causal tree, place the samples in the effect estimation set into the corresponding leaf nodes. At each leaf node, calculate the difference in average viscosity between the treatment group and the control group samples, and use it as the individual treatment effect estimate. Step S34: Generate multiple causal trees by randomly sampling samples and variables, and fuse the individual treatment effect estimates of multiple causal trees by weighted averaging to obtain the final predicted value of polymer liquid viscosity.