Inferensys

Glossary

Shapley-Taylor Index

A generalization of SHAP interaction values that quantifies the importance of interactions among any specified number of features.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
INTERACTION ATTRIBUTION

What is Shapley-Taylor Index?

The Shapley-Taylor index is a generalization of SHAP values that quantifies the importance of feature interactions of any specified order for a model prediction.

The Shapley-Taylor index decomposes a model's prediction into additive components representing the marginal contribution of individual features and their interactions up to a specified order k. It extends the standard Shapley value, which captures only first-order effects, by applying a truncated Taylor expansion to the coalitional game theory value function. This allows an analyst to explicitly attribute credit not just to a single feature, but to a specific pair or triplet of features working in concert.

Computing the index involves summing over all subsets of features of size less than or equal to k, using discrete derivatives to isolate the pure interaction effect. A Shapley-Taylor interaction index of order 2, for instance, captures pairwise synergies that a standard additive explanation would miss. This provides a rigorous, axiomatically justified method for auditing complex, non-linear dependencies in black-box models.

INTERACTION ATTRIBUTION

Key Properties of the Shapley-Taylor Index

The Shapley-Taylor Index generalizes SHAP values to quantify the importance of feature interactions of any specified order, providing a rigorous game-theoretic decomposition of a model's prediction into main effects and higher-order synergies.

01

Interaction Index Definition

The Shapley-Taylor index distributes credit among all subsets of features of size k rather than just individual features. For a given order k, it computes the fair allocation of the model's output to each k-way interaction by applying the Shapley value formula to the lattice of feature subsets. This generalizes the standard SHAP value, which is the order-1 Shapley-Taylor index, to capture pairwise synergies (k=2), three-way interactions (k=3), and beyond.

02

Efficiency Over Interactions

A fundamental property of the Shapley-Taylor index is that the sum of all interaction effects across all orders exactly equals the model's prediction minus the baseline. Formally, summing the attributions for all subsets of size 1 through d (where d is the total number of features) reconstructs the full model output. This guarantees a complete and lossless decomposition of the prediction into main effects and interaction effects of increasing complexity.

03

Interaction Faithfulness

The Shapley-Taylor index satisfies an interaction faithfulness axiom: if a model's output can be perfectly represented as a sum of functions depending on at most k features, then all interaction indices for orders greater than k are exactly zero. This property ensures the index does not hallucinate spurious high-order interactions when the model's decision function is inherently simpler, providing a truthful representation of the model's interaction structure.

04

Recursive Computation

The Shapley-Taylor index can be computed recursively from lower-order indices. The order-k interaction effect for a feature set S is derived by taking the discrete derivative of the model's prediction with respect to S and subtracting all lower-order effects that are subsumed within S. This recursive structure mirrors the Möbius inversion on the Boolean lattice and ensures that each interaction index captures only the pure k-way synergy not explained by any subset of the interacting features.

05

Relationship to ANOVA Decomposition

The Shapley-Taylor index is closely related to the functional ANOVA decomposition of a model. While ANOVA decomposes a function into orthogonal components of increasing interaction order under a uniform input distribution, the Shapley-Taylor index weights these components by Shapley-style coalitional coefficients. This weighting ensures the decomposition satisfies the efficiency and symmetry axioms of cooperative game theory, making it more robust for feature attribution than standard ANOVA.

06

Computational Complexity

Computing the exact Shapley-Taylor index for all interactions of order k requires evaluating the model on O(d^k) subsets in the worst case, where d is the number of features. For pairwise interactions (k=2), this scales quadratically with the number of features. Practical implementations use sampling approximations and leverage the recursive structure to reduce the number of model evaluations, trading exactness for tractability in high-dimensional settings.

INTERACTION ATTRIBUTION COMPARISON

Shapley-Taylor Index vs. SHAP Interaction Values

Comparing the Shapley-Taylor Index, which quantifies feature interactions of any specified order, against standard pairwise SHAP Interaction Values.

FeatureShapley-Taylor IndexSHAP Interaction Values

Interaction Order

Arbitrary (k-order)

Pairwise (2nd-order)

Theoretical Foundation

Generalized Shapley values with Taylor expansion

Shapley interaction index

Captures 3-way interactions

Captures pairwise interactions

Computational Complexity

O(2^n) exact; sampling approximations available

O(n^2) for TreeSHAP; higher for model-agnostic

Efficiency Property

Satisfies k-order efficiency

Satisfies interaction-level efficiency

Primary Use Case

Identifying complex multi-feature synergies

Visualizing pairwise feature dependencies

Output Granularity

Interaction tensors of specified order

Symmetric interaction matrix

SHAPLEY-TAYLOR INDEX

Frequently Asked Questions

Clear, technically precise answers to the most common questions about the Shapley-Taylor interaction index and its role in model explainability.

The Shapley-Taylor Index is a feature attribution method that generalizes the Shapley value to quantify the importance of interactions among any specified number of features, not just individual contributions. While standard SHAP values decompose a prediction into the additive sum of single-feature effects, the Shapley-Taylor index decomposes the prediction into a sum of effects attributed to all feature subsets up to a chosen interaction order k. It does this by applying a truncated Taylor expansion to the discrete set function representing the model, distributing credit according to the discrete derivatives (or interaction effects) of that function. This provides a principled, game-theoretic allocation of importance to feature pairs, triplets, and higher-order coalitions, offering a more complete picture of a model's decision logic than marginal, single-feature attributions alone.

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.