Inferensys

Glossary

Sensitivity Analysis

Sensitivity analysis is the study of how the uncertainty in a model's output can be apportioned to different sources of uncertainty in its inputs.
ML engineer working on model compression and quantization, laptop showing performance benchmarks, technical workspace.
UNCERTAINTY DECOMPOSITION

What is Sensitivity Analysis?

Sensitivity analysis is the systematic study of how the uncertainty in a model's output can be apportioned to different sources of uncertainty in its inputs.

Sensitivity Analysis is the quantitative study of how the variation in a numerical model's output can be attributed to distinct variations in its inputs. It answers the critical question: which input factors—whether features, hyperparameters, or structural assumptions—drive the model's predictive volatility? Unlike feature attribution methods that explain a single prediction, sensitivity analysis operates globally across the entire input space to rank factors by their contribution to output variance.

In high-stakes machine learning, practitioners use global techniques like Sobol' indices and Morris screening to decompose output variance into first-order and interaction effects. This process distinguishes between epistemic uncertainty—reducible by gathering more data—and aleatoric uncertainty inherent in the system. For CTOs, this provides a rigorous audit trail, validating that a model's decisions are driven by domain-relevant signals rather than spurious correlations or noise.

DECOMPOSING OUTPUT VARIANCE

Key Characteristics of Sensitivity Analysis

Sensitivity analysis is the systematic investigation of how uncertainty in a model's output can be apportioned to different sources of uncertainty in its inputs. It moves beyond a single prediction to map the entire landscape of model behavior.

01

Local vs. Global Analysis

Sensitivity analysis operates on two distinct scales:

  • Local Sensitivity Analysis (LSA): Examines output variation around a single, specific nominal input point, typically using partial derivatives or gradients. It answers, 'How does a small perturbation at this exact point change the output?'
  • Global Sensitivity Analysis (GSA): Explores the entire input space, often using Monte Carlo methods, to apportion output variance across all inputs simultaneously. It answers, 'Which inputs drive output uncertainty across all plausible scenarios?' GSA is preferred for non-linear models where interactions between inputs are significant.
02

One-at-a-Time (OAT) Methods

The most intuitive but limited approach, where a single input factor is varied while all others are held constant at their baseline values.

  • Mechanism: A tornado plot is a common visualization, ranking inputs by the magnitude of output change they induce.
  • Critical Limitation: OAT methods fail to detect interaction effects between inputs. A model's sensitivity to factor A might depend entirely on the level of factor B, a relationship OAT completely misses.
  • Use Case: Suitable for a quick, preliminary screening of a linear or near-linear model, but insufficient for rigorous uncertainty quantification in complex systems.
03

Variance-Based Decomposition

A class of global methods that decomposes the total variance of the model output, V(Y), into contributions from individual inputs and their interactions.

  • First-Order Sensitivity Index (S_i): Measures the main effect of input X_i alone, calculated as V(E[Y|X_i]) / V(Y). A high S_i means fixing X_i would significantly reduce output variance.
  • Total-Effect Sensitivity Index (S_Ti): Measures the contribution of X_i including all its interactions with any other inputs. It is calculated as E[V(Y|X_{~i})] / V(Y).
  • Sobol' Indices: The standard method for computing these indices, requiring a specific sampling design. A large difference between S_Ti and S_i indicates strong interaction effects for that input.
04

Derivative-Based Sensitivity

For differentiable models like neural networks, sensitivity is directly computed from the gradient of the output with respect to the input.

  • Saliency Maps: In computer vision, the absolute value of the gradient for each pixel creates a saliency map, highlighting which pixels most influence the classification score.
  • Integrated Gradients: A more robust method that addresses gradient saturation. It computes the average gradient along a straight-line path from a baseline input (e.g., a black image) to the actual input, satisfying the completeness axiom where attributions sum to the output difference.
  • Limitation: These methods are inherently local and explain sensitivity around a single prediction, not global variance.
05

Elementary Effects Method (Morris)

A screening method designed for models with a large number of inputs or high computational cost, where full variance decomposition is infeasible.

  • Mechanism: It computes multiple elementary effects—the ratio of output change to input change—at randomly sampled points across the input space.
  • Output Metrics: The mean of the absolute elementary effects (μ*) estimates the overall importance of a factor, while the standard deviation (σ) detects non-linear effects and interactions with other inputs.
  • Classification: The Morris method classifies inputs into three groups: those with negligible effects, those with linear and additive effects, and those with non-linear or interaction effects, guiding further, more costly analysis.
06

Moment-Independent Methods

Unlike variance-based methods that summarize uncertainty with a single moment, these techniques analyze the entire output distribution.

  • Density-Based Sensitivity: Measures the shift in the output's probability density function when an input is fixed, often using the Kullback-Leibler divergence or a similar distance metric between the unconditional and conditional output distributions.
  • PAWN Method: A moment-independent approach that uses Cumulative Distribution Functions (CDFs) . It measures sensitivity by the distance between the unconditional output CDF and the CDFs conditioned on fixing an input at different values.
  • Advantage: These methods are more sensitive to changes in higher-order moments (skewness, tail behavior) that variance-based indices might miss, making them valuable for risk analysis where tail events are critical.
SENSITIVITY ANALYSIS

Frequently Asked Questions

Explore the core concepts behind sensitivity analysis, the foundational technique for decomposing model output uncertainty and understanding how variations in input data propagate through complex predictive systems.

Sensitivity analysis is the systematic study of how the uncertainty in a model's output can be apportioned to different sources of uncertainty in its inputs. It works by strategically varying input factors—whether features, parameters, or assumptions—and quantifying the resulting change in the prediction or performance metric. The core mechanism involves defining a model Y = f(X₁, X₂, ..., Xₖ), then computing sensitivity indices that rank inputs by their contribution to output variance. Local methods perturb a single input around a nominal point using partial derivatives, while global methods sample the entire input space to capture interaction effects. For enterprise CTOs, this provides an audit trail showing exactly which data signals drive critical automated decisions, distinguishing between genuine data noise and fundamental model ignorance in high-stakes deployments.

SCOPE OF ANALYSIS

Local vs. Global Sensitivity Analysis

Comparison of local and global approaches to sensitivity analysis based on their scope, computational cost, and the type of insight they provide into model behavior.

FeatureLocal Sensitivity AnalysisGlobal Sensitivity Analysis

Scope of Exploration

Single point in input space

Entire input distribution

Primary Question Answered

Which inputs drive this specific prediction?

Which inputs drive model behavior overall?

Typical Method

Gradient-based (e.g., Saliency Maps)

Variance-based (e.g., Sobol Indices)

Computational Cost

Low (single or few forward/backward passes)

High (requires thousands of model evaluations)

Captures Input Interactions

Suitable for Non-Linear Models

Output Format

Vector of partial derivatives

First-order and total-order sensitivity indices

Dependence on Nominal Value

High (results change with input point)

Low (results summarize average behavior)

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.