Inferensys

Glossary

Sensitivity Analysis

The study of how the uncertainty in the output of a genomic model can be apportioned to different sources of uncertainty in its nucleotide inputs.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
DEFINITION

What is Sensitivity Analysis?

Sensitivity analysis is the study of how uncertainty in a model's output can be apportioned to different sources of uncertainty in its inputs, quantifying the relationship between perturbations and predictions.

In genomic deep learning, sensitivity analysis quantifies how variations in nucleotide input sequences—such as single-nucleotide polymorphisms or indels—propagate through a neural network to affect output predictions like gene expression or binding affinity. It provides a mathematical framework for understanding model robustness by systematically perturbing inputs and measuring the magnitude of change in the output, distinguishing it from feature attribution methods that assign static importance scores.

Techniques range from local methods like Jacobian-based sensitivity, which computes the partial derivative of the output with respect to each input token, to global methods like variance-based Sobol indices that decompose output variance across all possible combinations of input features. In regulatory genomics, this analysis is critical for identifying which sequence positions a model is most fragile to, directly informing variant effect prediction and the engineering of robust genomic foundation models.

PERTURBATION-BASED INTERPRETABILITY

Key Characteristics of Sensitivity Analysis

Sensitivity analysis quantifies how variations in nucleotide inputs propagate through a genomic model to influence its predictions, providing a foundational measure of feature importance and model robustness.

01

Local vs. Global Sensitivity

Sensitivity analysis operates at two distinct scopes:

  • Local Sensitivity: Measures the impact of infinitesimal perturbations around a single specific input sequence, often computed via the partial derivative of the output with respect to each input nucleotide.
  • Global Sensitivity: Assesses the impact of input variability across the entire domain of possible sequences, identifying factors that dominate model behavior irrespective of the specific input. This distinction is critical for determining whether an explanation is valid for a single patient's variant or a general biological mechanism.
02

One-at-a-Time (OAT) Perturbation

The foundational method for sensitivity analysis involves systematically perturbing one input feature while holding all others constant.

  • In genomic models, this translates to performing in-silico mutagenesis (ISM) by computationally substituting a single nucleotide at each position and recording the change in the model's prediction score.
  • The resulting delta score quantifies the sensitivity of the output to that specific base pair. While computationally straightforward, OAT methods fail to capture epistatic interactions where the effect of one mutation depends on the state of another.
03

Variance-Based Decomposition

Global sensitivity is often quantified using variance-based methods, such as Sobol' indices, which decompose the total variance of the model output into fractions attributable to individual inputs and their higher-order interactions.

  • First-order index: Measures the direct contribution of a single nucleotide position to output variance.
  • Total-effect index: Measures the total contribution, including all interactions with other positions. This provides a rigorous statistical framework for identifying which genomic regions most control the model's predictive uncertainty, essential for regulatory compliance.
04

Gradient-Based Sensitivity

For differentiable genomic models like deep neural networks, the gradient of the output with respect to the input provides a direct, computationally efficient measure of local sensitivity.

  • Saliency maps are generated by computing the absolute value of these gradients, visually highlighting nucleotides where a small change would cause the largest impact on the prediction.
  • This is the core mechanism behind attribution methods like Integrated Gradients and DeepLIFT. Gradient-based sensitivity assumes a locally linear approximation of the model's decision function, which can be a limitation for highly non-linear genomic landscapes.
05

Perturbation-Based Faithfulness Metrics

Sensitivity analysis directly underpins the evaluation of explanation quality through faithfulness metrics:

  • Area Over the Perturbation Curve (AOPC): Sequentially perturbs the most 'sensitive' nucleotides identified by an attribution map and measures the drop in prediction probability. A steep drop indicates a faithful map.
  • Remove and Retrain (ROAR): Retrains the model from scratch after removing the most sensitive features, testing if the original attribution map truly identified the causal features the model relied upon. These metrics transform sensitivity from a descriptive tool into a quantitative benchmark for interpretability.
06

Uncertainty Quantification in Sensitivity

A raw sensitivity score is incomplete without a measure of its statistical confidence. Attribution uncertainty quantifies the variability of an importance score.

  • Techniques like Bayesian neural networks or Monte Carlo dropout can be used to compute a distribution of sensitivity scores for each nucleotide, yielding credible intervals.
  • A high-sensitivity nucleotide with a wide confidence interval is a less reliable explanation than one with a tight interval. This is vital for clinical genomics, where a variant effect prediction must be accompanied by a confidence score to inform medical decisions.
SENSITIVITY ANALYSIS IN GENOMICS

Frequently Asked Questions

Explore the core concepts of sensitivity analysis, a critical technique for quantifying how uncertainty in genomic model predictions can be traced back to specific nucleotide inputs, ensuring model robustness and regulatory compliance.

Sensitivity analysis is the systematic study of how the uncertainty in the output of a genomic model can be apportioned to different sources of uncertainty in its nucleotide inputs. Unlike feature attribution methods that explain a single prediction, sensitivity analysis quantifies the model's global or local stability by measuring output variance in response to controlled input perturbations. For a CTO, this provides a quantitative risk assessment for deploying models on noisy sequencing data. The core mechanism involves defining a probability distribution over the input space—such as a position weight matrix for a binding site—and computing the resulting output distribution, often using Monte Carlo estimation or variance-based decomposition like Sobol' indices. This directly addresses regulatory compliance by demonstrating that a model's diagnostic call is not brittle to minor, biologically irrelevant sequence variations.

SENSITIVITY ANALYSIS

Applications in Genomic Research

How uncertainty in genomic model outputs is traced back to uncertainty in nucleotide inputs, enabling robust variant interpretation and regulatory compliance.

01

Variant Effect Prediction Uncertainty

Quantifies the confidence interval around a variant effect score by propagating input perturbations through the model. This distinguishes truly pathogenic variants from benign ones when prediction scores are similar.

  • Uses Monte Carlo dropout or ensemble methods to generate prediction distributions
  • Critical for clinical reporting where a single point estimate is insufficient
  • Enables risk stratification based on prediction variance, not just mean effect
95% CI
Typical Reporting Interval
02

Input Perturbation Robustness

Systematically adds noise to one-hot encoded nucleotide sequences to measure how model predictions degrade. This reveals which sequence positions the model is most sensitive to.

  • Gaussian noise injection into embedding layers
  • Identifies brittle dependencies on single nucleotides
  • Used to validate that models rely on biological motifs rather than artifacts
03

Global Sensitivity with Sobol Indices

Decomposes output variance using Sobol sensitivity analysis to attribute uncertainty to specific input features or interactions between features. This is a model-agnostic approach.

  • Computes first-order and total-order sensitivity indices
  • Identifies epistatic interactions where nucleotide pairs jointly influence predictions
  • Computationally intensive but provides rigorous variance decomposition
04

Saliency Map Reliability Assessment

Evaluates whether feature attribution maps are stable under input perturbations. A reliable saliency map should not change dramatically when non-essential nucleotides are altered.

  • Measures Jaccard similarity between attribution maps from original and perturbed inputs
  • Low stability indicates the model's decision boundary is poorly defined
  • Used to validate interpretability methods before regulatory submission
05

Adversarial Robustness in Regulatory Genomics

Tests model sensitivity to adversarial perturbations—small, biologically plausible sequence changes that cause large prediction shifts. This reveals vulnerabilities in genomic classifiers.

  • Generates adversarial examples constrained by evolutionary substitution matrices
  • High sensitivity to adversarial examples indicates overfitting to spurious correlations
  • Essential for validating models used in clinical decision support
06

Uncertainty-Aware Model Calibration

Applies sensitivity analysis to calibrate model confidence so that predicted probabilities reflect true empirical frequencies. A well-calibrated model's 80% confidence predictions are correct 80% of the time.

  • Uses expected calibration error (ECE) as a quantitative metric
  • Temperature scaling adjusts output logits based on sensitivity patterns
  • Required for models that inform clinical action thresholds
INTERPRETABILITY TAXONOMY

Sensitivity Analysis vs. Feature Attribution Methods

A systematic comparison of global perturbation-based sensitivity analysis against local gradient-based and perturbation-based feature attribution methods for genomic sequence models.

FeatureSensitivity AnalysisIntegrated GradientsIn-silico Mutagenesis

Primary Objective

Quantify output uncertainty from input variance

Assign local importance scores satisfying completeness

Measure prediction change from systematic nucleotide perturbation

Scope of Analysis

Global (distribution-wide)

Local (single prediction)

Local (single prediction)

Perturbation Strategy

Statistical sampling from input distributions

Path integral from baseline to input

Exhaustive or targeted in-silico mutation of every position

Axiomatic Guarantees

Computational Cost

High (requires multiple forward passes across distribution)

Moderate (requires integral approximation via 50-300 steps)

Very High (3 x sequence length forward passes for single-nucleotide variants)

Output Granularity

Variance decomposition across input features

Nucleotide-level attribution scores

Delta score per nucleotide substitution

Identifies Feature Interactions

Baseline/Reference Dependency

High (choice of baseline critically affects attributions)

Low (reference is the original unmutated sequence)

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.