Water quality remote sensing inversion method based on interpretable hybrid physical guidance neural network (HPGNN) model
By combining the HPGNN model with a hybrid loss function that integrates data-driven and physical constraints, the problems of discontinuity and model transparency in remote sensing water quality monitoring are solved, enabling high-precision and interpretable prediction of water quality parameters, applicable to global aquatic systems.
Patent Information
- Application Number
- CN202511159451.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-11-25
AI Technical Summary
Traditional remote sensing water quality monitoring methods are discontinuous in space and time, and experience-based models have limited portability and global scalability in different environments. Deep learning models lack transparency and cannot explain the impact of input variables on predictions.
We employ an interpretable hybrid physics-guided neural network (HPGNN) model, combining a hybrid loss function that integrates data-driven and physical constraints. The model is trained using a globally representative dataset, and interpretability of the model's input features is provided through SHAP.
It improves the prediction accuracy and generalization ability of water quality parameters, realizes high-precision spatiotemporal dynamic estimation, and enhances the interpretability and global applicability of the model.
Smart Images

Figure CN121011287A_ABST
Abstract
Description
The technical field belongs to
[0001] The present application relates to a water quality remote sensing inversion method based on an interpretable hybrid physical guided neural network (HPGNN) model, belonging to the field of water color remote sensing, and having important significance in water ecosystem research and water quality monitoring applications. BACKGROUND
[0002] Water quality monitoring is crucial for assessing organic matter dynamics, eutrophication, sediment load, and water transparency, thus providing information for ecological health and management strategies. Traditional in-situ water quality monitoring methods, although accurate, are limited by space and time, and the resulting data sets are discontinuous in space and time, making it impractical for global-scale lake assessment. In contrast, remote sensing technology enables large-scale and near real-time water quality monitoring.
[0003] However, due to the presence of phytoplankton, suspended sediments, and dissolved organic matter, the optical properties of water bodies are complex and variable, making remote sensing-based water quality assessment more complex. Remote sensing-based water quality indicator inversion usually employs analytical, empirical, semi-analytical, or semi-empirical methods. Empirical algorithms are essentially site-specific and very sensitive to changes in water quality types, and mostly rely on fixed empirical relationships, which limits their portability and global scalability in different environments. Machine learning (ML) provides a robust alternative by identifying complex nonlinear relationships between water quality indicators and remote sensing signals, thus improving their versatility in different aquatic systems.
[0004] Machine learning models have been increasingly applied to regional-scale water quality inversion, however, models that exhibit strong universality in global aquatic systems are very limited. In recent years, deep learning models trained on representative in-situ datasets have outperformed traditional machine learning models in remote sensing-based water quality inversion. These findings highlight the need to develop advanced deep learning architectures trained on globally representative datasets to enable reliable monitoring of water quality indicators on a global scale.
[0005] The Physical Guided Neural Network (PGNN) represents a transformative advancement in deep learning by integrating domain-specific knowledge or physical laws into the neural network architecture. This integration is achieved by embedding physics-based constraints within the model, thereby improving prediction accuracy and generalization capabilities, even under conditions of data scarcity or high noise. Unlike traditional Deep Neural Networks (DNNs) that rely solely on Mean Squared Error (MSE) loss during training, the PGNN employs a hybrid loss function that combines data-driven loss with a physics-informed penalty to minimize deviations from physically plausible outcomes, guiding the network to find more reliable and generalizable solutions. Furthermore, deep learning models are often criticized for being "black boxes" due to a lack of transparency in elucidating the influence of input variables on predictions. To address this issue, Explainable Artificial Intelligence (XAI) techniques such as SHAP provide interpretability by quantifying the contribution of each input feature to the model's output, bridging the gap between empirical performance and mechanistic understanding.
[0006] The HPGNN integrates domain-specific knowledge or physical laws into the neural network architecture, representing a transformative advancement in deep learning. This integration is achieved by embedding physics-based constraints within the model, thereby improving prediction accuracy and generalization capabilities, even under conditions of data scarcity or noise. Unlike traditional Deep Neural Networks (DNNs) that rely solely on Mean Squared Error (MSE) loss during training, the HPGNN employs a hybrid loss function that combines data-driven loss with a physics-informed penalty to minimize deviations from physically plausible outcomes, guiding the network to find more reliable and generalizable solutions. The hybrid custom loss function combines data-driven loss, regularization loss, and physics loss.
[0007] Building on the PGNN and SHAP, an interpretable HPGNN model is constructed and trained using a globally representative dataset and a hybrid loss function that includes data-driven, regularization, and physics loss. This approach leverages the strengths of remote sensing data and advances in deep learning technology while achieving high-precision, spatiotemporal dynamic estimation of water quality parameters. The development and promotion of this technology have important scientific value and practical significance for water environment monitoring and prevention and control of organic matter, eutrophication, sediment load, and turbidity. SUMMARY
[0008] 1. A water quality remote sensing inversion method based on an interpretable hybrid physical guided neural network (HPGNN) model, characterized by the following steps:
[0009] (1) Collecting the water quality parameter concentration data and the spatio-temporally matched water body remote sensing reflectance data of globally representative surface water bodies, performing data quality control, and generating standardized data sets through preprocessing for training, validating and testing the prediction model of water quality parameters in lake water bodies;
[0010] (2) Building the prediction model of each water quality parameter concentration based on the HPGNN advanced deep learning model;
[0011] (3) Explaining the importance of input features of water quality indicators for the HPGNN model;
[0012] (4) Precision evaluation of the prediction HPGNN model.
[0013] 2. The specific method for data collection, processing and standardization for the optical activity water quality index prediction model training, validation and testing is as follows:
[0014] (1) Collecting in-situ water quality measurement data of lakes in six continents (Africa, Asia, Europe, North America, Oceania and South America) from globally representative data sets and high-spectral remote sensing reflectance R rs (λ) after quality assurance and radiation correction, and converting the water surface remote sensing reflectance R rs (λ) into band equivalent remote sensing reflectance R rs (band i ) based on the spectral response function of satellite sensors:
[0015]
[0016] where i represents the band number of the satellite sensor; λ1 and λ2 represent the minimum and maximum wavelength values of band i ; R rs (λ) and SRF(λ) represent the reflectance measurement value of the global ground data set at wavelength λ and the spectral response value of the satellite sensor, respectively; R rs (band i ) represents the simulated reflectance value of band i .
[0017] (2) Extracting data records from the prepared data sets, preparing training data sets and validation data sets for univariate prediction of each water quality parameter, which contain converted spectral reflectance data (input features) and respective output features (water quality parameter concentrations); the representation method of the data sets is
[0018] Train_Val_Datasets={Dataset Y |Y∈{WQ1,WQ2,…,WQ i}
[0019] where the structure of each data set is
[0020] Dataset Y = {B1, B2,..., Bi,..., Bn, Y} i
[0021] (3) For a given target variable Y, the dataset filtered for outliers is represented as follows:
[0022] FilteredDataset Y = {(B1, B2,..., Bi,..., Bn, Y) e Dataset i | Y e [Q Y - k.IQR 0.1,Y , Q Y + k.IQR} 0.9,Y Y}
[0023] where Q 0.1,Y represents the 10th percentile of Y, Q 0.9,Y represents the 90th percentile of Y, IQR Y = Q 0.9,Y - Q 0.1,Y represents the interquartile range of Y, and k represents the outlier threshold factor (1.5).
[0024] The filtered dataset is represented as
[0025] FilteredDatasets = {FilteredDataset Y | Y e {WQ1, WQ2,..., WQ i}}
[0026] (4) Apply MinMax scaling to each input feature in the filtered dataset; the MinMax scaling for a single feature is represented as
[0027]
[0028] where j = {1, 2,..., i}, min(B j ) is the minimum value of B j in the entire dataset, and max(B j ) is the maximum value of B j in the entire dataset.
[0029] Since all datasets have the same features, the scaling ratio for all Y is consistently defined as:
[0030]
[0031] The scaled dataset is represented as
[0032] ScaledDatasets={ScaledDataset Y |Y∈{WQ1,WQ2,…,WQ i}}
[0033] (5) Each scaled dataset is split into 80% training and 20% validation using the train-test split method, which is represented as
[0034]
[0035] where Y Y = Y is the target variable, corresponding to the target variable Y, is 80% of X Y , is 20% of X Y , and the same split is applied to Y Y . The split of all output variables is defined as
[0036]
[0037] (6) Water surface reflectance is extracted using Google Earth Engine (GEE) and compared with in-situ water quality measurements with geo-tagging and their corresponding collection dates to prepare independent test datasets for each parameter model test, which is represented as
[0038] TestDatasets={TestDataset Y |Y∈{WQ1,WQ2,…,WQ i}}
[0039] where each dataset is scaled using the same scaling factor as used for the training and validation datasets, and the structure is
[0040]
[0041] 3. The specific implementation method of the water quality parameter prediction model based on HPGNN advanced deep learning is as follows: the HPGNN model based on the mixed custom loss function (data-driven, regularization, and physics-based loss) captures the complex relationship between water quality parameters and satellite optical features to monitor water quality; the mixed custom loss function and the training and validation datasets are used to establish a feedforward neural network model for each water quality indicator, and the Bayesian optimization tuner method is used to optimize the adjustable hyperparameters, as follows: the HPGNN model architecture for each water quality indicator is shown below:
[0042] (1) The structure of each parameter's HPGNN model is dynamically established, which is defined as follows;
[0043] Input layer: defined as
[0044] X Y ∈R n
[0045] where n = 8 (number of input features);
[0046] Hidden layer: adjustable HL Y Hidden layer, where HL Y ∈ {2, 3, 4, 5, 6}, each layer is built with the following configuration;
[0047] Dense layer: let the output of i-th layer be
[0048]
[0049] where; (weight); is an adjustable parameter between 32 and 1024, with 32 units of increment, representing the number of units of the hidden layer; ReLU is the activation function.
[0050] Batch normalization is defined as
[0051]
[0052] where, is the batch mean of ; is the batch standard deviation of ; ∈ Y is a small constant to prevent division by 0; and are learnable scaling and shifting parameters, respectively.
[0053] Dropout is defined as
[0054]
[0055] where and are adjustable parameters with a step size of 0.1.
[0056] Output layer: build a dense regression layer to predict the scalar target variable defined as: where; Y ∈ {WQ1, WQ2, …, WQ i}
[0057]
[0058] (2) Custom loss function is defined as a combination of the following multiple weighted losses;
[0059] Data-driven MSE loss: It measures the standard prediction error commonly used in regression models, ensuring that the network prediction is close to the true value; the MSE loss is expressed as:
[0060]
[0061] where N is the number of samples, i represents the i th sample;
[0062] Data-driven uncertainty loss: When the standard deviation of the actual value is low, it reduces the uncertainty of the prediction by penalizing the standard deviation of the predicted value; the uncertainty loss is expressed as
[0063]
[0064] where std is the standard deviation, is the uncertainty loss.
[0065] Data-driven variance loss: When the variance of the actual value is lower than the threshold, it reduces the excessive variance in the prediction by penalizing the variance of the predicted value, thereby preventing overfitting; the variance loss is expressed as
[0066]
[0067] where var is the variance, and
[0068] Gradient regularization loss: It encourages the smoothness of the prediction by penalizing large gradients based on the same input features; the gradient regularization loss is expressed as
[0069]
[0070] where X Y = [B1 scaled ,B2 scaled ,…,B i scaled ] corresponds to the corresponding Y output variable.
[0071] Physically-based non-negativity loss: It enforces physical constraints according to the rule that water quality index values cannot be negative, ensuring that predicted values are non-negative; the non-negativity loss is expressed as
[0072]
[0073] where ensures that only negative predictions will be penalized.
[0074] Physics-based smoothness loss: It ensures the continuity of the prediction by penalizing abrupt changes. Water quality indicators follow a smooth pattern in space and time, and when the smoothness of the actual value is low (defined by a threshold), abrupt changes will be penalized; the smoothness loss is expressed as:
[0075]
[0076] where
[0077] Physics-based physical loss: It performs physical constraints to ensure that the predicted value of the physical model is close to the actual value, which is based on the famous empirical model established by the physical relationship between remote sensing reflectance and water quality indicators; the physical loss is expressed as
[0078]
[0079] where represents the predicted value of each indicator by the empirical model
[0080] Physical loss of each parameter: The loss is calculated according to the predicted value of each empirical model, and the model is selected according to the best result of the training data set and the validation data set. The model coefficients are recalibrated according to the training data set to improve the universality.
[0081] The following is an example of common optically active parameters: CDOM concentration a (CDOM) (440), chlorophyll a concentration (Chla), transparency (SDD), total suspended solids concentration (TSS), and turbidity:
[0082] a (CDOM) (440): The physical loss of a (CDOM) (440) is calculated using a 2-band ratio model:
[0083]
[0084] where a1 = 9.993; a2 = -1.166.
[0085] Chla: The normalized differential chlorophyll index (NDCI) model is used to calculate the physical loss of Chl-a:
[0086]
[0087] where b1 = 28.797; b2 = 147.978; b3 = 135.977
[0088] SDD: The physical loss of SDD is calculated using a 2-band combination model:
[0089]
[0090] where cl = 0.925; c2 = 0.829; c3 = -54.530
[0091] TSS: The physical loss of TSS is calculated using the single-band model:
[0092]
[0093] where dl = 6.874; d2 = 2.570e+02; d3 = 9.046e+05
[0094] Turbidity: The physical loss of turbidity is calculated using the single-band model:
[0095]
[0096] where el = 177.432; e2 = 0.546
[0097] Total loss: All these losses are combined in a linearly weighted form and a function HPGNN-Loss is developed to return the total loss, denoted as
[0098]
[0099] where (step = 0.1) represents the adjustable loss weight for each Y e {WQ1, WQ2,..., WQ i} output variable.
[0100] (3) The model is optimized using the Adam optimizer, which updates the model weights using the adaptive gradient descent momentum method, which is defined as follows;
[0101]
[0102] where, represents the model weights at stage t, represents the adjustable learning rate, represents the first moment (average gradient) after bias correction, represents the second moment (uncentered variance) after bias correction.
[0103] (4) The adaptive training control uses a batch training process with a batch sample size of 64. When the validation mean absolute error (val_mae) does not improve within 200 epochs, the early stopping criterion is used to stop training, and the learning rate is dynamically adjusted when the validation performance tends to be stable. The specific definition is as follows;
[0104]
[0105] where the minimum learning rate constraint is defined as η ≥ 10-6 .
[0106] (5) The maximum number of trials for Bayesian hyperparameter optimization is 25, with each trial executed twice and each trial executed 1,000 times; Used for training and calculating the gradient of the total loss with respect to the trainable parameters of the model, and for updating the model weights; Used for verification, and guided by val_mae for hyperparameter tuning. The goal of optimization is to find the optimal hyperparameters. Minimize val_mae as shown in the following equation;
[0107]
[0108] in, (Search space), Λ contains different integer and floating-point values for learnable components, val_mae(λ) Y The result is calculated using a Gaussian process with random variables, and it is ensured that... It has universality.
[0109] (6) Using the optimized hyperparameters, establish an optimal model for each parameter, which is expressed as follows:
[0110]
[0111] Where M is a model building function with the following configuration:
[0112] • Architecture: Hidden layer, unit, Drop rate
[0113] • Loss weights:
[0114] • Learning rate:
[0115] (7) Using adaptive training control (step (5)), 1000 durations, custom loss function and optimal hyperparameters, the optimal model is trained and validated with the goal of minimizing loss. Used for training; Used for validation. The training and validation process is represented as follows:
[0116]
[0117] Where f θ Representative model prediction
[0118] 4. The specific implementation method for explaining the HPGNN model to explain the importance of input features to water quality indicators is as follows: based on SHAP, Deep SHAP is used to explain the importance of input features in model prediction, as follows:
[0119] (1) Background sampling is performed from the training data set, as follows:
[0120]
[0121] where B Y is the background sample of size s, is the total number of training samples, is the i-th sample (features B1-B8), and Uniform(.) represents uniform sampling using a fixed seed.
[0122] (2) For each validation data set sample and feature j, the purpose of calculating the SHAP value is to measure the degree of change of feature j compared with the baseline to the output;
[0123]
[0124] where M is the number of background samples, is the m-th background sample, is the j-th feature value of the m-th background sample, k = (1, 2, … K) is the validation sample index, is the j-th feature value of the k-th sample of the validation data, is the trained model, denotes replacement with
[0125] (3) For each sample, calculate the SHAP value of all features
[0126] (4) Calculate the SHAP value for all samples, and the final output is defined as a set of vectors, one for each validation data sample, as follows:
[0127]
[0128] (5) Aggregate to obtain global feature importance by averaging the absolute values of SHAP for all samples, as follows:
[0129]
[0130] 5. The specific implementation method for predicting model accuracy is as follows:
[0131] (6) The HPGNN model of each water quality index is verified by the corresponding test data set, which is defined as follows;
[0132]
[0133] (7) The data set is divided into input features and output values, as shown below;
[0134]
[0135] (8) The data set is used as the input of the HPGNN model to predict the corresponding water quality index value:
[0136]
[0137] Wherein represents the predicted water quality index value;
[0138] (9) Finally, the regression accuracy index is used to evaluate the accuracy of the model, including R 2 , RMSE and MAE, and the predicted water quality index value is compared with the actual water quality index value .
[0139] 6. Compared with the prior art, the advantages of the present application are
[0140] (1) high accuracy and high transparency
[0141] The present application uses a customized hybrid loss function to combine data-driven learning with physical domain knowledge, improving prediction accuracy, physically consistent output, and reducing overfitting. In addition, the model's explanation of feature importance enhances the model's behavior and known principles.
[0142] (2) wide spatiotemporal applicability
[0143] The present application uses a globally representative data set and high spatiotemporal remote sensing data, which enables the present application to generalize different water body types (turbid, clear, eutrophic), and capture seasonal and interannual variations. It is scalable and applicable to multiple data-scarce regions around the world.
[0144] (I) Drawing description
[0145] Figure 1 is the technical process of the present application.
[0146] Figure 2 is the SHAP value honeycomb chart of the HPGNN model in predicting the input features of each water quality. Specific implementation method
[0147] To better illustrate the water a based on the HPGNN model involved in this invention (CDOM) (440) The remote sensing inversion method for Chl-a, SDD, TSS, and turbidity was applied to lakes worldwide and good results were achieved. The specific implementation method is as follows:
[0148] This invention includes collecting globally representative in-situ water quality measurement data from geographically marked regions (a CDOM (440), Chl-a, SDD, TSS, and turbidity) and corresponding R values from 325 global lakes in GLORIA. rs , will R rs Convert to equivalent Sentinel-2R rs The surface reflectance of the Sentinel-2 satellite was extracted based on the in-situ data location and sampling date. The converted R... rs HPGNN models were developed and trained using a hybrid of custom loss functions (including data-driven, regularized, and physics-based losses) to predict various water quality indicators. Extracted Sentinel-2 satellite surface reflectance was used to test the models. Furthermore, SHAP was used to interpret the feature importance of each model. This invention presents an HPGNN-based inversion method for estimating a from satellite remote sensing reflectance. (CDOM) (440), Chl-a, SDD, TSS and turbidity can be used for short-term and long-term spatiotemporal analysis.
[0149] Step 1: Prepare training and testing datasets
[0150] (1) Taking the ESA Sentinel-2 satellite as an example, the following formula is used to extract GLORIA AR from the in-situ data. rs Convert to equivalent Sentinel-2R rs ;
[0151]
[0152] Where i represents the band number of Sentinel-2; λ1 and λ2 represent the bands. i The minimum and maximum wavelength values; R rs (λ) and SRF(λ) represent the measured GLORIA reflectance at wavelength λ and the spectral response of Sentinel-2, respectively; R rs (band i ) indicates band i The simulated reflectance value.
[0153] Data records were extracted from the prepared dataset to prepare training and validation datasets for univariate prediction of each water quality parameter, which contain transformed spectral reflectance data (input features) and respective output features, i.e. a (CDOM) (440), Chl-a, SDD, TSS and Turbidity; the datasets are represented as follows
[0154] Train_Val_Datasets = {Dataset Y | Y E {a CDOM , Chla, SDD, TSS, Turbidity}}
[0155] The structure of each dataset is
[0156] Dataset Y = {B1, B2,..., B8, Y}
[0157] For a given target variable Y, the filtered dataset is defined as follows:
[0158] FilteredDataset Y = {(B1, B2,..., B8, Y) E Dataset Y | Y
[0159] E [Q 0.1,Y - k.IQR Y , Q 0.9,Y + k.IQR Y ]}
[0160] where Q 0.1,Y represents the 10th percentile of Y, Q 0.9,Y represents the 90th percentile of Y, IQR Y = Q 0.9,Y - Q 0.1,Y represents the interquartile range of Y, and k represents the outlier threshold factor (1.5).
[0161] The filtered datasets are represented as
[0162] FilteredDatasets = {FilteredDataset Y | Y E {a CDOM , Chla, SDD, TSS, Turbidity}}
[0163] MinMax scaling is applied to each input feature in the filtered dataset; the MinMax scaling for a single feature is represented as
[0164]
[0165] Where j = {1,2,3,4,5,6,7,8}min(B j ) is B j The minimum value in the entire dataset, max(B) j ) is B j The maximum value in the entire dataset.
[0166] Since all datasets have the same characteristics, the scaling definition for all Y is consistent:
[0167]
[0168] Scaling the dataset as
[0169] ScaledDatasets={ScaledDataset Y |Y∈{a CDOM ,Chla,SDD,TSS,Turbidity}}
[0170] Each scaled dataset was split into 80% training data and 20% validation data, using a training-test split, denoted as...
[0171]
[0172] Among them, Y Y =Y is the target variable, (Scaled input features) correspond to the target variable Y. It is X Y 80%, It is X Y 20%, the same segmentation method also applies to Y. Y The segmentation definitions for all output variables are as follows:
[0173]
[0174] (2) Water surface reflectance (COPERNICUS / S2_SR_HARMONIZEDlevel 2A) corresponds to geotagged in-situ water quality measurements and their corresponding acquisition dates. This data, sourced from the GEE platform, is used to prepare independent test datasets for each parameter model test. The dataset contains preprocessed and atmospherically corrected Sentinel-2 satellite imagery with surface reflectance values for each pixel and auxiliary information. As shown in the following formula, a date range D is created for each sample date D. range Centered on D, the time spans from D-3 days to D+3 days;
[0175] D range ={D-3,…,D,…,D+3}
[0176] In D range , the collected images are filtered, and the filtering results are as follows, that is, a set of images I acquired from the Sentinel-2 satellite within a specified time;
[0177] I = {I j | D i ∈ D range}
[0178] where I j represents each image in the filtered image set, Sentinel-2SR_HARMONIZED is the complete dataset of Sentinel-2 Level-2A surface reflectance images, D i represents the date of the target image, which is within the range of D range .
[0179] From each image in the image set I, surface reflectance values and auxiliary information are extracted according to each in-situ data collection location defined by the following set symbol.
[0180] P = {P i | P i ∈ (x i ,y i )} (4)
[0181] where P i is the i-th point in the in-situ data set, (x i ,y i ) represents the latitude and longitude coordinates of P i .
[0182] Each P i is a sample location, from which surface reflectance values of B1 to B8 bands and the Scene Classification Layer (SCL) band (which classifies pixels into clear land, water, clouds, etc.) of each image I j can be extracted. The reflectance of band B k at pixel coordinates (x i ,y i ) can be represented by B k (I j ), where k ∈ {1, 2, …, 8}. For each pixel location (x i ,y i ) in I j , the reflectance data of each band is extracted and divided by a scale factor of 10,000, because the surface reflectance values provided by Sentinel-2A are scaled by a scale factor of 10,000. The extracted reflectance data includes the following information;
[0183]
[0184] Similarly, I j SCL classification for each pixel position (x i ,y i ) is labeled using the following class types and formulas;
[0185] • Water: Water pixels
[0186] • Non-water: Non-water pixels in the following cases
[0187]
[0188] The Normalized Difference Water Index (NDWI) is calculated using the following formula;
[0189]
[0190] I j Each data record in P i is appended with the image acquisition date (denoted as date (I j ) and the reference target date, and the final output for each point contains the reflectance values for each band in each image, the class type from SCL classification, the NDWI value, the image acquisition date, and the target reference date, which are mathematically calculated as follows;
[0191]
[0192] Records classified as water (SCL = 6) and with NDWI > 0 are kept for model testing, which is denoted as
[0193] TestDatasets = {TestDataset Y | Y e {a CDOM , Chla, SDD, TSS, Turbidity}}
[0194] where each dataset is scaled using the scaling factor used for the corresponding training and validation dataset, and its structure is
[0195]
[0196] Step 2: a (CDOM) (440), Chl-a, SDD, TSS, and turbidity modeling
[0197] The HPGNN model based on the hybrid custom loss function (including data-driven loss (MSE, uncertainty, and variance), regularization loss (gradient), and physical loss (smoothness, non-negativity, and physical loss)) captures the complex relationship between water quality parameters and satellite optical features to monitor water quality; the hybrid custom loss function and the training and validation data set are used to establish a feedforward neural network model for each water quality index, and the Bayesian optimization tuner method is used to optimize the adjustable hyperparameters to minimize the prediction error.
[0198] Step 3: HPGNN model explanation
[0199] Based on SHAP, Deep SHAP is used to explain the importance of input features in model prediction. It can sort input features and provide a more detailed view to explain the direction (positive or negative) of feature influence and the distribution of feature contribution.
[0200] Step 4: Accuracy evaluation of the prediction model
[0201] Each water quality index HPGNN model is verified by a custom test data set;
[0202]
[0203] The data set is divided into input features and output values, as follows:
[0204]
[0205] The data set is used as the input of the HPGNN model to predict the corresponding water quality index value; the data set is used as the input of the HPGNN model to predict the corresponding water quality index value; the data set is used as the input of the HPGNN model to predict the corresponding water quality index value
[0206]
[0207] where represents the predicted water quality index value;
[0208] Finally, the regression accuracy index is used to evaluate the accuracy of the model, including R 2 , RMSE and MAE, which compares the predicted water quality index value with the actual water quality index value
[0209] Finally, it should be noted that the above merely describes the preferred embodiments of the present application and the technical principles adopted by the present application. It can be understood by those skilled in the art that the present application is not limited to the specific embodiments described herein, and those skilled in the art can make various obvious changes, re-adjustments and replacements to the present application without departing from the protection scope of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments, and the present application can also include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A water quality remote sensing inversion method based on an interpretable hybrid physical guided neural network (HPGNN) model, characterized in that Comprise the following steps: (1) Collecting globally representative surface water body water quality parameter concentration data and spatiotemporally matched water body remote sensing reflectance data, performing data quality control, generating standardized data sets after preprocessing, for training, validating and testing the prediction model of water quality parameters in lake water body; (2) Based on the deep learning model framework, the HPGNN prediction model of each water quality parameter concentration is constructed; (3) Explain the importance of HPGNN model input features for water quality indicators; (4) Precision evaluation of HPGNN model.
2. The water quality remote sensing inversion method based on an interpretable hybrid physical guidance neural network (HPGNN) model according to claim 1, characterized in that: The specific method of "collecting globally representative surface water body water quality parameter concentration data and spatiotemporally matched water body remote sensing reflectance data, performing data quality control, generating standardized data sets after preprocessing, for training, validating and testing the prediction model of water quality parameters in lake water body" in step (1) is as follows: (1) Collecting geo-tagged in-situ water quality parameter concentration measurement data and high spectral remote sensing reflectance R rs ; converting water surface remote sensing reflectance into band equivalent remote sensing reflectance based on spectral response functions of satellite sensors; (2) Extract data records from the spatiotemporally matched water quality-spectrum data set, prepare training data set and validation data set for single variable prediction of each water quality parameter, and the representation method of data set is: Train_Val_Datasets = {Dataset Y | Y ∈ {WQ1, WQ2, …, WQ i}} The structure of each data set is Dataset Y = {B1, B2,..., B i , Y} wherein WQ i represents the i-th water quality parameter, i represents the serial number of the parameter, B i represents the remote sensing reflectance of the i-th band of the satellite sensor; (3) For a given target variable Y, the data set after outlier filtering is represented as FilteredDatast Y = {(B1, B2,..., B i , Y) ∈ Dataset Y | Y ∈ [Q 0.1,Y - k.IQR Y , Q 0.9,Y + k.IQR Y ]} where Q 0.1,Y represents the 10th percentile of Y, Q 0.9,Y represents the 90th percentile of Y, IQR Y = Q 0.9,Y - Q 0.1,Y represents the interquartile range of Y, k represents the outlier threshold factor 1.5; the filtered dataset is represented as FilteredDatasets = {FilteredDataset Y | Y ∈ {WQ1, WQ2, …, WQ i}} (4) Apply MinMax scaling to each input feature in the filtered data set; the MinMax scaling of a single feature is represented as where j = {1, 2,..., i}, min(B j ) is the minimum value of B j over the entire dataset, max(B j ) is the maximum value of B j over the entire dataset. Since all data sets have the same features, the scaling ratio of all Y is defined consistently as: The scaled data set is represented as ScaledDatasets = {ScaledDataset Y | Y ∈ {WQ1, WQ2, …, WQ i}} (5) Use training test split method to split each scaled data set into 80% training data set and 20% validation data set, represented as where Y Y = Y is the target variable, is the scaled input feature corresponding to the target variable Y, is X Y 80%, is X Y 20%, the same partitioning method is applied to X Y ; the partitioning of all output variables is defined as follows: (6) Use Google Earth Engine (GEE) to extract water surface reflectance and geotagged in-situ water quality measurement data and their corresponding collection dates to prepare independent test data set for each parameter model test: TestDatasets = {TestDataset Y | Y ∈ {WQ1, WQ2, …, WQ i}} Each data set is scaled using the scaling factor used in the corresponding training and validation data set, and its structure is as follows:
3. The global lake water quality remote sensing inversion method based on the interpretable HPGNN model according to claim 1, characterized in that: Step (2 ) The specific method of "constructing the HPGNN prediction model of each water quality parameter concentration based on the deep learning model framework" is as follows: (1) Use hybrid custom loss function and training and validation data sets to develop a feedforward neural network model for each water quality indicator, and optimize adjustable hyperparameters through Bayesian optimization tuner method; (2) The structure of HPGNN model for each parameter is dynamically established, which is defined as follows: Input layer: defined as X Y ∈R N*d Where d is the number of input features, and N is the number of samples; Hidden layers: adjustable HL Y Hidden layers, where HL Y ∈ {2,3,4,5,6}, each layer is built with the following configuration; dense layer: let the output of i layer be wherein, is a weight; is an adjustable parameter between 32 and 1024, in increments of 32 units, representing the number of units of the hidden layer; ReLU is an activation function; The definition of batch normalization is as follows wherein is the batch average of is the batch standard deviation of Y is a small constant to prevent division by 0; and are learnable scaling and shifting parameters, respectively; The expression of dropout rate is as follows wherein and a step size of 0.1 for the adjustable parameter; Output layer: A dense regression layer is constructed to predict the scalar target variable defined as where Y e {WQ1, WQ2,..., WQ i}; (3) Custom loss function, total loss function For the combination of the following multiple weighted losses, and develop a function HPGNN_Loss to return the total loss, as shown below: where, is a data-driven root mean square error loss that measures the standard prediction error commonly used in regression models, ensuring that the network prediction is close to the true value; is a data-driven uncertainty loss that reduces the uncertainty of the prediction by penalizing the standard deviation of the predicted value when the standard deviation of the actual value is low; is a data-driven variance loss; is a gradient regularization loss that promotes the smoothness of the prediction by penalizing large gradients based on the same input features; is a physics-based smoothness loss that ensures the continuity of the prediction by penalizing abrupt changes; is a physics-based non-negativity loss that ensures the predicted value is non-negative; is a physics-based physics loss that enforces physical constraints, ensuring that the predicted value of the physical model is close to the actual value; Step size = 0.1, indicating that for each Y∈{WQ1,WQ2,…,WQ i Adjustable loss weight of output variable; (4) The model optimization uses Adam adaptive gradient descent momentum optimizer, and the model weight update method is as follows: wherein denotes the model weights at stage t, denotes an adjustable learning rate, denotes the bias-corrected average gradient, denotes the bias-corrected uncentered variance; (5) Adaptive training control is constructed through batch training process, and the batch sample size is 64. When the validation mean absolute error (val_mae) does not improve within 200 epochs, the training is stopped in advance, and the learning rate is dynamically adjusted when the validation performance tends to be stable. The specific method is as follows: with the constraint that the minimum learning rate is η≥ 10 -6 (6) Bayesian hyperparameter optimization configuration is configured for a maximum of 25 experiments, each experiment is executed 2 times, and each execution is 1,000 epochs; For training and calculating the gradient of the total loss with respect to the model trainable parameters, and updating the model weights; For verification, and guiding the hyperparameter adjustment by val_mae; the goal of optimization is to find the optimal hyperparameter λ Y(*) Minimize val_mae; (7) Use the optimized best hyperparameters to build the best model for each parameter, represented as Where M is the model building function with the following configuration: • Architecture: HL Y(*) hidden layer, unit, Drop rate • loss weights: • Learning rate: η Y(*) (8) Use adaptive training control, 1000 epochs, custom loss function and best hyperparameters to train and validate the best model with the goal of minimizing loss.
4. The water quality remote sensing inversion method based on an interpretable hybrid physical guidance neural network (HPGNN) model according to claim 1, characterized in that: The specific method of "explaining the importance of input characteristics of water quality indicators for the HPGNN model" in step (3) is as follows: (1) Based on SHAP, DeepExplainer explains the importance of input characteristics in model prediction; (2) Background sampling is performed from the training data set, as follows where B Y is a background sample of size s, is a training sample, is the total number of training samples, is the i-th sample, and Uniform(.) denotes uniform sampling with a fixed seed. (3) For each validation dataset sample and feature j, compute SHAP values to measure how much feature j changes the output compared to the baseline: where M is the number of background samples, is the mth background sample, is the jth feature value of the mth background sample, k = (1, 2,... K) is the validation sample index, is the jth feature value of the kth sample of the validation data, is the trained model, denotes replacing with (4) For each sample, the SHAP value of all features is calculated as follows: (5) Calculate the SHAP value for all samples, and the final output is defined as a set of vectors, one for each validation data sample, as follows: (6) Aggregate the global feature importance by taking the average of the absolute values of all samples:
5. The water quality remote sensing inversion method based on an interpretable hybrid physical guidance neural network (HPGNN) model according to claim 1, characterized in that: The specific method of "predicting the accuracy evaluation of the HPGNN model" in step (4) is as follows: (1) Verify the HPGNN model for each water quality indicator using the respective test data set; (2) The data set is divided into input characteristics and output characteristics, as follows: (3) The data set is used as an input of the HPGNN model to predict a corresponding water quality index value. The data set is used as the input of the HPGNN model to predict the corresponding water quality indicator value; (4) Finally, the accuracy of the model was evaluated using regression accuracy indicators, including the determination coefficient R 2 , the root mean square error RMSE and the mean absolute error MAE, by comparing the predicted water quality indicator values with the actual water quality indicator values .
Citation Information
Cited By
CDOM prediction method based on multi-source driving factor and related device
CN120598099A
