---
title: Shapley Taylor Interaction Index
url: https://www.emergentmind.com/topics/shapley-taylor-interaction-index-stii
type: topic
---

# Shapley Taylor Interaction Index

The Shapley Taylor Interaction Index (STII) is a rigorous, axiomatic framework for attributing the output of a black-box model to feature interactions of arbitrary order. Extending the classical Shapley value, which explains additive feature effects, STII isolates contributions from combinations of features—quantifying higher-order dependencies that are inaccessible to standard single-feature importance metrics. The index is uniquely characterized by an extension of the Shapley axioms and closely parallels the truncated Taylor expansion of a function's multilinear extension, rendering it foundational for interpretable machine learning in domains such as tabular modeling, natural language processing, and vision.

## 1. Formal Definition and Mathematical Foundation

Let $N = \{1,\dots,n\}$ denote the set of features and $f\colon 2^N \to \mathbb{R}$ a value function giving the model output (e.g., probability, logit, or expected prediction) for any subset of “active” features. For an interaction subset $T \subseteq N$, the order-$|T|$ Shapley Taylor Interaction Index is expressed by:

\[
\phi_T(f) = \sum_{S \subseteq N \setminus T} w_{|S|,|T|} \Delta_T f(S),
\]

where the discrete derivative is

\[
\Delta_T f(S) = \sum_{U \subseteq T} (-1)^{|T|-|U|}\, f(S \cup U).
\]

The weight kernel is

\[
w_{s,t} = \frac{s! (n-s-t)!}{(n-t+1)!},
\]

where $s=|S|$, $t=|T|$. For pairwise interactions, the second-order index $\phi_{i,j}(f)$ isolates non-additive effects between features $i$ and $j$. The construction mirrors the Taylor expansion of the multilinear extension of $f$; main effects are zeroth/first derivatives, and interactions correspond to higher-order discrete differences [1902.05622, 2512.05338, 2208.03112, 2403.13106, 2209.04012].

## 2. Fundamental Axioms and Uniqueness

STII is determined by five axioms:

- **Linearity:** $\phi_T(af + bg) = a\phi_T(f) + b\phi_T(g)$ for any functions $f, g$ and scalars $a, b$.
- **Dummy:** If any feature in $T$ is non-interacting (i.e., $f(S \cup \{i\}) - f(S)$ depends only on $f(\{i\})$), then all higher-order $\phi_T$ vanish for $|T|\geq2$.
- **Symmetry:** Index values are invariant under permutations of feature labels; $\phi_T$ re-labels accordingly.
- **Efficiency:** The sum over all subsets $S$ of size $\leq k$ equals the total gain: $\sum_{|S|\leq k} \phi_S(f) = f(N) - f(\emptyset)$.
- **Interaction Distribution:** Pure higher-order interactions do not “leak” to lower orders; for a pure $T$-way cross function, only $\phi_T$ is nonzero for $|T| = k$.

These axioms, proven in [1902.05622, 2512.05338, 2209.04012], guarantee the uniqueness and interpretive fidelity of STII compared to alternative indices from cooperative game theory.

## 3. Algorithmic Computation and Scalability

Computation of STII is combinatorial in the number of features. For order-$k$ interactions, exact evaluation is $O(2^n)$ per $\phi_T$—scaling as $\Theta(4^n)$ for all possible interactions. For tree ensembles, polynomial-arithmetic frameworks such as TreeSHAP-IQ achieve exact indices using recursive traversal with summary, interaction, and quotient polynomials [2401.12069]. Permutation-based Monte Carlo approximations, stratified or antithetic sampling, and dynamic programming reduce variance and cost for large-scale problems [2208.03112, 2403.13106].

Tensor network reformulations (Interaction Tensor SHAP, IT-SHAP) allow for polynomial time and polylog depth computation under Tensor Train decomposition, compressing the exponential complexity of discrete difference enumeration to NC$^2$ parallel time, conditioned on TT-representability of model and distribution tensors [2512.05338].

| Method           | Order Supported  | Complexity      |
|------------------|------------------|----------------|
| Brute Force      | Any              | $O(2^n)$       |
| TreeSHAP-IQ      | Any (trees)      | $O(\text{poly}(n,s))$ |
| Monte Carlo      | Any              | $O(M n^2)$     |
| IT-SHAP          | Any              | $O(\text{poly}(n,k))$  |

## 4. Relationship to Classical Shapley Values and GAMs

The classical Shapley value assigns each feature its marginal contribution, conflating main and interaction effects. STII decomposes the Shapley value into pure main effects (self-interactions) and interactions of arbitrary order. Summing all indices up to order $k$ recovers the total model output, satisfying the efficiency axiom [1902.05622, 2209.04012, 2208.03112].

$k$-order STII recovers Generalized Additive Models (GAMs) with interaction terms up to order $k$: for any $f(x) = \sum_{|S|\leq k} f_S(x_S)$, the STII gives $I_S^k(x) = f_S(x_S)$ exactly [2209.04012]. This aligns the post-hoc attribution with intrinsic interpretability.

## 5. Empirical Applications and Case Studies

STII has demonstrated empirical utility across domains:

- **Tabular Modeling:** In clinical models of colon cancer, STII isolates combinations (e.g., age and bilirubin) whose joint effects exceed main effects—enabling sharper dependence plots and clinicians’ risk stratification [2208.03112].
- **Language Models:** In NLP, pairwise STII quantifies nonlinear syntactic and semantic dependencies (e.g., idiom structure, syntactic proximity). Elevated STII for idiomatic token pairs evidences non-compositionality in model representations [2403.13106].
- **Tree Ensembles:** Datasets such as German Credit, Bank, or California housing show key features’ importance is supplanted by interactions, e.g., latitude–longitude in real estate [2401.12069].
- **Vision and Speech:** STII heatmaps delineate object boundaries in images and phonetic coarticulation in speech frames—reflecting structured interaction patterns in model outputs [2403.13106].

## 6. Practical Considerations and Limitations

Truncation to second- or third-order interactions is typically sufficient in practice for sparse or weakly correlated domains. Computational infeasibility arises for $k > 3$ in high dimensions unless leveraging structure (e.g., trees, TT format, dynamic pruning). Sampling variance can yield spurious small interactions. Interventional vs. observational definitions of $f(S)$ may alter attribution meaning and computational burden [2401.12069].

Projection onto the most influential interactions, ranking by standard deviation or domain priors, is recommended. Centering interactions (interpreting $\phi_{i,j}$ as the extra contribution beyond main effects) clarifies dependence plots [2208.03112, 2403.13106].

## 7. Extensions, Generalizations, and Ongoing Research

The framework admits generalization to structured inputs, as in the Myerson-Taylor index, which internalizes graph connectivity in node-wise and subgraph interactions—uniquely axiomatized for graph neural networks [2405.14352]. The TT contraction formalism in IT-SHAP unifies main and higher-order effects for scalable interaction analysis in high-dimensional models [2512.05338].

Recent work connects STII to the broader family of $n$-Shapley values, which characterize all possible function decompositions up to order $n$, bringing post-hoc explanations for complex models into harmony with inherently interpretable model classes [2209.04012].

Further methodology refinements center on algorithmic efficiency for large ensembles, tensor network contraction, and background distribution estimation—affecting every facet of practical model interpretation for state-of-the-art black-box architectures.

Source: https://www.emergentmind.com/topics/shapley-taylor-interaction-index-stii