Papers
Topics
Authors
Recent
2000 character limit reached

Interaction Tensor SHAP

Updated 13 December 2025
  • Interaction Tensor SHAP is an advanced explainable AI method that computes exact higher-order Shapley–Taylor interactions using tensor train contractions.
  • The framework reformulates discrete derivatives into tensor network contractions, achieving polynomial time complexity and NC² parallelism to overcome exponential barriers.
  • Its tensor train decomposition preserves core Shapley axioms while scaling efficiently to high-dimensional models through bounded TT-ranks.

Interaction Tensor SHAP (IT SHAP) is a framework for computing exact Shapley‐Taylor interaction indices of arbitrary order in high‐dimensional machine learning models, formulated as a tensor network contraction to achieve polynomial time and polylogarithmic depth complexity under tensor train (TT) assumptions. IT SHAP is designed to overcome the exponential computational barrier inherent in existing approaches for higher‐order feature interactions, while maintaining the axiomatic exactness of the Shapley family of attribution methods (Hasegawa et al., 5 Dec 2025).

1. Limitations of Existing Shapley Interaction Methods

Traditional feature attribution techniques in explainable AI largely rely on Shapley value–based formulations, which decompose a model’s output into contributions from individual features. The Shapley–Taylor Interaction Index (STII) generalizes Shapley values to quantify main effects and interactions of arbitrary order by applying discrete derivatives on the value function F:2[n]RF:2^{[n]}\to \mathbb{R}. The central expressions are:

  • Discrete derivative:

δSF(T)=WS(1)SWF(TW)\delta_S F(T) = \sum_{W\subseteq S} (-1)^{|S|-|W|} F(T\cup W)

  • Closed-form STII:

ISk(F)=knT[n]SδSF(T)(n1T)I^k_S(F) = \frac{k}{n} \sum_{T\subseteq [n]\setminus S} \frac{\delta_S F(T)}{\binom{n-1}{|T|}}

However, enumerating all 2n2^n subsets for fixed SS and TT yields complexity Θ(4n)\Theta(4^n) for general order k=nk=n, which is prohibitive in high‐dimensional settings. Marginal SHAP Tensor (MST) methods recast first‐order effects as tensor contractions under TT structure, but do not extend to higher‐order interactions.

2. Mathematical Formalism: Value and Weight Tensors

IT SHAP reformulates STII exactly in terms of tensor contractions involving two central objects:

  • Value Tensor V(M,P)V^{(M,P)} encodes the model output under feature interventions. For routing index s{1,2}ns\in\{1,2\}^n, which selects which features to keep or impute,

Vx,s,y=Fx,y(S(s))=ExP[My(xS(s),xS(s)c)]V_{x,s,y} = F_{x,y}(S(s)) = E_{x'\sim P}[M_y(x_{S(s)}, x'_{S(s)^c})]

  • Weight Tensor W~(k)\widetilde{W}^{(k)}, a modified weighted coalitional tensor (MWCT), assigns the appropriate combinatorial weights αSk(τ)\alpha^k_S(\tau) rolled out from the closed‐form STII expression.

The contraction for order‐kk interactions is:

TS,x,y(k)=τW~S,τ(k)Vx,τ,y(M,P)=ISk(Fx,)T^{(k)}_{S,x,y} = \sum_{\tau} \widetilde{W}^{(k)}_{S,\tau} \cdot V^{(M,P)}_{x,\tau,y} = I^k_S(F_{x,\cdot})

where τ\tau indexes all routing choices.

3. Tensor Train Representation and Polynomial Complexity

A key advance of IT SHAP is showing that the weight tensor W~(k)\widetilde{W}^{(k)} admits an exact TT decomposition provided its combinatorial weighting function αSk(τ)\alpha^k_S(\tau) is computable by finite-state prefix recursion. Specifically, the TT format expresses an nn-mode tensor TT as a chain G(1),,G(n)\langle G^{(1)},\ldots,G^{(n)} \rangle, where each core G(i)Rri1×2×riG^{(i)} \in \mathbb{R}^{r_{i-1} \times 2 \times r_i}, and rir_i are the TT‐ranks.

Finite‐state prefix construction ensures all TT‐ranks of W~(k)\widetilde{W}^{(k)} are bounded by O(n2)\mathcal{O}(n^2) (Lemma 4.6), dramatically reducing complexity compared to the exponential scaling of naïve enumeration.

4. Algorithmic Workflow for IT SHAP Computation

Under TT assumptions for the model, background distribution tensor, and weight tensor, IT SHAP computation proceeds by parallel contraction of per‐mode TT cores:

  • Inputs: TT decompositions for model, background, and W~(k)\widetilde{W}^{(k)}
  • Precomputation: Router cores M(i)M^{(i)} selecting or imputing each feature.
  • For each mode ii, compute:
    • Mode‐ii MST contraction: Ai:=M(i)×2I(i)×2P(i)A_i := M^{(i)} \times_2 I^{(i)} \times_2 P^{(i)}
    • Incorporate weighting: Ci:=Ai×?,?G(i)C_i := A_i \times_{?,?} G^{(i)} (contracting routing with TT core)
  • Output: Chain C(1),C(2),...,C(n)\langle C^{(1)},C^{(2)},...,C^{(n)}\rangle is the TT representation of T(k)T^{(k)}.

Individual interaction terms TS,x,y(k)T^{(k)}_{S,x,y} are extracted via TT slice and chain product with complexity O(nr3)O(n r^3) sequential or NC2^2 parallel time.

Complexity Table

Item STII (Naïve) IT SHAP (TT)
Time complexity Θ(4n)\Theta(4^n) O(nrIT3)O(n \cdot r_{IT}^3) (poly nn)
Space complexity Θ(2n)\Theta(2^n) O(nrIT2)O(n \cdot r_{IT}^2) (poly nn)
TT‐ranks Exponential in nn O(n2)O(n^2) for weight/overall poly nn
Parallel complexity Exponential barrier NC2^2 (depth O(log2n)O(\log^2 n))
Essential operation 2n2^n subset enumeration TT contraction, rank‐dependent

5. Axiomatic Exactness and Guarantees

IT SHAP retains the five core axiomatic properties of STII—linearity, dummy, symmetry, efficiency, and interaction distribution—ensuring rigorous attribution semantics. For first‐order (k=1k=1), it exactly matches MST/Shapley value decomposition. The framework thus provides a unified formalization for both main and higher‐order effects with exactness inherited from STII.

6. Illustrative Construction and Scaling Implications

For explicit illustration, consider n=3n=3 features and k=2k=2: the routing index τ{1,2}3\tau \in \{1,2\}^3 yields eight configurations. For S={1,2}S = \{1,2\}, the MWCT expansion recovers the expected discrete derivative, and the TT‐core construction yields ranks 12\leq 12. The finite state at position ii is determined by the running count and flags for membership in SS, demonstrating polynomial TT‐rank scaling.

A plausible implication is that, whenever empirical models and data distributions exhibit TT‐ranks in the low hundreds, IT SHAP is practical up to hundreds of dimensions on commodity hardware.

7. Practical Impact and Future Directions

By reformulating Shapley–Taylor interactions as TT‐structured tensor contractions, IT SHAP renders tractable the analysis of higher‐order interactions in large black box models. The approach is foundational for scalable interaction‐aware explainable AI (XAI), enabling a granular decomposition of feature interplay previously infeasible in deep and high‐dimensional architectures. Theoretical results guarantee polynomial time and NC2^2 parallelism under TT‐rank conditions (Theorem 4.8). In general tensor networks (TN), complexity is #P‐hard, so TT structure is essential for scalability.

Future research directions include characterizing TT‐rank bounds for real model/distribution pairs, error analysis for background estimation, empirical benchmarking for large nn, and extensions to alternative tensor formats such as Tucker and CP. Preliminary results indicate feasibility for dimensions nn in the hundreds, provided TT ranks remain manageable.

In summary, Interaction Tensor SHAP establishes the first provably exact, scalable, and axiomatically consistent framework for high‐order Shapley–Taylor interactions, formulated as polynomial‐time tensor train contractions (Hasegawa et al., 5 Dec 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Whiteboard

Follow Topic

Get notified by email when new papers are published related to Interaction Tensor SHAP (IT SHAP).