---
title: Local and Global Explanation Methods
url: https://www.emergentmind.com/topics/local-and-global-explanation-methods
type: topic
---

# Local and Global Explanation Methods

Local and global explanation methods are formal approaches used in interpretable machine learning to elucidate how complex models make decisions. Local explanation methods characterize the prediction for an individual instance, typically by attributing contributions to features relevant for that point. Global explanation methods aim to summarize how a model behaves on average, across the entire input domain, by decomposing its prediction function or aggregating local mechanisms. The distinction, and the methodologies that bridge it, are central to modern explainable AI, spanning regression, classification, time-series, text, and vision domains.

## 1. Formal Decomposition and Marginal Identification

Functional decomposition is a rigorous approach to unify local and global explanation methods by expressing any prediction function $f : \mathbb{R}^d \to \mathbb{R}$ as a sum over all feature subsets:
$$
f(x) = \sum_{S \subseteq \{1,\ldots,d\}} f_S(x_S)
$$
Here, $f_\emptyset=f_0$ (intercept), $f_{\{k\}}(x_k)$ encodes the main effect of feature $k$, and $f_S(x_S)$ for $|S|\ge2$ encodes pure interactions. This ANOVA-style expansion is not unique unless an additional identification constraint is imposed.

The marginal-identification constraint requires that for all $S$,
$$
\sum_{T: T\cap S \neq \emptyset} \int f_T(x_T) p_S(x_S) dx_S = 0
$$
where $p_S$ is the marginal density of $X_S$. This uniquely pins down each $f_S$ via Möbius inversion:
$$
f_S(x_S) = \sum_{V \subseteq S} (-1)^{|S \setminus V|} \int f_{\text{full}}(x) p_{-V}(x_{-V}) dx_{-V}
$$
This identification recovers core local and global quantities. Specifically, for any singleton $k$, the partial dependence plot (PDP) coincides with $f_0 + f_k(x_k)$, while interventional SHAP values use weighted sums over main effect and interaction components [2208.06151].

## 2. Relationships with Core Attribution Methods

### 2.1 Partial Dependence and Feature Effects
The partial dependence plot for $k$ is:
$$
PD_k(x_k) = \int f(x_k, x_{-k}) p_{-k}(x_{-k}) dx_{-k}
$$
Under marginal identification, this simplifies to $f_0 + f_k(x_k)$. For any feature subset $S$,
$$
PD_S(x_S) = \int f(x) p_{-S}(x_{-S}) dx_{-S} = \sum_{U \subseteq S} f_U(x_U)
$$

### 2.2 Interventional SHAP Values
The interventional SHAP value for $k$:
$$
\phi_k(x) = \sum_{S: k \in S} \frac{1}{|S|} f_S(x_S)
$$
Each interaction term $f_S$ that involves $k$ is apportioned $1/|S|$ of its value to feature $k$ [2208.06151]. This recasting connects Shapley values, previously motivated through game theory, to a functional expansion, exposing the direct tie between local and global explanations.

### 2.3 Feature Importance Measures
Standard SHAP importance $E[|\phi_k(X)|]$ mixes main and interaction effects. The decomposition enables refined importance measures:
$$
I_k = E \left[ \sum_{S \ni k} \frac{1}{|S|} |f_S(X_S)| \right]
$$
For order separation,
$$
I_k^{(1)} = E[|f_k(X_k)|],\quad I_k^{(2)} = \sum_{j\ne k} E[|f_{kj}(X_{k,j})|],\ldots
$$

## 3. Algorithms for Exact and Approximate Functional Decomposition

The number of components $f_S$ is generally exponential in $d$, but many machine learning models admit low-dimensional base learners (e.g., tree ensembles with interaction order $q \ll d$). For such models, exact functional decomposition is feasible:
- For each tree, identify the split set $T_t$.
- For each $U\subseteq T_t$, recursively compute $M_t(U, x)$—the marginal tree value as an expectation over unselected features.
- For each $S\subseteq T_t$, assemble $f_S(x_S)$ from $M_t(U, x)$ via signed sums.
- For XGBoost, Algorithm 3 describes efficient aggregation via $n\times 2^q$ tables; for random planted forests, grid-based marginals suffice.

Complexity is $O(B2^q n)$ for $B$ trees of interaction-order $q$ and $n$ points [2208.06151].

## 4. Post-hoc De-biasing and Fairness Interventions

Bias removal targeting protected features relies on the additive decomposition. Consider $U\subseteq \{1,\ldots,d\}$ as a block of features (e.g., gender) to eliminate from the model:
$$
\int f(x) p_U(x_U) dx_U = \sum_{S: S \cap U = \emptyset} f_S(x_S)
$$
Thus, forming a debiased predictor entails simply dropping every component $f_S$ with $S\cap U\ne\emptyset$ from the sum. This approach removes both direct and indirect bias via protected features [2208.06151].

## 5. Key Experimental Results: Fidelity and Separation of Effects

Empirical studies verify the nuances of functional decomposition:
- Toy problems: For $m(x_1,x_2) = x_1 + x_2 + 2x_1x_2$ with correlated features, standard interventional SHAP may mask main effects due to cancellation. Decomposition yields distinct main/interaction components $f_1(x_1)$, $f_2(x_2)$, $f_{12}(x_1,x_2)$, which can be inspected separately.
- Real data: On bike-sharing, decomposing fitted XGBoost reveals strong interaction terms (e.g., hour$\times$workingday) that standard SHAP summary plots cannot separate.
- Feature importance simulation: When interactions involve specific features (e.g., $x_2x_3x_4$), the decomposed importances precisely attribute effects by order.
- De-biasing: When retraining on a subset of unprotected features, standard refitting fails to remove indirect bias. Decomposition allows rigorous elimination, as shown on simulated salary data and UCI Adult.

## 6. Integration with Broader Explanation Frameworks

Functional decomposition under marginal identification creates a mathematical bridge between local and global explanations, encompassing:
- Local methods: SHAP, LIME, IG (Integrated Gradients) when interpreted via instance-level functional expansions [1801.08640, 2106.08641].
- Global surrogates: Partial dependence plots, additive global explanations, distilled student models [1801.08640].
- Hybrid local-to-global: Aggregations and hierarchical clustering approaches that build global rules or proxies from local surrogates [2101.07685, 2502.10311, 2003.06005, 2408.05060].
- Algorithmic transparency: Accessible for exact calculation in low-dimensional/ensemble models, and compatible with rule extraction via logic programming [2410.11000].

## 7. Practical Implications and Trade-offs

This unification addresses critical needs in explainable AI:
- Separates out main/interaction effects so practitioners can diagnose local anomalies, interaction-induced bias, or global functional structure.
- Enables robust feature importance assessments not confounded by interaction-induced cancellation.
- Provides actionable pipelines for post-hoc fairness interventions by component removal, rather than ambiguous retraining.
- Offers scalable algorithms amenable to tree ensembles and structured models.

The key limitation remains the exponential scaling of decomposition with dimension $d$ for general black-box models absent low-order structure. Approximate methods, surrogates, and rule-based reductions remain essential for scalability [2502.10311, 2101.07685].

---

In summary, local and global explanation methods are formalized and unified by functional decomposition with marginal identification constraints. This framework rigorously subsumes interventional SHAP, partial dependence, feature effect curves, and enables principled algorithms for bias reduction and feature importance. Empirical findings demonstrate increased fidelity, interpretability, and robustness, particularly for models and domains with rich interaction structures [2208.06151].

Source: https://www.emergentmind.com/topics/local-and-global-explanation-methods