Inferensys

Glossary

Infidelity Measure

A metric that quantifies the expected error between a significant perturbation of the input sequence and the corresponding perturbation of the attribution map.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
ATTRIBUTION FAITHFULNESS METRIC

What is Infidelity Measure?

A quantitative metric that evaluates the reliability of feature attribution maps by measuring the expected error between a significant perturbation of the input sequence and the corresponding perturbation of the explanation.

The Infidelity Measure is a faithfulness metric that quantifies how accurately an attribution map reflects a genomic model's true decision logic. It is defined as the expected squared difference between the change in the model's output when a meaningful perturbation is applied to the input sequence and the dot product of the attribution map with that perturbation. A lower infidelity score indicates that the explanation is a more faithful local linear approximation of the model's behavior.

Unlike perturbation-based metrics that measure output drop after removing salient features, infidelity directly evaluates the local fidelity of the attribution function itself. It is computed by sampling significant perturbations—such as Gaussian noise or meaningful nucleotide substitutions—and comparing the model's response delta to the attribution-weighted perturbation. This makes it a robust tool for benchmarking nucleotide-level attribution methods like Integrated Gradients and DeepSHAP against the ground-truth behavior of genomic sequence models.

FAITHFULNESS METRICS

Key Characteristics of Infidelity Measures

Infidelity measures quantify the expected error between a significant perturbation of the input sequence and the corresponding perturbation of the attribution map, providing a rigorous mathematical framework for evaluating how faithfully an explanation captures a model's decision logic.

01

Mathematical Definition

Infidelity is formally defined as the expected squared difference between the dot product of the perturbation vector and the attribution map, and the difference in model output caused by that perturbation.

  • Core Equation: INFD(Φ, f, x) = E_{I∼μ_I}[ (I^T Φ(f, x) - (f(x) - f(x - I)))^2 ]
  • Perturbation Vector (I): A significant, non-local modification to the input sequence, drawn from a distribution μ_I
  • Attribution Map (Φ): The feature importance scores generated by an interpretability method
  • Model Output Difference: The actual change in the model's prediction when the perturbation is applied
  • A lower infidelity score indicates a more faithful explanation
02

Relationship to Completeness

Infidelity is closely tied to the completeness axiom of attribution methods, which requires that the sum of all feature attributions equals the difference between the model output at the input and a baseline.

  • If an attribution method satisfies completeness, the infidelity for perturbations that are dense vectors (all features perturbed) will be zero
  • Methods like Integrated Gradients and DeepSHAP inherently satisfy completeness
  • Infidelity generalizes completeness by testing it across a distribution of perturbations rather than a single baseline
  • This makes infidelity a more robust measure than simply checking the summation property
03

Perturbation Distribution Design

The choice of perturbation distribution μ_I is critical to the meaningfulness of the infidelity metric and must reflect biologically plausible sequence variations.

  • Gaussian perturbations: Test sensitivity to small, diffuse noise across all nucleotide positions
  • Subspace perturbations: Restrict perturbations to specific genomic regions (e.g., promoters, enhancers) to test localized faithfulness
  • Motif-scrambling perturbations: Randomize conserved transcription factor binding sites while preserving dinucleotide composition
  • In-silico mutagenesis perturbations: Introduce single-nucleotide variants drawn from known population frequencies (gnomAD)
  • Poor perturbation design can yield misleadingly low infidelity scores that don't reflect real-world reliability
04

Comparison with Other Faithfulness Metrics

Infidelity complements but differs from other perturbation-based faithfulness metrics commonly used in genomic model evaluation.

  • vs. AOPC (Area Over the Perturbation Curve): AOPC measures prediction drop when removing top features sequentially; infidelity measures alignment across all features simultaneously
  • vs. ROAR (Remove And Retrain): ROAR requires expensive model retraining after feature removal; infidelity is computed on a single trained model
  • vs. Sensitivity-n: Sensitivity-n measures correlation with a single perturbation magnitude; infidelity uses a full distribution
  • vs. Faithfulness Correlation: Correlation metrics capture linear relationships; infidelity captures exact numerical agreement
  • Infidelity is particularly suited for high-dimensional genomic inputs where feature interactions are complex
05

Application in Genomic Variant Effect Prediction

Infidelity measures are essential for validating attribution maps used to score the functional impact of non-coding variants in clinical genomics pipelines.

  • Benchmarking: Compare DeepLIFT, Integrated Gradients, and SHAP attributions against Deep Mutational Scan (DMS) ground truth using infidelity
  • Regulatory compliance: Demonstrate to auditors that variant effect scores are derived from faithful explanations of the underlying model
  • Model selection: Choose between genomic architectures (e.g., Enformer vs. Basenji2) based on which produces lower infidelity attributions
  • Attribution uncertainty: Combine infidelity with bootstrap resampling to compute confidence intervals on variant effect scores
  • Example: A variant in a distal enhancer with low infidelity attribution is more trustworthy for clinical reporting
06

Limitations and Practical Considerations

Despite its theoretical rigor, infidelity has several limitations that practitioners must account for when evaluating genomic model explanations.

  • Computational cost: Requires many forward passes through the model for each perturbation in the distribution, scaling poorly with sequence length
  • Perturbation dependency: Results are only as meaningful as the perturbation distribution; biologically irrelevant perturbations produce uninformative scores
  • Attribution scale sensitivity: Infidelity is sensitive to the magnitude of attributions, not just their relative ordering
  • No baseline-free variant: Unlike some metrics, infidelity always requires specifying a perturbation distribution, introducing a design choice
  • Non-uniqueness: Multiple different attribution maps can achieve identical infidelity scores, so it should be used alongside other metrics like AOPC and ROAR
UNDERSTANDING INFIDELITY IN GENOMIC AI

Frequently Asked Questions

Clear, technical answers to the most common questions about the infidelity measure, a critical metric for evaluating the trustworthiness of feature attribution maps in genomic sequence models.

The infidelity measure is a quantitative metric that evaluates the faithfulness of a feature attribution map by calculating the expected mean squared error between a significant perturbation applied to an input genomic sequence and the corresponding perturbation applied to its explanation. In simpler terms, it measures how poorly an attribution map predicts the model's output change when you meaningfully alter the input DNA. A low infidelity score indicates that the attribution map is a faithful representation of the model's true decision logic, while a high score signals that the explanation is unreliable. The measure is formally defined as INFD(Φ, f, x) = E_{I~μ_I}[(I^T Φ(f,x) - (f(x) - f(x - I)))^2], where Φ is the attribution method, f is the model, x is the input sequence, and I is a significant perturbation vector drawn from a distribution μ_I. This metric is crucial for regulatory compliance in clinical genomics, where understanding why a model flagged a variant is as important as the prediction itself.

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.