Generalized Functional ANOVA in Closed-Form: A Unified View of Additive Explanations

Baptiste Ferrere, Nicolas Bousquet, Fabrice Gamboa, Jean-Michel LoubesarXiv 2026

TL;DR

This paper introduces an explicit, closed-form mathematical basis (a Riesz basis) for the generalized functional ANOVA decomposition under realistic settings where input features are dependent. By framing model interpretability as a clean least-squares regression problem, the authors deliver a fast, model-agnostic algorithm that unifies popular post-hoc explanation tools (like SHAP) and inherently interpretable models (like Generalized Additive Models) under a single theoretical roof.

What Problem Does This Paper Address?

Explainable AI (XAI) is filled with tools designed to open the "black box" of machine learning, such as SHAP, LIME, and various Generalized Additive Models (GAMs). However, many of these popular methods face two major criticisms: they often rely on heuristic engineering rather than rigorous mathematical theorems, and they can be computationally crushing to evaluate.

A mathematically principled alternative is the functional ANOVA (or Hoeffding decomposition), which breaks down a model's prediction into isolated main effects and higher-order feature interactions. While this decomposition is straightforward when input features are completely independent, real-world data rarely is. When features are dependent, finding this decomposition becomes mathematically and computationally intractable for continuous variables. This paper tackles the challenge of finding an explicit, tractable functional ANOVA decomposition for continuous, dependent inputs without losing model-agnostic flexibility.

Methods

The authors bridge the gap between theory and practice by combining Hilbert space methods with the generalized functional ANOVA framework.

  1. The Decomposition Basis: The core breakthrough is the construction of an explicit Riesz basis using tensorized, normalized Legendre polynomials combined with an inverse likelihood weighting mechanism. This weighting adjusts for feature dependencies, restoring a property called "hierarchical orthogonality."
  2. Twofold Truncation: To turn an infinite-dimensional problem into something a computer can solve, the authors apply two structural constraints based on common physical principles:
  3. Sparsity-of-effects: Only a small number of feature interactions truly drive a model's response.
  4. Reluctance principle: Main effects are preferred over complex interactions if they explain the data equally well. This allows them to truncate both the interaction order (typically restricting to main effects $K=1$ or pairwise interactions $K=2$) and the polynomial degrees ($d$).

  5. The Estimation Pipeline: With the basis explicitly defined, the non-parametric optimization problem simplifies to a standard finite-dimensional least-squares regression. The algorithm scales features using a tanh transformation, estimates marginal densities via Legendre expansions, constructs a design matrix, selects the best features using Least Angle Regression (LARS) with a Bayesian Information Criterion (BIC) penalty, and solves the final system using Singular Value Decomposition (SVD).

Illustration of the estimation pipeline from scratch

Datasets

The method was evaluated on one synthetic analytical case (using a Farlie–Gumbel–Morgenstern joint density to control feature dependence) and six diverse, publicly available real-world benchmarks:

  • Bike Sharing (Regression)
  • California Housing (Regression)
  • Census Income (Classification)
  • Electrical Grid Stability (Classification)
  • Diabetes (Classification)
  • Superconductivity (Regression)

Key Insights and Ideas

  • A Unifying Framework: The paper elegantly demonstrates that post-hoc explainers (KernelSHAP, DeepSHAP, TreeHFD) and inherently interpretable architectures (NAMs, EBMs) are not isolated heuristics. Instead, they are all implicitly approximating specific components of the exact same mathematical object: the generalized functional ANOVA.
  • Efficiency vs. Noise: Traditional SHAP values strictly enforce the "efficiency axiom," meaning they must distribute 100% of the model's prediction output across the features. The authors argue this forces SHAP to capture residual noise, resulting in jagged, unstable explanation curves. By relaxing this constraint, their method captures the true underlying additive signal cleanly.
Figure 1: Estimated main effects on California Housing: our method (black) vs TreeHFD (main effects) and TreeSHAP on a trained XGB.

Key Results

  • High Reconstruction Fidelity: Across all tested black-box models (XGBoost, MLPs) and datasets, the method achieved a reconstruction coefficient of determination ($R^2$) of $\ge 0.85$, proving that low-order interactions ($K \le 2$) are highly sufficient to explain complex models.
  • Blazing Fast Computation: Because the problem reduces to a single linear system, it is exceptionally fast. For example, the method successfully explained all 48,842 instances of the Census Income dataset in roughly 0.6 seconds on a standard consumer laptop.
  • Orthogonality Preserved: Despite using plug-in empirical estimates for the unknown marginal densities, the metric measuring deviation from hierarchical orthogonality (MaxCorr) remained remarkably close to zero across experiments.

Limitations and Future Work

  • Bounded Continuous Variables Only: The current formulation relies heavily on Legendre polynomials, meaning it natively expects continuous, bounded inputs. The authors use a tanh pre-processing step to enforce this, but it remains a theoretical constraint.
  • No Mixed-Type Inputs: The framework cannot currently handle mixed continuous-categorical datasets natively, as combining polynomial expansions with discrete summation over categorical levels complicates the basis structure.
  • Density Estimation Sensitivity: The pipeline relies on an elementary tensorized Legendre expansion for density estimation. While fast, more sophisticated density estimators (like normalizing flows or kernel density estimators) could improve accuracy in highly complex data distributions.
  • Compute Optimization: The reference implementation is written in pure Python and runs entirely on the CPU. Porting the linear algebra steps to the GPU would unlock even higher dimensional scaling.

Summary updated

BibTeX
@misc{ferrere2026generalized,
  author = {Baptiste Ferrere and Nicolas Bousquet and Fabrice Gamboa and Jean-Michel Loubes},
  title = {{Generalized Functional ANOVA in Closed-Form: A Unified View of Additive Explanations}},
  year = {2026},
  eprint = {2605.18422},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.18422},
}
Figure