Local accuracy (also known as local fidelity) requires that the sum of all feature attributions plus the baseline value equals the original model's prediction f(x). This guarantees the explanation is a faithful, additive decomposition of the output for that single input, not an approximation.
Glossary
Local Accuracy

What is Local Accuracy?
Local accuracy is the fundamental SHAP property ensuring that the explanation model's output exactly matches the original model's prediction for the specific instance being explained.
This property is enforced by the Efficiency axiom of Shapley values. When g(x') is the explanation model and f(x) is the original prediction, local accuracy demands f(x) = g(x') = φ₀ + Σ φᵢ. This ensures no contribution is lost or double-counted in the attribution.
Frequently Asked Questions
Targeted answers to the most common technical questions about the local accuracy property in SHAP explanations, designed for engineers and data scientists who need precise, actionable definitions.
Local accuracy is the efficiency property of additive feature attribution methods that guarantees the sum of all feature attributions exactly equals the difference between the model's prediction for a specific instance and the baseline value. Mathematically, if f(x) is the original model's output and φ₀ is the expected prediction over the background dataset, then f(x) = φ₀ + Σᵢ φᵢ, where φᵢ is the SHAP value for feature i. This property ensures the explanation model g(x') perfectly matches the complex model f(x) when all features are present (x' = 1). Unlike global surrogate models that approximate behavior across a distribution, local accuracy enforces exact fidelity at the single prediction being explained. This is what distinguishes SHAP from methods like LIME, where the linear surrogate is only approximately correct locally. The property is inherited directly from the Shapley value axioms in cooperative game theory, specifically the efficiency axiom requiring that the total payout distributed to players equals the grand coalition's value.
Key Characteristics of Local Accuracy
Local accuracy is the foundational property that ensures an explanation model perfectly matches the original model's output for the specific instance being explained.
Definition and Core Principle
Local accuracy requires that the explanation model g(x') equals the original model f(x) when evaluated at the instance x. This means the sum of all feature attributions plus a baseline value exactly reconstructs the model's prediction. It guarantees the explanation is faithful to the model's output at that specific point, even if the explanation model is a simple linear function.
Mathematical Formulation
For an instance x and its simplified binary representation x', local accuracy is expressed as:
- f(x) = g(x') = φ₀ + Σᵢ φᵢ where φ₀ is the baseline expected prediction and φᵢ are the Shapley value attributions for each feature. This additive decomposition ensures no information is lost or fabricated in the explanation process.
Relationship to the Efficiency Property
Local accuracy is synonymous with the efficiency property in Shapley value theory. Efficiency states that the total gain distributed among players equals the total value created by the grand coalition. In SHAP, this translates to the sum of all feature attributions exactly equaling the difference between the model's prediction f(x) and the baseline value φ₀.
Distinction from Global Fidelity
Local accuracy guarantees fidelity only at a single instance, not across the entire input space. An explanation can be locally accurate while failing to capture the model's global behavior. This contrasts with global surrogate models that aim for overall fidelity but may sacrifice precision at individual points. Local accuracy prioritizes the specific prediction under audit.
Practical Implications for Auditing
In high-stakes applications like credit denial or medical diagnosis, local accuracy ensures that the explanation provided to a stakeholder accounts for every factor influencing their specific outcome. If the sum of attributions does not match the prediction, the explanation is mathematically inconsistent, undermining trust and regulatory compliance.
Enforcement in SHAP Implementations
KernelSHAP and TreeSHAP enforce local accuracy by design. In KernelSHAP, the weighted linear regression is constrained so the intercept captures the baseline and coefficients sum to the prediction difference. In TreeSHAP, the algorithm's recursive structure ensures exact additive decomposition for every leaf path, guaranteeing local accuracy without approximation error.
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.
Local Accuracy vs. Related SHAP Properties
How the Local Accuracy axiom relates to and differs from other fundamental SHAP properties
| Property | Local Accuracy | Efficiency | Missingness | Consistency |
|---|---|---|---|---|
Matches original model output for specific instance | ||||
Sum of attributions equals prediction minus baseline | ||||
Applies to single-instance explanations | ||||
Applies globally across all instances | ||||
Requires features absent from input to have zero attribution | ||||
Guarantees attribution monotonicity when model changes | ||||
Additive decomposition: f(x) = φ₀ + Σ φᵢ | ||||
Violated by LIME without proper constraints |
Related Terms
Understanding local accuracy requires familiarity with the core axioms and mechanisms of the SHAP framework. These concepts define how individual predictions are faithfully decomposed into feature contributions.
Efficiency Property
The mathematical guarantee that the sum of all feature attributions exactly equals the difference between the model's prediction and the baseline value. This is the formal definition of local accuracy within the SHAP framework.
- Ensures the explanation is a complete decomposition of the prediction
- No contribution is lost or double-counted
- Directly derived from the Shapley value axioms in cooperative game theory
Additive Feature Attribution
A class of explanation models that express a prediction as a linear sum of individual feature contributions relative to a baseline. Local accuracy is the defining property of this class.
- The explanation model g takes the form: g(z') = φ₀ + Σ φᵢz'ᵢ
- φ₀ is the baseline expected prediction
- φᵢ is the attributed effect of feature i
- The binary variable z'ᵢ indicates feature presence (1) or absence (0)
Baseline Value
The expected model output computed across the background dataset, representing the prediction when no feature information is known. Local accuracy measures deviation from this reference point.
- Acts as the intercept φ₀ in the additive explanation model
- Typically computed as the average prediction over a representative sample
- The choice of background dataset directly impacts attribution magnitudes
- A neutral starting point before any feature contributions are added
Marginal Contribution
The difference in a model's prediction when a specific feature is added to a subset of other features. This is the atomic unit of Shapley value computation and the mechanism that enforces local accuracy.
- Calculated as: f(S ∪ {i}) - f(S) where S is a coalition without feature i
- A feature's Shapley value is the weighted average of all its marginal contributions
- Requires handling missing features through conditional expectation or interventional sampling
- The computational bottleneck that KernelSHAP and TreeSHAP optimize
SHAP Waterfall Plot
A visualization that directly demonstrates local accuracy by decomposing a single prediction from the baseline value to the final model output. Each bar shows how a feature pushes the prediction higher or lower.
- Starts at E[f(X)] (the baseline) at the bottom
- Each feature adds or subtracts its SHAP value cumulatively
- Ends at f(x) (the actual prediction) at the top
- The most intuitive proof that local accuracy holds for a given instance

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