Inferensys

Glossary

Infidelity Measure

A metric that quantifies the faithfulness of an attribution method by measuring the error between the model's output change and the dot product of the attribution with a significant input perturbation.
Wide-angle shot of a modern WeWork open floor plan with creative walls covered in AI system architecture diagrams, product team collaborating in standing desk area with industrial lighting.
ATTRIBUTION FAITHFULNESS METRIC

What is Infidelity Measure?

A quantitative metric for evaluating the faithfulness of feature attribution explanations by measuring the mean squared error between a model's output perturbation and the explanation's predicted perturbation.

The Infidelity Measure is a metric that quantifies how faithfully an attribution method explains a model's predictions. It computes the expected mean squared error between the actual change in the model's output when the input is significantly perturbed and the change predicted by the dot product of the attribution vector with the perturbation.

Formally, for a model f, input x, attribution vector Φ, and perturbation I, infidelity is defined as E<sub>I</sub>[(Φ<sup>T</sup> I - (f(x) - f(x - I)))<sup>2</sup>]. A lower infidelity score indicates a more faithful explanation that accurately captures the model's local sensitivity to meaningful input variations, serving as a complementary metric to the Sensitivity-n axiom.

FAITHFULNESS METRIC

Key Characteristics of Infidelity Measure

Infidelity is a quantitative metric that evaluates how faithfully an attribution method represents a model's behavior by measuring the prediction error between the model's output change and the explanation's estimate under significant input perturbations.

01

Core Mathematical Definition

Infidelity is formally defined as the expected squared difference between two quantities when a significant perturbation I is applied to the input:

  • Term 1: The actual change in the model's output: f(x) - f(x - I)
  • Term 2: The dot product of the attribution map Φ with the perturbation: Φ(x)ᵀ · I

A lower infidelity score indicates that the attribution method more accurately predicts how the model's output responds to meaningful input changes. The metric is computed over a distribution of perturbations, not just a single instance.

Lower = Better
Score Interpretation
02

Perturbation Design Philosophy

Unlike random noise, infidelity perturbations must be semantically significant to expose attribution weaknesses:

  • Gaussian noise is insufficient because it explores trivial, off-manifold directions the model never encounters
  • Meaningful perturbations include blurring, occlusion by superpixels, or interpolation toward a baseline image
  • The perturbation distribution defines what 'faithfulness' means in practice—a method faithful under one perturbation set may fail under another

This design choice directly tests whether the explanation captures the model's behavior along data-manifold directions rather than arbitrary vector spaces.

Manifold-Aligned
Perturbation Requirement
03

Relationship to Completeness

Infidelity generalizes the Completeness Axiom from axiomatic attribution frameworks:

  • Completeness requires that attributions sum to the output difference f(x) - f(baseline) for a single baseline
  • Infidelity measures this property across an entire distribution of baselines and perturbations simultaneously
  • An attribution method with zero infidelity perfectly satisfies completeness for all perturbations in the test set

This makes infidelity a more rigorous, empirical complement to the theoretical completeness guarantee provided by methods like Integrated Gradients.

Distributional
Completeness Scope
04

Optimal Attribution Derivation

For a given perturbation distribution, there exists an optimal attribution map that minimizes infidelity:

  • The optimal attribution equals the expected gradient of the model integrated over the perturbation distribution
  • This connects infidelity directly to Expected Gradients, which averages Integrated Gradients over a background dataset
  • Methods like SmoothGrad and VarGrad can be understood as approximations to this optimal attribution under specific perturbation choices

This theoretical link provides a principled way to design new attribution methods by explicitly specifying the perturbation distribution they optimize for.

Expected Gradients
Optimal Solution
05

Sensitivity to Explanation Noise

Infidelity is closely related to the sensitivity of an explanation to small input changes:

  • A fragile attribution map that changes dramatically under tiny perturbations will exhibit high infidelity
  • The metric penalizes explanations that rely on shattered gradients—noisy, high-frequency patterns that don't reflect true model behavior
  • By averaging over perturbations, infidelity naturally smooths out gradient noise, favoring methods like SmoothGrad and Integrated Gradients over raw Gradient × Input

This property makes infidelity a practical tool for comparing the robustness of different attribution techniques.

Robustness Proxy
Noise Sensitivity
06

Benchmarking Attribution Methods

Infidelity serves as a standardized benchmark for comparing explanation techniques:

  • Integrated Gradients typically achieves low infidelity due to its axiomatic completeness property
  • Gradient × Input often scores poorly because it captures only first-order effects and suffers from gradient saturation
  • Guided Backpropagation may exhibit high infidelity as it violates the completeness axiom by filtering negative contributions

When reporting infidelity scores, always specify the perturbation distribution, number of samples, and baseline choice to ensure reproducibility across studies.

IG > Grad×Input
Typical Ranking
ATTRIBUTION QUALITY METRICS

Infidelity vs. Sensitivity vs. Robustness

A comparison of three core metrics used to evaluate the quality and trustworthiness of feature attribution explanations.

MetricInfidelitySensitivityRobustness

Core Question

How faithful is the explanation to the model's true behavior?

How much does the explanation change with a tiny input perturbation?

How much does the explanation change under adversarial noise?

Mathematical Formulation

Expected error between model output change and attribution dot product with perturbation

Gradient of the explanation function with respect to the input

Maximum change in explanation within a bounded input neighborhood

Primary Focus

Prediction accuracy of the explanation

Local stability of the explanation

Worst-case stability of the explanation

Perturbation Type

Meaningful, significant perturbations

Infinitesimal perturbations

Adversarial, bounded perturbations

Failure Mode Detected

Explanations that misrepresent the model's decision boundary

Explanations that are noisy or visually fragmented

Explanations that can be manipulated by an attacker

Typical Metric Value

Lower is better

Lower is better

Lower is better

Related Concept

Completeness Axiom

Shattered Gradient

Local Lipschitz Estimate

Computational Cost

High (requires multiple model evaluations)

Low (requires gradient computation)

Medium (requires optimization loop)

INFIDELITY MEASURE

Frequently Asked Questions

Explore the core concepts behind quantifying the faithfulness of feature attribution methods, a critical step in ensuring that explanations accurately reflect a model's true decision-making process.

The Infidelity Measure is a quantitative metric that evaluates the faithfulness of a feature attribution explanation by measuring the error between a model's actual output change and the change predicted by the explanation when a significant perturbation is applied to the input. Formally, it is defined as the expected mean squared error between the dot product of the attribution vector and the perturbation vector, and the difference in the model's output. A lower infidelity score indicates that the explanation more accurately captures the model's local decision boundary. This metric directly addresses the core question: 'Does the explanation truly reflect how the model reacts to changes in the input?'

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.