Articles | Volume 30, issue 20
https://doi.org/10.5194/hess-30-6579-2026
https://doi.org/10.5194/hess-30-6579-2026
Technical note
 | Highlight paper
 | 
27 Oct 2026
Technical note | Highlight paper |  | 27 Oct 2026

Technical note: Machine learning metamodelling for global sensitivity analysis

Patricio Yeste, Lieke A. Melsen, João Paulo L. F. Brêda, Nicolás Tacoronte, Andrea Saltelli, Giulia Vannucci, Roberta Siciliano, and Axel Bronstert
Abstract

Global sensitivity analysis (GSA) plays a central role in hydrologic modelling by supporting model understanding, diagnosis, and decision-making through the identification of influential and non-influential parameters and their interactions. Variance-based methods provide a rigorous framework for GSA but are often computationally expensive, as their estimation requires a large number of model evaluations. Metamodelling has therefore been widely adopted as a strategy to alleviate this issue, with recent advances in machine learning (ML) offering new opportunities to construct accurate and flexible surrogates for complex models. This technical note examines the practical relationship between Sobol' total-effect indices (Ti) and feature importance measures derived from ML metamodels within a hydrologic modelling context. Building on theoretical results that link Ti to permutation variable importance (PVIi) under independence assumptions, we provide systematic numerical evidence using three hydrologic models of varying complexity (HBV, HyMod, and VIC) applied to three headwater catchments in northern Germany, together with three ML metamodels: a gradient boosting decision tree (GBDT), a neural network (NN), and a linear model (LM). The three metamodels were trained on Monte Carlo samples and used to estimate sensitivities through PVIi and SHapley Additive exPlanations (SHAPi). The results demonstrate that GBDT and NN metamodels reliably reproduce both the ranking and relative magnitude of Ti using PVIi across all hydrologic models, providing clear empirical support for the theoretical connection between the two measures. In contrast, the performance of LM-based estimates depends strongly on the degree of linearity in the underlying model response. Mean absolute SHAPi values exhibit a consistent monotonic relationship with Ti and preserve parameter rankings, while sample-specific SHAPi values enable a distributed evaluation of sensitivities across both the parameter space and the target variable space. Overall, this study highlights ML metamodelling as a computationally efficient and conceptually sound framework for GSA in hydrologic modelling and beyond.

Editorial statement
This timely, meticulous and accessible technical note brings important insights to the hydrological community on the new opportunities for sensitivity analysis (SA) offered by explainable AI. It also addresses the issue of computational efficiency, which remains an important barrier to application of SA to complex models. By reconciling machine leaning techniques with classical SA, the paper is relevant to the broader environmental modelling, sensitivity analysis, and explainable AI communities.
Share
1 Introduction

Global sensitivity analysis (GSA) provides a systematic framework to quantify how uncertainty in model outputs can be attributed to uncertainty in model inputs, both individually and through their interactions (Saltelli et al., 2008, 2010). GSA supports model understanding, diagnosis, and decision-making by revealing dominant controls, identifying influential and non-influential parameters, and highlighting the role of interactions in complex systems. These properties make GSA particularly valuable for hydrologic modelling, where models are often nonlinear, high-dimensional, and affected by substantial uncertainty. In this context, GSA enables a sensitivity analysis based on different settings, such as the prioritization of influential input factors to inform data collection and parameter estimation efforts, or for the identification of non-influential factors that can be fixed to reduce model complexity (Saltelli and Tarantola, 2002). Sensitivity analysis facilitates the diagnosis and comparison of alternative model structures, hypotheses, and assumptions (Razavi et al., 2021; Sheikholeslami et al., 2021).

Among GSA approaches, variance-based methods provide a formal way to quantify how uncertainty in model outputs can be attributed to uncertainty in individual input factors and their interactions. Within this class of methods, Sobol’ indices describe how uncertainty in each input propagates through the model, with first-order indices measuring additive effects and total-effect indices accounting for the overall contribution of each factor, including higher-order interactions (Saltelli et al., 2010). Variance-based sensitivity analysis has been widely adopted across scientific disciplines and is commonly used as a reference for GSA (Lo Piano et al., 2021; Puy et al., 2022). A limitation of variance-based approaches is that they rely on the assumption that the variance of the model output is an adequate proxy for its uncertainty, which has motivated the development of moment-independent importance measures (Borgonovo et al., 2011). In hydrologic modelling, several studies have also highlighted important challenges in applying variance-based approaches, particularly when assessing sensitivity with respect to performance metrics. In such cases, global aggregation can obscure varying behaviours across different levels of model performance, and sensitivity estimates may vary substantially depending on the choice of performance metric and the defined parameter boundaries (Razavi and Gupta, 2015, 2016). These considerations motivate a careful and critical use of variance-based sensitivity analysis in hydrologic applications, while reinforcing its role as a rigorous and informative sensitivity framework. While these challenges are particularly evident in hydrologic modelling, they are not exclusive to it and extend to complex models in general.

A major practical limitation of variance-based GSA is its computational cost. Accurate estimation of total-effect indices typically requires a large number of model evaluations, scaling with both the number of uncertain inputs and the sample size required for convergence (Saltelli et al., 2010; Puy et al., 2022). For computationally expensive or high-dimensional models, these costs can become prohibitive, revealing the paradox of GSA: the models that would benefit most from GSA are typically those for which a full analysis is computationally infeasible. To alleviate this issue, metamodelling has long been proposed as a strategy to replace the original model with a computationally efficient approximation, also referred to as surrogate modelling (Saltelli et al., 2008; Razavi et al., 2012). Metamodels can enable GSA at a fraction of the original cost, but their reliability in yielding accurate sensitivity estimates critically depends on the ability of the surrogate to faithfully reproduce the input–output relationship of the original model.

Recent advances in machine learning (ML) offer new opportunities for metamodelling in the context of GSA. ML algorithms are particularly well suited to approximate complex, nonlinear relationships in high-dimensional spaces, making them attractive candidates for metamodelling. In a comprehensive review, Antoniadis et al. (2021) discussed the use of random forests for GSA and highlighted the close conceptual link between feature importance measures and sensitivity indices. In particular, for a given ML algorithm, permutation variable importance quantifies the increase in prediction error induced by breaking the association between an input and the model output, a mechanism that is closely related to the notion of variance-based total-effect sensitivity. This connection suggests that ML-based feature importance measures may provide an alternative route to estimate sensitivities through metamodelling, provided that the surrogate accurately reproduces the behaviour of the original model.

The objective of this technical note is to examine the practical relationship between variance-based total-effect sensitivity indices (Homma and Saltelli, 1996) and feature importance measures derived from ML metamodels within a hydrologic modelling context. Building on theoretical results that link total-effect indices and permutation variable importance under the assumption that the input factors have independent probability distributions, we provide systematic numerical evidence using three hydrologic models with varying structural complexity. We assess the ability of different ML metamodels to reproduce variance-based sensitivities, analyse the conditions under which this approximation is reliable, and explore alternative sensitivity measures enabled by ML surrogates. By doing so, this work aims to clarify the role of ML metamodelling as a computationally efficient and conceptually sound framework for GSA in hydrologic modelling.

Before presenting the specific objectives and details of the numerical experiment, the next section introduces the mathematical preliminaries that underpin the rationale of this work. We present the key concepts of variance-based sensitivity analysis and permutation variable importance, complemented by intuitive explanations to facilitate interpretation. While this section relies on probabilistic and statistical reasoning that may be challenging for readers less familiar with these topics, it is included to ensure clarity and transparency and to establish a solid foundation for the methodological developments and numerical results that follow.

2 Mathematical preliminaries

This section presents the mathematical preliminaries underlying this work. Section 2.1 and 2.3 introduce the theoretical definitions of variance-based sensitivity indices and permutation variable importance, respectively, while Sect. 2.2 and 2.4 describe their practical estimation. This distinction between theoretical definition and practical estimation is reflected in the notation: quantities without a hat denote theoretical measures, whereas their estimators are denoted with a hat.

2.1 Variance-based sensitivity analysis

Given a deterministic model of the form Y=f(X), where Y is a scalar model output and X=(X1,…,Xp) is a vector of p uncertain input factors, variance-based sensitivity analysis aims to quantify how the uncertainty in Y can be attributed to the uncertainties in the individual input factors and their interactions.

The first-order Sobol' index of the i-th factor, Xi, is defined as e.g, Saltelli et al. (2008, 2010):

(1) S i = Var X i ( E X ∼ i [ Y | X i ] ) Var ( Y )

where Var(.) and 𝔼[.] are the variance and expectation operators, respectively, and X∼i denotes the vector of all input factors except Xi.

Si is normalized between 0 and 1, with larger values indicating a stronger additive effect of Xi on the model output. The inner expectation in VarXi(EX∼i[Y|Xi]) represents the conditional expectation of Y given Xi, and intuitively averages out the effect of all other factors, isolating the contribution of Xi. The outer variance measures how much this contribution varies across all possible values of Xi.

When ∑i=1pSi=1, the model is additive, which means that Var(Y) can be decomposed as the sum of all the first-order effects as there are no interactions among the input factors. However, in the presence of non-negligible interactions ∑i=1pSi≤1, and the first-order indices would not be informative enough to quantify sensitivities. This is generally the case for any real-world model.

The total-effect Sobol' index of Xi measures the total contribution of Xi to the output variance, including all interactions with other factors, and is given by e.g. Homma and Saltelli (1996):

(2) T i = 1 - Var X ∼ i ( E X i [ Y | X ∼ i ] ) Var ( Y )

One intuitive interpretation is that the term VarX∼i(EXi[Y|X∼i]) represents the variance explained by all factors except Xi. Subtracting this from the total variance Var(Y) isolates the contribution of Xi and all its interactions. Ti satisfies the condition Si≤Ti≤1, and for additive models Si=Ti as there are no factor interactions.

Further details and a complete derivation of the Sobol' indices can be found, for example, in Saltelli et al. (2008). It is important to note that the definitions presented above assume that the input factors have independent probability distributions. Under this assumption, Var(Y) can be uniquely decomposed into contributions from individual factors and their interactions. When the inputs are not independent, this decomposition is no longer unique. Extensions of Sobol' indices to dependent inputs have been proposed in the literature (e.g., Chastaing et al., 2015; Il Idrissi et al., 2021; Jacques et al., 2006; Kucherenko et al., 2017; Li et al., 2010; Mara et al., 2015), but these are beyond the scope of this work.

2.2 Estimation of Sobol' indices

The estimation of Sobol' indices requires two essential components: a sampling strategy to generate points in the space of the input factors, and an estimator to compute sensitivity (Lo Piano et al., 2021). Here, we follow the Monte Carlo–based numerical approach recommended by Saltelli et al. (2010) to estimate Si and Ti using a single set of model evaluations. For a comprehensive overview of available estimators, we refer the reader to Puy et al. (2022).

Let A and B be two independent sampling matrices, each containing n realizations of the p input factors. For each input factor, we construct the hybrid matrix AB(i) by replacing the ith column of A with the corresponding column of B. Si and Ti can be estimated as:

(3)S^i=1n∑v=1nf(B)vfAB(i)v-f(A)vVar(Y)(4)T^i=1n∑v=1nf(A)v-f(AB(i))v22Var(Y)

In the previous expressions, Var(Y) can be estimated as Puy et al. (2022):

(5) Var ^ ( Y ) = 1 2 n - 1 ∑ v = 1 n ( f ( A ) v - f 0 ) 2 + ( f ( B ) v - f 0 ) 2

where f0=12n∑v=1nf(A)v+f(B)v. Here and throughout the remainder of the paper we employ the hat notation for estimators.

Equation (3) was originally proposed in Saltelli et al. (2010) as an improvement to previous approaches, although it has been outperformed by better practices, see e.g. Azzini et al. (2021). Equation (4) was introduced in Jansen (1999) and represents the best practice thus far to estimate Ti. As a result, the estimation of Si and Ti based on the triplet of matrices A, B, and AB(i) has a total cost of n(p+2) simulations: 2n simulations are required for matrices A and B, and pn simulations for the hybrid matrices AB(i).

2.3 Permutation variable importance

Let Y be a real-valued random variable and X=(X1,…,Xp) a vector of real-valued random variables. We assume that X and Y are jointly distributed according to some joint distribution encoding a general relationship between X and Y, which may be deterministic or stochastic.

To assess the contribution of each variable Xi to the variability of Y, we define the modified vector X(i)=(X1,…,Xi′,…,Xp), where Xi′ is an independent replication of Xi that is also independent of Y and of all other variables. The permutation variable importance (PVI) of the ith variable is formally defined as Zhu et al. (2015); Gregorutti et al. (2017):

(6) PVI i = E ( Y - E [ Y | X ( i ) ] ) 2 - E ( Y - E [ Y | X ] ) 2

where 𝔼[Y|X] denotes the conditional expectation of Y given X.

𝔼[Y|X] represents the best function of X for predicting Y in the least-square sense (Bertsekas and Tsitsiklis, 2008), and therefore the expression E(Y-E[Y|X])2 corresponds to the smallest possible mean squared error (MSE) achievable if one could use the true conditional expectation as a predictor. This quantity represents the irreducible uncertainty in Y, that is, the part of its variability that cannot be explained by X, no matter what model is used.

On the other hand, the term E(Y-E[Y|X(i)])2 measures the expected MSE when Xi is replaced by an independent copy Xi′ and the information carried by Xi has been destroyed. Hence, PVIi measures the increase in MSE when Xi is made independent of Y, with a large PVIi indicating that Xi contributes substantially to predicting Y.

If we restrict our attention to the case when the dependence between X and Y is purely deterministic, the relationship between X and Y can be written as Y=f(X). This is the case of the generic model defined in the previous section. Here, E[Y|X]=f(X), and Eq. (6) reduces to:

(7) PVI i = E ( f ( X ) - f ( X ( i ) ) ) 2

PVIi measures the average change in f(X) when the ith component is permuted. Then, if the components of X are independent, Wei et al. (2015) established the following relationship for Ti and PVIi:

(8) T i = PVI i 2 Var ( Y ) = E ( f ( X ) - f X ( i ) ) 2 2 Var ( Y )

This relation constitutes an important connection between sensitivity analysis and ML: Ti is central to GSA, while PVIi provides a model-agnostic approach widely used in explainable artificial intelligence (XAI) to quantify feature importance for ML models. Although beyond the scope of this work, interested readers are referred to the work of Benoumechiara (2019), which proposed a modified version of PVIi to calculate Si and provided an in-depth analysis of the dependent case using a Rosenblatt transformation of the input variables.

Based on Eq. (8), an estimator of Ti can be constructed with the matrices A, B, and AB(i) introduced in the previous section. The generation of AB(i) by replacing the i-th column of A with the i-th column of B mimics the independent replication of Xi in X(i). Therefore, Ti can be estimated with the following expression:

(9) T ^ i = 1 n ∑ v = 1 n f ( A ) v - f ( A B ( i ) ) v 2 2 Var ( Y )

where Var(Y) can be estimated using Eq. (5).

Equation (9) is identical to the total-order estimator proposed by Jansen (1999) (see Eq. 4). Our goal now is to demonstrate how the estimation of PVIi is carried out in practice for ML models. This provides an alternative way for estimating Ti based on ML metamodelling, which is the focus of this work.

2.4 Estimation of PVIi

Let Dn={(X1,Y1),…,(Xn,Yn)} denote a learning set consisting of n independent observations from the joint distribution of X and Y, where X and Y are defined as in the previous section. The goal in a regression setting is to find an estimator f^ of 𝔼[Y|X] (Zhu et al., 2015; Gregorutti et al., 2017). Broadly speaking, this involves fitting a function to the learning set that minimizes a loss function of choice, thereby producing a reliable approximation of the underlying relationship between X and Y.

The most common approach to estimate PVIi in practice is the importance measure proposed in Breiman (2001) for random forests (Antoniadis et al., 2021; Vannucci et al., 2026). Let f^k denote the k-th tree in an ensemble of ntree trees and let D‾k be its out-of-bag (OOB) sample, namely the subset of observations not used to train that tree. The prediction error R^ of f^k, expressed as MSE, is given by the following estimator over D‾k (Gregorutti et al., 2017):

(10) R ^ f ^ k , D ‾ k = 1 | D ‾ k | ∑ i : X i , Y i ∈ D ‾ k ( Y i - f ^ k ( X i ) ) 2

where |D‾k| is the number of samples in D‾k.

For each input factor Xi, let us now define a perturbed version of the OOB sample, denoted D‾ki, by randomly permuting the values of Xi while keeping all other variables unchanged. The importance of Xi is then estimated through the degradation in prediction error induced by this perturbation averaged over all trees in the forest (Gregorutti et al., 2017):

(11) PVI ^ i = 1 n tree ∑ k = 1 n tree [ R ^ ( f ^ k , D ‾ k i ) - R ^ ( f ^ k , D ‾ k ) ]

This expression is the empirical counterpart of the theoretical definition of PVIi presented in Eq. (6). Although random forests provide a natural setting for estimating PVIi, the permutation principle is not restricted to this class of models. Given any regression algorithm, one may estimate the importance of Xi by evaluating the predictive performance of the fitted model f^ and comparing it with the performance obtained after permuting the values of Xi. This general procedure is a model-agnostic approach widely used across ML algorithms (Pedregosa et al., 2011). In all cases, the resulting PVI^i quantifies how much the predictive accuracy of the particular model deteriorates when the information carried by Xi is destroyed.

Finally, when the learning set is generated via a Monte Carlo-based approach for GSA – for example, using the sampling matrix A and the corresponding model outputs f(A) defined in Sect. 2.2 – the regression setting becomes a metamodelling approach. In this case, the regression algorithm provides a surrogate model f^ for the true model f, and PVI^i can be used to approximate Ti. The quality of this approximation depends directly on the predictive accuracy of the surrogate: only when f^ adequately captures the behaviour of f on the learning set can PVI^i be expected to reproduce the corresponding theoretical quantity, and consequently yield reliable estimates of Ti. This approach yields a substantial computational advantage over classical estimation of Ti, which requires n(p+2) model evaluations (see Sect. 2.2). The surrogate is trained on the n evaluations of matrix A alone and subsequently used to perform the additional evaluations required for PVI^i computation across all p parameters, replacing n(p+1) model runs with surrogate predictions that take advantage of highly optimized ML libraries at negligible cost.

3 Numerical experiment

3.1 Specific objectives

Specific objectives in this technical note are:

  1. To provide a representative hydrologic modelling context in which to generate numerical evidence for the relationship between Ti and PVIi expressed in Eq. (8).

  2. To evaluate the capabilities of different ML metamodels to accurately approximate Ti in a computationally cheaper way than a traditional variance-based sensitivity analysis.

  3. To assess the potential of alternative approaches in ML metamodelling to estimate sensitivities.

It is important to note that the specific choice of hydrologic models, catchments, and model output of interest is not central to the objectives of this study.

3.2 Hydrologic modelling

In this study, three hydrologic models that are frequently used in hydrologic modelling were employed: Hydrologiska Byråns Vattenbalansavdelning (HBV, Seibert, 1997), HyMod (Wagener et al., 2001) and Variable Infiltration Capacity (VIC) version 5 (Hamman et al., 2018). The number of free parameters p for these models is set to 13, 5, and 9, respectively. It should be noted that VIC is a physically based land-surface model and therefore includes a more complex parameterization than conceptual hydrologic models such as HBV and HyMod, with numerous soil and vegetation parameters describing land–atmosphere interactions. In this study, only a subset of VIC parameters was treated as free, while the remaining soil and vegetation parameters were obtained from the VICGlobal dataset (Schaperow et al., 2021) and kept fixed. Definitions of each parameter and their feasible ranges, as informed by literature (Kollat et al., 2012 for HBV and HyMod; Schaperow et al., 2021 and Yeste et al., 2023, 2024 for VIC), are provided in the Supplementary Material. For the purpose of this experiment, all models were implemented in a lumped configuration with a daily time step.

The study focuses on three headwater catchments located in northern Germany, namely the Sude River (gauge Garlitz), the Treene River (gauge Augaard), and the Trave River (gauge Schackendorf). These catchments have semi-humid climatic conditions. Runoff generation is predominantly groundwater-driven, while during wet and high-flow conditions saturation-excess processes also play a role. The landscape is characterized by glacial deposits with deep, sandy to loamy soils, and land use is predominantly agricultural. The catchments are free of major flow regulation, allowing for the analysis of hydrologic dynamics under near-natural conditions. Key physiographic and hydroclimatic characteristics of the catchments are summarized in Table 1. Catchment areas range from 136 to 675 km2. Mean annual precipitation ranges from 661 mm yr−1 (Sude) to 909 mm yr−1 (Treene), while snow contributions are minor, with fractions below 0.05 for all catchments. Aridity indices range from 0.59 (Treene) to 0.96 (Sude), and runoff ratios are relatively similar (0.32–0.38), although the Sude catchment is somewhat drier, receiving about 20 % less precipitation and yielding lower specific annual runoff. Overall, these groundwater-dominated catchments display similar annual hydrologic variability, suggesting comparable long-term water balance characteristics.

The study catchments are part of the CAMELS-DE dataset (Loritz et al., 2024): Garlitz (gauge ID DE812200), Schackendorf (gauge ID DEF13760), and Augaard (gauge ID DEF10190). They were selected based on the performance of the HBV model reported in the original CAMELS-DE data publication, in which HBV was applied across the full dataset and the Nash–Sutcliffe Efficiency (NSE) was provided as a performance metric. The three catchments with the highest NSE values were retained for the present analysis.

Table 1Main physiographic and hydroclimatic characteristics of the three study catchments.

Download Print Version | Download XLSX

For each model–catchment combination, a Monte Carlo experiment was conducted using the sampling matrices A, B, and AB(i) described in Sect. 2.2. The sampling matrices were generated using the Sobol' quasi-random sequence scheme implemented in the SALib Python package (Herman and Usher, 2017) after setting the number of samples n to 10 000. This design resulted in a total of n(p+2) model evaluations per model and catchment combination. The model output of interest was the Kling–Gupta Efficiency (KGE) of daily streamflow over the period 1 October 2001 to 30 September 2020.

For sensitivity analysis and metamodelling, model parameters were treated as uncertain inputs and assumed to be independent and uniformly distributed within their prescribed bounds. This choice corresponds to the most common practice in hydrologic sensitivity analysis and model calibration, where parameter uncertainty is represented by specifying lower and upper bounds and assigning a uniform distribution to each parameter (Mai, 2023). Importantly, the assumption of independent inputs is required for the theoretical relationship between Ti and PVIi expressed in Eq. (8). In the VIC model, there is a dependence relationship between two parameters. This dependency was explicitly accounted for and handled so that the resulting input space satisfies the independence assumption required for the analyses conducted here. Details of this procedure are provided in the Supplement.

3.3 ML metamodelling

To emulate the behaviour of the hydrologic models, a learning set was constructed using the parameter columns in matrix A as input variables and the corresponding KGE values from the Monte Carlo experiment as the target variable. This setup defined a regression problem, enabling the ML models to act as surrogate models for the hydrologic simulations. The learning set constructed from the sampling matrix A was used exclusively for training the metamodels, without applying cross-validation or a separate test set, as would be common in a predictive ML workflow. This choice reflects the purpose of the metamodels in this study, which is not to generalize to unseen data, but to accurately emulate the behaviour of the original hydrologic models within the sampled parameter space. From a sensitivity analysis perspective, faithful reproduction of the input–output relationship on the training domain is the primary requirement for obtaining reliable sensitivity estimates. Accordingly, model configurations that would typically be regarded as overfitting in a predictive setting are acceptable here, provided that they do not distort the resulting sensitivity measures. The implications of this choice and its consistency are further examined through a dedicated sanity check, as described in Sect. 3.5.

Three ML algorithms were tested as metamodelling approaches. A gradient boosting decision tree (GBDT) was implemented in XGBoost (Chen and Guestrin, 2016) with three configurations of 100, 150, and 200 trees. Choosing GBDT over a conventional random forest was motivated by computational efficiency: while both share the same tree-based architecture, the boosting implementation in XGBoost is advantageous over the bagging approach of random forests. A neural network (NN) was implemented in TensorFlow (Abadi et al., 2016) with two hidden layers, three configurations of 100, 150, and 200 neurons per layer, and ReLU activation. The choice of a conventional feed-forward network over recurrent architectures such as long short-term memory (LSTM) networks is motivated by the nature of the surrogate task: each Monte Carlo simulation produces a single scalar KGE value from a fixed parameter set, meaning the surrogate's input space consists of static parameter vectors rather than sequential data. LSTM networks are designed to capture long-range dependencies in sequential data through their recurrent architecture (Hochreiter and Schmidhuber, 1997). In the present study, however, the input consists of a fixed-length vector of p parameter values without any temporal or other intrinsic sequential ordering. Therefore, the recurrent structure of an LSTM is not directly motivated by the structure of the input data, and the problem is instead treated as a conventional tabular regression task. A feed-forward network with ReLU activations is therefore a natural and computationally efficient choice for this purpose. Finally, a linear model (LM) was implemented in scikit-learn (Pedregosa et al., 2011). For all three ML algorithms, MSE was selected as the loss function, which is a crucial step in assessing the applicability of Eq. (8). These metamodelling approaches allowed us to efficiently reproduce the hydrologic simulations, thus providing a computationally cheap framework for GSA.

3.4 Sensitivity measures

While Sect. 2 presents the theoretical definitions and general estimation procedures for the sensitivity measures, this section describes their specific implementation in the context of the numerical experiment.

Variance-based sensitivity T^i was calculated using the Python library SALib (Herman and Usher, 2017), which implements Eq. (4) described previously, and ML-based PVI^i was computed from the three ML metamodelling approaches using the implementation available in scikit-learn (Pedregosa et al., 2011).

Feature importance was also evaluated using SHapley Additive exPlanations (SHAP, Lundberg and Lee, 2017), a model-agnostic method rooted in cooperative game theory. SHAP decomposes each individual model prediction into additive contributions associated with each input feature, ensuring local accuracy and global consistency. The formal mathematical definition of SHAP values is provided in Appendix A. In this work we used the SHAP Python library, which provides architecture-specific explainer implementations: GPUTreeExplainer (or TreeExplainer when CUDA is not available) was used for the GBDT metamodel, DeepExplainer for the NN metamodel, and LinearExplainer for the LM metamodel.

In the present application, where the inputs correspond to hydrologic model parameters, we denote by SHAPi the contribution of parameter Xi to the target variable. From a sensitivity analysis perspective, SHAPi values enable two complementary levels of analysis. First, a global measure of parameter importance can be obtained by averaging the absolute SHAPi values across all samples, yielding mean |SHAPi|, which provides a scalar summary of the overall importance of Xi on the model response. Second, the sample-specific SHAPi values allow for a distributed evaluation of parameter importance across both the parameter space and the model output space. This property is particularly relevant when assessing sensitivities with respect to model performance metrics. In such cases, global averages may emphasize parameter sensitivity in regions associated with poor model performance, potentially obscuring the controls that dominate in well-performing regions of the parameter space. By retaining sample-level contributions, SHAPi values allow parameter importance to be examined across behavioural and non-behavioural regions of the model response surface.

Finally, standardized regression coefficients were computed for the LM as an additional sensitivity measure. The standardized coefficient for parameter Xi is defined as

(12) β ^ i = b ^ i σ X i σ Y

where b^i is the estimated regression coefficient, and σXi and σY are the sample standard deviations of Xi and the model output Y, respectively. Standardized regression coefficients have been used in previous hydrologic sensitivity analyses as a computationally inexpensive alternative to variance-based methods (e.g., Yeste et al., 2020; Zhang et al., 2025), at the cost of assuming linear model behaviour.

If the relationship between X and Y is given by a linear model of the form Y=b0+∑i=1pbiXi, the model is additive and Si and Ti coincide. In this case, the following equality holds (Saltelli et al., 2008):

(13) S i = T i = β i 2

Moreover, combining this result with the theoretical relationship between Ti and PVIi (Eq. 8) yields

(14) β i 2 = PVI i 2 Var ( Y )

Accordingly, the ability of the LM to approximate Ti through β^i2 or PVI^i depends directly on the degree to which the hydrologic model response can be represented by a linear relationship.

To assess the uncertainty of the sensitivity estimates, 95 % confidence intervals were computed for all sensitivity measures. For T^i, bootstrap resampling was performed using the implementation available in SALib (1000 resamples). For PVI^i and mean |SHAPi|, confidence intervals were obtained by evaluating the trained metamodels on resampled versions of the training data (1000 resamples). For the GBDT metamodel, subsampling without replacement with a subsample size of 80 % was used, following a similar approach to Rouzies et al. (2023) for random forests, to avoid interference with the internal subsampling mechanism of XGBoost. For the NN and LM metamodels, standard bootstrap with replacement was used.

3.5 Sanity check and convergence test

To evaluate the consistency of the ML metamodelling approach with GSA, two a priori assessments were performed: a sanity check of the bias–variance tradeoff for the important measures, and a convergence test for all sensitivity measures. Simply put, the bias–variance tradeoff establishes that increasing model flexibility produces smaller training error, but may lead to larger test error due to overfitting (e.g., James et al., 2023). In the present context, however, the objective was not to generalize to unseen data, but to accurately emulate the true model response. As discussed in Sect. 2.4, PVI^i can provide a reliable approximation of Ti only if the metamodel is able to adequately reproduce the behaviour of the original model. From this perspective, a low training error was a necessary condition, and configurations that would be otherwise regarded as overfitting could be acceptable provided that they do not affect the feature importance estimates. Based on this, PVI^i and mean |SHAPi| were calculated for the GBDT and the NN metamodels using five overfitting configurations, as reported in Table 2. For the subsequent analysis, the less complex configuration was selected in each case, as it provided feature importance estimates comparable to the more complex configurations while achieving similar predictive performance.

Table 2GBDT and NN metamodel configurations used during the sanity check. Configurations differ in model complexity and random initialization.

Download Print Version | Download XLSX

The convergence test was performed to verify that the sensitivity measures stabilized as the number of Monte Carlo samples increased. The test was carried out using a random subsampling strategy. Each subsample was drawn as an independent random sample without replacement from the full set of Monte Carlo simulations, with subsample sizes incremented in steps of 100 up to the full set of 10,000 samples, resulting in 100 subsampling matrices. For each subsampling matrix, T^i, PVI^i, mean |SHAPi|, and β^i2 were computed, and convergence was assessed by comparing their values between consecutive subsample sizes. Sensitivity estimates corresponding to each subsampling matrix were normalized by dividing by the sum of all sensitivities. The Euclidean distance between the resulting sensitivity vectors at consecutive subsample sizes was then used as the convergence metric. This procedure ensured that the sensitivity results were robust with respect to the size of the training dataset. The purpose of this test was to verify that the full set of 10 000 samples was sufficient for the sensitivity estimates to stabilize, rather than to identify an exact sample size at which convergence was achieved. Since the subsamples were drawn from the same finite pool, consecutive draws of increasing size inevitably share some samples, leading to smoother variations as the subsample size approaches the full set. Despite this overlap, the test provided a reliable assessment of the stability of the sensitivity estimates across the range of subsample sizes considered.

4 Results and discussion

For clarity of presentation, the results for the Garlitz catchment are used as the guiding thread in this section. Corresponding figures for the Schackendorf and Augaard catchments are provided in the Supplementary Material. All three catchments exhibit consistent patterns, and their joint analysis is intended to ensure the robustness of the results rather than to highlight site-specific differences.

https://hess.copernicus.org/articles/30/6579/2026/hess-30-6579-2026-f01

Figure 1Predictive performance of the GBDT, NN, and LM metamodels for the three hydrologic models. GBDT and NN results are shown for configuration 1 (see Table 2). Scatter plots compare fitted and original KGE values for (a–c) GBDT, (d–f) NN, and (g–i) LM applied to HBV, HyMod, and VIC, respectively. The solid line indicates the 1:1 relationship. Coefficients of determination (R2) and root mean square errors (RMSE) are reported in each panel.

Download

4.1 Sanity check and convergence test

Figure 1 summarizes the predictive performance of the GBDT, NN, and LM metamodels by comparing fitted and original KGE values across the three hydrologic models. For GBDT and NN, only configuration 1 is shown (see Table 2), as all five configurations exhibit similar predictive performance. Both GBDT and NN closely match the reference simulations for all three hydrologic models, indicating that they capture the dominant structure of the parameter–output relationship. The high R2 values are expected, as the metamodels are evaluated on the same points used for training. This confirms that the surrogates adequately capture the behaviour of the original models, which is a necessary condition for the validity of Eq. (8) (see Sect. 2.4). In contrast, LM exhibits markedly weaker performance, particularly for HBV, with HyMod and VIC showing the highest linear response. The suitability and limitations of using an LM metamodel in contrast to GBDT and NN are discussed in the next section.

Figure 2 shows the sensitivity estimates obtained for the GBDT and NN metamodels across five flexible configurations, using both PVI^i and mean |SHAPi|. All five configurations correspond to deliberately overfitted metamodels (see Table 2), with coefficients of determination exceeding R2>0.98 for all hydrologic models. The importance curves corresponding to the different configurations largely overlap, indicating that the magnitude of the importance estimates remains remarkably consistent across varying model complexity and random initialization. In addition, panel titles in Fig. 2 report the mean ± standard deviation of pairwise Kendall τ and Spearman ρ between the importance vectors of the five configurations, which consistently show high values across all model–metamodel–importance combinations. This behaviour is observed for both PVI^i and mean |SHAPi|, suggesting that potential overfitting does not affect the resulting importance estimates. For a given importance measure, GBDT and NN exhibit nearly identical magnitudes and rankings, highlighting the robustness of the results with respect to the choice of metamodel. When comparing PVI^i and mean |SHAPi|, the relative ranking of influential parameters is generally preserved, while small differences in magnitude are observed. These differences are expected given the distinct theoretical foundations of the two approaches, but their close agreement indicates a consistent identification of dominant parameters across methods. Based on these results, configuration 1 was selected for GBDT and NN for the subsequent analysis, as it is the least complex while providing feature importance estimates comparable to the more complex configurations (see Sect. 3.5).

https://hess.copernicus.org/articles/30/6579/2026/hess-30-6579-2026-f02

Figure 2Sanity check of feature importance estimates for GBDT and NN metamodels across five overfitting configurations (see Table 2). Panels (a)–(c) show PVI^i and panels (g)–(i) show mean |SHAPi| for the GBDT metamodel applied to HBV, HyMod, and VIC, respectively, while panels (d)–(f) and (j)–(l) show the corresponding results for the NN metamodel. Each coloured line represents a different model configuration. Panel titles report the mean ± standard deviation of pairwise Kendall τ and Spearman ρ correlation between the importance vectors of the five configurations. The strong overlap of importance curves across configurations, supported by high τ‾ and ρ‾ estimates, indicates that the feature importance estimates are robust to overfitting.

Download

Finally, Fig. 3 presents the convergence behaviour of all sensitivity measures as a function of the number of Monte Carlo samples during the subsampling experiment. For all three hydrologic models, T^i exhibits stable and monotonic convergence as the subsample size increases. A similar convergence pattern is observed for PVI^i and mean |SHAPi| derived from the ML metamodels, indicating that the importance estimates stabilize with increasing training data. For all sensitivity measures, stabilization occurs at subsample sizes well below the full set of 10 000 samples, confirming that the number of Monte Carlo simulations used in this study was sufficient. Convergence is generally faster and smoother for HyMod and VIC, whereas HBV shows comparatively slower convergence and higher variability across sensitivity measures. This behaviour is consistent with the higher structural complexity of HBV, which involves 13 parameters, compared to the more parsimonious HyMod (5 parameters) and VIC (9 parameters), and reflects the increased sampling requirements associated with higher-dimensional parameter spaces. In addition, mean |SHAPi| values computed from the GBDT metamodel display slightly reduced stability for HBV relative to the other cases.

https://hess.copernicus.org/articles/30/6579/2026/hess-30-6579-2026-f03

Figure 3Convergence of sensitivity measures as a function of subsample size. Panels (a)–(c) show the convergence of T^i, panels (d)–(f) of PVI^i, panels (g)–(i) of mean |SHAPi|, and panels (j)–(l) of β^i2 for HBV, HyMod, and VIC, respectively. The convergence metric is computed as the Euclidean distance between normalized sensitivity vectors obtained from consecutive subsample sizes. Normalization was performed by dividing by the sum of all sensitivities.

Download

4.2 Relationship between Ti and PVIi

The theoretical relationship between Ti and PVIi expressed in Eq. (8) was examined empirically for the HBV, HyMod, and VIC models using the importance measures derived from GBDT, NN, and LM metamodels. Figure 4 shows the normalized T^i together with normalized PVI^i estimates and normalized mean |SHAPi| values obtained from the three metamodels. As in the convergence analysis (Fig. 3), values were normalized by dividing by the sum of all sensitivities in order to facilitate a direct comparison and produce a consistent ranking of parameters. For the GBDT and NN metamodels, PVI^i reproduces both the ranking and the relative magnitude of T^i across all three hydrologic models, reflecting only minor discrepancies. In contrast, LM-based PVI^i provides a good approximation of T^i for HyMod and VIC, but exhibits larger deviations for HBV, particularly in the relative importance assigned to dominant parameters. This behaviour is consistent with the comparatively poor predictive performance of the LM for HBV (Fig. 1). This expected limited fit of the LM underscores that the ability of PVI^i to approximate T^i depends critically on the accuracy with which the metamodel captures the underlying model response.

https://hess.copernicus.org/articles/30/6579/2026/hess-30-6579-2026-f04

Figure 4Parameter rankings for (a) HBV, (b) HyMod, and (c) VIC. Bars show normalized T^i from variance-based GSA, normalized PVI^i estimates, and normalized mean |SHAPi| with T^i obtained from GBDT, NN, and LM metamodels. Sensitivity measures were normalized by dividing each by the sum of all sensitivities, as in the convergence test. Thin black lines indicate 95 % confidence intervals.

Download

The correspondence between T^i and PVI^i is further illustrated in Fig. 5 (panels a–c), which directly compares the two quantities for each hydrologic model parameter and metamodel. GBDT- and NN-based estimates closely follow the theoretical relationship, providing clear numerical support for the connection established in Eq. (8). For the LM, agreement with the theoretical relationship is observed only for HyMod, whereas a weaker correspondence is observed for HBV and VIC – in line with how well the LM is able to capture hydrologic model behaviour. The close agreement observed between T^i and PVI^i for GBDT is in line with previous theoretical and numerical results under independence assumptions (Wei et al., 2015; Antoniadis et al., 2021). While earlier work primarily focused on random forest, the present results extend these findings by demonstrating that alternative ML metamodels can also provide reliable approximations of T^i, provided that they accurately reproduce the underlying input–output relationship. In particular, the strong performance of the NN metamodel, and the satisfactory behaviour of the LM for HyMod, indicate that the validity of PVI^i-based sensitivity estimates is not tied to a specific algorithm, but rather to the fidelity of the regression surrogate. This observation corroborates the insight of Gregorutti et al. (2017), who emphasized that the empirical estimation of PVIi strongly depends on the algorithm used to approximate the regression function. In contrast, Rouzies et al. (2023) reported that the relationship between PVI^i and T^i was not well respected when using a random forest surrogate for a distributed, physically based pesticide transfer model with 145 input parameters, and after applying a screening procedure to reduce the dimension of the problem. In their study, the poor predictive performance of the surrogate was identified as the likely cause, further underscoring that the practical applicability of Eq. (8) depends on surrogate fidelity. It should be noted, however, that in our work all three models were used in lumped configurations: HBV and HyMod are lumped conceptual rainfall-runoff models, while VIC, though a land-surface model with a more complex parameterization including surface and energy balance components, was likewise run in a lumped setup. This limits the degree of structural complexity relative to fully distributed applications such as that of Rouzies et al. (2023), and may partly explain why high surrogate fidelity was more readily achieved in our study.

https://hess.copernicus.org/articles/30/6579/2026/hess-30-6579-2026-f05

Figure 5Comparison of different sensitivity estimates across hydrologic models. Panels (a)–(c) compare PVI^i with T^i for HBV, HyMod, and VIC, respectively. Panels (d)–(f) compare mean |SHAPi| with T^i, and panels (g)–(i) compare PVI^i with β^i2 for the LM metamodel. Dashed lines indicate the corresponding theoretical relationships. Colours denote the ML metamodel used.

Download

In recent hydrologic studies, tree-based ensemble approaches and feature importance measures have been widely used as exploratory tools to analyse large-sample datasets and to identify dominant drivers of hydrologic behaviour, for example, in the context of intercatchment groundwater flow (Liu et al., 2020), hydrologic signatures (Addor et al., 2018), and flood-generating processes (Stein et al., 2021). In these applications, different XAI approaches are used to help elucidate empirical relationships learned by a random forest. ML metamodels are also efficient alternatives to complex hydrologic models, such as VIC (Gu et al., 2020; Sun et al., 2023) and ParFlow.CLM (Lim and Wang, 2022), and have already been applied to accelerate studies on climate impacts (Schnorbus and Cannon, 2014) as well as for regionalization and calibration of conceptual hydrologic models (Farahani et al., 2025; Tang et al., 2025). A closer connection to sensitivity analysis is found in the work of Brêda et al. (2024), who employed feature importance as a diagnostic approach for global hydrologic and land-surface models using a random forest surrogate. The present study builds directly on this emerging line of research by explicitly linking feature importance measures to variance-based total-effect sensitivity indices across multiple hydrologic models and metamodel classes.

4.3 Alternative approaches to estimate sensitivities

As an alternative to PVI^i, Fig. 5 also examines the possibility of using mean |SHAPi| and β^i2 for GSA. The normalized mean |SHAPi| values included in Fig. 4 further illustrate this comparison at the parameter level. Panels (d)–(f) of Fig. 5 contrast mean |SHAPi| with T^i, revealing a clear monotonic relationship across all hydrologic models, with larger dispersion than PVI^i (panels a–c). Results obtained with GBDT and NN are very similar for all hydrologic models, whereas, as observed for PVI^i, LM-based results are satisfactory for HyMod and VIC, where the model response exhibits a stronger degree of linearity. Despite the increased dispersion, mean |SHAPi| preserves nearly the same ranking of influential parameters as identified by PVI^i and T^i. Panels (g)–(i) compare PVI^i with β^i2 for the LM metamodel, confirming the proportionality between the two measures established in Eq. (14).

Beyond providing a global ranking, SHAPi values enable a more detailed and informative sensitivity analysis across both the parameter space and the target variable space, as illustrated in Fig. 6 for HyMod using the GBDT metamodel. Panel (a) reports a global importance ranking based on mean |SHAPi|, which coincides with the results shown in Fig. 5 (panel e). Panel (b) shows the distribution of SHAPi values across the parameter space, highlighting that parameters with similar global importance can exhibit markedly different local contributions depending on their values (e.g., Sm and beta). Panel (c) focuses on the most influential parameter, alfa, illustrating how its contribution to the model response varies across its range. Finally, panel (d) displays SHAPi values for alfa as a function of KGE, showing that the region of highest model performance (i.e., larger KGE values) is associated with positive and comparatively larger SHAPi values for alfa.

https://hess.copernicus.org/articles/30/6579/2026/hess-30-6579-2026-f06

Figure 6Detailed SHAPi-based sensitivity analysis for HyMod using the GBDT metamodel. Panel (a) shows the global parameter ranking based on mean |SHAPi|, with thin black lines indicating 95 % confidence intervals. Panel (b) displays the distribution of SHAPi values across the parameter space, coloured by parameter value. Panel (c) illustrates the variation of SHAPi for the most influential parameter, alfa, across its range. Panel (d) shows SHAPi values for alfa as a function of KGE, highlighting how parameter contributions vary across model performance levels.

Download

The ability of SHAPi values to characterize how parameter influence varies across both the parameter space and the target variable space is conceptually closely related to the Distributed Evaluation of Local Sensitivity Analysis (DELSA) introduced by Rakovec et al. (2014). DELSA was developed to move beyond single summary measures of sensitivity by providing distributions of parameter sensitivities across the parameter space, thereby revealing regimes in which parameters may alternate between being influential or negligible. As emphasized by Rakovec et al. (2014), the ability to understand how parameter sensitivities vary throughout parameter space is critical for informing decisions related to data collection and model development, particularly when sensitivities are evaluated with respect to performance metrics. This perspective aligns with the broader critique of GSA articulated by Razavi and Gupta (2015, 2016), who demonstrated that global aggregation can obscure important behaviour when sensitivity is assessed using performance metrics. The SHAPi-based analyses presented here address these limitations by providing sample-specific contributions that can be examined jointly in parameter space and target variable space.

In this sense, SHAPi values provide a complementary perspective to distributed sensitivity approaches such as DELSA, while naturally integrating with ML metamodelling frameworks. It is important to emphasize that neither SHAPi nor DELSA should be regarded as equivalent to classical GSA measures such as T^i. DELSA is a hybrid local-global approach that provides distributions of parameter sensitivities across the parameter space, rather than the single summary measures characteristic of GSA (see also Dell'Oca et al., 2020, for a non-aggregated approach based on copula density-driven metrics). Similarly, SHAPi operates as a local prediction-explanation method that attributes the contribution of each input to individual predictions, and the global importance derived from mean absolute SHAPi values is an aggregation of these local explanations rather than a variance decomposition index. This complementary relationship between SHAP and SA-based approaches has been explored in recent studies. Panigrahi et al. (2025) compared an SA-based explainer, the Explainer Variogram Analysis of Response Surface (XVARS), with SHAP, showing that both approaches mostly align in their feature rankings. However, they differ in that XVARS characterizes the entire response surface of ML models, whereas SHAP provides local explanations that are generalized by averaging over sampled data points and may miss behaviour in regions without training data. Panigrahi et al. (2026) extended this comparison, finding that XVARS and SHAP are broadly consistent in identifying dominant features but differ in scope and robustness: SA-based methods are independent of training sample size and more robust to sampling variability, whereas SHAP scales linearly with sample size and its importance estimates depend on the underlying ML architecture.

Last, despite the absence of a formal link between SHAPi and T^i, both measures share a common theoretical root in the Shapley value framework from cooperative game theory, which provides a principled approach for allocating contributions among interacting variables. In the context of GSA, the same principle has been adopted through Shapley effects, which allocate contributions to the variance of model outputs among input variables. Owen (2014) demonstrated that, for independent inputs, Shapley effects are bounded by the first-order and total-effect Sobol indices. Although SHAP and Shapley effects address different attribution problems, both rely on the same theoretical foundation. Hence, when SHAP values are aggregated over a representative sample of the input space, as in the mean |SHAPi| values used in this work, they provide a global measure of variable influence that, while not equivalent to Sobol indices or Shapley effects, can be considered a complementary global sensitivity measure.

5 Conclusions

This technical note examined the practical relationship between GSA and ML metamodelling within a hydrologic modelling context. Using three hydrologic models (HBV, HyMod, and VIC) applied over three catchments in Germany, and taking KGE as the target variable, we computed Sobol' Ti and assessed whether GBDT, NN, and LM metamodels can reproduce these sensitivities through two feature importance measures, namely PVIi and SHAPi values.

The numerical experiments provided clear empirical evidence supporting the theoretical relationship between Ti and PVIi underlying Eq. (8). Across all hydrologic models, the GBDT and NN metamodels reproduced both the ranking and the relative magnitude of Ti using PVIi, with only minor discrepancies. The results further showed that, as expected, the reliability of PVIi as a proxy for Ti depends critically on metamodel performance: when the LM failed to accurately reproduce the hydrologic model response, agreement between PVIi and Ti deteriorated, whereas satisfactory performance and agreement were obtained for the more linear case.

Alternative sensitivity measures derived from ML metamodels were also assessed. Mean |SHAPi| exhibited a consistent monotonic relationship with Ti and preserved nearly the same ranking of influential parameters observed for Ti and PVIi. For the LM, βi2 was proportional to PVIi, as expected from Eq. (14). Importantly, SHAPi values provided additional diagnostic insight by enabling a distributed evaluation of parameter sensitivities across both the parameter space and the model output space, thereby revealing important effects that are averaged out by single summary measures of sensitivity.

The results also highlight the key computational motivation for using ML metamodelling for GSA. Classical variance-based estimation of T^i requires n(p+2) model evaluations, which can be prohibitive for complex or high-dimensional models. In contrast, once a surrogate model is trained, PVI^i can be computed at negligible additional cost, while relying only on the n model evaluations used for training. This makes ML metamodels particularly attractive for efficient sensitivity analysis of computationally demanding models.

From a hydrologic modelling perspective, these findings support ML metamodelling as a practical and flexible framework for GSA, with direct relevance for parameter prioritization, model diagnosis, and the interpretation of model behaviour across model performance levels. By establishing a clear and empirically validated link between variance-based sensitivity indices and ML-based feature importance measures, this work helps bridge methodological developments in GSA and XAI with applied hydrologic modelling practice. The analysis was conducted for catchments characterized by semi-humid climatic conditions and predominantly groundwater-driven runoff generation, which may influence the generality of the results. Future research could extend this analysis to catchments with contrasting hydroclimatic and physiographic characteristics, to settings with dependent inputs, alternative model outputs of interest, and more complex hydrologic modelling configurations, as well as to applications where metamodels are used beyond sensitivity estimation, such as for exploring uncertainties, supporting calibration, or transferring across catchments.

Appendix A: Mathematical definition of SHAP values

Let Y=f(X) be the deterministic model defined in Sect. 2.1, and let x=(x1,…,xp) be a specific realization of the input vector X. The SHAP value of the ith input variable for the prediction f(x) is defined as the Shapley value of the conditional expectation function (Lundberg and Lee, 2017):

(A1) ϕ i ( f , x ) = ∑ S ⊆ P ∖ { i } | S | ! ( p - | S | - 1 ) ! p ! [ E f ( X ) | X S ∪ { i } = x S ∪ { i } - E f ( X ) | X S = x S ]

where P={1,…,p} is the set of input indices and the sum runs over all subsets S of P that exclude i.

The two conditional expectations represent the expected model output when only a subset of inputs is known:

  • E[f(X)|XS∪{i}=xS∪{i}] is the expected model output when the inputs in S and Xi are set to their values in x, while the remaining inputs vary according to their prescribed distributions.

  • E[f(X)|XS=xS] is the same expectation, but now Xi is left unknown and marginalized over its distribution.

Their difference measures the change in expected model output when Xi is made known. This difference depends on which other inputs are already known, so the Shapley value averages this difference over all possible subsets S that exclude i. The weight |S|!(p-|S|-1)!/p! gives each subset S its appropriate share according to cooperative game theory (Shapley, 1953), ensuring that the contribution of each input is fairly allocated regardless of the order in which inputs are considered.

The exact computation of SHAP values is challenging (Lundberg and Lee, 2017). In practice, SHAP values are approximated using estimators that exploit the structure of the prediction model, such as TreeExplainer for tree-based models or DeepExplainer for neural networks. This computational challenge also motivates the use of ML metamodels f^ as efficient surrogates of the original model f, for which SHAP values can be computed much more efficiently.

Throughout this paper, the ϕi values obtained from a ML metamodel f^ are referred to as SHAPi, and their absolute values averaged over all samples yield the mean |SHAPi|, which is used here as a global measure of parameter importance.

Code and data availability

All data and code used in this study are available in a Zenodo repository (https://doi.org/10.5281/zenodo.19222162, Yeste et al., 2026). All implementation details and computational times are documented in the repository description pdf.

Supplement

The supplement related to this article is available online at https://doi.org/10.5194/hess-30-6579-2026-supplement.

Author contributions

Conceptualization: PY, LAM, JPLFB, AS, GV, RS. Methodology: PY, LAM, JPLFB. Software: PY, NT. Validation: NT, AB. Formal analysis: PY. Investigation: PY. Data curation: PY, NT. Writing – Original Draft: PY. Writing – Review and Editing: PY, LAM, JPLFB, NT, AS, GV, RS, AB. Visualization: PY. Supervision: AB. Funding acquisition: PY, AB.

Competing interests

The contact author has declared that none of the authors has any competing interests.

Disclaimer

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims made in the text, published maps, institutional affiliations, or any other geographical representation in this paper. The authors bear the ultimate responsibility for providing appropriate place names. Views expressed in the text are those of the authors and do not necessarily reflect the views of the publisher.

Acknowledgements

The first author acknowledges the Alexander von Humboldt Foundation for a Humboldt Research Fellowship for postdoctoral researchers. The first author is currently funded by a UGR-Banco Santander postdoctoral fellowship. This work was supported by the Italian Ministry of Research, under the complementary actions to the NRRP “Fit4MedRob - Fit for Medical Robotics” Grant (# PNC0000007). All the simulations were conducted in the HPC cluster at the University of Potsdam (https://www.uni-potsdam.de/en/zim/angebote-loesungen/hpc, last access: 5 February 2026). We thank OpenAI's ChatGPT (version 4) for providing suggestions on wording and phrasing during manuscript preparation. We thank Banamali Panigrahi, two anonymous referees, and the associate editor for their constructive comments.

Financial support

This research has been supported by the Alexander von Humboldt-Stiftung (Humboldt Research Fellowship for postdoctoral researchers), UGR-Banco Santander (postdoctoral fellowship), and the Italian Ministry of Research (grant # PNC0000007).

Review statement

This paper was edited by Fanny Sarrazin and reviewed by Banamali Panigrahi and two anonymous referees.

References

Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., Corrado, G. S., Davis, A., Dean, J., Devin, M., Ghemawat, S., Goodfellow, I., Harp, A., Irving, G., Isard, M., Jia, Y., Jozefowicz, R., Kaiser, L., Kudlur, M., Levenberg, J., Mane, D., Monga, R., Moore, S., Murray, D., Olah, C., Schuster, M., Shlens, J., Steiner, B., Sutskever, I., Talwar, K., Tucker, P., Vanhoucke, V., Vasudevan, V., Viegas, F., Vinyals, O., Warden, P., Wattenberg, M., Wicke, M., Yu, Y., and Zheng, X.: TensorFlow: Large-Scale Machine Learning on Heterogeneous Distributed Systems, arXiv [preprint], https://doi.org/10.48550/arXiv.1603.04467, 2016. a

Addor, N., Nearing, G., Prieto, C., Newman, A. J., Le Vine, N., and Clark, M. P.: A Ranking of Hydrological Signatures Based on Their Predictability in Space, Water Resour. Res., 54, 8792–8812, https://doi.org/10.1029/2018WR022606, 2018. a

Antoniadis, A., Lambert-Lacroix, S., and Poggi, J.-M.: Random forests for global sensitivity analysis: A selective review, Reliab. Eng. Syst. Safe., 206, 107312, https://doi.org/10.1016/j.ress.2020.107312, 2021. a, b, c

Azzini, I., Mara, T. A., and Rosati, R.: Comparison of two sets of Monte Carlo estimators of Sobol’ indices, Environ. Model. Softw., 144, 105 167, https://doi.org/10.1016/j.envsoft.2021.105167, 2021. a

Benoumechiara, N.: Treatment of dependency in sensitivity analysis for industrial reliability, PhD thesis, Sorbonne Université, https://doi.org/10.70675/d5422653z5ecfz41a6z9e5czba00e20b0650 2019. a

Bertsekas, D. and Tsitsiklis, J. N.: Introduction to Probability, Athena Scientific, ISBN 978-1-886529-23-6, 2008. a

Borgonovo, E., Castaings, W., and Tarantola, S.: Moment Independent Importance Measures: New Results and Analytical Test Cases, Risk Analysis, 31, 404–428, https://doi.org/10.1111/j.1539-6924.2010.01519.x, 2011. a

Brêda, J. P. L. F., Melsen, L. A., Athanasiadis, I., Van Dijk, A., Siqueira, V. A., Verhoef, A., Zeng, Y., and van der Ploeg, M.: Predictor Importance for Hydrological Fluxes of Global Hydrological and Land Surface Models, Water Resour. Res., 60, https://doi.org/10.1029/2023WR036418, 2024. a

Breiman, L.: Random Forests, Mach. Learn., 45, 5–32, https://doi.org/10.1023/A:1010933404324, 2001. a

Chastaing, G., Gamboa, F., and Prieur, C.: Generalized Sobol sensitivity indices for dependent variables: numerical methods, J. Stat. Comput. Simul., 85, 1306–1333, https://doi.org/10.1080/00949655.2014.960415, 2015. a

Chen, T. and Guestrin, C.: XGBoost: A Scalable Tree Boosting System, in: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 785–794, Assoc. Comput. Mach., https://doi.org/10.1145/2939672.2939785, 2016. a

Dell'Oca, A., Guadagnini, A., and Riva, M.: Copula density-driven metrics for sensitivity analysis: Theory and application to flow and transport in porous media, Adv. Water Res., 145, 103714, https://doi.org/10.1016/j.advwatres.2020.103714, 2020. a

Farahani, M. A., Wood, A. W., Tang, G., and Mizukami, N.: Calibrating a large-domain land/hydrology process model in the age of AI: the SUMMA CAMELS emulator experiments, Hydrol. Earth Syst. Sci., 29, 4515–4537, https://doi.org/10.5194/hess-29-4515-2025, 2025. a

Gregorutti, B., Michel, B., and Saint-Pierre, P.: Correlation and variable importance in random forests, Stat. Comput., 27, 659–678, https://doi.org/10.1007/s11222-016-9646-1, 2017. a, b, c, d, e

Gu, H., Xu, Y.-P., Ma, D., Xie, J., Liu, L., and Bai, Z.: A surrogate model for the Variable Infiltration Capacity model using deep learning artificial neural network, J. Hydrol., 588, 125019, https://doi.org/10.1016/j.jhydrol.2020.125019, 2020. a

Hamman, J. J., Nijssen, B., Bohn, T. J., Gergel, D. R., and Mao, Y.: The Variable Infiltration Capacity model version 5 (VIC-5): infrastructure improvements for new applications and reproducibility, Geosci. Model Dev., 11, 3481–3496, https://doi.org/10.5194/gmd-11-3481-2018, 2018. a

Herman, J. and Usher, W.: SALib: An open-source Python library for Sensitivity Analysis, Journal of Open Source Software, 2, 97, https://doi.org/10.21105/joss.00097, 2017. a, b

Hochreiter, S. and Schmidhuber, J.: Long Short-Term Memory, Neural Comput., 9, 1735–1780, https://doi.org/10.1162/neco.1997.9.8.1735, 1997. a

Homma, T. and Saltelli, A.: Importance measures in global sensitivity analysis of nonlinear models, Reliab. Eng. Syst. Safe., 52, 1–17, https://doi.org/10.1016/0951-8320(96)00002-6, 1996. a, b

Il Idrissi, M., Chabridon, V., and Iooss, B.: Developments and applications of Shapley effects to reliability-oriented sensitivity analysis with correlated inputs, Environ. Model. Softw., 143, 105115, https://doi.org/10.1016/j.envsoft.2021.105115, 2021. a

Jacques, J., Lavergne, C., and Devictor, N.: Sensitivity analysis in presence of model uncertainty and correlated inputs, Reliab. Eng. Syst. Safe., 91, 1126–1134, https://doi.org/10.1016/j.ress.2005.11.047, 2006. a

James, G., Witten, D., Hastie, T., Tibshirani, R., and Taylor, J.: An Introduction to Statistical Learning: with Applications in Python, Springer International Publishing, https://doi.org/10.1007/978-3-031-38747-0, 2023. a

Jansen, M. J. W.: Analysis of variance designs for model output, Comput. Phys. Commun., 117, 35–43, https://doi.org/10.1016/S0010-4655(98)00154-4, 1999. a, b

Kollat, J. B., Reed, P. M., and Wagener, T.: When are multiobjective calibration trade-offs in hydrologic models meaningful?, Water Resour. Res., 48, 1–19, https://doi.org/10.1029/2011WR011534, 2012. a

Kucherenko, S., Klymenko, O. V., and Shah, N.: Sobol' indices for problems defined in non-rectangular domains, Reliab. Eng. Syst. Safe., 167, 218–231, https://doi.org/10.1016/j.ress.2017.06.001, 2017. a

Li, G., Rabitz, H., Yelvington, P. E., Oluwole, O. O., Bacon, F., Kolb, C. E., and Schoendorf, J.: Global Sensitivity Analysis for Systems with Independent and/or Correlated Inputs, J. Phys. Chem. A, 114, 6022–6032, https://doi.org/10.1021/jp9096919, 2010. a

Lim, T. and Wang, K.: Comparison of machine learning algorithms for emulation of a gridded hydrological model given spatially explicit inputs, Comput. Geosci., 159, 105025, https://doi.org/10.1016/j.cageo.2021.105025, 2022. a

Liu, Y., Wagener, T., Beck, H. E., and Hartmann, A.: What is the hydrologically effective area of a catchment?, Environ. Res. Lett., 15, https://doi.org/10.1088/1748-9326/aba7e5, 2020. a

Lo Piano, S., Ferretti, F., Puy, A., Albrecht, D., and Saltelli, A.: Variance-based sensitivity analysis: The quest for better estimators and designs between explorativity and economy, Reliab. Eng. Syst. Safe., 206, 107300, https://doi.org/10.1016/j.ress.2020.107300, 2021. a, b

Loritz, R., Dolich, A., Acuña Espinoza, E., Ebeling, P., Guse, B., Götte, J., Hassler, S. K., Hauffe, C., Heidbüchel, I., Kiesel, J., Mälicke, M., Müller-Thomy, H., Stölzle, M., and Tarasova, L.: CAMELS-DE: hydro-meteorological time series and attributes for 1582 catchments in Germany, Earth Syst. Sci. Data, 16, 5625–5642, https://doi.org/10.5194/essd-16-5625-2024, 2024. a

Lundberg, S. M. and Lee, S.-I.: A unified approach to interpreting model predictions, in: Proceedings of the 31st International Conference on Neural Information Processing Systems, 4768–4777, Curran Associates Inc., https://proceedings.neurips.cc/paper/2017/hash/8a20a8621978632d76c43dfd28b67767-Abstract.html (last access: 23 October 2026), 2017. a, b, c

Mai, J.: Ten strategies towards successful calibration of environmental models, J. Hydrol., 620, 129414, https://doi.org/10.1016/j.jhydrol.2023.129414, 2023. a

Mara, T. A., Tarantola, S., and Annoni, P.: Non-parametric methods for global sensitivity analysis of model output with dependent inputs, Environ. Model. Softw., 72, 173–183, https://doi.org/10.1016/j.envsoft.2015.07.010, 2015. a

Owen, A. B.: Sobol' Indices and Shapley Value, SIAM/ASA Journal on Uncertainty Quantification, 2, 245–251, https://doi.org/10.1137/130936233, 2014. a

Panigrahi, B., Razavi, S., Doig, L. E., Cordell, B., Gupta, H. V., and Liber, K.: On Robustness of the Explanatory Power of Machine Learning Models: Insights From a New Explainable AI Approach Using Sensitivity Analysis, Water Resour. Res., 61, e2024WR037398, https://doi.org/10.1029/2024WR037398, 2025. a

Panigrahi, B., Razavi, S., Doig, L. E., Gupta, H., and Liber, K.: On the complementary roles of XVARS and SHAP in explainable AI, Environ. Model. Softw., 203, 107007, https://doi.org/10.1016/j.envsoft.2026.107007, 2026. a

Pedregosa, F., Varoquaux, G., Gramfort, A., Michel, V., Thirion, B., Grisel, O., Blondel, M., Prettenhofer, P., Weiss, R., Dubourg, V., Vanderplas, J., Passos, A., Cournapeau, D., Brucher, M., Perrot, M., and Duchesnay, É.: Scikit-learn: Machine Learning in Python, J. Mach. Learn. Res., 12, 2825–2830, 2011. a, b, c

Puy, A., Piano, S. L., Saltelli, A., and Levin, S. A.: sensobol: An R Package to Compute Variance-Based Sensitivity Indices, J. Stat. Softw., 102, 1–37, https://doi.org/10.18637/jss.v102.i05, 2022. a, b, c, d

Rakovec, O., Hill, M. C., Clark, M. P., Weerts, A. H., Teuling, A. J., and Uijlenhoet, R.: Distributed Evaluation of Local Sensitivity Analysis (DELSA), with application to hydrologic models, Water Resour. Res., 50, 409–426, https://doi.org/10.1002/2013WR014063, 2014. a, b

Razavi, S. and Gupta, H. V.: What do we mean by sensitivity analysis? The need for comprehensive characterization of “global” sensitivity in Earth and Environmental systems models, Water Resour. Res., 51, 3070–3092, https://doi.org/10.1002/2014WR016527, 2015. a, b

Razavi, S. and Gupta, H. V.: A new framework for comprehensive, robust, and efficient global sensitivity analysis: 1. Theory, Water Resour. Res., 52, 423–439, https://doi.org/10.1002/2015WR017558, 2016. a, b

Razavi, S., Tolson, B. A., and Burn, D. H.: Review of surrogate modeling in water resources, Water Resour. Res., 48, https://doi.org/10.1029/2011WR011527, 2012. a

Razavi, S., Jakeman, A., Saltelli, A., Prieur, C., Iooss, B., Borgonovo, E., Plischke, E., Lo Piano, S., Iwanaga, T., Becker, W., Tarantola, S., Guillaume, J. H. A., Jakeman, J., Gupta, H., Melillo, N., Rabitti, G., Chabridon, V., Duan, Q., Sun, X., Smith, S., Sheikholeslami, R., Hosseini, N., Asadzadeh, M., Puy, A., Kucherenko, S., and Maier, H. R.: The Future of Sensitivity Analysis: An essential discipline for systems modeling and policy support, Environ. Model. Softw., 137, 104954, https://doi.org/10.1016/j.envsoft.2020.104954, 2021. a

Rouzies, E., Lauvernet, C., Sudret, B., and Vidard, A.: How is a global sensitivity analysis of a catchment-scale, distributed pesticide transfer model performed? Application to the PESHMELBA model, Geosci. Model Dev., 16, 3137–3163, https://doi.org/10.5194/gmd-16-3137-2023, 2023. a, b, c

Saltelli, A. and Tarantola, S.: On the Relative Importance of Input Factors in Mathematical Models, J. Am. Stat. Assoc., 97, 702–709, https://doi.org/10.1198/016214502388618447, 2002. a

Saltelli, A., Ratto, M., Andres, T., Campolongo, F., Cariboni, J., Gatelli, D., Saisana, M., and Tarantola, S.: Global Sensitivity Analysis, The Primer, Wiley, https://doi.org/10.1002/9780470725184, 2008. a, b, c, d, e

Saltelli, A., Annoni, P., Azzini, I., Campolongo, F., Ratto, M., and Tarantola, S.: Variance based sensitivity analysis of model output. Design and estimator for the total sensitivity index, Computer Phys. Commun., 181, 259–270, https://doi.org/10.1016/j.cpc.2009.09.018, 2010. a, b, c, d, e, f

Schaperow, J. R., Li, D., Margulis, S. A., and Lettenmaier, D. P.: A near-global, high resolution land surface parameter dataset for the variable infiltration capacity model, Sci. Data, 8, 1–14, https://doi.org/10.1038/s41597-021-00999-4, 2021. a, b

Schnorbus, M. A. and Cannon, A. J.: Statistical emulation of streamflow projections from a distributed hydrological model: Application to CMIP3 and CMIP5 climate projections for British Columbia, Canada, Water Resour. Res., 50, 8907–8926, https://doi.org/10.1002/2014WR015279, 2014. a

Seibert, J.: Estimation of Parameter Uncertainty in the HBV Model: Paper presented at the Nordic Hydrological Conference (Akureyri, Iceland – August 1996), Hydrol. Res., 28, 247–262, https://doi.org/10.2166/nh.1998.15, 1997. a

Shapley, L. S.: 17. A Value for n-Person Games, in: Contributions to the Theory of Games (AM-28), Volume II, 307–318, Princeton University Press, https://doi.org/10.1515/9781400881970-018, 1953. a

Sheikholeslami, R., Gharari, S., Papalexiou, S. M., and Clark, M. P.: VISCOUS: A Variance-Based Sensitivity Analysis Using Copulas for Efficient Identification of Dominant Hydrological Processes, Water Resour. Res., 57, 1–24, https://doi.org/10.1029/2020WR028435, 2021. a

Stein, L., Clark, M. P., Knoben, W. J. M., Pianosi, F., and Woods, R. A.: How Do Climate and Catchment Attributes Influence Flood Generating Processes? A Large-Sample Study for 671 Catchments Across the Contiguous USA, Water Resour. Res., 57, e2020WR028300, https://doi.org/10.1029/2020WR028300, 2021. a

Sun, R., Pan, B., and Duan, Q.: A surrogate modeling method for distributed land surface hydrological models based on deep learning, J. Hydrol., 624, 129944, https://doi.org/10.1016/j.jhydrol.2023.129944, 2023. a

Tang, G., Wood, A. W., and Swenson, S.: On Using AI-Based Large-Sample Emulators for Land/Hydrology Model Calibration and Regionalization, Water Resour. Res., 61, e2024WR039525, https://doi.org/10.1029/2024WR039525, 2025. a

Vannucci, G., Siciliano, R., and Saltelli, A.: Global sensitivity analysis in random forests: unveiling generative variable importance, Stat. Method. Appl., 35, 285–317, https://doi.org/10.1007/s10260-026-00839-y, 2026. a

Wagener, T., Boyle, D. P., Lees, M. J., Wheater, H. S., Gupta, H. V., and Sorooshian, S.: A framework for development and application of hydrological models, Hydrol. Earth Syst. Sci., 5, 13–26, https://doi.org/10.5194/hess-5-13-2001, 2001. a

Wei, P., Lu, Z., and Song, J.: A comprehensive comparison of two variable importance analysis techniques in high dimensions: Application to an environmental multi-indicators system, Environ. Model. Softw., 70, 178–190, https://doi.org/10.1016/j.envsoft.2015.04.015, 2015. a, b

Yeste, P., García-Valdecasas Ojeda, M., Gámiz-Fortis, S. R., Castro-Díez, Y., and Esteban-Parra, M. J.: Integrated sensitivity analysis of a macroscale hydrologic model in the north of the Iberian Peninsula, J. Hydrol., 590, 125230, https://doi.org/10.1016/j.jhydrol.2020.125230, 2020. a

Yeste, P., Melsen, L. A., García-Valdecasas Ojeda, M., Gámiz-Fortis, S. R., Castro-Díez, Y., and Esteban-Parra, M. J.: A Pareto-Based Sensitivity Analysis and Multiobjective Calibration Approach for Integrating Streamflow and Evaporation Data, Water Resour. Res., 59, e2022WR033235, https://doi.org/10.1029/2022WR033235, 2023.  a

Yeste, P., García-Valdecasas Ojeda, M., Gámiz-Fortis, S. R., Castro-Díez, Y., Bronstert, A., and Esteban-Parra, M. J.: A large-sample modelling approach towards integrating streamflow and evaporation data for the Spanish catchments, Hydrol. Earth Syst. Sci., 28, 5331–5352, https://doi.org/10.5194/hess-28-5331-2024, 2024. a

Yeste, P., Melsen, L., Lyra Fialho Brêda, J. P., Tacoronte, N., Saltelli, A., Vannucci, G., Siciliano, R., and Bronstert, A.: Data and Code Supplement to “Technical note: Machine learning metamodelling for global sensitivity analysis”, Zenodo [data set], https://doi.org/10.5281/ZENODO.19222162, 2026. a

Zhang, Q., Zhang, K., Bárdossy, A., Li, Y., and Wu, N.: Improving representation of hydrological process heterogeneity in grid-Xin’anjiang model through a stepwise approach, J. Hydrol., 655, 132897, https://doi.org/10.1016/j.jhydrol.2025.132897, 2025. a

Zhu, R.,  , Donglin, Z., , and Kosorok, M. R.: Reinforcement Learning Trees, J. Am. Stat. Assoc., 110, 1770–1784, https://doi.org/10.1080/01621459.2015.1036994, 2015. a, b

Download
Editorial statement
This timely, meticulous and accessible technical note brings important insights to the hydrological community on the new opportunities for sensitivity analysis (SA) offered by explainable AI. It also addresses the issue of computational efficiency, which remains an important barrier to application of SA to complex models. By reconciling machine leaning techniques with classical SA, the paper is relevant to the broader environmental modelling, sensitivity analysis, and explainable AI communities.
Short summary
Understanding which factors most influence streamflow is key for accurate hydrologic modelling. This study shows that machine learning methods, like random forests and neural networks, can efficiently identify the most important model inputs, producing results similar to traditional sensitivity analysis but with far less computation. This approach helps scientists explore complex models faster and more reliably, improving insights into how catchments respond to changing conditions.
Share