A wastewater COD prediction method based on interpretable neural networks with causal decomposition

CN122570980APending Publication Date: 2026-08-14FUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-08-14

AI Technical Summary

Technical Problem

[0007]本发明的目的在于提供一种基于因果分解的可解释神经网络的污水COD预测方法,以解决现有污水COD预测场景中神经网络黑盒不可解释、传统模型无法兼顾预测性能与可解释性的技术问题,提供一种基于因果分解的可解释神经网络的污水COD预测方法

Benefits of technology

[0042]1)本发明面向污水COD预测场景定制化设计,从网络构建阶段即融入因果分解逻辑,而非事后对模型输出进行解释,因此从根源上解决了神经网络黑盒问题,模型的决策路径与特征提取逻辑可直接解释,满足了污水处理厂高可信要求。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122570980A_ABST
    Figure CN122570980A_ABST
Patent Text Reader

Abstract

This invention discloses a wastewater COD prediction method based on an interpretable neural network using causal decomposition, belonging to the fields of wastewater treatment and machine learning. The method first collects and preprocesses wastewater quality data, screening for water quality features related to effluent COD. Then, it performs a causal co-unique-redundant decomposition (SURD) to decompose the information entropy of the target variable COD into mutual information and conditional entropy. Through feature subset mutual information sorting and incremental allocation, it determines the set of unique variables and the set of co-variable combinations. Finally, it constructs a co-unique-redundant neural network (SURNN), building a binary co-variable layer based on the co-variable combinations, constructing a sparse layer according to variable inclusion relationships, and concatenating the sparse layer output with the unique variables before connecting it to a fully connected layer to output the predicted COD value. This invention embeds causal logic from the network construction stage, making the model's decision path directly interpretable. It achieves high prediction accuracy and strong generalization performance, and can be deployed in wastewater treatment plants to realize real-time and reliable COD prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of wastewater treatment and machine learning technology, specifically relating to a wastewater COD prediction method based on an interpretable neural network with causal decomposition. Background Technology

[0002] Chemical oxygen demand (COD) in effluent is a core indicator for measuring the water quality compliance and process efficiency of wastewater treatment plants. Accurate prediction of COD changes can guide process control and reduce operation and maintenance costs, making it a crucial aspect of intelligent wastewater treatment.

[0003] In recent years, neural networks have been widely used in COD prediction due to their powerful nonlinear fitting capabilities. However, the inherent "black box" nature of neural networks leads to opaque prediction decision paths and untraceable feature contributions, making it difficult to meet the high reliability requirements of wastewater treatment plants for safe and stable operation.

[0004] Existing interpretable neural network methods are mostly ex-post interpretations, such as feature attribution (SHAP, LIME) and surrogate models. These methods can only analyze the output after the model has been trained. More importantly, these methods mostly provide explanations from the perspective of statistical correlation or approximate simulation, failing to start from the essence of causality, quantify the interaction mechanism between input variables and output targets, and thus failing to reveal the true decision-making path inside the model, and cannot fundamentally solve the black box problem.

[0005] Traditional prediction models also have significant shortcomings: fully connected networks have poor interpretability; support vector regression and decision tree regression lack nonlinear fitting ability and have weak generalization performance. These methods cannot simultaneously achieve both prediction accuracy and model interpretability, making it difficult to meet the demand for real-time and reliable COD prediction under fluctuating influent water quality and process disturbances.

[0006] Therefore, developing a COD prediction method that can start from the causal nature and embed interpretable logic in the network construction stage is of great practical significance. Summary of the Invention

[0007] The purpose of this invention is to provide a wastewater COD prediction method based on an interpretable neural network with causal decomposition, addressing the technical problems of existing wastewater COD prediction scenarios where neural networks are black boxes and cannot be interpreted, and traditional models cannot balance prediction performance and interpretability. This invention embeds causal logic from the network construction stage, making the model's decision path directly interpretable. It achieves high prediction accuracy and strong generalization performance, and can be deployed in wastewater treatment plants to achieve real-time and reliable COD prediction.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: a wastewater COD prediction method based on an interpretable neural network for causal decomposition, comprising the following steps:

[0009] Step 1: Collect water quality data during the wastewater treatment process and perform data preprocessing;

[0010] Step 2: From the pretreated water quality data, screen water quality characteristics related to the chemical oxygen demand (COD) of the effluent;

[0011] Step 3: Perform Synergistic-Unique-Redundant Decomposition (SURD) on the selected water quality characteristics and the target variable effluent COD. Decompose the information entropy of the target variable COD into mutual information and conditional entropy. By sorting and incrementally allocating the mutual information of the feature subsets, the causal components are divided into unique causal components, redundant causal components, and co-causal components. Based on the division results, determine the set of unique variables U and the set of co-causal variable combinations S.

[0012] Step 4: Based on the unique variable set U and the collaborative variable combination set S, construct a Synergistic-Unique-Redundant Neural Network (SURNN). The SURNN network is constructed as follows: a binary collaborative layer is built based on the collaborative variable combination, a sparse layer is built according to the variable inclusion relationship, and the output of the sparse layer is concatenated with the unique variables and then connected to the fully connected layer.

[0013] Step 5: Use the collected water quality data to train and optimize the constructed SURNN network to obtain the COD prediction model;

[0014] Step 6: Use the trained COD prediction model to predict the COD of the water quality data to be predicted, output the predicted COD value, and verify the interpretability of the model.

[0015] Furthermore, in step 2, a feature selection framework based on mutual information is adopted to screen water quality features based on the criteria of maximizing the correlation between the selected features and the effluent COD and minimizing the redundancy among the selected features.

[0016] Furthermore, step 3 specifically includes:

[0017] Step 3.1: Discretize the space composed of input features and target variables, and estimate the joint probability distribution;

[0018] Step 3.2: Calculate the mutual information between the target variable and each non-empty feature subset;

[0019] Step 3.3: Sort the mutual information values ​​of all non-empty feature subsets in ascending order and calculate the mutual information increment of adjacent subsets;

[0020] Step 3.4: Based on the number of variables contained in the feature subset and the number of variables in the currently unassigned feature set, allocate the mutual information increment to the redundant causal components, unique causal components, or co-causal components;

[0021] Step 3.5: Extract all features with unique components greater than 0 to form a unique variable set U, and extract all feature combinations with co-components greater than 0 to form a co-variable combination set S.

[0022] Furthermore, in step 3.1, the space composed of the input features and the target variable is discretized, specifically as follows:

[0023] Input features and target variable The space is divided into There are three equal-width intervals, where m is the number of features and b is the number of interval divisions for each variable; the number of samples within each interval is counted. The ratio of the ratio to the total sample size n estimates the joint probability distribution. :

[0024]

[0025] Where, x j For the value corresponding to feature subset j, y k Let N be the k-th value interval of the target variable, N(∙) be the counting function, and p(∙) be the probability distribution function.

[0026] Furthermore, in step 3.4, the specific rules for allocating mutual information increments are as follows:

[0027] For a single feature subset, if the number of variables in the current unassigned feature set is greater than 1, the mutual information increment is allocated to the redundant causal component, and the feature corresponding to the single feature subset is removed from the unassigned feature set; otherwise, the mutual information increment is allocated to the unique causal component.

[0028] For multi-feature subsets, the mutual information increment is allocated to the co-causal component.

[0029] Furthermore, step 4 specifically includes:

[0030] Step 4.1: Construct a binary coordinating layer based on the binary coordinating combination set S2. The neurons in this layer use the Gaussian activation function.

[0031] Step 4.2: Construct a binary mask matrix M based on the inclusion relationship between the collaborative feature combinations, and use this mask matrix to construct a sparse layer. The forward propagation of the sparse layer adopts the ReLU activation function.

[0032] Step 4.3: Concatenate the output of the last sparse layer with the feature vectors in the unique variable set U, and use the result as the input to the fully connected layer. The fully connected layer outputs the predicted value of COD.

[0033] Furthermore, in step 4.1, the constructed binary coordinating layer has each neuron connected to only two features in the corresponding binary coordinating combination, and the activation function of the neuron is a Gaussian activation function, the expression of which is:

[0034]

[0035] Where f(x) is the Gaussian activation function, x is the input of the binary collaborative layer, and ω, a, and b are trainable parameters.

[0036] Further, in step 4.2, the element m in the i-th row and j-th column of the binary mask matrix M... ij Defined as:

[0037]

[0038] Among them, X m_i X represents the collaborative feature combination corresponding to the i-th neuron in the m-th sparse layer. m+1_j This represents the collaborative feature combination corresponding to the j-th neuron in the (m+1)-th sparse layer.

[0039] Furthermore, in step 5, the model training adopts an early stopping mechanism, which stops training when the validation set loss does not decrease within a preset number of consecutive rounds.

[0040] The present invention also provides a wastewater COD prediction system based on an interpretable neural network for causal decomposition, including a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the above-mentioned method.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] 1) This invention is designed for wastewater COD prediction scenarios. It incorporates causal decomposition logic from the network construction stage, rather than interpreting the model output after the fact. Therefore, it solves the black box problem of neural networks from the root. The decision path and feature extraction logic of the model can be directly interpreted, which meets the high reliability requirements of wastewater treatment plants.

[0043] 2) This invention utilizes the SURD (Cooperative-Unique-Redundant Decomposition) method to scientifically distinguish three types of causal components, effectively optimizing the utilization efficiency of wastewater quality characteristics: unique features directly enter the fully connected layer, cooperative features are jointly modeled through a hierarchical network, and redundant features are eliminated. This design ensures the model's fitting accuracy and generalization ability. Experiments demonstrate its effectiveness in MAE, MSE, and R... 2 In terms of metrics, it outperforms traditional fully connected networks, support vector regression, and decision tree regression.

[0044] 3) The SURNN network constructed in this invention exhibits a weight distribution that is strongly correlated with the SURD causal decomposition results, consistent with the wastewater treatment mechanism. For example, the total suspended solids in the effluent have the highest weight, which aligns with its direct impact on COD measurement; while the co-components and weights of other upstream features are relatively small. This interpretability can be intuitively verified without relying on additional post-hoc interpretation tools, facilitating understanding and trust in the model by on-site maintenance personnel. Attached Figure Description

[0045] Figure 1 The flowchart illustrates the implementation of the wastewater COD prediction method based on causal decomposition and interpretable neural networks provided by this invention.

[0046] Figure 2 This is a schematic diagram of the SURD causal decomposition results in an example of the present invention.

[0047] Figure 3 This is a heatmap of the weights of each layer of the SURNN in an example of the present invention. Detailed Implementation

[0048] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0049] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0050] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to this application. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0051] like Figure 1 As shown in the figure, this embodiment provides a wastewater COD prediction method based on an interpretable neural network with causal decomposition, and its specific implementation steps are as follows.

[0052] Step 1: Data Acquisition and Preprocessing. Collect water quality data during the wastewater treatment process and perform data preprocessing, including data cleaning, outlier removal, and feature standardization.

[0053] Step 2: Water quality characteristic screening. From the pretreated water quality data, screen water quality characteristics related to the effluent chemical oxygen demand (COD).

[0054] Specifically, a feature selection framework based on mutual information is adopted to screen water quality features for subsequent causal decomposition, with the criteria of maximizing the correlation between selected features and effluent COD and minimizing the redundancy among selected features, so as to reduce model complexity.

[0055] Step 3: Causal Co-occurrence-Unique-Redundancy Decomposition. A causal co-occurrence-unique-redundancy decomposition (SURD) is performed on the selected water quality characteristics and the target variable, effluent COD. The information entropy of the target variable COD is decomposed into mutual information and conditional entropy. By sorting and incrementally allocating the mutual information of the feature subsets, the causal components are divided into unique causal components, redundant causal components, and co-causal components. Based on the division results, the set of unique variables U and the set of co-causal variable combinations S are determined.

[0056] Step 3.1: Variable Space Discretization and Joint Probability Estimation. To calculate mutual information, the variables are first discretized: the input features... and target variable The space that is formed is divided into Let m be the number of features, n be the total number of samples, and b be the number of intervals for each variable. Count the number of samples within each interval. Then the estimate of the joint probability distribution is:

[0057]

[0058] Where, x j For the value corresponding to feature subset j, y k Let N be the k-th value interval of the target variable, N(∙) be the counting function, and p(∙) be the probability distribution function.

[0059] Step 3.2: Calculate the mutual information of the feature subset. For the k-th value interval y of the target variable... k and any non-empty feature subset , where x1 to x m For the first to m features, calculate y k Mutual information with feature subset j:

[0060]

[0061] Among them, X jLet j be the set of variable values ​​corresponding to feature subset j. This represents the probability of a value corresponding to feature subset j. This represents the probability corresponding to the k-th value interval of the target variable. i(∙) is the mutual information function.

[0062] Step 3.3: Mutual Information Sorting and Incremental Calculation. For all non-empty feature subsets j, sort by mutual information... The features are sorted in ascending order to ensure that the more variables a feature subset contains, the larger its mutual information value, while eliminating invalid combinations that introduce irrelevant information. The mutual information increment between adjacent subsets is calculated. , where j i Let j represent the i-th feature subset after sorting. i-1 Then it is the (i-1)th feature subset, by convention .

[0063] Step 3.4: Causal component assignment. Initialize the unassigned feature set. Based on the number of variables contained in the feature subset and the number of variables in the current unassigned feature set Incremental mutual information Assigned to three types of components (the superscripts R, U, and S below correspond to redundant, unique, and cooperative components, respectively): for a single feature subset, i.e. ,like This indicates that the incremental information of this feature can be replaced by other features, belonging to redundant causal components, which is a redundant component in the current lab. Implement update: Then, remove the feature from the lab to avoid duplicate assignment. If this condition is not met... This indicates that the incremental information of this feature cannot be replaced by other features, making it a unique causal component, which is different from the unique components already present in lab. Implement update: For multiple feature subsets, this condition is not satisfied. This indicates that the incremental information is the result of the synergistic effect of multiple features, belonging to the co-causal component, and is related to the existing synergistic components of feature combination j. Implement update: For k from 1 to b, repeat steps 3.2 to 3.4.

[0064] Step 3.5: Extract unique variables to form a set U, which consists of all features with unique components greater than 0. Extract combinations of co-variables to form a set S, which consists of all combinations of features with co-variable components greater than 0. Divide S according to the number of variables: S t Let be the set of t-element cooperative combinations.

[0065] Step 4: Construction of the Cooperative-Unique-Redundant Neural Network. Based on the set of unique variables U and the set of cooperative variable combinations S, a cooperative-unique-redundant neural network SURNN is constructed. Specifically, a binary cooperative layer is built based on the cooperative variable combinations, a sparse layer is built according to the variable inclusion relationship, and the output of the sparse layer is concatenated with the unique variables and then connected to a fully connected layer to form an interpretable network architecture adapted to COD prediction.

[0066] Step 4.1: Construct a binary coordinating layer based on the binary coordinating combination set S2. The neurons in this layer use a Gaussian activation function, calculated as follows: , where x is the input of the binary collaborative layer, ω, a, b are trainable parameters, and f(∙) is the corresponding activation function.

[0067] Step 4.2: Sparse Layer and Mask Matrix Construction. The sparse layer constructs a binary mask matrix M based on feature inclusion relationships. The element m in the i-th row and j-th column of the mask matrix... ij Defined as:

[0068]

[0069] Among them, X m_i X represents the collaborative feature combination corresponding to the i-th neuron in the m-th sparse layer. m+1_j This represents the collaborative feature combination corresponding to the j-th neuron in the (m+1)-th sparse layer. The forward propagation formula for the sparse layer is: Where x is the input of the sparse layer, W and b are the trainable weights and biases, O is the output of the sparse layer, and ReLU(∙) is the ReLU activation function.

[0070] Step 4.3: Constructing the Fully Connected Layer. The output of the last sparse layer is concatenated with the feature vectors from the unique variable set U, serving as the input to the fully connected layer. The fully connected layer outputs the predicted value of COD, completing the overall construction of the SURNN network and calculating the loss. Where y is the true value of the target variable. Let L be the predicted value output by the SURNN network, and L(∙) be the loss function.

[0071] Step 5: Model Training and Optimization. Initialize all trainable parameters of the network. Divide the collected data into training, validation, and test sets proportionally. Select an appropriate loss function and optimizer, adjust hyperparameters such as learning rate and batch size, and update the network's trainable parameters through backpropagation. Stop model training when the early stopping mechanism is triggered or the iteration limit is reached, and obtain the COD prediction model.

[0072] Step 6: Use the trained COD prediction model to predict the COD of the water quality data to be predicted, output the predicted COD value, and verify the interpretability of the model.

[0073] The following section uses a case study of COD prediction in the effluent of a wastewater treatment plant to elaborate on the specific implementation process of this method, fully reproducing the entire process of model construction and application.

[0074] Step 1: In this embodiment, the wastewater treatment process consists of five treatment units connected in series and one clarifier. Water quality monitoring points were set up at the inlet, the outlet of each treatment unit, and the final outlet to collect indicators such as dissolved oxygen, dissolved nitrogen, and total suspended solids. Monitoring data under normal operating conditions on a sunny day, totaling 4035 valid samples, were used to standardize the water quality characteristics.

[0075] Step 2: A feature selection framework based on mutual information is adopted to avoid high redundancy among features. Finally, five input features are selected: total suspended solids in the effluent (x1), total nitrogen in the influent (x2), dissolved oxygen in the effluent of the third unit (x3), ammonia nitrogen in the influent (x4), and biochemical oxygen demand in the effluent of the first unit (x5).

[0076] Step 3: Perform causal co-unique-redundancy decomposition (SURD) between the selected features and the target variable to obtain the corresponding decomposition results (e.g., Figure 2 (As shown). Determine the set of unique variables U and the set of combinations of collaborative variables S, and split them into subsets S2, S3, S4, and S5 according to the number of variables.

[0077] Step 4: Using the selected 5 water quality features as input to the network, a binary collaborative layer is built based on S2. Each neuron in this layer corresponds to a binary collaborative combination, which is connected to the features in the combination, and a Gaussian activation function is used. A mask matrix M is constructed according to the inclusion relationship between elements in S2 to S5, and sparse connections are built. The output of the last sparse layer is concatenated with the unique variable and used as the input to the fully connected layer to output the final COD prediction value.

[0078] Step 5: Train the model. Divide the dataset into training, validation, and test sets in an 8:1:1 ratio. Training parameters: mean squared loss function, Adam optimizer, batch size 600, learning rate 0.01, maximum number of iterations 500, early stopping patience value 10. Calculate predicted values ​​using forward propagation, update network parameters using backpropagation, and stop training if the validation set loss does not decrease for 10 consecutive iterations. Save the optimal COD prediction model.

[0079] Step 6: Evaluation indicators include MAE, MSE, and R. 2The comparison models are: (1) FCN#1: a fully connected network with only one hidden layer and 2 neurons; (2) FCN#2: a fully connected network with the same number of layers and neurons as SURNN; (3) SVR: support vector regression with radial basis kernels; (4) DTR: decision tree regression with the same maximum depth as SURNN. The experiment was repeated 10 times and the average was taken. The results show that the SURNN model has good prediction accuracy and the results are relatively stable (see Table 1). Finally, interpretability verification was performed, and the network weight heatmap (e.g.) was generated. Figure 3 (As shown) This perfectly matches the SURD causal decomposition results, with the total suspended solids in the effluent having the highest weight, consistent with the wastewater treatment mechanism. This is because the total suspended solids in the effluent contain...

[0080] Organic suspended particulate matter directly affects the measured COD of the effluent. Other characteristics are parameters from upstream or intermediate process stages. Their impact on effluent COD is indirect, and these effects are ultimately encompassed within the overall influence of total suspended solids on effluent COD. Therefore, their corresponding synergistic components and weights are relatively small.

[0081] Table 1. Performance of each model on the test set

[0082] Model MAE MSE <![CDATA[R 2 ]]> SURNN 22.85±9.60 992.17±651.44 0.9881±0.0077 FCN#1 25.02±10.87 1273.62±780.28 0.9874±0.0065 FCN#2 22.35±11.09 1481.91±972.90 0.9867±0.0087 SVR 32.53 3911.68 0.9534 DTR 27.82 2326.38 0.9732

[0083] This embodiment also provides a wastewater COD prediction system based on an interpretable neural network for causal decomposition, including a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the above-described method.

[0084] This embodiment also provides a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the above-described method.

[0085] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0086] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0088] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0089] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A wastewater COD prediction method based on an interpretable neural network with causal decomposition, characterized in that, Includes the following steps: Step 1: Collect water quality data during the wastewater treatment process and perform data preprocessing; Step 2: From the pretreated water quality data, screen water quality characteristics related to the chemical oxygen demand (COD) of the effluent; Step 3: Perform causal co-unique-redundant decomposition (SURD) on the selected water quality characteristics and the target variable effluent COD. Decompose the information entropy of the target variable COD into mutual information and conditional entropy. By sorting and incrementally allocating the mutual information of the feature subsets, the causal components are divided into unique causal components, redundant causal components and co-causal components. Based on the division results, determine the unique variable set U and the co-variable combination set S. Step 4: Based on the unique variable set U and the cooperative variable combination set S, construct a cooperative-unique-redundant neural network SURNN. The SURNN network is constructed as follows: build a binary cooperative layer based on the cooperative variable combination, construct a sparse layer according to the variable inclusion relationship, and connect the output of the sparse layer and the unique variables to the fully connected layer. Step 5: Use the collected water quality data to train and optimize the constructed SURNN network to obtain the COD prediction model; Step 6: Use the trained COD prediction model to predict the COD of the water quality data to be predicted, output the predicted COD value, and verify the interpretability of the model.

2. The wastewater COD prediction method based on an interpretable neural network with causal decomposition according to claim 1, characterized in that, In step 2, a feature selection framework based on mutual information is adopted to screen water quality features based on the criteria of maximizing the correlation between the selected features and the effluent COD and minimizing the redundancy among the selected features.

3. The wastewater COD prediction method based on an interpretable neural network for causal decomposition according to claim 1, characterized in that, Step 3 specifically includes: Step 3.1: Discretize the space composed of input features and target variables, and estimate the joint probability distribution; Step 3.2: Calculate the mutual information between the target variable and each non-empty feature subset; Step 3.3: Sort the mutual information values ​​of all non-empty feature subsets in ascending order and calculate the mutual information increment of adjacent subsets; Step 3.4: Based on the number of variables contained in the feature subset and the number of variables in the currently unassigned feature set, allocate the mutual information increment to the redundant causal components, unique causal components, or co-causal components; Step 3.5: Extract all features with unique components greater than 0 to form a unique variable set U, and extract all feature combinations with co-components greater than 0 to form a co-variable combination set S.

4. The wastewater COD prediction method based on an interpretable neural network for causal decomposition according to claim 3, characterized in that, In step 3.1, the space composed of input features and target variables is discretized, specifically as follows: Input features and target variable The space is divided into There are 3 equal-width intervals, where m is the number of features and b is the number of interval divisions for each variable; By counting the number of samples in each interval The ratio of the ratio to the total sample size n estimates the joint probability distribution. : Where, x j For the value corresponding to feature subset j, y k Let N be the k-th value interval of the target variable, N(∙) be the counting function, and p(∙) be the probability distribution function.

5. The wastewater COD prediction method based on an interpretable neural network for causal decomposition according to claim 3, characterized in that, In step 3.4, the specific rules for allocating mutual information increments are as follows: For a single feature subset, if the number of variables in the current unassigned feature set is greater than 1, the mutual information increment is allocated to the redundant causal component, and the feature corresponding to the single feature subset is removed from the unassigned feature set; otherwise, the mutual information increment is allocated to the unique causal component. For multi-feature subsets, the mutual information increment is allocated to the co-causal component.

6. The wastewater COD prediction method based on an interpretable neural network for causal decomposition according to claim 1, characterized in that, Step 4 specifically includes: Step 4.1: Construct a binary coordinating layer based on the binary coordinating combination set S2. The neurons in this layer use the Gaussian activation function. Step 4.2: Construct a binary mask matrix M based on the inclusion relationship between the collaborative feature combinations, and use this mask matrix to construct a sparse layer. The forward propagation of the sparse layer adopts the ReLU activation function. Step 4.3: Concatenate the output of the last sparse layer with the feature vectors in the unique variable set U, and use the result as the input to the fully connected layer. The fully connected layer outputs the predicted value of COD.

7. The wastewater COD prediction method based on an interpretable neural network for causal decomposition according to claim 6, characterized in that, In step 4.1, the constructed binary coordinating layer has each neuron connected to only two features in the corresponding binary coordinating combination, and the activation function of the neuron is a Gaussian activation function, the expression of which is: Where f(x) is the Gaussian activation function, x is the input of the binary collaborative layer, and ω, a, and b are trainable parameters.

8. The wastewater COD prediction method based on an interpretable neural network for causal decomposition according to claim 6, characterized in that, In step 4.2, the element m in the i-th row and j-th column of the binary mask matrix M... ij Defined as: Among them, X m_i X represents the collaborative feature combination corresponding to the i-th neuron in the m-th sparse layer. m+1_j This represents the collaborative feature combination corresponding to the j-th neuron in the (m+1)-th sparse layer.

9. The wastewater COD prediction method based on an interpretable neural network for causal decomposition according to claim 1, characterized in that, In step 5, the model training adopts an early stopping mechanism, which stops training when the validation set loss does not decrease within a preset number of consecutive rounds.

10. A wastewater COD prediction system based on an interpretable neural network for causal decomposition, characterized in that, It includes a memory, a processor, and computer program instructions stored in the memory and executable by the processor, wherein when the processor executes the computer program instructions, it can implement the method as described in any one of claims 1-9.