Local explanations justify a single prediction for a specific input instance by identifying the features, data points, or graph structures most influential for that particular output. In contrast, global explanations describe the overall behavior, logic, or decision boundaries of a machine learning model across its entire input domain or a representative dataset. This scope dichotomy is critical for deploying auditable AI, as local justifications satisfy individual right to explanation demands, while global insights inform model validation and improvement.
Glossary
Local vs. Global Explanations

What is Local vs. Global Explanations?
A fundamental distinction in Explainable AI (XAI) that categorizes methods based on the scope of the model's behavior they elucidate.
Local methods, such as LIME or instance-specific SHAP values, are typically model-agnostic and post-hoc. Global explanations may involve extracting symbolic rules, analyzing aggregate feature importance, or visualizing the model's latent space. For knowledge graph-based models, a local explanation might highlight a crucial subgraph, whereas a global one could summarize the ontological concepts the model consistently relies upon, directly supporting algorithmic explainability governance.
Local vs. Global Explanations: Key Differences
A comparison of two fundamental approaches for interpreting machine learning models, particularly relevant for knowledge graph-based AI systems.
| Feature / Dimension | Local Explanation | Global Explanation |
|---|---|---|
Scope of Explanation | A single prediction for a specific data instance. | The overall logic, behavior, or decision boundaries of the entire model. |
Primary Question Answered | "Why did the model make this specific prediction for this specific input?" | "How does the model generally work? What are its core rules or important features?" |
Fidelity & Accuracy | High fidelity to the model's behavior for the specific instance. | Lower fidelity; provides an approximate, often simplified, overview of model behavior. |
Computational Complexity | Typically lower; analyzes one data point. | Typically higher; requires analysis across the dataset or model structure. |
Representative Techniques | LIME, SHAP (instance-level), Counterfactual Explanations, Saliency Maps. | Partial Dependence Plots, Feature Importance (global), Rule Extraction, Model Distillation. |
Use Case in Knowledge Graphs | Explaining why a specific entity was classified a certain way or why a particular link was predicted. | Explaining the general patterns the GNN learned across the graph or the overall importance of relationship types. |
Audience | End-users subject to a decision, auditors verifying a specific case. | Model developers, regulators, business stakeholders, data scientists. |
Connection to XAI Governance | Addresses the "Right to Explanation" for individuals. Provides audit trails for specific decisions. | Supports model validation, bias detection, and certification. Informs model documentation and trust. |
Core Characteristics of Local and Global Explanations
In Explainable AI (XAI), explanations are categorized by their scope: local explanations justify a single prediction for a specific instance, while global explanations describe the overall behavior or logic of a machine learning model across its entire operating domain.
Scope of Explanation
The fundamental distinction lies in the scope of the analysis.
- Local Explanation: Focuses on a single data instance (e.g., one loan application, one molecule, one graph node). It answers: "Why did the model make this specific prediction for this specific input?"
- Global Explanation: Characterizes the model's overall logic or average behavior across the entire dataset or population. It answers: "What general patterns or rules does the model follow?" or "Which features are most important on average?"
Primary Use Cases
The choice between local and global explanations is driven by the stakeholder's goal.
Local explanations are critical for:
- Debugging individual predictions (e.g., Why was this transaction flagged as fraud?)
- Providing actionable feedback to an end-user (Algorithmic Recourse).
- Validating a single high-stakes decision in regulated domains (e.g., healthcare, finance).
Global explanations are essential for:
- Model validation and trust during development and auditing.
- Understanding learned representations and feature relationships.
- Ensuring the model aligns with domain knowledge and business logic.
Common Techniques & Methods
Different technical methods are optimized for local or global analysis.
Local Explanation Methods:
- LIME: Creates a local, interpretable surrogate model.
- SHAP (local Shapley values): Attributes the prediction for an instance to each feature.
- Counterfactual Explanations: Find minimal changes to alter the prediction.
- Saliency/Attention Maps: Highlight important input regions (pixels, nodes, tokens).
Global Explanation Methods:
- Global feature importance (e.g., mean absolute SHAP values).
- Partial Dependence Plots (PDPs).
- Rule extraction (e.g., mining decision rules from the model).
- Concept Activation Vectors (CAVs) for understanding learned concepts.
Role of Knowledge Graphs
Knowledge Graphs (KGs) provide a structured semantic layer that enhances both local and global explanations.
- For Local Explanations: A KG can ground the features of a specific instance (e.g., a 'patient' node) in a rich network of related entities (medications, conditions, procedures). The explanation can trace the prediction through this semantic subgraph, making it more intuitive.
- For Global Explanations: The KG's ontology defines the concepts and relationships the model should respect. Global explanations can be validated against this ontology, and rule-based explanations can be expressed in the KG's formal language (e.g., OWL, SPARQL). This is a core tenet of Neuro-Symbolic AI.
Evaluation Metrics
The quality of explanations is measured differently based on scope.
Local Explanation Metrics:
- Faithfulness/Fidelity: Does removing features deemed important by the explanation significantly change the local prediction?
- Stability: Does the explanation remain consistent for similar inputs?
- Actionability: Can the explanation guide a user to a desired outcome (recourse)?
Global Explanation Metrics:
- Comprehensiveness: Does the explanation capture the model's major decision pathways?
- Consistency with Domain Knowledge: Does the extracted logic align with expert rules or the KG ontology?
- Representativeness: Is the explanation valid across diverse data subsets?
Trade-offs and Complementary Nature
Local and global explanations are not mutually exclusive; they offer complementary views.
Key Trade-offs:
- Local explanations can be highly accurate for one case but may not reveal systemic model biases.
- Global explanations provide the big picture but can oversimplify and miss local nuances or edge cases.
A robust XAI strategy requires both. For example:
- Use a global explanation to verify the model generally prioritizes clinically relevant features from a medical ontology.
- Use a local explanation to audit why it recommended a specific treatment for Patient X, tracing the reasoning through their connected health data in the KG. This dual approach satisfies both model auditing (global) and individual right to explanation (local) requirements.
Frequently Asked Questions
These questions address the core distinction between local and global explanations in machine learning, a critical concept for building transparent, auditable AI systems, especially when grounded in structured knowledge.
A local explanation justifies a single prediction for a specific input instance, while a global explanation describes the overall behavior or logic of a machine learning model across its entire operating domain.
- Local Explanation: Answers "Why did the model predict this for that specific case?" It is instance-specific, often generated post-hoc using methods like LIME or SHAP, and is crucial for debugging individual decisions or providing recourse to an affected individual.
- Global Explanation: Answers "How does this model generally make decisions?" It provides a holistic view, which might be an interpretable surrogate model (like a decision tree), a set of learned rules, or an analysis of feature importance across the dataset. This is essential for model validation, compliance auditing, and understanding broad model behavior.
When using a knowledge graph for grounding, a local explanation might trace the specific entities and relationships used for a single query, whereas a global explanation could describe the ontology or schema that consistently guides the model's reasoning.
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
Local and global explanations are core concepts in Explainable AI (XAI). The following terms define specific methods, metrics, and frameworks used to generate and evaluate these explanations.
Explainable AI (XAI)
Explainable AI (XAI) is the overarching field of artificial intelligence focused on developing techniques to make the outputs and internal logic of machine learning models understandable to human users. It encompasses both local (single-instance) and global (whole-model) explanation methods. The goal is to build trust, facilitate debugging, and ensure compliance with regulations like the EU AI Act.
Post-hoc Explanation
A Post-hoc Explanation is generated after a model makes a prediction, using a separate analytical method to interpret the black-box model's output. Most local explanation techniques (e.g., LIME, SHAP) are post-hoc. They are distinct from intrinsic explainability, where the model itself is inherently interpretable (e.g., a decision tree).
Model-Agnostic Explanation
A Model-Agnostic Explanation method can generate interpretations for any machine learning model without requiring internal access to its architecture or parameters. Key examples include:
- LIME: Fits a simple local surrogate model.
- SHAP: Uses game-theoretic Shapley values. These methods are essential for explaining complex models like deep neural networks and are applicable to both local and global scopes.
Surrogate Model
A Surrogate Model is a simple, interpretable model (e.g., a linear regression, decision tree, or rule set) trained to approximate the predictions of a complex, opaque model. It is a core technique for generating explanations:
- Locally: A surrogate is trained on perturbed samples around a single instance.
- Globally: A surrogate is trained to mimic the complex model's behavior across the entire dataset, providing a comprehensible overview of its logic.
Faithfulness Metric
The Faithfulness Metric is a critical evaluation measure for post-hoc explanations. It quantifies how accurately the explanation reflects the actual reasoning of the underlying model. For a local explanation, faithfulness is tested by perturbing the features deemed important and measuring the correlation between the perturbation's impact on the prediction and the explanation's importance scores. A high-fidelity explanation is one where the highlighted features are truly causal to the model's output.
Interpretability vs. Explainability
These are distinct but related concepts:
- Interpretability refers to the extent to which a human can understand the cause of a model's decision by examining its internal mechanics (e.g., weights in a linear model). It is an intrinsic property.
- Explainability refers to the ability to provide understandable reasons for a model's behavior, often using external, post-hoc methods. A global explanation aims for interpretability of the model's overall logic, while a local explanation provides explainability for a specific case.

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