Introduction
In the field of Explainable AI (XAI), identifying which features drive a model's predictions is a fundamental task. While Permutation Feature Importance (PFI) is widely used, it measures marginal importance by shuffling feature values, which can create unrealistic data points when features are correlated. This leads to misleading importance scores. Conditional feature importance addresses this by sampling from the conditional distribution of a feature given others. However, estimating these distributions for mixed tabular data is computationally intensive. This paper introduces cARFi (conditional ARF feature importance), which leverages Adversarial Random Forests (ARF) as an efficient generative model to provide robust, statistically valid feature importance scores.
The cARFi Methodology
The core innovation of cARFi is the use of ARFs to learn the joint distribution of data and perform "surgical" conditional sampling. The algorithm follows a structured approach:
- Model Training: A predictive "black box" model is trained on the dataset.
- Generative Modeling: An ARF is trained on the features to capture their underlying dependencies.
- Conditional Sampling: For each instance, $R$ new values for a target feature are sampled from the ARF, conditioned on the remaining features.
- Loss Evaluation: The model's loss on original data is compared against the loss on data with conditioned replacements.
- Inference: Asymptotic normality of the estimator allows for standard statistical testing (e.g., t-tests) to confirm significance.
A unique advantage of using ARFs is the ability to adjust the "strictness" of conditioning via the minimum node size parameter. Smaller nodes capture correlations more strictly, while larger nodes move the measure toward marginal importance.
Statistical Validity and Power
The authors evaluated cARFi's performance using synthetic datasets with both linear and non-linear relationships. A critical requirement for any feature importance method is controlling the Type I error rate—ensuring that unimportant but correlated features are not falsely identified as significant.
As shown in Figure 1, cARFi maintains the nominal 5% Type I error rate (at zero effect size) while demonstrating high statistical power as the effect size increases. This performance is consistent across various learners, including Support Vector Machines and Neural Networks, proving the method's versatility.
Marginal vs. Conditional Importance
One of the primary strengths of cARFi is its flexibility in handling different conditioning sets. Unlike traditional methods that are often fixed to either marginal or full conditional importance, cARFi can derive any conditional distribution on the fly from a single fitted ARF.
Figure 3 illustrates this flexibility using a causal structure. Marginal importance (left) often overestimates the contribution of features that are merely correlated with the target through other variables. By conditioning on subsets or all other features (middle and right), cARFi isolates the unique contribution of each variable. This is particularly useful in complex datasets like the bike-sharing dataset, where variables like "Hour of the day" and "Temperature" share predictive information.
Conclusion
cARFi represents a significant step forward in making conditional feature importance practical for real-world tabular data. By utilizing ARFs, it avoids the computational overhead of refitting samplers for every feature subset and naturally handles mixed data types. Future work may involve integrating this fast conditioning mechanism into other frameworks like SHAP or applying it to causal discovery tasks.
Summary updated