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.
Glossary
Infidelity Measure

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.
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.
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.
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.
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.
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.
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.
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.
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.
Infidelity vs. Sensitivity vs. Robustness
A comparison of three core metrics used to evaluate the quality and trustworthiness of feature attribution explanations.
| Metric | Infidelity | Sensitivity | Robustness |
|---|---|---|---|
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) |
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?'
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Concepts essential for evaluating and improving the trustworthiness of gradient-based explanations, directly addressing the limitations quantified by the Infidelity Measure.
Sensitivity-n
An axiomatic attribution principle requiring that if a model's output is mathematically independent of a feature, that feature must receive an attribution of zero.
- Directly counters a source of infidelity: if a perturbation to a zero-importance feature changes the explanation, the method is unfaithful.
- A method violating Sensitivity-n will exhibit high infidelity when that irrelevant feature is perturbed.
- Core component of the axiomatic framework used to evaluate attribution quality.
Local Lipschitz Estimate
A robustness metric that measures the maximum change in an explanation under small, adversarial input perturbations.
- Quantifies the stability of a saliency map, which is closely related to infidelity: an unstable explanation is highly unfaithful under minor noise.
- A high Local Lipschitz Estimate indicates that the dot product between the attribution and a perturbation vector will vary wildly, directly increasing the Infidelity Measure.
- Used to certify that explanations do not shatter under imperceptible input changes.
Shattered Gradient
A phenomenon where the gradient of a deep network with respect to its input resembles white noise, providing no visually coherent saliency map.
- A classic symptom of high infidelity: the raw gradient is a poor explanation because it fails to capture the true decision boundary.
- Occurs due to the highly non-linear loss surface, making the local gradient a noisy and unfaithful approximation of the model's global behavior.
- Techniques like SmoothGrad and Integrated Gradients are designed specifically to address this failure mode.
Attribution Prior
A regularization term added to a model's training objective that encodes a desired property of the feature attributions, such as smoothness or sparsity.
- Trains models to be inherently more interpretable and faithful, rather than just explaining a black box post-hoc.
- By penalizing high infidelity during training, the model learns to have a simpler, more linear decision boundary where the gradient is a faithful explanation.
- Examples include penalizing the variance of gradients or encouraging attributions to be concentrated on a few features.
Expected Gradients
An attribution method that computes feature importance by averaging the gradients of the model's output over a distribution of background samples.
- Unifies Integrated Gradients and SHAP to reduce the variance and noise that contribute to infidelity.
- By integrating over many reference points, it avoids the pathological failure where a single baseline path yields a misleading, high-infidelity explanation.
- Provides a more robust and faithful attribution by accounting for the model's behavior across the entire data manifold.
Extremal Perturbation
A technique that finds the smallest smooth mask over an input image that maximally preserves a model's prediction.
- Directly addresses the perturbation component of the Infidelity Measure by searching for the most impactful region to modify.
- Instead of measuring error from random perturbations, it identifies the minimal sufficient explanation, providing a complementary view of faithfulness.
- The resulting mask is a high-fidelity saliency map that highlights only the pixels absolutely necessary for the prediction.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us