Inferensys

Glossary

Consistency

A Shapley property stating that if a model changes so a feature's contribution increases, its SHAP value should not decrease.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
SHAPLEY AXIOM

What is Consistency?

The Consistency property is a fundamental Shapley axiom ensuring that if a model's reliance on a feature increases, that feature's attributed importance does not arbitrarily decrease.

Consistency is a critical axiom in the Shapley value framework guaranteeing that an explanation model behaves logically under model modification. Formally, if a model changes such that a specific feature's marginal contribution increases or stays the same across all coalitions, the SHAP value assigned to that feature must not decrease. This prevents counter-intuitive attribution shifts.

This property ensures that additive feature attribution methods remain faithful to the underlying model's dependence structure. Without consistency, a feature could become more important to the model's logic yet receive a lower importance score, undermining trust in the explanation. It distinguishes SHAP from other attribution methods that violate this principle.

SHAPLEY AXIOMS

Key Characteristics of the Consistency Property

The Consistency property is a fundamental Shapley axiom that ensures feature importance remains logically coherent when a model is updated. It guarantees that if a model changes so a feature's contribution increases, its SHAP value will not decrease.

01

Formal Definition

Consistency states that if a model changes such that a feature's marginal contribution increases or stays the same across all subsets, the feature's SHAP value must not decrease. Formally, if f_x'(S) - f_x'(S\{i}) ≥ f_x(S) - f_x(S\{i}) for all subsets S, then φ_i(f', x) ≥ φ_i(f, x). This ensures the explanation method respects the underlying model's behavior.

02

Distinction from Local Accuracy

While Local Accuracy (Efficiency) ensures the sum of attributions equals the prediction difference, Consistency governs how attributions change between models. Local Accuracy is a per-instance constraint; Consistency is a cross-model constraint. A method can satisfy Local Accuracy but violate Consistency, leading to counterintuitive explanations when models are retrained or updated.

03

Uniqueness of Shapley Values

Consistency, combined with Efficiency, Symmetry, and Dummy (Missingness), uniquely defines the Shapley value solution concept. No other additive feature attribution method satisfies all four axioms simultaneously. This uniqueness is why SHAP is considered the theoretically principled choice for model explanation—any method violating Consistency will produce logically inconsistent feature rankings across model iterations.

04

Practical Implication: Model Retraining

When a model is retrained and a feature becomes genuinely more important, Consistency guarantees its SHAP value reflects this. Without Consistency, a feature's attributed importance could paradoxically drop even as its true impact grows. This is critical for model monitoring and drift detection in production ML systems where feature importance trends must be tracked reliably over time.

05

Violation Example: Feature Dropout

Consider a model that relies heavily on feature A. If the model is simplified to ignore feature A entirely, Consistency requires feature A's SHAP value to drop to zero. A method violating Consistency might still assign a non-zero value, or even increase it. This demonstrates why Consistency is essential for feature selection and model pruning workflows where features are systematically removed.

06

Relationship to Monotonicity

Consistency is closely related to the concept of monotonicity in attribution. If a feature's functional contribution increases monotonically across all coalitions, its attribution must increase monotonically. This prevents explanation methods from exhibiting erratic, non-monotonic behavior where adding more evidence for a feature's importance paradoxically reduces its attributed score.

SHAP CONSISTENCY

Frequently Asked Questions

Explore the formal Shapley property of consistency and its critical role in ensuring that feature attribution methods remain logically coherent when underlying models are updated.

The consistency property is a fundamental Shapley axiom stating that if a model changes so that a specific feature's marginal contribution increases or stays the same regardless of other features present, the feature's assigned SHAP value should not decrease. This property is critical for algorithmic explainability because it guarantees logical coherence in feature attribution. Without consistency, a feature that becomes objectively more important to the model's decision-making process could paradoxically receive a lower importance score after retraining. This ensures that SHAP (SHapley Additive exPlanations) remains the only additive feature attribution method that satisfies consistency alongside local accuracy and missingness, making it the gold standard for high-stakes model auditing where trust in the explanation's stability over model iterations is mandatory.

AXIOM COMPARISON

Consistency vs. Other Shapley Axioms

How the Consistency property differs from the other three foundational Shapley axioms in cooperative game theory and SHAP.

AxiomConsistencyEfficiencySymmetryDummy

Core Requirement

Attribution must track model changes monotonically

Sum of attributions equals prediction minus baseline

Identical contributions yield identical values

Zero contribution features get zero value

Formal Condition

If f'(S) - f'(S{i}) ≥ f(S) - f(S{i}) for all S, then φ_i(f') ≥ φ_i(f)

Σ φ_i = f(N) - f(∅)

If f(S∪{i}) = f(S∪{j}) for all S, then φ_i = φ_j

If f(S∪{i}) = f(S) for all S, then φ_i = 0

Primary Role

Ensures model improvement logic

Ensures complete accounting

Ensures fairness

Ensures irrelevance exclusion

Violation Consequence

Feature importance can decrease when actual impact increases

Attributions do not sum to prediction

Equivalent features get different scores

Irrelevant features receive non-zero credit

SHAP Guarantee

Unique to Shapley

Model-Agnostic

Computational Cost

Verified analytically, not computed per instance

Enforced by additive construction

Enforced by permutation averaging

Enforced by marginal contribution definition

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.