Although Shapley additive explanations (SHAP) can be computed in polynomial time for simple models like decision trees, they unfortunately become NP-hard to compute for more expressive black-box models like neural networks - where generating explanations is often most critical. In this work, we analyze the problem of computing SHAP explanations for *Tensor Networks (TNs)*, a broader and more expressive class of models than those for which current exact SHAP algorithms are known to hold, and which is widely used for neural network abstraction and compression. First, we introduce a general framework for computing provably exact SHAP explanations for general TNs with arbitrary structures. Interestingly, we show that, when TNs are restricted to a *Tensor Train (TT)* structure, SHAP computation can be performed in *poly-logarithmic* time using *parallel* computation. Thanks to the expressiveness power of TTs, this complexity result can be generalized to many other popular ML models such as decision trees, tree ensembles, linear models, and linear RNNs, therefore tightening previously reported complexity results for these families of models. Finally, by leveraging reductions of binarized neural networks to Tensor Network representations, we demonstrate that SHAP computation can become *efficiently tractable* when the network's *width* is fixed, while it remains computationally hard even with constant *depth*. This highlights an important insight: for this class of models, width - rather than depth - emerges as the primary computational bottleneck in SHAP computation.
翻译:尽管对于决策树等简单模型,沙普利加性解释(SHAP)可以在多项式时间内计算,但遗憾的是,对于神经网络等更具表现力的黑盒模型——生成解释通常最为关键的场景,其计算却变为NP难问题。在本工作中,我们分析了为*张量网络(TNs)*计算SHAP解释的问题,这是一类比当前已知存在精确SHAP算法的模型更广泛、更具表现力的模型类别,并广泛用于神经网络的抽象与压缩。首先,我们提出了一个通用框架,用于为具有任意结构的一般TNs计算可证明精确的SHAP解释。有趣的是,我们证明,当TNs被限制为*张量链(TT)*结构时,SHAP计算可以在*多对数*时间内通过*并行*计算完成。得益于TT的表达能力,这一复杂度结果可以推广到许多其他流行的机器学习模型,如决策树、树集成、线性模型和线性RNNs,从而收紧先前报道的这些模型族的复杂度结果。最后,通过利用二值化神经网络到张量网络表示的约简,我们证明当网络的*宽度*固定时,SHAP计算可以变得*高效易处理*,而即使*深度*为常数,其计算仍然困难。这突显了一个重要见解:对于此类模型,宽度——而非深度——成为SHAP计算中的主要计算瓶颈。