Inferensys

Glossary

Faithfulness Metric

A quantitative evaluation criterion that measures how accurately an attribution map reflects the true importance of features by perturbing the most important inputs and measuring the prediction drop.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
ATTRIBUTION EVALUATION

What is Faithfulness Metric?

A quantitative evaluation criterion that measures how accurately an attribution map reflects the true importance of features by perturbing the most important inputs and measuring the prediction drop.

A faithfulness metric is a quantitative evaluation criterion that measures how accurately an attribution map reflects the true importance of input features to a model's prediction. It operates by systematically perturbing the features deemed most important and measuring the resulting drop in prediction probability, establishing a causal link between attribution and model behavior.

Core implementations include the Deletion Metric and Insertion Metric, which remove or add pixels in ranked order while tracking the area under the probability curve. A faithful explanation will cause a steep, monotonic decline in confidence when important features are removed, whereas an unfaithful map will show erratic or minimal impact, revealing that the attribution method is highlighting irrelevant correlations rather than true decision boundaries.

EVALUATION CRITERIA

Core Characteristics of Faithfulness Metrics

Faithfulness metrics are quantitative benchmarks that validate whether an attribution map accurately reflects a model's true reasoning process. They operate by perturbing inputs deemed 'important' and measuring the resulting degradation in model confidence.

01

The Perturbation Principle

The foundational logic of faithfulness relies on a causal intervention: if the highlighted features are truly important, removing or altering them must break the prediction.

  • Positive Perturbation (Insertion): Starting from a neutral baseline (e.g., a blurred image), features are added in order of attributed importance. A faithful map shows a steep, monotonic increase in model confidence.
  • Negative Perturbation (Deletion): Starting from the original input, the most salient features are progressively removed or obfuscated. A faithful map exhibits a sharp, rapid drop in the target class probability.
  • Baseline Selection: The choice of replacement value (zero, mean, Gaussian noise, or a learned inpainting mask) critically impacts the metric's validity and must be carefully calibrated to avoid out-of-distribution artifacts.
Causal
Intervention Type
02

Deletion and Insertion Curves

These metrics generate comprehensive area-under-the-curve (AUC) scores rather than single-point estimates, providing a holistic view of attribution quality.

  • Deletion Metric: Measures the drop in probability as the top k most important pixels are sequentially removed. A lower AUC indicates a more faithful explanation, as the model's confidence collapses quickly.
  • Insertion Metric: Measures the recovery of probability as the top k pixels are added back to a blurred baseline. A higher AUC signifies a more faithful explanation, as the model rapidly reconstructs its decision.
  • Comprehensive Evaluation (F1-Score): Often, the harmonic mean of the normalized deletion and insertion scores is used to balance the assessment of both foreground and background feature importance.
AUC
Primary Score
03

Remove and Retrain (ROAR)

ROAR is a rigorous, computationally intensive protocol designed to expose the information leakage of an attribution method. It tests if the map truly captures the features the model uses rather than just the features it sees.

  • Procedure: A fraction (e.g., 10-30%) of the most important pixels, as ranked by the attribution map, are replaced with a constant value across the entire dataset. The model is then fully retrained from scratch on this modified data.
  • Interpretation: If the map is faithful, the model retrained on the perturbed data should show a significant drop in accuracy compared to a model retrained on randomly perturbed data. If the accuracy remains high, the original model was likely using alternative, unhighlighted features.
  • Iterative Application: The process is repeated iteratively, removing more features each round, to track the degradation curve over multiple retraining cycles.
Retraining
Required Step
04

Sensitivity-N and Infidelity

These metrics evaluate faithfulness by analyzing the mathematical relationship between perturbations and output changes, often without requiring a full model retraining.

  • Sensitivity-N: A sample-based metric that measures the maximum change in the model's output when a random subset of N input features is perturbed. It correlates the magnitude of the output change with the sum of the attribution scores of the perturbed features.
  • Infidelity: A formal measure of the expected prediction error between the original output and a first-order Taylor expansion of the model around a significant perturbation. It quantifies how well the attribution map serves as a local linear explanation.
  • Max-Sensitivity: A robustness check that calculates the maximum change in the explanation itself when the input is subjected to small, imperceptible perturbations, ensuring the attribution map is stable.
Taylor Expansion
Mathematical Basis
05

Causal Scrubbing

A mechanistic interpretability technique that tests a hypothesized circuit (a subgraph of the model) by surgically altering activations. It is the gold standard for verifying if a specific set of neurons or attention heads is both necessary and sufficient for a behavior.

  • Hypothesis Testing: An interpretability researcher identifies a specific path of weights (e.g., an attention head that moves a name to a specific residual stream position).
  • Activation Resampling: The activations of the hypothesized circuit are replaced with activations from a 'corrupted' forward pass (e.g., one where the subject is changed). If the circuit is correct, the model's output should fully reflect the corrupted input, and the loss should recover to the level of the corrupted baseline.
  • Faithfulness Check: The metric is the degree to which the scrubbed model's loss matches the loss of the fully corrupted model, confirming that no other components are secretly computing the same function.
Mechanistic
Interpretability Level
06

Correlation with Human Ground Truth

While not a direct measure of model-internal faithfulness, alignment with human expert annotations serves as a crucial external validity check, especially in high-stakes domains like medical imaging.

  • Pointing Game: A binary metric that checks if the most attributed pixel falls within a human-annotated bounding box of the target object. It measures localization accuracy but not the completeness of the explanation.
  • Intersection over Union (IoU): Measures the overlap between a thresholded attribution heatmap and a human segmentation mask. It penalizes both over-attribution to background and under-attribution to the object.
  • Plausibility vs. Faithfulness: A critical distinction. A map can be highly plausible to a human (highlighting the object) but unfaithful to the model (which might be using a spurious background correlation). Human correlation is a proxy, not a direct measure, of true faithfulness.
Proxy
Metric Type
FAITHFULNESS METRIC

Frequently Asked Questions

A quantitative evaluation criterion that measures how accurately an attribution map reflects the true importance of features by perturbing the most important inputs and measuring the prediction drop.

A faithfulness metric is a quantitative evaluation criterion that measures the degree to which an attribution map accurately reflects the true importance of input features to a model's prediction. It operates on a core principle: if the features identified as most important are truly critical, perturbing or removing them should cause a significant drop in the model's confidence or accuracy. Conversely, removing features deemed unimportant should have minimal impact. This is typically operationalized through perturbation-based protocols like the Deletion Metric and Insertion Metric, which iteratively remove or add pixels in order of attributed importance and measure the area under the resulting probability curve. Faithfulness is distinct from plausibility, which measures alignment with human intuition; a faithful explanation accurately captures the model's internal mechanics even if those mechanics are counterintuitive to humans.

COMPARATIVE ANALYSIS

Faithfulness vs. Other Explainability Evaluation Criteria

A comparison of the Faithfulness metric against other common criteria used to evaluate the quality and reliability of feature attribution explanations.

Evaluation CriterionFaithfulnessSensitivity-nCompletenessImplementation Invariance

Core Definition

Measures correlation between feature importance and prediction impact via perturbation.

Measures the sum of attributions for N randomly masked features.

Ensures the sum of all feature attributions equals the prediction difference from a baseline.

Requires identical attributions for functionally equivalent models regardless of implementation.

Primary Question Answered

Do important features truly drive the prediction?

How much does the output change when N features are removed?

Is the total attribution accounted for?

Do different network implementations of the same function yield the same explanation?

Methodology

Perturb top-k features and measure prediction drop.

Randomly mask subsets of N features and measure total attribution of the masked set.

Sum all feature attributions and compare to f(x) - f(baseline).

Compare attributions from two distinct models that compute the same mathematical function.

Evaluates Ground Truth Alignment

Requires Ground Truth Labels

Model-Agnostic

Detects Hallucinated Importance

Key Limitation

Sensitive to perturbation strategy and baseline choice.

Does not verify if the identified features are the true causal drivers.

A method can be complete but assign importance to irrelevant features.

Does not guarantee the explanation is correct, only consistent across implementations.

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.