SHAP values quantify the impact of each molecular feature on a model's prediction by calculating its average marginal contribution across all possible feature subsets. Rooted in cooperative game theory, this method assigns an importance score to each descriptor—such as LogP, molecular weight, or a specific ECFP bit—by comparing the model's output with and without that feature, ensuring a fair and consistent distribution of credit.
Glossary
SHAP Values

What is SHAP Values?
SHAP (SHapley Additive exPlanations) values are a game-theoretic approach to explain the output of any machine learning model by computing the marginal contribution of each feature to a specific prediction.
In molecular property prediction, SHAP analysis reveals why a model flagged a compound for hERG cardiotoxicity or predicted high oral bioavailability, moving beyond a black-box score to an atomistic or substructural rationale. This local and global interpretability is critical for guiding medicinal chemistry decisions, debugging models by identifying spurious correlations, and satisfying the rigorous applicability domain and algorithmic explainability requirements of preclinical development.
Key Properties of SHAP Values
SHAP (SHapley Additive exPlanations) values provide a unified framework for interpreting molecular property predictions by assigning each feature an importance value for a particular prediction, grounded in cooperative game theory.
Local Accuracy
The sum of all feature attributions equals the difference between the model's prediction for a specific molecule and the average prediction across the dataset. This property, also known as efficiency, ensures the explanation is a faithful decomposition of the output. For a toxicity prediction model, if the base value is 0.3 and the prediction is 0.8, the SHAP values for all molecular fragments will sum to exactly 0.5.
Missingness
A feature that is already missing from the input—such as a structural fragment not present in the molecule—is guaranteed an attribution of zero. This prevents the explanation from arbitrarily assigning importance to absent substructures. In molecular fingerprinting, bits representing absent circular substructures will not influence the SHAP explanation for that compound.
Consistency
If a model is retrained so that a feature's marginal contribution increases or stays the same regardless of other features, the SHAP value for that feature will never decrease. This formal guarantee ensures that explanations track model behavior logically. If a retrained hERG cardiotoxicity model relies more heavily on a basic amine substructure, its SHAP value will reflect this increased dependence.
Additivity
SHAP values are linearly additive across models. For an ensemble method like a random forest predicting logP, the SHAP value for a functional group is the average of its SHAP values across all individual trees. This property extends to explaining multi-task models, where the importance of a molecular feature for a combined ADMET score can be decomposed into its contributions to individual endpoints.
Symmetry
If two features contribute identically to the model's output in every possible coalition of other features, they receive identical SHAP values. In molecular property prediction, two topologically equivalent atoms in a symmetric molecule—such as the two methyl groups in para-xylene—will be assigned equal importance for any prediction, preserving chemical symmetry in the explanation.
Kernel SHAP Estimation
Exact SHAP computation is exponential in the number of features, making it intractable for high-dimensional molecular representations. Kernel SHAP is a model-agnostic approximation that uses a weighted linear regression over sampled coalitions. For a molecule encoded with 2048-bit ECFP4 fingerprints, Kernel SHAP samples subsets of bits to estimate their contributions without evaluating all 2^2048 possible coalitions.
Frequently Asked Questions
Clear, technically precise answers to the most common questions about SHapley Additive exPlanations and their application in molecular property prediction and model interpretability.
SHAP (SHapley Additive exPlanations) values are a game-theoretic approach to explain the output of any machine learning model by computing the marginal contribution of each feature to a specific prediction. The method is rooted in Shapley values from cooperative game theory, where the 'game' is the prediction task and the 'players' are the input features. SHAP assigns each feature an importance value by considering all possible subsets of features and calculating how the prediction changes when a feature is included versus excluded. The result is an additive feature attribution where the sum of all SHAP values equals the difference between the model's actual prediction and the average prediction. For molecular property prediction, this means you can decompose a predicted LogP or hERG inhibition value into contributions from individual atoms, functional groups, or molecular descriptors, providing a transparent audit trail for regulatory-critical decisions.
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
Core concepts that contextualize SHAP values within the broader landscape of interpretable machine learning for molecular property prediction.
Integrated Gradients
A gradient-based attribution method that satisfies the completeness axiom by accumulating gradients along a path from a baseline input to the actual input. Unlike SHAP, it is designed specifically for differentiable models like neural networks. For molecular property prediction, it can attribute a toxicity score to individual atoms by integrating gradients through a message-passing neural network.
Feature Importance vs. Feature Attribution
A critical distinction in explainability:
- Feature Importance: Global, model-level metrics (e.g., permutation importance, Gini impurity) that rank features by their average contribution across all predictions.
- Feature Attribution: Local, instance-level explanations (e.g., SHAP values) that decompose a single prediction into feature contributions. In drug discovery, global importance identifies which molecular descriptors generally influence logP, while SHAP explains why a specific molecule received a high clearance prediction.
DeepSHAP
An adaptation of SHAP for deep neural networks that combines SHAP values with DeepLIFT's linear composition rule. DeepSHAP approximates SHAP values by backpropagating contributions through the network layers. For molecular graph neural networks, it can assign importance scores to individual atoms and bonds, revealing which functional groups drive a binding affinity prediction.
KernelSHAP
The original model-agnostic SHAP implementation that estimates Shapley values using a weighted linear regression over a sampled coalition space. While guaranteed to converge to true SHAP values, KernelSHAP is computationally expensive for high-dimensional molecular fingerprints (e.g., 2048-bit ECFP vectors). It serves as a fallback when model-specific methods like TreeSHAP or DeepSHAP are unavailable.

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