The baseline value is the model's average prediction over a representative background dataset, serving as the starting point for SHAP explanations. It represents the expected output when all features are missing or unknown. In the additive feature attribution framework, individual Shapley values quantify how each feature pushes the prediction away from this reference point toward the actual model output for a specific instance.
Glossary
Baseline Value

What is Baseline Value?
The baseline value is the expected model prediction across a background dataset, representing the output when no feature information is available.
Selecting an appropriate baseline is critical for meaningful explanations. A poorly chosen background dataset can produce attributions that violate the efficiency property, where the sum of feature contributions no longer equals the difference between the prediction and the baseline. Common choices include the training data mean prediction or a cluster centroid, with the selection directly impacting whether SHAP reflects interventional or observational conditional expectations.
Key Properties of the Baseline Value
The baseline value serves as the anchor point for all SHAP explanations. It represents the model's expected output when no feature information is available, providing the reference from which all feature contributions are measured.
Definition and Mathematical Role
The baseline value is the expected model prediction over the background dataset. Formally, it is the average prediction when all features are missing: E[f(x)] where the expectation is taken over the background distribution.
- Acts as the intercept term in the additive explanation model
- Represents the prediction before any feature information is known
- Every SHAP value measures deviation from this baseline
Efficiency Property Connection
The Efficiency Property of Shapley values guarantees that the sum of all feature attributions plus the baseline value exactly equals the model's prediction for any instance.
- f(x) = baseline + Σ SHAP values
- Ensures complete decomposition of the prediction
- No unexplained residual remains
- Critical for auditability in regulated industries
Background Dataset Selection
The baseline value depends critically on the background dataset used to compute it. This dataset represents the distribution of 'missing' feature values.
- Training data mean: Most common choice, represents average case
- Median sample: Robust to outliers in skewed distributions
- Domain-specific reference: A clinically normal patient, a zero-signal state
- K-means centroids: Multiple baselines for clustered data
- The choice directly impacts SHAP value interpretation
Waterfall Plot Anchor
In a SHAP waterfall plot, the baseline value appears as the starting point at the bottom of the chart. Each feature's SHAP value is then stacked sequentially, pushing the prediction upward or downward.
- E[f(x)] sits at the base of the waterfall
- Red arrows push above the baseline (positive contribution)
- Blue arrows push below the baseline (negative contribution)
- The final bar equals f(x), the actual prediction
- Provides intuitive visual decomposition for single-instance explanations
Interventional vs. Observational Baseline
The method of computing the baseline distinguishes two SHAP formulations:
- Interventional SHAP: Breaks feature correlations by sampling from the marginal distribution. The baseline is the unconditional expectation. Reflects causal 'what-if' interventions.
- Observational SHAP: Preserves correlations by conditioning on observed features. The baseline respects the joint distribution. Reflects model behavior on the natural data manifold.
- The choice affects how correlated features are attributed
Practical Implementation
In the SHAP library, the baseline value is computed automatically from the background dataset passed to the Explainer object.
shap.Explainer(model, background_data)computes E[f(x)] internally- For TreeSHAP, the background dataset also defines the feature splitting paths
- For DeepSHAP, a single reference sample or mean is often used
- The
base_valueattribute of a SHAP explanation object stores this value - Can be accessed via
explanation.base_valuesfor inspection
Frequently Asked Questions
Clear answers to common questions about the role and mechanics of the baseline value in SHAP explanations.
The baseline value is the expected model output averaged over the entire background dataset. It represents the model's prediction when no feature information is known for a specific instance. In the additive feature attribution framework, the baseline serves as the starting point—the prediction you would make if all features were missing. Every SHAP value then quantifies how much a specific feature pushes the prediction away from this baseline. Mathematically, the baseline is the intercept term in the explanation model, ensuring the Efficiency Property holds: the sum of all SHAP values plus the baseline exactly equals the model's actual prediction for the instance being explained.
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
Understanding the baseline value is essential for interpreting SHAP explanations. Explore these related concepts that define how feature contributions are measured and visualized.
Background Dataset
A representative sample of data used to compute the expected model output and to impute missing features during SHAP value estimation. The baseline value is the average prediction over this dataset.
- Serves as the reference distribution for feature absence
- Quality directly impacts explanation accuracy
- Should reflect realistic, non-informative inputs
Efficiency Property
A Shapley axiom ensuring that the sum of all feature attributions exactly equals the difference between the model's prediction and the baseline value. This guarantees a complete, fair decomposition of the output.
- Total attribution = f(x) - baseline_value
- No unexplained residual remains
- Fundamental to additive feature attribution methods
SHAP Waterfall Plot
A visualization that decomposes a single prediction by showing how each feature pushes the model output from the baseline value to the final prediction. The plot starts at E[f(X)] and ends at f(x).
- Blue bars indicate features decreasing the prediction
- Red bars indicate features increasing the prediction
- Ideal for auditing individual decisions
Local Accuracy
The property guaranteeing that an explanation model matches the original model's output for a specific input instance. The explanation's sum of feature attributions plus the baseline value must equal f(x).
- Ensures the explanation is faithful to the model
- Requires a correctly specified baseline value
- Violated if features are not properly accounted for
Missingness
A SHAP property requiring that features not present in the original input are assigned an attribution of zero. The baseline value represents the prediction when all features are missing.
- Ensures absent features don't receive spurious credit
- Relies on the background dataset for imputation
- Critical for handling incomplete or partial inputs
Observational SHAP
A SHAP formulation that preserves feature correlations by conditioning on observed values, reflecting the model's behavior on the natural data manifold. The baseline remains the expected prediction over the background dataset.
- Uses conditional expectation for imputation
- Avoids evaluating the model on unrealistic data points
- Preferred when causal interventions are not the goal

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