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.
Glossary
Fidelity Metric

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.
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.
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.
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
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
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
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
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
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
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.
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.
| Metric | Fidelity | Faithfulness | Sparsity | Stability |
|---|---|---|---|---|
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 |
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
Core concepts for assessing how faithfully an explanation represents the original model's decision-making process on graph-structured data.
Faithfulness Metric
A quantitative evaluation score that measures how accurately an explanation subgraph reflects the true reasoning process of the GNN. It is typically assessed by the drop in performance when the explanation is removed.
- Core Principle: If the explanation is faithful, removing it should break the prediction.
- Calculation: Often computed as
Accuracy(Original) - Accuracy(Masked). - Contrast with Fidelity: While fidelity measures how well the explanation mimics the model, faithfulness measures if the explanation captures the model's actual internal logic.
Perturbation Analysis
A fidelity assessment method that measures the change in a GNN's prediction after masking or altering the most important nodes or edges identified by an explainer.
- Positive Perturbation: Removing the top-k most important features should cause a sharp decline in prediction score.
- Negative Perturbation: Removing the least important features should have minimal impact.
- Area Under the Curve (AUC): The fidelity curve is often summarized by the AUC of prediction score vs. fraction of features removed.
Graph Information Bottleneck
A principle for learning explainable GNNs by compressing the input graph into a minimal subgraph that retains maximal mutual information about the label, discarding irrelevant structural noise.
- Objective:
max I(Y; G_sub) - β * I(G; G_sub)where Y is the label and G_sub is the explanation. - Key Insight: The bottleneck forces the model to identify the minimal sufficient statistic for prediction.
- Relationship to Fidelity: A subgraph extracted via the information bottleneck should naturally achieve high fidelity.
Graph Rationalization
A self-explainable GNN framework where a generator module extracts a concise, causal subgraph (the rationale) and a predictor module makes a decision based solely on that rationale.
- Cooperative Training: The generator and predictor are trained jointly to maximize prediction accuracy while minimizing rationale size.
- Causal Interpretation: The rationale is treated as the direct cause of the prediction.
- Fidelity Connection: The predictor's output on the rationale serves as the explanation, and fidelity is measured against the original model's behavior.
GSAT (Graph Stochastic Attention)
A method that injects stochasticity into the attention mechanism to automatically select a minimal, label-relevant subgraph for explanation and prediction.
- Mechanism: Learns a Bernoulli distribution over edges, sampling subgraphs during training.
- Regularization: A penalty term controls the size of the extracted subgraph, enforcing sparsity.
- Advantage: Reduces the risk of selecting spurious correlations by introducing randomness, leading to more robust fidelity scores.
GraphMask
A post-hoc explanation method that learns a sparse mask over the messages passed between nodes in each GNN layer to identify which connections are irrelevant to a prediction.
- Layer-Wise Masking: Unlike input-level explanations, GraphMask can identify irrelevant edges at any layer of the GNN.
- Fidelity Evaluation: The prediction is recalculated with masked messages; high fidelity means the masked model's output closely matches the original.
- Key Distinction: Explains the message-passing process, not just the input graph structure.

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