---
title: 'FANOVA-GP Prior: Sensitivity Analysis Framework'
url: https://www.emergentmind.com/topics/fanova-gp-prior
type: topic
---

# FANOVA-GP Prior: Sensitivity Analysis Framework

The FANOVA-GP prior (Functional ANOVA Gaussian Process prior) provides a nonparametric Bayesian framework for variance-based sensitivity analysis and effect decomposition in computer experiments, particularly targeting problems involving functional or high-dimensional outputs. By enforcing explicit orthogonality among all additive and interaction effects, it generalizes the classical ANOVA decomposition to arbitrary distributions, nonlinear dependencies, and both scalar and functional responses. Key constructions include conditional-orthogonality via kernel conditioning, closed-form effect-specific kernels, and efficient algorithms for both effect separation and attributions such as Sobol' and Shapley indices.

## 1. Mathematical Foundations of the FANOVA-GP Prior

The FANOVA-GP prior models the latent function $f(x)$, with input $x = (x_1, \dots, x_d)$, as an explicit additive decomposition:
\[
f(x) = \sum_{S \subseteq D} f_S(x_S),
\]
where $D = \{1, \dots, d\}$, $S$ indexes any subset of features, and $x_S$ denotes the subvector corresponding to $S$. Each component $f_S$ is given a zero-mean Gaussian process prior independent of other components:
\[
f_S \sim \mathcal{GP}\bigl(0, K_S(x_S, x_S')\bigr),
\]
ensuring orthogonality of effects under the feature-space measure:
\[
\operatorname{Cov}(f_S(x_S), f_T(x_T')) = 0 \qquad (S \ne T).
\]
The aggregate prior thus corresponds to a GP with kernel
\[
K(x, x') = \sum_{S \subseteq D} K_S(x_S, x_S').
\]
In the case of functional outputs, a joint variable $(x, t)$ is considered, e.g.,
\[
y(x, t) = f(x, t) + \varepsilon, \qquad \varepsilon \sim \mathcal{N}(0, \sigma^2 \delta_0^2),
\]
and the decomposition becomes
\[
f(x, t) = \sum_{u \subseteq D} f_{u|t}(x_u, t),
\]
where each $f_{u|t}$ is a zero-mean GP with covariance $k_{u|t}$ and conditional independence among components [2506.12701], [2508.14499].

## 2. Kernel Construction and Conditional-Orthogonality

Orthogonality of components is enforced at the kernel level. For each feature $i$, a base positive-definite kernel $k_i(x_i, x_i')$ (e.g., squared-exponential) is orthogonalized to yield a zero-mean kernel:
\[
\tilde{k}_i(x_i, x_i') = k_i(x_i, x_i') - \frac{\mathbb{E}_x[k_i(x, x_i)]\, \mathbb{E}_{x'}[k_i(x', x_i')]}{ \mathbb{E}_{x, x'}[k_i(x, x')] }.
\]
Each interaction kernel for subset $S$ is then constructed as
\[
K_S(x_S, x_S') = \sigma_{|S|}^2 \prod_{i \in S} \tilde{k}_i(x_i, x_i').
\]
The full kernel is the sum over all $S$.

For functional-output decompositions, the output domain kernel $k_t(t, t')$ is introduced, and the subsetwise kernel is
\[
k_{u|t}((x_u, t), (x_u', t')) = k_t(t, t') \prod_{i \in u} \tilde k_i(x_i, x_i').
\]
Orthogonality is guaranteed by conditioning the GP prior for $f_{u|t}$ on the constraint that its mean under each $x_i$ marginal is zero for every $i \in u$ and for all $t$:
\[
\int f_{u|t}(x_u, t) \, dF_i(x_i) = 0 \qquad \forall i \in u.
\]
This is achieved analytically through Gaussian conditioning, where the same kernel formula arises from the removal of the mean component. Consequently, all effect components are mutually orthogonal in $L^2(F)$ for the empirical feature distribution, and each effect has zero expectation in each coordinate [2506.12701], [2508.14499].

## 3. Analytical Indices for Sensitivity Analysis

Once the posterior GP is fitted, one obtains a posterior mean function decomposed by effect:
\[
\hat{f}(x, t) = \sum_{u \subseteq D} \hat{f}_{u|t}(x_u, t),
\]
with each $\hat{f}_{u|t}(x_u, t)$ computable via closed-form kernel evaluations and GP weights. 

Variance-based sensitivity analysis is realized by computing, for each effect $u$ and output location $t$, the *local variance*:
\[
V_{u|t}(t) = \operatorname{Var}_x\left[\hat{f}_{u|t}(x_u, t)\right],
\]
and the total local variance $V_t(t) = \sum_u V_{u|t}(t)$, with the *local Sobol' index*:
\[
S_{u|t}(t) = \frac{V_{u|t}(t)}{V_t(t)}, \qquad 0 \leq S_{u|t}(t) \leq 1, \quad \sum_u S_{u|t}(t) = 1.
\]
Closed-form expressions for $V_{u|t}(t)$ are available:
\[
V_{u|t}(t) = \gamma^{\top} \Big[ (\delta_t^4 k_t k_t^\top) \odot \bigodot_{i \in u} (\delta_i^4 \mathbb{E}_{x_i}[k_i k_i^\top]) \Big] \gamma,
\]
where $\gamma = K^{-1}y$ and $\mathbb{E}_{x_i}[k_i k_i^\top]$ denotes empirical expectations over the $x_i$ marginal [2506.12701].

Averaging these indices in $t$ yields global (expected conditional variance, ECV) variances and ECV indices:
\[
V_u = \mathbb{E}_t[V_{u|t}(t)], \qquad S_u = \frac{V_u}{V},
\]
enabling comprehensive attribution of both main effects and interactions.

## 4. Efficient Computation and Inference Procedures

The computational workflow closely follows that of standard GP regression, with added steps for empirical integration and kernel assembly:
1. Empirical estimation of marginal feature densities $p_i$ (or use of observed marginals) for construction of each $\tilde k_i$.
2. Assembly of the additive, orthogonal kernel matrix $K$ via Hadamard products or, for the additive representation, via Newton's identities for elementary symmetric polynomials, leading to $O(d^2)$ complexity per kernel evaluation.

The covariance matrix in the functional-output case is
\[
K = \delta_0^2 I_N + \delta_t^2 K_t \odot \bigodot_{i=1}^d \Big(1_N 1_N^\top + \delta_i^2 K_i\Big),
\]
with $K_t[n,m] = k_t(t_n, t_m)$, $K_i[n,m] = \tilde{k}_i(x_{n,i}, x_{m,i})$. The marginal likelihood is optimized w.r.t. hyperparameters (scales $\delta_{(*)}^2$, noise $\delta_0^2$, length scales) using gradient-based solvers, and $\sigma^2$ has a closed-form maximizer. 

If outputs are observed on a regular grid in $x$ and $t$, the full kernel decomposes as a Kronecker product, yielding $O(m^3 + n^3)$ cost for $m \times n$ grids [2506.12701].

The implementation for non-functional outputs benefits from explicit Möbius inversion and recursion over symmetric polynomials, avoiding enumeration of all $2^d$ subsets, with all key operations scaling quadratically in $d$ [2508.14499].

## 5. Shapley Attributions and Explainability

The FANOVA-GP family admits exact, closed-form computation of Shapley values for both local (instance-wise) and global (variance-based) feature attributions at quadratic time complexity. The stochastic Shapley value is defined via the cooperative game over function components, capturing the expected contribution (as well as uncertainty) of each input to the functional or scalar output. Global Shapley values quantify feature importance for the model's overall sensitivity structure.

These attributions rest on a Möbius representation of the FANOVA decomposition and recursive algorithms leveraging Newton's identities for elementary symmetric polynomials, facilitating scalable and axiomatically sound explainability for structured probabilistic models [2508.14499].

## 6. Nonparametric, Data-Driven, and Orthogonal Properties

No fixed basis functions are required, and the orthogonality constraint is imposed analytically in the kernel. This enables:
- Fully nonparametric modeling, with data-driven orthogonality valid for any observed $x$ marginal distribution.
- No strong distributional assumptions, as all required kernel integrals are approximated empirically from the data.
- All effect orders (including high-order interactions) present in the prior, controlled by separate scale hyperparameters; uninformative high-order terms are naturally shrunk by their learned variances.
- Equivalence of computational costs to ordinary GP regression, with only minor preprocessing for empirical integral estimation.

This approach yields an explicit, orthogonal, and interpretable ANOVA decomposition for complex, nonlinear, and functional-output computer experiments, obviating the need for manual basis selection or uniform input assumptions, and with analytic variance-based indices available without resorting to Monte Carlo estimation [2506.12701].

## 7. Practical Relevance and Applications

The practical utility of FANOVA-GP priors, including the FOAGP variant for functional outputs, is demonstrated by their effective orthogonal effect decomposition and variance analysis in both simulated and real engineering applications, such as fuselage shape control. This framework provides both practitioners and theorists with an analytically tractable, scalable, and robust tool for nonparametric sensitivity analysis, interpretable uncertainty quantification, and input attribution in a wide range of complex, black-box modeling scenarios [2506.12701], [2508.14499].

Source: https://www.emergentmind.com/topics/fanova-gp-prior