Why did the distribution change?

Kailash Budhathoki, Dominik Janzing, Patrick Blöbaum, Hoiyi Ng

Abstract

We describe a formal approach based on graphical causal models to identify the "root causes" of the change in the probability distribution of variables. After factorizing the joint distribution into conditional distributions of each variable, given its parents (the "causal mechanisms"), we attribute the change to changes of these causal mechanisms. This attribution analysis accounts for the fact that mechanisms often change independently and sometimes only some of them change. Through simulations, we study the performance of our distribution change attribution method. We then present a real-world case study identifying the drivers of the difference in the income distribution between men and women.

The Challenge of Distribution Shifts

In real-world systems, probability distributions are rarely static. Retailers see shifts in demand, and economists observe fluctuations in income. While statistical tests like the Kolmogorov-Smirnov test can detect if a distribution has changed, they fail to explain why.

A change in a single variable's distribution is often a "downstream" effect. For instance, if the distribution of "Income" changes, is it because the workforce became more educated (a change in an input variable), or because the "mechanism" of how education translates to salary changed (a change in the rule)? This research seeks to distinguish between these scenarios by attributing shifts to changes in causal mechanisms—the conditional probability of a variable given its direct causes.

A Causal Framework for Attribution

The proposed approach rests on two pillars: Causal Graphical Models and Cooperative Game Theory.

Causal Factorization

Using the Causal Markov Condition, the joint distribution of a system is decomposed into a product of independent causal mechanisms. Each variable $X_j$ is defined by its conditional probability given its parents $PA_j$ in a causal graph.

The joint distribution is factorized into a product of causal mechanisms.

When attributing changes in the joint distribution, the Kullback-Leibler (KL) divergence is used. Because KL divergence is additive over independent mechanisms, each mechanism's contribution is simply its own KL divergence.

Attributing Marginal Distribution Changes

Often, researchers care about a specific target variable ($X_{target}$). Because marginalization is non-linear, the additive property of KL divergence disappears. To solve this, the authors employ Shapley values. By treating each causal mechanism as a "player" in a game, they calculate a "fair" contribution to the total change by averaging its marginal impact across all possible orderings of mechanism replacements.

Mechanism Change Detection

To avoid attributing noise from sampling variability to actual causal shifts, the framework includes a detection step. A non-parametric conditional independence test ($X_j \perp \perp A | PA_j$, where $A$ is a domain or time index) determines if a mechanism has actually changed before assigning it an attribution value.

A causal graph illustrating the relationship between a domain index A, parents PA, and variable X.

Key Insights and Empirical Results

Mechanisms over Variables

The core insight is that attribution should focus on the relationships between variables rather than the variables themselves. A variable might appear different simply because its parents changed; the mechanism itself remains the "physical" invariant that defines the system's behavior.

Case Study: The Gender Income Gap

Applying this framework to the Adult Census Income dataset, the model investigated the income distribution difference between men and women. The analysis attributed the disparity primarily to the mechanism $P(\text{occupation} | \text{education})$. This suggests that even when education levels are similar, the "process" that assigns individuals to occupations differs by gender, driving the income gap. Interestingly, the mechanism for education itself contributed almost nothing to the difference.

Model Sensitivity

Simulations revealed that the choice of model class is critical. While linear regression estimated root causes perfectly for linear data, non-linear models like XGBoost introduced significant estimation errors as the magnitude of the distribution change increased.

Limitations and Future Work

The method's primary limitation is its reliance on an accurate Directed Acyclic Graph (DAG). If the causal structure is misidentified, the attribution results will be misleading. Furthermore, calculating exact Shapley values is computationally expensive ($O(2^n)$) for large systems. Future research may focus on handling Markov equivalence classes where multiple graphs fit the observational data equally well.

Summary updated

Abstract

We describe a formal approach based on graphical causal models to identify the "root causes" of the change in the probability distribution of variables. After factorizing the joint distribution into conditional distributions of each variable, given its parents (the "causal mechanisms"), we attribute the change to changes of these causal mechanisms. This attribution analysis accounts for the fact that mechanisms often change independently and sometimes only some of them change. Through simulations, we study the performance of our distribution change attribution method. We then present a real-world case study identifying the drivers of the difference in the income distribution between men and women.
BibTeX
@inproceedings{budhathoki2021why,
  author = {Kailash Budhathoki and Dominik Janzing and Patrick Blöbaum and Hoiyi Ng},
  title = {{Why did the distribution change?}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2021},
  url = {https://openreview.net/forum?id=gkSnVd8Gcb},
}
Figure