Counterfactual Explanations for Deep Two-Sample Testing
The article presents a counterfactual explanation framework for deep two-sample testing, addressing the limitations of classical tests in high-dimensional data by generating sample-level edits that reduce discrepancy between distributions. The method utilizes a diffusion autoencoder in conjunction with a pretrained deep two-sample test model, optimizing a maximum mean discrepancy (MMD) objective to produce interpretable counterfactuals. This approach enhances statistical sensitivity and provides insights into the features driving distributional differences, as demonstrated through evaluations on synthetic datasets and MRI cohorts, where the counterfactual transformations significantly increased p-values, indicating closer alignment with the target distribution.