Inferensys

Glossary

Fidelity Metric

An evaluation metric that measures how well an explanation mimics the original model's behavior, often calculated as the accuracy of the original model on the extracted explanatory subgraph.
ML engineer running AI model benchmarks, performance charts on multiple screens, late night home office setup.
EXPLANATION EVALUATION

What is Fidelity Metric?

A fidelity metric quantifies how accurately a post-hoc explanation mimics the predictive behavior of the original black-box model on a specific input.

A fidelity metric is a quantitative evaluation score that measures the degree to which an explanation model accurately replicates the decision boundary of the original, complex model. In graph neural networks, high fidelity indicates that the extracted explanatory subgraph, when passed through the original GNN, produces a prediction that is statistically indistinguishable from the prediction made on the full input graph.

Fidelity is often calculated as the accuracy of the original model when its input is restricted to the explanation alone. A perfect fidelity score implies the explainer has successfully isolated the true causal structure, whereas low fidelity signals that the explanation is a poor proxy for the model's internal reasoning.

EVALUATION FRAMEWORK

Core Characteristics of Fidelity Metrics

Fidelity metrics quantify how faithfully an explanation mimics the original model's decision boundary. These characteristics define the rigor and reliability of explanation evaluation in graph neural networks.

01

Prediction Agreement Rate

The most direct fidelity measure: the accuracy of the original GNN when evaluated solely on the explanatory subgraph. A high agreement rate indicates the explainer has captured the structural features that genuinely drive the model's output.

  • Computed as: Accuracy(f_original(G_explanation))
  • A score of 1.0 means the subgraph perfectly reproduces all original predictions
  • Low agreement signals the explainer is highlighting spurious or irrelevant structures
02

Fidelity+ and Fidelity-

A paired evaluation framework that measures explanation quality through perturbation analysis. This dual metric distinguishes between important and irrelevant substructures.

  • Fidelity+: Drop in prediction probability when the most important nodes/edges are removed. Higher is better.
  • Fidelity-: Drop when the least important components are removed. Lower is better.
  • The difference between these scores reveals how well the explainer discriminates signal from noise
03

Sparsity Constraint

A critical regularization factor that penalizes overly large explanations. True fidelity requires the explanation to be minimal yet sufficient — capturing the causal subgraph without extraneous nodes.

  • Measured as the fraction of original graph retained: |E_explanation| / |E_original|
  • Optimal sparsity balances fidelity+ against explanation size
  • The Graph Information Bottleneck principle formalizes this trade-off mathematically
04

Contrastivity Score

Measures whether an explanation is unique to the predicted class rather than generically important across all classes. A high-contrastivity explanation changes significantly when the target class changes.

  • Evaluated by comparing explanations for different predicted classes on the same input
  • Low contrastivity suggests the explainer is identifying dataset-wide artifacts rather than class-specific reasoning
  • Critical for multi-class graph classification tasks where structural overlap is common
05

Stability Under Perturbation

A robust fidelity metric must remain consistent under small, meaningless input variations. This characteristic tests whether the explanation changes when noise is injected into irrelevant parts of the graph.

  • Add random edges or feature noise to non-explanatory regions
  • A stable explainer produces nearly identical subgraphs before and after perturbation
  • Instability indicates the explainer is overfitting to brittle, non-robust features of the GNN
06

Faithfulness vs. Plausibility

A fundamental distinction in fidelity evaluation. Faithfulness measures alignment with the model's true internal reasoning, while plausibility measures alignment with human intuition.

  • Faithfulness: Does the explanation reflect what the model actually computed?
  • Plausibility: Would a human domain expert agree with the explanation?
  • High fidelity metrics prioritize faithfulness; a model may use non-intuitive features that are nonetheless correct
FIDELITY METRIC

Frequently Asked Questions

Clarifying the core evaluation standard used to determine if an explanation faithfully mirrors the original model's decision logic.

A Fidelity Metric is a quantitative evaluation score that measures how accurately an explanation mimics the behavior of the original black-box model. In the context of Explainable Graph Neural Networks (GNNs), fidelity is typically calculated as the accuracy of the original model when its input is restricted solely to the explanatory subgraph identified by an explainer. A high-fidelity explanation implies that the extracted nodes and edges are sufficient to reproduce the original prediction, confirming that the explainer has captured the true decision boundary rather than spurious correlations. This metric is critical for auditing automated decisions in high-stakes domains like drug discovery and financial fraud detection.

METRIC COMPARISON

Fidelity vs. Other Explanation Evaluation Metrics

A comparison of fidelity against other key quantitative metrics used to evaluate the quality of graph neural network explanations.

MetricFidelityFaithfulnessSparsityStability

Core Question

How well does the explanation mimic the original model?

How much does the model's performance drop when the explanation is removed?

How concise is the explanation?

How consistent is the explanation under small input perturbations?

Measures

Predictive accuracy on the explanatory subgraph

Performance degradation after masking explanation

Size of the explanatory subgraph

Variance of explanations across similar inputs

Ideal Value

High

High

Low

Low

Primary Focus

Fidelity of surrogate behavior

Completeness of causal factors

Cognitive load and interpretability

Robustness and trust

Calculation

Accuracy(Original Model, Explanatory Subgraph)

Original Accuracy - Accuracy(Masked Input)

Number of nodes and edges in explanation

Cosine similarity or Jaccard index between explanations

Common Pitfall

A trivial explanation of the whole graph achieves perfect fidelity

High faithfulness can be gamed by identifying a single, fragile predictive edge

An empty explanation is perfectly sparse but useless

High stability may indicate the explainer is ignoring meaningful input variations

Related Metric

Accuracy

Comprehensiveness

Size

Sensitivity

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.