为深度双样本检验生成可解释的反事实编辑,揭示差异来源
Counterfactual Explanations for Deep Two-Sample Testing

- 用扩散自编码器结合预训练模型,优化表示空间中的MMD目标生成反事实样本
- 编辑后样本p值显著上升,证明源组与目标组分布更接近,且变化可量化
- 结果直观揭示关键差异特征,适用于医学影像等需可解释性的场景
双样本检验是检测跨科学领域分布差异的基础工具,但经典方法(包括核方法)在高维结构化数据(如图像)上表现不佳。近期深度双样本检验通过学习信息性表示提升了敏感性,但难以解释拒绝原假设H₀的驱动因素。为此,本文提出一种针对深度双样本检验的反事实解释框架,通过生成将源组样本向目标组迁移的样本级编辑,同时显式减小测试度量的差异。方法结合扩散自编码器与预训练的深度双样本测试模型,在测试模型的表示空间中优化最大均值差异(MMD)目标,生成合理反事实样本。通过测试统计量和对应p值的变化量化分布效应。在合成2D形状数据集及两个MRI队列上评估,反事实编辑均使p值显著升高,表明编辑后的源组更接近目标分布。使用LPIPS衡量最小性,确保反事实样本与原样本相近。生成的编辑提供了与检测到的组间差异相关的关键特征的可解释证据。在MRI数据中,局部变化与已知解剖差异一致。
原文摘要 · Abstract (English)
Two-sample testing is a fundamental tool for detecting distributional differences across scientific domains, but classical tests (including kernel-based tests) can be ineffective on high-dimensional structured data such as images. Recent deep two-sample tests improve sensitivity in these settings by learning informative representations, yet they provide limited insight into which data features drive rejection of the null hypothesis $H_0$. To address this issue, we propose a counterfactual explanation framework for deep two-sample testing that generates sample-level edits moving observations from a source group toward a target group while explicitly reducing the discrepancy measured by the test. Our method combines a diffusion autoencoder with a pretrained deep two-sample test model and optimizes a maximum mean discrepancy (MMD) objective in the test model's representation space to produce plausible counterfactuals. We quantify distribution-level effects through changes in the test statistic and the resulting two-sample p-values. We evaluate the method on synthetic 2D shape datasets and two MRI cohorts. Across both settings, the counterfactual transformations consistently increase p-values relative to the original samples, indicating that the edited source set becomes statistically closer to the target distribution under the test. We measure minimality using LPIPS to ensure the counterfactuals remain close to the original samples. The resulting edits provide interpretable evidence of the features associated with the detected group differences. On MRI, the localized changes are consistent with known anatomical differences between cohorts.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。