Inferensys

Glossary

Explanation Model

A simple, interpretable surrogate model, such as a linear function of binary variables, used to approximate the behavior of a complex model locally.
ML engineer managing model training cluster on laptop, GPU utilization visible, technical deep learning setup.
SURROGATE INTERPRETABILITY

What is an Explanation Model?

An explanation model is a simple, interpretable surrogate model used to approximate the predictions of a complex black-box model for a specific local input.

An explanation model is a simple, interpretable surrogate model, such as a linear function of binary variables, used to approximate the behavior of a complex model locally. It belongs to the class of additive feature attribution methods, expressing a prediction as the sum of individual feature contributions relative to a baseline value. The explanation model is trained on perturbed samples near the instance being explained, ensuring local accuracy.

In the SHAP framework, the explanation model is a linear function of simplified binary features indicating the presence or absence of original inputs. The coefficients of this linear model are the Shapley values, which satisfy the efficiency property by summing exactly to the difference between the model's prediction and the baseline. This design guarantees a unique, fair distribution of credit among features.

FOUNDATIONAL AXIOMS

Key Properties of Explanation Models

An effective explanation model must satisfy specific mathematical properties to ensure its attributions are fair, consistent, and faithful to the original complex model.

01

Local Accuracy

The explanation model must match the original model's output for the specific input being explained. If the original model predicts a value of $f(x)$, the sum of all feature attributions plus a baseline must exactly equal $f(x)$.

  • Definition: $f(x) = \phi_0 + \sum_{i=1}^{M} \phi_i$
  • Significance: Guarantees the explanation is faithful to the prediction, not an approximation
  • Violation: If attributions don't sum to the prediction, the explanation is incomplete or misleading
02

Missingness

Features that are not present in the original input must receive an attribution of zero. This ensures that absent features do not artificially influence the explanation.

  • Definition: If $x_i' = 0$ (feature is missing), then $\phi_i = 0$
  • Practical Impact: Prevents the model from assigning importance to features that don't exist in the instance
  • Implementation: Achieved by mapping simplified binary inputs to original feature space where missing features are replaced with baseline values
03

Consistency

If a model changes so that a feature's marginal contribution increases or stays the same regardless of other features, that feature's attribution should not decrease. This property ensures attributions track true feature importance.

  • Formal Statement: If $f_x'(S \cup {i}) - f_x'(S) \geq f_x(S \cup {i}) - f_x(S)$ for all subsets $S$, then $\phi_i(f', x) \geq \phi_i(f, x)$
  • Why It Matters: Prevents counterintuitive situations where a more important feature receives a lower attribution
  • Unique Solution: Shapley values are the only additive feature attribution method satisfying consistency
04

Efficiency

The sum of all feature attributions must exactly equal the difference between the model's prediction and the expected model output. This property, inherited from Shapley values, ensures complete distribution of the prediction among features.

  • Equation: $\sum_{i=1}^{M} \phi_i = f(x) - E[f(X)]$
  • Interpretation: The total 'effect' is fully partitioned among features with no residual
  • Baseline Role: $E[f(X)]$ serves as the starting point; attributions show how each feature pushes away from this average
05

Symmetry

Two features that make identical marginal contributions across all possible coalitions must receive identical attributions. This ensures the explanation model treats features fairly based solely on their model impact.

  • Condition: If $f(S \cup {i}) = f(S \cup {j})$ for all subsets $S$ not containing $i$ or $j$, then $\phi_i = \phi_j$
  • Fairness Guarantee: Prevents arbitrary bias in feature importance assignment
  • Example: Two perfectly correlated features with identical model effects will receive equal SHAP values
06

Linearity

If a model is a linear combination of two sub-models, the attribution for the combined model equals the same linear combination of individual attributions. This enables compositional reasoning about explanations.

  • Property: $\phi_i(\alpha f + \beta g) = \alpha \phi_i(f) + \beta \phi_i(g)$
  • Ensemble Application: SHAP values for an ensemble model are the weighted average of SHAP values for individual models
  • Practical Use: Simplifies explanation computation for bagged or boosted ensembles by decomposing into base learners
EXPLANATION MODELS

Frequently Asked Questions

Clear answers to common questions about surrogate models, local approximations, and the mechanics of interpretable explanations.

An explanation model is a simple, interpretable surrogate—such as a linear function of binary variables or a shallow decision tree—designed to approximate the local decision boundary of a complex black-box model for a specific prediction. Unlike the original opaque model, the explanation model is inherently human-readable. It operates on a simplified input representation, often using binary features that indicate the presence or absence of interpretable components like super-pixels in an image or keywords in a text. The core principle is local fidelity: the explanation model does not need to be globally accurate, but it must closely mimic the complex model's behavior in the immediate neighborhood of the instance being explained. This trade-off between interpretability and fidelity is the foundational concept behind techniques like LIME (Local Interpretable Model-agnostic Explanations).

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.