Methods
gsax implements ten methods for global sensitivity analysis (GSA). All of them answer the same broad question — which input parameters actually drive my model's output? — but they differ in what exactly they measure, how many model evaluations they cost, and whether they need a dedicated sampling design or can work with data you already have.
If you're new to the package, start with Choosing a Method, then jump to the section for the method you picked. Each method section opens with what it measures and when you'd choose it, followed by the estimator details.
Throughout this page,
Choosing a Method
Three questions narrow the field quickly.
1. Can you still choose where to run the model? Four methods need their own sampling design, which gsax generates for you: Sobol' (Saltelli matrices), eFAST (search curves), Morris (trajectories), and DGSM (plain Monte Carlo plus autodiff). The other six — HDMR, PCE, Shapley effects, HSIC, PAWN, and Borgonovo delta — are given-data methods: they accept any set of
2. What should the number mean? Variance-based methods (Sobol', HDMR, PCE, eFAST, Shapley) report fractions of output variance — "parameter 3 explains 40% of the output's spread". Screening methods (Morris, DGSM) trade that precision for cheap, reliable rankings. Moment-independent methods (HSIC, PAWN, Borgonovo delta) measure how strongly an input affects the whole output distribution — the right lens when your output is skewed or heavy-tailed and variance feels like the wrong summary.
3. What's your evaluation budget? Sobol' needs
Common situations:
- "I can run the model freely and want the standard variance decomposition." Use Sobol' via Saltelli sampling — the reference method, with first-order, total-order, and second-order indices.
- "My model is expensive and has many parameters." Screen first with Morris (
runs), or with DGSM if the model is JAX-differentiable. Fix the negligible parameters, then spend the remaining budget on Sobol' for the survivors. - "I only have existing simulation data." Any given-data method works. HDMR or PCE for variance-based indices via a surrogate; HSIC, PAWN, or Borgonovo delta for distribution-based indices.
- "My inputs are correlated." Sobol', PCE, eFAST, DGSM, Morris, and Shapley all assume independent inputs. Use HDMR (which separates structural from correlation-induced variance), or HSIC / PAWN / Borgonovo delta (which make no independence assumption).
- "My output distribution is skewed or heavy-tailed." Use PAWN or Borgonovo delta — both compare whole output distributions rather than variances.
- "I want one fair importance number per parameter that sums to 1." Use Shapley effects.
- "I also want a fast emulator of my model." Use HDMR (
emulate_hdmr) or PCE (emulate_pce).
Comparison table
| Consideration | Sobol' | HDMR | PCE | Shapley | eFAST | DGSM | Morris | HSIC | PAWN | Borgonovo delta |
|---|---|---|---|---|---|---|---|---|---|---|
| Sampling requirement | Structured Saltelli design, | Any | Any | Any | Search curves, | Plain MC, | Trajectory or radial design, | Any | Any | Any |
| Input independence | Assumed | Handled via ANCOVA decomposition | Assumed | Assumed (dependent-input Shapley is future work) | Assumed | Assumed | Assumed | Not assumed | Not assumed | Not assumed |
| Input distributions | Uniform + Gaussian | Uniform + Gaussian (via CDF mapping) | Uniform + Gaussian | Uniform + Gaussian (both backends) | Uniform + Gaussian | Uniform + Gaussian (+ truncated Normal) | Uniform + Gaussian (truncated-quantile grid) | Uniform + Gaussian (via CDF mapping) | Uniform + Gaussian (via CDF mapping) | Any (rank-based classes; marginals not used) |
| Output shapes | Scalar, multi-output, time-series | Scalar, multi-output, time-series | Scalar, multi-output, time-series | Scalar, multi-output, time-series (both backends) | Scalar, multi-output, time-series | Scalar, multi-output, time-series | Scalar, multi-output, time-series | Scalar, multi-output, time-series | Scalar, multi-output, time-series | Scalar, multi-output, time-series |
| What the numbers mean | Exact variance fractions (given enough samples) | Variance fractions from a B-spline surrogate (fit-dependent) | Variance fractions from a polynomial surrogate (fit-dependent) | Exact allocation within the fitted surrogate; depends on fit quality | Exact variance fractions (given enough samples) | Bounds on | Screening ranks ( | Dependence measure, not variance fractions | Distributional (KS) distance, not variance fractions | Distributional (L1) distance, not variance fractions |
| Second-order indices | Direct estimation from cross-matrices | From interaction component functions | Analytical from coefficients | Not available (interaction variance folded into | Not available | Not available | Not available | Not available | Not available | Not available |
| Interaction detection | Via | Via explicit interaction component functions | Via | Via the gaps | Via the gap | Not available (bounds only) | Via large | Via the Total HSIC − R2-HSIC gap | Not available (first-order only) | Not available (the |
| Surrogate/emulator | No | Yes (emulate_hdmr) | Yes (emulate_pce) | Fits HDMR or PCE internally (no emulator returned) | No | No | No | No | No | No |
Background: Variance-Based Sensitivity Analysis
Why Global Sensitivity Analysis?
Unlike local sensitivity methods (e.g. partial derivatives at a nominal point), global sensitivity analysis explores the entire parameter space. This matters for non-linear models, where interactions and non-monotonic responses mean a gradient at one point can be misleading. GSA quantifies each parameter's contribution to output uncertainty across the whole input domain.
In practice, GSA serves several roles:
- Parameter identifiability: parameters with near-zero sensitivity across all outputs are effectively unidentifiable from data and may need to be fixed rather than estimated; high-sensitivity parameters are the ones data can constrain.
- Experimental design: for time-series outputs, watching sensitivity indices evolve over time helps pick measurement times when outputs are most informative about the parameters of interest.
- Model simplification: if interaction indices are negligible, the model response is approximately additive, and simpler surrogate models may suffice.
The Hoeffding–Sobol' Decomposition
The theoretical foundation of variance-based GSA is the Hoeffding (ANOVA) decomposition. Any square-integrable function
where
where
Sobol' Sensitivity Indices
Dividing each variance component by
First-order index
Second-order index
Total-order index
where
Sobol' Indices via Saltelli Sampling
This is the reference method and gsax's default workflow: exact, model-free variance decomposition with well-understood convergence. Pick it when you can afford a dedicated sampling design and your inputs are independent. gsax uses the Saltelli sampling scheme (Saltelli 2002, 2010), which arranges quasi-random sample matrices so that first-order (
The Pick-Freeze Sampling Scheme
The method generates two independent scipy.stats.qmc.Sobol). For each parameter
The cost is calc_second_order=True, the default).
Estimators
gsax implements the following estimators:
First-order — Saltelli (2010):
Total-order — Jansen (1999):
Variance normalisation: all estimators normalise by a pooled output variance computed over the concatenation of
How to use it
gsax.sample()generates the Sobol' quasi-random sequence and builds the Saltelli cross-matrices. Duplicate rows are removed so your model only evaluates unique input points.- You evaluate your model on
sampling_result.samples. gsax.analyze()reconstructs the Saltelli layout internally and computes all indices in a singlejit(vmap(...))pass.
Two optional knobs align results with SALib. gsax.analyze(..., prenormalize=True) applies SALib-style output standardization once per output slice before computing the estimators, which changes the point-estimate path to match SALib more closely. When bootstrapping (num_resamples > 0), ci_method="quantile" reports percentile bootstrap bounds and ci_method="gaussian" reports symmetric bounds from the bootstrap standard deviation; either way, gsax returns explicit lower/upper endpoint arrays rather than SALib's symmetric confidence widths.
Index summary
| Index | Meaning |
|---|---|
| Fraction of output variance due to parameter | |
| Fraction of output variance due to parameter | |
| Fraction of output variance due to the pairwise interaction between |
When to use Sobol': you can afford the structured Saltelli design —
RS-HDMR (Random Sampling High-Dimensional Model Representation)
RS-HDMR is a given-data, variance-based method: it fits a B-spline surrogate to any set of
Theoretical Background
High-Dimensional Model Representation (HDMR) exploits the observation that, for many practical problems, only the low-order interactions among input variables significantly influence the output. The RS-HDMR variant constructs component functions from randomly sampled input–output data, rather than requiring structured grids. The model is decomposed as:
where each component function is expanded in a B-spline basis and fitted via backfitting with Tikhonov regularisation.
ANCOVA Decomposition
Unlike the classical Sobol' decomposition, which assumes independent inputs, RS-HDMR uses an ANCOVA (analysis of covariance) decomposition that separates each component's variance into:
- Structural variance (
): the contribution that would remain if all inputs were independent — analogous to the classical Sobol' index. - Correlative variance (
): the additional contribution arising from correlations between inputs.
This distinction matters because many real-world models have correlated inputs (e.g. coupled physical parameters), and conflating structural and correlative contributions can produce misleading sensitivity rankings.
How to use it
- You provide any set of
pairs — no sampling design required. gsax.analyze_hdmr()maps inputs tovia their marginal CDFs, optionally standardises outputs once over the sample axis ( prenormalize=True), builds B-spline basis matrices, and fits component functions via backfitting with Tikhonov regularisation.- The ANCOVA decomposition splits each component's variance into structural (
) and correlative ( ) parts. Total-order indices ( ) sum contributions from all terms involving a given parameter.
When prenormalization is enabled, the surrogate is trained on standardized outputs, but gsax.hdmr.emulate() (or the top-level alias gsax.emulate_hdmr()) maps predictions back to the original output scale before returning them.
Index summary
| Index | Meaning |
|---|---|
| Structural (uncorrelated) variance contribution of term | |
| Correlative variance contribution of term | |
| Total contribution per term: | |
| Total-order per parameter: sum of |
When to use HDMR:
- Model evaluations are expensive and you want to reuse existing runs
- Inputs may be correlated (Sobol' assumes independent inputs)
- You need a surrogate/emulator for fast prediction at new inputs (
gsax.hdmr.emulate)
PCE (Polynomial Chaos Expansion)
PCE is the second given-data, surrogate-based route to Sobol indices: it fits an orthogonal polynomial surrogate to
How to use it
- You provide any set of
pairs; Ymay be scalar(N,), multi-output(N, K), or time-series(N, T, K)— all output slices share one polynomial basis and are fitted in a single solve. gsax.analyze_pce()maps inputs to the appropriate reference domain, builds the design matrix from a total-degree multi-index, and fits coefficients via regularized least squares.- Sobol indices (
, , ) are computed analytically from the squared coefficients. - Leave-one-out cross-validation RMSE quantifies surrogate accuracy.
When to use PCE:
- You want analytical Sobol indices without Monte Carlo sampling noise
- Your model is smooth enough to be well-approximated by low-order polynomials
- You have mixed uniform and Gaussian inputs (the Wiener-Askey scheme selects the appropriate basis automatically)
- You need a fast emulator (
emulate_pcemirrors the training output layout)
Shapley Effects
The Shapley effect
Theoretical Background
For independent inputs, the Hoeffding–Sobol' decomposition splits the output variance into partial variances
so a main-effect variance
- Bracketing:
— the Shapley effect always lies between the first-order and total-order Sobol indices. - Exact partition: unlike
(which omits interactions, so ) and (which counts each interaction once per participant, so ), Shapley effects split every interaction fairly and sum to exactly 1 with no gaps or double counting.
Independence assumption (v1 limitation): gsax currently assumes independent inputs. The Shapley value is particularly attractive for dependent inputs — where Sobol indices lose their clean interpretation — but the dependent-input formulation requires conditional-variance estimation and is future work. Do not rely on the indices when inputs are strongly correlated.
How gsax computes them
gsax computes Shapley effects analytically from a fitted surrogate's variance decomposition — no permutation Monte Carlo, no conditional-variance sampling, and no external shap dependency:
backend="pce"(default) fits a polynomial chaos expansion and groups the squared orthonormal coefficients by the support of their multi-index (Sudret, 2008) — exact within the fitted polynomial.backend="hdmr"fits the RS-HDMR B-spline surrogate and uses the structural () variances of its component functions as the partial variances , truncated at maxorder.
Both backends accept scalar (N,), multi-output (N, K), and time-series (N, T, K) Y.
Normalization is by the surrogate's total decomposed variance backend="pce" they match analyze_pce exactly, while for backend="hdmr" they differ from analyze_hdmr (which normalizes by explained_variance.
How much of the output variance the surrogate actually captured is reported separately in the explained_variance field, UserWarning is emitted when it strays far from 1. Interactions above maxorder (HDMR) or the polynomial order (PCE) are absent from the allocation.
How to use it
- You provide any set of
pairs — no sampling design required. gsax.analyze_shapley()fits the selected surrogate backend ("pce"or"hdmr"), extracts its variance decomposition, and allocates each partial variance equally among the parameters in its interaction set.- The result carries
ShalongsideS1andSTcomputed from the same surrogate, so the three indices are directly comparable and the orderingis visible at a glance.
import jax.numpy as jnp
import gsax
from gsax.benchmarks.ishigami import PROBLEM, evaluate
X = gsax.sample_mc(PROBLEM, N=2000, seed=42)
Y = evaluate(jnp.asarray(X))
# PCE backend (default) — exact within the fitted polynomial
result = gsax.analyze_shapley(PROBLEM, jnp.asarray(X), Y)
print("Sh:", result.Sh) # (D,) Shapley effects
print("sum:", result.Sh.sum()) # == 1 (Shapley efficiency property)
print("explained:", result.explained_variance) # sum_u V_u / Var(Y) — fit quality
print("order:", result.order) # effective surrogate order used
print("S1:", result.S1) # first-order, same surrogate
print("ST:", result.ST) # total-order, same surrogate
# HDMR backend — B-spline surrogate; HDMR-only knobs
result_hdmr = gsax.analyze_shapley(PROBLEM, jnp.asarray(X), Y, backend="hdmr", maxorder=2)Backend-specific keyword arguments are validated: explicitly setting a knob that belongs to the non-selected backend (e.g. backend="pce" with maxorder=3) raises ValueError.
Index summary
| Index | Meaning |
|---|---|
| Shapley effect: parameter | |
| First-order index from the same surrogate (main effect only). | |
| Total-order index from the same surrogate (main effect plus all interactions counted in full). | |
explained_variance | Fraction of |
When to use Shapley effects:
- You want a single, fairly allocated importance score per parameter that sums to exactly 1 (e.g. for ranking, reporting, or budget allocation)
- Interactions matter and you want them attributed to their participants rather than omitted (
) or double-counted ( ) - You have existing
pairs and want analytical indices without permutation Monte Carlo noise - Your inputs are independent (required in this version)
References
- Owen, A.B. (2014). Sobol' indices and Shapley value. SIAM/ASA Journal on Uncertainty Quantification, 2(1), 245-251.
- Song, E., Nelson, B.L. & Staum, J. (2016). Shapley effects for global sensitivity analysis: Theory and computation. SIAM/ASA Journal on Uncertainty Quantification, 4(1), 1060-1083.
- Sudret, B. (2008). Global sensitivity analysis using polynomial chaos expansions. Reliability Engineering & System Safety, 93(7), 964-979.
eFAST (Extended Fourier Amplitude Sensitivity Test)
eFAST computes the same first-order and total-order Sobol indices as the Saltelli workflow, but through a frequency-based decomposition with a simpler sampling design of
How it works
For each parameter
The Fourier power spectrum of the output along each curve is then decomposed:
First-order index — the fraction of total variance captured by harmonics of
where
Total-order index — the complement of the low-frequency (non-focal) variance:
The low-frequency content at or below
How to use it
gsax.sample_efast()(orefast.sample()) generates search-curve samples with shape(N * D, D), where each contiguous block ofrows corresponds to one parameter's search curve. - You evaluate your model on all
N * Drows. gsax.analyze_efast()(orefast.analyze()) splits the output by curve, computes the Fourier spectrum for each, and extractsand indices.
Index summary
| Index | Meaning |
|---|---|
| Fraction of output variance from the focal parameter's harmonics (main effect). | |
| Total effect including interactions, computed as |
eFAST does not produce second-order (
When to use eFAST:
- You only need
and (no required) - You want a simpler sampling design without the Saltelli cross-matrix structure
- You are screening a large number of parameters
- The total cost is
evaluations, which can be lower than Saltelli's (first/total only) or (with second-order, the default) when is chosen smaller than the Saltelli base count
Reference
Saltelli, A., Tarantola, S. & Chan, K.P.-S. (1999). A quantitative model-independent method for global sensitivity analysis of model output. Technometrics, 41(1), 39-56.
DGSM (Derivative-based Global Sensitivity Measures)
DGSM is the cheapest quantitative method when your model is JAX-differentiable: it uses exact gradients from automatic differentiation to compute bounds on the total Sobol index
The DGSM Moments
For a model
Mean squared derivative (importance measure):
Mean derivative:
These moments are estimated from jax.jacrev (reverse-mode autodiff), the cost of computing the full Jacobian for all
Bounds on the Total Sobol Index
DGSM does not compute Sobol indices directly. Instead, it provides an upper bound and a lower bound on the total-order index
Poincaré upper bound (Sobol' & Kucherenko, 2009):
where
Kucherenko–Song lower bound (Kucherenko & Song, 2016):
When the upper and lower bounds are close, DGSM gives a tight bracket on
Poincaré Constants by Distribution
The Poincaré constant depends on the marginal distribution of each input:
| Distribution | Poincaré Constant |
|---|---|
| Uniform | |
| Gaussian | |
| Truncated Normal | Spectral solve (P1 finite-element Neumann eigenproblem) |
For truncated normal inputs, the constant is computed numerically by solving a weighted eigenproblem on a finite-element grid. gsax handles this automatically when the input spec declares truncation bounds.
How to use it
gsax.sample_mc()generates plain Monte Carlo samples from the declared input distributions.- You pass your JAX-differentiable function and the samples to
gsax.analyze_dgsm(). - Internally,
jax.jacrevcomputes the Jacobian via reverse-mode autodiff, and the DGSM moments and bounds are derived. - The returned
DGSMResultcontainsnu,sigma,upper_bound,lower_bound, andvar_y.
Alternatively, if the Jacobian has been computed externally (e.g. for non-JAX models), you can pass pre-computed Y and dfdx arrays directly.
Index summary
| Field | Meaning |
|---|---|
| Mean squared derivative: | |
| Mean derivative: | |
| Upper bound | Poincaré bound: |
| Lower bound | Kucherenko–Song bound: |
When to use DGSM:
- You have a JAX-differentiable model and want fast screening without the cost of Saltelli or eFAST sampling
- You want bounds on
rather than exact indices - You are screening a large number of parameters where autodiff is cheaper than structured designs
- You want a quick sanity check before running a full Sobol analysis
References
- Sobol', I.M. & Kucherenko, S. (2009). Derivative based global sensitivity measures and their link with global sensitivity indices. Mathematics and Computers in Simulation, 79(10), 3009-3017.
- Kucherenko, S. & Song, S. (2016). Derivative-based global sensitivity measures and their link with Sobol' sensitivity indices. Reliability Engineering & System Safety, 148, 81-95.
- Lamboni, M., Iooss, B., Popelin, A.-L. & Gamboa, F. (2013). Derivative-based global sensitivity measures: General links with Sobol' indices and numerical tests. Mathematics and Computers in Simulation, 87, 44-54.
Morris (Elementary Effects Screening)
Morris is a global screening method: with only
How it works
The design consists of
where
- Trajectory design (Morris 1991, default): each trajectory is a random walk on a
-level grid ( num_levels, default 4) with the canonical step, visiting inputs in a random order. - Radial design (Campolongo et al. 2011,
method="radial"): star designs around scrambled-Sobol' base points, where each elementary effect compares a one-coordinate swap against the shared base point with a per-step.
Both uniform and Gaussian marginals are supported. The design includes the unit-cube boundaries, which an unbounded inverse CDF would map to infinity, so each Gaussian coordinate is confined to truncation_quantile, default
The
— the mean elementary effect. Sign cancellation can mask non-monotonic influence, which is why alone is unreliable. — the mean absolute elementary effect (Campolongo et al. 2007). This is the headline importance measure — read it as "how strongly does the output respond, on average, when this input moves?" — and a good proxy for the total-order index ranking. — the standard deviation of the elementary effects (ddof=1). A large relative to means the effect of input changes across the domain, indicating nonlinearity or interactions with other inputs.
The canonical output is the
Morris is closely related to DGSM: as
How to use it
gsax.sample_morris()builds the trajectories, removes exact duplicate rows (grid designs collide often in low dimensions, so this saves real model evaluations, just like Saltelli sampling), and returns only the unique rows.- You evaluate your model on
sampling_result.samples. gsax.analyze_morris()reconstructs the expanded design internally, drops trajectories containing non-finite values with a warning, and reduces one elementary effect per trajectory and parameter to, , and . Pass num_resamples > 0(with a JAX PRNGkey) for bootstrap confidence intervals over trajectories.
Elementary effects are computed in unit-cube coordinates, so MorrisResult.to_physical_units() rescales to derivative-scale values in the problem's native units (uniform-marginal problems only — for Gaussian marginals the inverse-CDF transform is nonlinear, so the measures stay in grid coordinates). MorrisSamplingResult.downsample() prefix-slices to fewer trajectories without re-simulation, mirroring SamplingResult.downsample().
Compared to SALib's Morris implementation, gsax adds unique-row deduplication, vectorized multi-output and time-series analysis (SALib's Morris is scalar-only), bootstrap confidence intervals, the radial design, and prefix-nested downsampling.
Index summary
| Measure | Meaning |
|---|---|
| Mean elementary effect. Sign cancellation can hide non-monotonic influence. | |
| Mean absolute elementary effect. Headline importance measure; proxy for the | |
| Standard deviation of the elementary effects. Large |
When to use Morris:
- You want a cheap screening pass before committing to a full Sobol' run
- Your model is a black box (not JAX-differentiable — otherwise consider DGSM)
- You have many parameters and a tight evaluation budget — the cost is
with typically 10-50 - You only need a ranking and an interaction flag, not exact variance fractions
References
- Morris, M.D. (1991). Factorial sampling plans for preliminary computational experiments. Technometrics, 33(2), 161-174.
- Campolongo, F., Cariboni, J. & Saltelli, A. (2007). An effective screening design for sensitivity analysis of large models. Environmental Modelling & Software, 22(10), 1509-1518.
- Campolongo, F., Cariboni, J. & Saltelli, A. (2011). From screening to quantitative sensitivity analysis. A unified approach. Computer Physics Communications, 182(4), 978-988.
- Saltelli, A. et al. (2008). Global Sensitivity Analysis: The Primer, ch. 3. Wiley.
HSIC (Hilbert–Schmidt Independence Criterion)
HSIC measures the statistical dependence between each input and the output — any dependence, including nonlinear, non-monotone, and heteroscedastic effects that variance-based indices can underweight. Pick it when you suspect your model's behaviour isn't well summarised by variance, when your inputs may be correlated, or when you want statistical significance tests attached to the indices. It works in a reproducing kernel Hilbert space (RKHS), mapping inputs and outputs through Gaussian RBF kernels. Like HDMR, it is a given-data method: any set of
The HSIC Dependence Measure
Each input
where
First-Order and Total Indices
gsax reports two normalised indices per parameter.
R2-HSIC (first-order) — the normalised dependence between input
Total HSIC — the analogue of a total-order index, capturing dependence carried through interactions with the other inputs. It is built from augmented product kernels
Unlike Sobol indices, R2-HSIC values are individual dependence measures and do not sum to 1.
Permutation p-values
Because HSIC is a dependence measure rather than a variance fraction, gsax attaches a permutation test to each first-order index: the output labels are randomly shuffled n_perms times to build a null distribution of HSIC values, and the p-value uses the Phipson–Smyth correction n_perms) and
How to use it
gsax.sample_mc()generates plain Monte Carlo samples — any sampling strategy works, since no structured design is required.- You evaluate your model on the samples.
gsax.analyze_hsic()transforms each input tovia its marginal CDF, builds the kernel matrices with the median heuristic, and computes all indices and p-values in a single JIT-compiled pass.
HSIC is chunk_size to build them in row blocks and limit peak memory. For outputs of large magnitude, set prenormalize=True to standardise
Index summary
| Index | Meaning |
|---|---|
| Normalised first-order kernel dependence between input | |
| Total HSIC | Total dependence of input |
| p-value | Permutation p-value for the first-order dependence (Phipson–Smyth corrected). |
When to use HSIC:
- You want a measure that captures any dependence — nonlinear, non-monotone, or heteroscedastic — not just variance contributions
- Your inputs may be correlated (HSIC makes no independence assumption)
- You have existing
pairs and want indices without additional model runs - You want statistical significance testing via permutation p-values
References
- Gretton, A., Herbrich, R., Smola, A., Bousquet, O. & Schölkopf, B. (2005). Kernel methods for measuring independence. Journal of Machine Learning Research, 6, 2075-2129.
- Da Veiga, S. (2015). Global sensitivity analysis with dependence measures. Reliability Engineering & System Safety, 142, 346-362.
- Larsen and Alexanderian (2026). Total HSIC sensitivity indices via augmented product kernels. arXiv preprint arXiv:2603.00849.
PAWN (CDF-Based Sensitivity)
PAWN asks a different question from the variance-based methods: not "how much variance does this input explain?" but "how much does the entire output distribution shift when this input is held fixed?". Pick it when you care about tails, skewness, or other distributional features that variance misses. It compares the unconditional output CDF against conditional CDFs obtained by fixing each input within a bin, using the Kolmogorov–Smirnov (KS) distance as the measure of separation (Pianosi & Wagener, 2015). Like HSIC and HDMR, it is a given-data method: any
The KS Distance
For parameter n_bins equal-width bins. Within each bin
A large KS value in a bin means fixing
Aggregating Across Bins
Each parameter yields one KS value per bin. The PAWN index reduces these to a single number per input using one of three statistics:
- median (default) — robust to a single anomalous bin.
- max — the worst-case shift across the input range.
- mean — the average shift.
Because it is built on CDFs rather than moments, the PAWN index is moment-independent and invariant under monotone transformations of the output — it captures tail and skewness changes that variance-based indices miss.
How to use it
gsax.sample_mc()generates plain Monte Carlo samples (Monte Carlo, Latin Hypercube, or Sobol sequences all work — no structured design required).- You evaluate your model on the samples.
gsax.analyze_pawn()maps each input to, assigns samples to bins, and computes the per-bin KS distances and their aggregate in a single JIT-compiled pass. Pass n_bootstrap > 0for bootstrap confidence intervals.
The number of bins (n_bins, default 10) trades conditioning resolution against sample density per bin; with very few samples per bin the KS statistic becomes noisy, so increase n_bins.
Index summary
| Index | Meaning |
|---|---|
| PAWN | Aggregated (median / max / mean) KS distance between the unconditional and conditional output CDFs for input |
When to use PAWN:
- You care about distributional changes beyond variance, such as tail behaviour or skewness shifts
- You want a moment-independent index, invariant under monotone output transforms
- You have existing
pairs from any sampling strategy - Your inputs may be correlated (no independence assumption or structured design)
Reference
Pianosi, F. & Wagener, T. (2015). A simple and efficient method for global sensitivity analysis based on cumulative distribution functions. Environmental Modelling & Software, 67, 1-11.
Borgonovo Delta (Density-Based Sensitivity)
Borgonovo's SALib.analyze.delta:
The index is
How it works
gsax implements the given-data estimator of Plischke, Borgonovo & Smith (2013):
- For each input, the samples are ordered by that input's rank and split into
equal-frequency classes. By default follows the Plischke sample-size heuristic (roughly , at most 48 classes); override it with n_classes. - The unconditional density
and each class-conditional density are estimated by Gaussian KDE with Silverman bandwidths on a fixed grid of grid_sizepoints spanning. - The L1 distances are integrated with the trapezoid rule and averaged with class weights, giving the plug-in estimate
The plug-in estimate is biased upward at finite n_bootstrap resamples, with percentile confidence intervals from the same replicates. Because this correction subtracts a bootstrap mean from twice the plug-in estimate, the reported
The same class partition also yields the given-data first-order Sobol index (variance of the class means over the total variance) at negligible extra cost, so every analysis returns both
The estimator matches SALib.analyze.delta (same equal-frequency rank partition, class-count heuristic, Silverman KDE factors, and 100-point output grid) with three differences: the central estimate is computed on the original sample — deterministic given the data, where SALib evaluates it on a random resample; a constant output column yields LinAlgError.
How to use it
gsax.sample_mc()generates plain Monte Carlo samples (any sampling strategy works — no structured design is required).- You evaluate your model on the samples.
gsax.analyze_borgonovo()partitions each input into rank classes and computes, , and their bootstrap intervals in a single JIT-compiled kernel, vmapped over output columns and scanned over bootstrap replicates.
Set n_bootstrap=0 to skip bias correction and confidence intervals (raw plug-in estimate), or bias_correct=False to keep the intervals but report the uncorrected estimate. For large time-series outputs, lower chunk_size to bound peak memory, which scales with chunk_size * D * N * grid_size.
Index summary
| Index | Meaning |
|---|---|
| Expected L1 distance between the unconditional and conditional output densities for input | |
| Given-data first-order Sobol index from the same class partition — the variance-based view of the same conditioning, for comparison at no extra cost. |
When to use Borgonovo delta:
- You care about influence on the whole output distribution — tails, skewness, multimodality — not just variance
- You want a moment-independent index with a fixed
scale, invariant under monotone output transforms - You have existing
pairs from any sampling strategy, possibly with correlated inputs - You use
SALib.analyze.deltaand want a deterministic, JIT-compiled equivalent that also handles multi-output and time-seriesY
Reference
- Borgonovo, E. (2007). A new uncertainty importance measure. Reliability Engineering & System Safety, 92(6), 771-784.
- Plischke, E., Borgonovo, E. & Smith, C.L. (2013). Global sensitivity measures from given data. European Journal of Operational Research, 226(3), 536-550.
Output Shapes
All ten methods share the same output contract: scalar, multi-output, and time-series outputs. The shape of Y determines the shape of all returned index arrays (read S1 / ST as the method's per-parameter measures — mu / mu_star / sigma for Morris, nu / sigma and the bounds for DGSM; only Sobol and PCE produce S2):
| Y shape | S1 / ST shape | S2 shape |
|---|---|---|
(N,) | (D,) | (D, D) |
(N, K) | (K, D) | (K, D, D) |
(N, T, K) | (T, K, D) | (T, K, D, D) |
D is always the last axis. Confidence interval arrays (when using bootstrap) prepend a leading dimension of 2 for [lower, upper].
How a 2-D Y is read depends on problem.output_names. Without it, a 2-D Y is always (N, K) — multiple outputs, no time dimension. With exactly one entry in output_names and more than one column, a 2-D (N, M) Y is read as M timepoints of that single labeled output and flows through as (N, M, 1), keeping the labeled output axis in results; a lone column (N, 1) stays a scalar output (N, K=1) (pass (N, 1, 1) explicitly for a genuine 1-timepoint series). With several entries, the column count must equal len(output_names). A 1-D (N,) Y is one output regardless of how many names are declared.
You need not pass exactly the canonical layout: every public entry point resolves Y through the same inference ladder. Exact canonical shapes pass silently; unambiguously recoverable layouts — a transposed (K, N) array, or a 3-D (N, K, T) array whose middle axis matches len(output_names) — are fixed with a UserWarning naming the transformation; ambiguous layouts raise. gsax never guesses.
Time-series outputs are particularly useful for dynamic models, where the evolution of sensitivity indices over time can reveal which parameters dominate at different stages of a process — for example, a parameter that is highly influential early in a batch but negligible later.
Data Cleaning
gsax.analyze() automatically drops sample groups that contain non-finite values (NaN, Inf). The Saltelli layout requires groups of rows to stay together, so if any row in a group is non-finite, the entire group is removed. A message is printed when this happens. The nan_counts field on the result reports how many NaN values remain in the computed indices.
References
- Sobol', I.M. (2001). Global sensitivity indices for nonlinear mathematical models and their Monte Carlo estimates. Mathematics and Computers in Simulation, 55(1-3), 271-280.
- Saltelli, A. (2002). Making best use of model evaluations to compute sensitivity indices. Computer Physics Communications, 145(2), 280-297.
- Saltelli, A., Annoni, P., Azzini, I., Campolongo, F., Ratto, M., & Tarantola, S. (2010). Variance based sensitivity analysis of model output. Computer Physics Communications, 181(2), 259-270.
- Jansen, M.J.W. (1999). Analysis of variance designs for model output. Computer Physics Communications, 117(1-2), 35-43.
- Li, G., Rabitz, H., Yelvington, P.E., Oluwole, O.O., Bacon, F., Kolb, C.E., & Schoendorf, J. (2010). Global sensitivity analysis for systems with independent and/or correlated inputs. Journal of Physical Chemistry A, 114(19), 6022-6032.
- Rabitz, H. & Alis, O. (1999). General foundations of high-dimensional model representations. Journal of Mathematical Chemistry, 25(2-3), 197-233.
- Sudret, B. (2008). Global sensitivity analysis using polynomial chaos expansions. Reliability Engineering & System Safety, 93(7), 964-979.
- Owen, A.B. (2014). Sobol' indices and Shapley value. SIAM/ASA Journal on Uncertainty Quantification, 2(1), 245-251.
- Song, E., Nelson, B.L. & Staum, J. (2016). Shapley effects for global sensitivity analysis: Theory and computation. SIAM/ASA Journal on Uncertainty Quantification, 4(1), 1060-1083.
- Saltelli, A., Tarantola, S. & Chan, K.P.-S. (1999). A quantitative model-independent method for global sensitivity analysis of model output. Technometrics, 41(1), 39-56.