Functional ANOVA offers a principled framework for interpretability by decomposing a model's prediction into main effects and higher-order interactions. For independent features, this decomposition is well-defined, strongly linked with SHAP values, and serves as a cornerstone of additive explainability. However, the lack of an explicit closed-form expression for general dependent distributions has forced practitioners to rely on costly sampling-based approximations. We completely resolve this limitation for categorical inputs. By bridging functional analysis with the extension of discrete Fourier analysis, we derive a closed-form decomposition without any assumption. Our formulation is computationally very efficient. It seamlessly recovers the classical independent case and extends to arbitrary dependence structures, including distributions with non-rectangular support. Furthermore, leveraging the intrinsic link between SHAP and ANOVA under independence, our framework yields a natural generalization of SHAP values for the general categorical setting.
翻译:函数方差分析(Functional ANOVA)通过将模型预测分解为主效应和高阶交互作用,为可解释性提供了原则性框架。对于独立特征,该分解具有明确形式,与SHAP值紧密关联,并作为加性可解释性的基石。然而,针对一般相关分布缺乏显式闭式解这一缺陷,迫使从业者依赖高成本采样近似方法。我们针对分类输入完全解决了该局限性。通过将泛函分析与离散傅里叶分析的扩展相结合,我们在无任何假设条件下推导出闭式分解。我们的公式具有极高的计算效率,既能无缝恢复经典独立情形,又能扩展到任意依赖结构(包括非矩形支撑的分布)。此外,利用SHAP与ANOVA在独立性条件下的内在联系,我们的框架为一般分类设置下SHAP值的自然推广提供了理论支撑。