为树模型设计高效精准的反事实解释方法,实现毫秒级响应。
Counterfactual Maps: What They Are and How to Find Them
- 将反事实搜索转化为最近区域查询,利用超矩形划分结构
- 基于KD树实现全局最优解,平均查询时间亚线性
- 适合医疗、金融等高风险场景的可解释决策支持
反事实解释是可解释机器学习的核心工具,但对复杂模型精确计算仍具挑战。对于树集成模型,其预测在大量轴对齐超矩形上为分段常数,因此某点的最优反事实对应于其在具有不同标签的最近超矩形上的投影。现有方法大多忽略这一几何结构,依赖无最优性保障的启发式或难以交互使用的混合整数规划。本文从最近区域搜索角度重新审视反事实生成,提出反事实地图,作为树集成模型的全局可追溯表示。通过将任意树集成压缩为带标签的超矩形划分,将反事实搜索建模为识别与最近异类标签矩形关联的广义Voronoi单元。由此提出基于体积k维(KD)树的精确、摊销算法,支持带显式最优性证明的分支定界查询,预处理后平均查询时间亚线性。在多个高风险应用领域的真实数据集上的实验表明,该方法可在毫秒级延迟下提供全局最优反事实解释,查询速度较现有精确冷启动优化方法快数个数量级。
原文摘要 · Abstract (English)
Counterfactual explanations are a central tool in interpretable machine learning, yet computing them exactly for complex models remains challenging. For tree ensembles, predictions are piecewise constant over a large collection of axis-aligned hyperrectangles, implying that an optimal counterfactual for a point corresponds to its projection onto the nearest rectangle with an alternative label under a chosen metric. Existing methods largely overlook this geometric structure, relying either on heuristics with no optimality guarantees or on mixed-integer programming formulations that do not scale to interactive use. In this work, we revisit counterfactual generation through the lens of nearest-region search and introduce counterfactual maps, a global representation of recourse for tree ensembles. Leveraging the fact that any tree ensemble can be compressed into an equivalent partition of labeled hyperrectangles, we cast counterfactual search as the problem of identifying the generalized Voronoi cell associated with the nearest rectangle of an alternative label. This leads to an exact, amortized algorithm based on volumetric k-dimensional (KD) trees, which performs branch-and-bound nearest-region queries with explicit optimality certificates and sublinear average query time after a one-time preprocessing phase. Our experimental analyses on several real datasets drawn from high-stakes application domains show that this approach delivers globally optimal counterfactual explanations with millisecond-level latency, achieving query times that are orders of magnitude faster than existing exact, cold-start optimization methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。