Counterfactual explanations (CE) explain model decisions by identifying input modifications that lead to different predictions. Most existing methods operate at the instance level. Distributional Counterfactual Explanations (DCE) extend this setting by optimizing an optimal transport objective that balances proximity to a factual input distribution and alignment to a target output distribution, with statistical certification via chance constrained bounds. However, DCE relies on gradient based optimization, while many real-world tabular pipelines are dominated by non-differentiable models. We propose DISCOVER, a model-agnostic solver for distributional counterfactual explanations. DISCOVER preserves the original DCE objective and certification while replacing gradient descent with a sparse propose-and-select search paradigm. It exploits a sample-wise decomposition of the transport objective to compute per-row impact scores and enforce a top-$k$ intervention budget, focusing edits on the most influential samples. To guide candidate generation without predictor gradients, DISCOVER introduces an OT-guided cone sampling primitive driven by input-side transport geometry. Experiments on multiple tabular datasets demonstrate strong joint alignment of input and output distributions, extending distributional counterfactual reasoning to modern black box learning pipelines. A code repository is available at https://github.com/understanding-ml/DCE.
翻译:反事实解释(CE)通过识别导致不同预测的输入修改来解释模型决策。现有方法大多在实例层面操作。分布反事实解释(DCE)通过优化一个平衡事实输入分布邻近性与目标输出分布对齐性的最优传输目标来扩展这一设定,并利用机会约束边界提供统计认证。然而,DCE依赖于基于梯度的优化方法,而现实世界中的许多表格数据流程主要由不可微模型主导。我们提出了DISCOVER,一种用于分布反事实解释的模型无关求解器。DISCOVER在保持原始DCE目标与认证机制的同时,用稀疏的“生成-筛选”搜索范式替代了梯度下降法。该方法利用传输目标的逐样本分解来计算每行影响分数,并强制执行前$k$项干预预算,从而将编辑操作聚焦于最具影响力的样本。为了在没有预测器梯度的情况下指导候选样本生成,DISCOVER引入了由输入端传输几何驱动的OT引导锥形采样原语。在多个表格数据集上的实验表明,该方法能实现输入与输出分布的强联合对齐,将分布反事实推理扩展到现代黑盒学习流程中。代码仓库位于https://github.com/understanding-ml/DCE。