Extracted main text — title through conclusion, appendix excluded. This is what our citation measures are computed over, published so the extraction can be checked by eye.
44,738 characters · 14 sections · 17 citation commands
Common Functional Decompositions Can Mis-attribute Differences in Outcomes Between Populations
Motivating Examples.
Many scientific questions reduce to similar comparisons between two populations. After observing differences, analysts often want to ask why these differences occur. One reason might be that the populations differ on meaningful traits. In our first example, perhaps the distribution of \(X\) is unequal: say, both hospitals provide the same standard of care, but hospital K's patient population is healthier and naturally has lower mortality rates. In this case, covariates \(X\) drive the difference. Or perhaps the patients in both hospitals are similar, but the medical staff in hospital K are particularly skilled at treating serious conditions, such as pneumonia or heart attacks. In this case, outcomes given covariates \(Y \mid X\) drive the difference. A useful explanation for mean differences between populations would distinguish between these possibilities, as well as describe which aspects of the covariates or outcomes given covariates explain the difference.
The Kitagawa-Oaxaca-Blinder (KOB) decomposition kitagawaComponentsDifferenceTwo1955, oaxacaMaleFemaleWageDifferentials1973, blinderWageDiscriminationReduced1973 is widely used in the econometrics literature to solve exactly this problem. The KOB decomposition separates a difference of means into components that depend on the distribution of covariates, \(X\), and those that depend on the conditional expectation of outcomes given covariates, \(\mathbb{E}[Y | X]\). However, it relies on parametric linear models of \(\mathbb{E}[Y | X]\), which are likely inadequate to describe the complex and heterogeneous relationships that may arise in practice fortinDecompositionMethodsEconomics2011,bach2024heterogeneity. A natural generalization of the KOB decomposition would allow for non-linear or nonparametric models for \(\mathbb{E}[Y | X]\). Such an approach could account for shifts in the distribution of \(X\) through a generic step-wise transformation that moves the distribution of \(X\) from population H to population K. Importance can be assigned to individual features in the change in conditional expectation \(\mathbb{E}[Y | X]\) through the use of additive functional decomposition methods.
Such a generalization requires a choice of the functional decomposition. Fortunately, modern machine learning offers multiple options. For example, the functional ANOVA (FANOVA) stoneUsePolynomialSplines1994,huangProjectionEstimationMultiple1998,hooker2004discovering,hookerGeneralizedFunctionalANOVA2007,agrawalSKIMFAKernelHighDimensional2021 and Accumulated Local Effects (ALE) apleyVisualizingEffectsPredictor2020 decompositions have been widely used in sensitivity analysis chastaingGeneralizedHoeffdingSobolDecomposition2012, antoniadisRandomForestsGlobal2021, machine learning interpretability lengerichPurifyingInteractionEffects, limmerNeuralANOVA2024, finance liang2022timesequencing, belhadi2021ensemble, and environmental and climate sciences huangBeyondPredictionIntegrated2023, peichlMachinelearningMethodsAssess2021, hillModellingClimateUsing2023.
The success of such decompositions makes them seem like natural choices for use in explaining a difference in means. However, we demonstrate that common functional decompositions---the FANOVA and ALE---are ill-suited for this task in that they can misattribute differences stemming from a changing \(X\) to differences from changing \(Y \mid X\). Throughout, we will use “misattribution” as a shorthand for differences in \(X\) attributed to \(Y \mid X\). We characterize when FANOVA makes this misattribution and provide a characterization of when a general decomposition will misattribute in discrete settings (i.e., when the covariate space is countable). In particular, we show that misattribution occurs whenever the functional decomposition depends on the input covariate distribution. We conjecture and partially prove that this result holds in continuous settings as well.
The remainder of this paper is structured as follows. In Section (ref), we review the Kitagawa-Oaxaca-Blinder (KOB) decomposition and discuss functional decomposition methods commonly used in machine learning, such as FANOVA and ALE. In Section (ref), we define our generalized decomposition framework for difference in means, extending the KOB decomposition to non-linear models. In Section (ref), we show through simple examples that FANOVA and ALE misattribute effects, and we characterize when FANOVA fails in practical cases of interest. In Section (ref), we provide a general characterization of when a functional decomposition misattributes effects. Finally, in Section (ref), we discuss the implications of our findings.
Throughout this work, we let \(\mathcal{X} \subseteq \mathbb{R}^d\) denote the feature space of the column random vector \(X = (X_1, \dots, X_d)^T\). In general, we assume \(\mathcal{X}\) is a subset of \(\mathbb{R}^d\) (continuous case), except for when we explicitly state that \(\mathcal{X}\) is countable (discrete case). We write \(x = (x_1,\dots,x_d)^T \in \mathcal{X}\) for a realization of \(X\). Uppercase letters (\(X, X_i\)) thus denote random variables, while lowercase letters (\(x, x_i\)) denote specific realizations of these. We denote by \(Y \in \mathbb{R}\) the outcome. When referring to distributions over the joint \((X,Y)\), we use capital letters such as \(H\) or \(K\). Subscripts indicate marginals or conditionals: \(H_X\) is the marginal distribution of \(X\) under \(H\); \(H_i\) is the marginal distribution of the \(i\)-th coordinate \(X_i\); and \(H_{1:i}\) is the joint distribution of \((X_1, \dots, X_i)\). Probability densities or mass functions are denoted by lowercase letters, such as \(h(x)\) or \(k(x)\). All probability measures are defined on the Borel \(\sigma\)-algebra of \(\mathcal{X}\) in the continuous case or on the power set of \(\mathcal{X}\) in the discrete case.
The Kitagawa-Oaxaca-Blinder (KOB) decomposition provides a framework for explaining differences in means between two populations by decomposing them into components attributable to differences in covariates and conditional expectations. In its original formulation, KOB assumes the covariate space is \(\mathcal{X} = \mathbb{R}^d\) and that the covariates \(X\) have a linear relationship with the outcome \(Y \in \mathbb{R}\): \[ \mathbb{E}_{H_{Y \mid X}}[Y \mid X] = X^T \beta_H \quad \text{and} \quad \mathbb{E}_{K_{Y \mid X}}[Y \mid X] = X^T \beta_K, \] where \( H_{Y \mid X} \) is the conditional distribution of \( Y \mid X \) in population \(H\), and similarly for population \(K\). The vectors \( \beta_H, \beta_K \in \mathbb{R}^d\) are the regression coefficients defining the linear relationship \( \mathbb{E}[Y \mid X] \) for each population. The KOB decomposes the difference \(\mathbb{E}_K[Y] - \mathbb{E}_H[Y]\) as
In the next section, we introduce a natural extension of the KOB decomposition that retains a similar interpretation, but allows for more general forms of $Y \mid X$ by using functional decompositions. The existing literature provides several such functional decompositions; however, we focus only on additive decompositions that decompose functions into additive components, as they provide a natural analogue of the additive form of $Y \mid X$ in the KOB decomposition. Other functional decomposition methods, such as Partial Dependence Plots friedman2001greedy, do not offer additive decompositions and thus cannot be immediately incorporated into KOB-like decompositions. We next review two particularly common additive functional decompositions: FANOVA and ALE.
FANOVA measures the importance of features in determining the output of a function and in identifying underlying additive interactions between subsets of variables hooker2004discovering. It provides a natural representation of a functional in terms of low-order components hookerGeneralizedFunctionalANOVA2007 by stating that a square-integrable function \(f(x)\) with \(x \in \mathcal{X} = \mathbb{R}^d\) can be written uniquely as \(f(x) = \sum_{S \in 2^{[d]}} \mathcal{L}(f,K_X,S)(x),\) where \(2^{[d]}\) denotes the power set of \( [d] = \{1, 2, \dots, d\} \) and \(K_X\) is a general measure of the covariates. Then, the components are jointly defined as
{subject to hierarchical orthogonality conditions among the components:
where \( \subsetneq \) denotes a proper subset.
Note that the FANOVA component corresponding to a subset \(S\) depends only on the covariates in \(S\), as it is constructed to capture their contribution separately from the rest. However, for the sake of generality in defining a functional decomposition, we express it as a function of the full covariate vector. The same applies to the ALE decomposition below.
ALE is another additive functional decomposition method that is particularly suitable for visualizing the effects of predictors apleyVisualizingEffectsPredictor2020. Although ALE is defined more generally---allowing for non-differentiable \( f \) and extending to dimensions \( d > 2 \)---the case for \( d = 2 \) with a differentiable model, \( f(x_1, x_2) = \mathbb{E}[Y \mid X_1 = x_1, X_2 = x_2] \), suffices for our illustrative purposes. The ALE main effect component for the first covariate \(X_1\) is then defined as:
where \( \frac{\partial f(x_1, x_2)}{\partial x_1} \) denotes the partial derivative of \(f\) with respect to the first component, \( x_{\text{min},1} \) is a lower bound of the support of \(K_1\), and constant is a centering constant such that \(\mathbb{E}_{K_X}[\mathcal{L}(f, K_X, \{1\})(X)] = 0\). The term \(\mathcal{L}(f, K_X, \{2\})\) is defined similarly; for the definition of \(\mathcal{L}(f, K_X, \{1,2\})\) and for the \(d > 2\) case, see apleyVisualizingEffectsPredictor2020.
As discussed in Section (ref), a desirable extension of KOB would allow for arbitrary flexible regression models by extending it to non-linear functional forms. Recall the KOB decomposition in Equation (ref) separates a difference in means into a \(Y \mid X\) effect and a covariate effect. To extend the KOB decomposition to more flexible models, we assume a general regression model \( f: \mathcal{X} \to \mathbb{R} \) is fitted such that \( f^K(x) = \mathbb{E}_{K_{Y \mid X}}[Y \mid X = x] \), and similarly for population H.\footnote{ We write an equality \( f^K(x) = \mathbb{E}_{K_{Y \mid X}}[Y \mid X = x] \) for the purpose of exposition. In practice, the fitted \( f^K(x) \) will contain approximation error, and our results apply to decompositions of \( f^K(x) \) rather than the exact expectation \( \mathbb{E}_{K_{Y \mid X}}[Y \mid X = x] \).} Our goal is to decompose Equation (ref) into smaller, interpretable components just as in the KOB decomposition. To achieve this goal and in the spirit of FANOVA and ALE discussed in Section (ref), we assume a generic additive functional decomposition, denoted by \( \mathcal{L} \), which operates on arbitrary functions \( f \) of the covariates, probability measures of the covariates \( H_X \), and subsets of features \( S \). We assume this decomposition yields an additive representation that holds for all \( x \in \mathcal{X} \subseteq \mathbb{R}^d \):
Given such an additive functional decomposition, it is straightforward to extend the KOB decomposition. We define two types of swaps, analogous to the terms in the KOB decomposition. First, we can swap out the distribution of each one-dimensional covariate of \( X \) at a time; we call such terms the difference due to change in \(X\). Second, we can swap out the functional decomposition terms of \( f^H \) for those of \( f^K \); we call such terms the difference due to change in \( Y \mid X \). We define this KOB extension below:
Definition (ref) is an extension of the KOB decomposition from Section (ref), which also defines differences from swapping out distributions of covariates, as well as differences in swapping out (a model for) \(Y \mid X\). The main difference is that Definition (ref) uses a generic additive decomposition of \(Y \mid X\), whereas the KOB decomposition assumes a linear model.
This decomposition---like the KOB decomposition---makes a series of specific choices: first swapping \(S_1\), then \(S_2\), ... then finally swapping \(S_{\left|\mathcal{S}\right|}\), and then swapping covariate one, then covariate two, etc. Why not swap \(S_2\) first? Why not swap covariate three immediately after \(S_1\)? In general, there is no reason to prefer any one ordering, and different orderings will produce different results. With no preferred ordering of swaps, one may prefer to average over all possible orderings and report the resulting averages as the definitions of \(\delta^{Y \mid X}_{S_i}\) and \(\delta^{X}_{j}\).\footnote{shorrocksDecompositionProceduresDistributional2013 describes such averages as applying logic of Shapley values to functional decompositions.} Our results here apply to any fixed order; we leave the extension to averaging over all orderings as future work.
Once a user has specified the functional forms of \(f^H(x)\) and \(f^K(x)\), the only decision to be made before using Definition (ref) is the choice of functional decomposition \(\mathcal{L}\). At first glance, options such as ALE or FANOVA from Section (ref) and Section (ref) seem like excellent choices: they provide additive decompositions of generic functions with properties that make them well-suited for understanding functions in other applications. However, we show that a broad class of functional decompositions, including FANOVA and ALE, are inappropriate for explaining population differences in the sense of Definition (ref), despite their great success in other applications. In particular, we characterize when such decompositions incorrectly state that differences stem from changes in \(Y \mid X\).
Recall that Definition (ref) defines \(\delta_{S_i}^{Y \mid X}\) to be the difference due to the dependence of \(Y \mid X\) on feature subset \(S_i\). Suppose that the distributions of \(Y \mid X\) are in fact identical across the two populations: \(f^K = f^H = f\). In this situation, any reasonable decomposition should lead us to believe there is no difference due to differences in \(Y \mid X\); that is, \(\delta_{S_i}^{Y \mid X} = 0\). Unfortunately, we present examples where FANOVA and ALE can misattribute differences in \(X\) to differences in \(Y \mid X\).
To begin with, we formalize what we mean by misattribution. Note that when \( f^K = f^H = f \), \( \delta^{Y \mid X}_S \) reduces to
With (ref) in mind, we define misattribution as follows:
In the following examples, we show that FANOVA and ALE misattribute effects of \(Y \mid X\) in simple scenarios; we present here a summary of the examples, and the full details are provided in Appendix (ref).
Similarly, the following example demonstrates that ALE misattributes in a simple scenario.
Examples (ref) and (ref) show that both ALE and FANOVA can misattribute differences in the covariates to differences in \( Y \mid X \). With the knowledge that common functional decompositions like FANOVA or ALE can misattribute effects, it behooves us to understand how widespread this behavior is. Does misattribution happen frequently for common functional decompositions? And what properties of functional decompositions will prevent misattribution? Practitioners need answers to these questions to confidently use methods similar to the one described in Definition (ref). In the next sections, we provide partial answers to these questions. In Section (ref), we argue that FANOVA misattributes in the sense of Definition (ref) in almost all cases of practical interest, rendering it unsuitable in practice. And in Section (ref), we conjecture---and partially prove---that any reasonable functional decomposition that depends on the input covariate distribution will misattribute.
In the last section, we presented an example in which FANOVA misattributes differences in \(X\) to differences in \(Y \mid X\). However, without a precise characterization of when this misattribution occurs, one might think it is specific to the example rather than a general phenomenon. We now provide theoretical characterizations of when FANOVA misattributes effects in cases of practical interest. Specifically, we first show that FANOVA does not misattribute when the lower-dimensional components computed for population K have a mean of zero under population H. We then demonstrate that this condition is highly unrealistic, even in simple cases such as affine functions, and becomes even more restrictive when we allow for more flexibility.
Theorem (ref) states that the expectation under population \( H \) of the component computed under population \(K\) must have a mean of zero. This suggests a close relationship between the two distributions or that the moments of the marginal distribution must satisfy specific conditions for Equation (ref) to hold. If these conditions hold in practical scenarios, then FANOVA could indeed be a viable option. Our next set of results indicates that Equation (ref) unfortunately cannot be reasonably expected to hold in practice.
We start by studying a particularly simple case---when \(f\) is a given affine function. We show that even in this case, the conditions under which FANOVA does not misattribute are very restrictive.
See Appendix (ref) for the proof. Equation (ref) is a fairly restrictive condition, as we expect covariate means to vary between populations; e.g., the proportion of the workforce with high school diplomas will likely not be identical between two cities H and K.
We can now see why FANOVA misattributes effects in Example (ref). There, the function \( f(x) = x_1 + x_2 \) corresponds to the affine class in Theorem (ref), with coefficients \( a_1 = a_2 = 1 \) and basis functions \( b_1(x_1) = x_1 \), \( b_2(x_2) = x_2 \). Since the expectation condition in Equation (ref) does not hold (\(\mathbb{E}_{H_X}[X_1] \neq \mathbb{E}_{K_X}[X_1]\)), FANOVA assigns a nonzero difference to \( S = \{1\} \), leading to misattribution.
A more revealing version of Theorem (ref) would extend to richer basis representations by using multiple basis functions per dimension rather than a single one and allowing for correlated covariates. However, we conjecture that this would further restrict the relationship between the moments of the distributions \(H_X\) and \(K_X\), imposing increasingly stringent requirements on them. In other words, adding flexibility to our model of \(\mathbb{E}[Y \mid X]\) comes at the cost of restricting the set of populations where the decomposition remains accurate. This culminates in our next result, which shows that placing minimal restrictions on \(\mathbb{E}[Y \mid X]\) imposes maximal restrictions on the distribution of \(X\).
See Appendix (ref) for a proof.
Theorem (ref) says that if we want FANOVA to never misattribute for a given pair of distributions---that is, not misattribute for every measurable function \( f \) and every nonempty subset \( S \) of the covariates---then it is necessary and sufficient that the input covariate distributions are identical (i.e., \( H_X = K_X \), up to a \( K_X \)-null set). Equivalently, if \( H_X \neq K_X \), then there exists at least one problematic measurable function \( f \) and nonempty subset \( S \) for which FANOVA misattributes to $Y \mid X$. In practice, we generally compare distinct populations (i.e., \( H_X \neq K_X \) ), implying that FANOVA will misattribute in settings where \( f \) is one of the problematic cases. Theorem (ref) does not characterize the problematic \( f \), suggesting that knowledge or assumptions about $f$ could rule out misattribution in some applications. A more practical result would characterize the set of problematic $f$ for a particular set of input densities; we leave this as a direction for future work. A more concerning result would instead give conditions under which misattribution can occur for any given $f$; we also leave this as a direction for future work.
Given the pessimistic results in Section (ref), one may be reasonably concerned that any functional decomposition $\mathcal{L}$ may misattribute, making the decomposition of Definition (ref) of little value, as practitioners would never know when to trust its outputs. To resolve this problem, we attempt to characterize what properties of the functional decomposition \(\mathcal{L}\) cause misattribution. We show that under regularity conditions, a functional decomposition \(\mathcal{L}\) does not misattribute the effects of \(Y \mid X\) if and only if its derivative with respect to the probability measure is orthogonal to \(K\) in the \(L^2\) sense. Furthermore, we prove that Definition (ref) does not lead to misattribution if \(\mathcal{L}\) is independent of its input distribution. For a reverse direction statement, we conjecture that under reasonable assumptions on \(\mathcal{L}(f,K_X,S)\), the function \(f\), and the distributions \(H_X\) and \(K_X\), a functional decomposition \(\mathcal{L}\) does not misattribute the effects of \(Y \mid X\) if it does not depend on its input distribution.
We now aim to characterize conditions on the functional \( \mathcal{L} \) under which \( \Delta(\mathcal{L}, f,H_X,K_X,S) \) does or does not equal zero for all \( f, H_X, K_X \). We start by studying the discrete case and leave the continuous generalization as a conjecture.
First, suppose that \(\mathcal{X}\) is a countable space so that the covariates of the random vector \(X = (X_1, \dots, X_d)^T\) are discrete. Let \(k(x)\) and \(h(x)\) be the probability mass functions corresponding to the probability measures \(K_X\) and \(H_X\), respectively, with shared support on \(\mathcal{X}\). For example, in healthcare, \(\mathcal{X}\) might represent patient categories based on age or pre-existing conditions, while \(f(x)\) could denote the expected recovery time, and \(k(x)\), \(h(x)\) represent the proportions of patients in different hospitals.
Before stating our main theorem of this section, we impose the following regularity conditions on the class of functional decompositions we consider.
For any fixed measurable function \(f\) and subset \(S \in 2^{[d]}\), we denote by \(\mathcal{J}_{K_X}(f, H_X, S)\) the Jacobian matrix of the mapping \(K_X \mapsto \mathcal{L}(f, K_X, S),\) with respect to \(K_X\), evaluated at \(K_X = H_X\).
We now state our main result for the discrete case, which characterizes when a functional decomposition \(\mathcal{L}\) will never misattribute the effects of \(Y \mid X\) to changes in \(X\).
See Appendix (ref) for the proof.
Theorem (ref) shows that if we require a functional decomposition \(\mathcal{L}\) to never to misattribute the effect of \(Y \mid X\) for any distribution \(K_X\), its dependence on \(K_X\) becomes severely restricted. Concretely, if the average change of \(\mathcal{L}\) is zero for every pair of distributions \(H_X, K_X \in {\kern0pt\Sigma}^{\mathrm{o}} \), then all the columns of the Jacobian of \(\mathcal{L}\) with respect to \(K_X\) must be the same. This structure means that \(\mathcal{L}\) cannot distinguish between different probability distributions, which implies that $\Delta$ must be zero. As the following corollary shows, this characterization implies \(\mathcal{L}\) must be constant in its second argument across values in \( {\kern0pt\Sigma}^{\mathrm{o}} \).
That is, for a decomposition not to misattribute, \(\mathcal{L}\) must be constant in \( {\kern0pt\Sigma}^{\mathrm{o}} \), meaning it is completely unresponsive to changes in \(K_X\). We note that this may be unnecessarily restrictive in practice. In particular, in most applications, we are not concerned with every possible redistribution of probability mass but rather with specific structured changes that carry meaningful information. Still, as the following example shows, there is at least one existing decomposition that satisfies the conditions of Corollary (ref).
In contrast, we conjecture that generalized FANOVA does satisfy the conditions of Corollary (ref).
Put together, Example (ref) and Corollary (ref) tell a story that is exactly the opposite of typical observations in the functional decomposition literature. In particular, that generalized FANOVA and ALE depend on their input distributions is tyipcally viewed as beneficial; indeed, this is a major motivator for the work of apleyVisualizingEffectsPredictor2020 and hookerGeneralizedFunctionalANOVA2007. One reason for this benefit is that typical functions $f$ of interest are often machine learning models fit to training data drawn from covariate distribution $K_X$. Many flexible machine learning models have arbitrary behavior outside the support of the training data; thus methods like the non-generalized FANOVA that integrate with respect to the uniform distribution may integrate over nonsensical values of $f$. ALE and FANOVA resolve this issue by integrating over the covariate distribution $K_X$.
These results highlight a tension in the design of functional decomposition methods: non-use of the covariate distribution $K_X$ may result in strange behavior by integrating over nonsensical values of $f$, while use of the covariate distribution may result in nonsensical decompositions of differences between two populations. We leave as future work an attempt to resolve this seeming contradiction.
In practice, many applications involve continuous distributions, where densities vary smoothly rather than being restricted to discrete points. For example, in economic models, income distributions are continuous, and in healthcare, biomarkers like blood pressure or cholesterol levels are measured on a continuous scale. To extend our characterization to these cases, we analyze the continuous setting in Appendix (ref).
In this work, we present a natural extension of the Kitagawa-Oaxaca-Blinder decomposition for explaining differences in means to non-linear models of the conditional expectation. We note that functional decompositions like FANOVA and ALE seem at first glance like excellent candidates to incorporate into our KOB extension. However, we provide simple counterexamples showing that both FANOVA and ALE can incorrectly assign differences in the distribution of covariates \(X\) to differences in the outcome-given-covariates, \(Y \mid X\). We further provide characterizations of when FANOVA misattributes for practical cases of interest, as well as a general property that any discrete decomposition should satisfy to never misattribution: the decomposition must be constant across all distributions. For the general continuous case, we show that if the decomposition is independent of its input distribution, it does not misattribute. For a reverse statement, we conjecture that the same will hold as in the discrete case: any reasonable functional decomposition method that depends on its input distribution in a meaningful way will misattribute.
Our findings highlight a fundamental limitation: methods effective for single-population analysis may be unreliable for comparing differences between populations. Our work also suggests that the requirements for single-population decomposition and two-population difference decomposition may diverge, highlighting the importance of developing new methods to decompose the difference in means. Future work should explore how to develop decompositions that avoid misattribution while preserving interpretability in real-world applications.
The authors are grateful to Raj Agrawal for his contributions and insights during the initial stages of this project. This research was supported in part by an ONR Early Career Grant. Advik Shreekumar was supported in part by the National Science Foundation Graduate Research Fellowship under Grant No.\ 1122374.
DISTRIBUTION STATEMENT A. Approved for public release. Distribution is unlimited. This material is based upon work supported by the Combatant Commands under Air Force Contract No. FA8702-15-D-0001 or FA8702-25-D-B001. Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Combatant Commands.