MMD-based Variable Importance for Distributional Random Forest

Clément Bénard, Jeffrey Näf, Julie Josse

Abstract

Distributional Random Forest (DRF) is a flexible forest-based method to estimate the full conditional distribution of a multivariate output of interest given input variables. In this article, we introduce a variable importance algorithm for DRFs, based on the well-established drop and relearn principle and MMD distance. While traditional importance measures only detect variables with an influence on the output mean, our algorithm detects variables impacting the output distribution more generally. We show that the introduced importance measure is consistent, exhibits high empirical performance on both real and simulated data, and outperforms competitors. In particular, our algorithm is highly efficient to select variables through recursive feature elimination, and can therefore provide small sets of variables to build accurate estimates of conditional output distributions.

Introduction

Standard Random Forests are powerful tools for predictive modeling, but they are primarily designed to estimate the conditional mean of an output. Consequently, traditional variable importance measures, such as Mean Decrease Accuracy (MDA), are optimized to identify features that contribute to mean prediction. However, in domains like healthcare and finance, understanding the entire conditional distribution—including variance, quantiles, and tail risks—is often more critical than the average outcome.

Distributional Random Forests (DRF) address this by estimating full multivariate conditional distributions. Despite their flexibility, DRFs have lacked a theoretically grounded importance measure. Existing heuristics, such as split-frequency counts, often suffer from biases, especially with correlated inputs. This paper introduces a consistent, distance-based importance measure for DRF that captures distributional impacts beyond the mean.

Methodology

The proposed importance measure, $I^{(j)}$, is built on two foundational concepts:

  1. The Drop and Relearn Principle: To evaluate the importance of a variable $j$, the model's performance with all variables is compared against a model trained without variable $j$. This approach is more robust to correlations than permutation-based methods.
  2. Maximum Mean Discrepancy (MMD): Because DRF outputs are distributions (represented as embeddings in a Reproducing Kernel Hilbert Space), a standard Euclidean distance is insufficient. MMD provides a rigorous metric to measure the distance between the full-model distribution and the reduced-model distribution.

To address the computational burden of retraining the forest for every variable, the authors introduce Projected DRF. This variant approximates the "drop" by ignoring splits on the target variable within the existing trees, significantly speeding up the process for high-dimensional datasets.

Empirical consistency of the importance measure $I_n$ as sample size $n$ increases.

Empirical Evaluation and Results

The authors tested the method on synthetic scenarios designed to isolate distributional effects (e.g., variables affecting only variance) and on nine real-world multivariate datasets.

Beyond the Mean

A key advantage of the MMD-based measure is its ability to detect variables that influence the shape of the output distribution without necessarily shifting the mean. In simulations where certain variables only affected the variance, traditional MDA failed to recognize their importance, whereas the proposed measure correctly identified them.

Comparison of variable importance rankings across different methods. Note how traditional MDA fails to capture certain relevant variables compared to the proposed $I_n^{(j)}$.

Consistency and Scalability

The measure is theoretically proven to be consistent, meaning the estimate converges to the true importance as the sample size grows. This is empirically demonstrated in Figure 1. Furthermore, the Projected DRF approach allows the method to scale effectively. In high-dimensional tests ($p=1000$), the measure maintained high accuracy in feature selection, outperforming native DRF importance measures that tend to dilute importance across irrelevant features.

Conclusion

This work provides a robust and theoretically sound framework for interpreting Distributional Random Forests. By combining the "drop and relearn" principle with MMD, the authors offer a tool that captures the full complexity of conditional distributions. Future work may extend this framework to local explanations via MMD-based Shapley values, further enhancing the interpretability of distributional models.

Summary updated

BibTeX
@inproceedings{benard2024mmd,
  author = {Clément Bénard and Jeffrey Näf and Julie Josse},
  title = {{MMD-based Variable Importance for Distributional Random Forest}},
  booktitle = {International Conference on Artificial Intelligence and Statistics},
  year = {2024},
  url = {https://openreview.net/forum?id=EaAVjAt6WL},
}
Figure