We consider finding a counterfactual explanation for a classification or regression forest, such as a random forest. This requires solving an optimization problem to find the closest input instance to a given instance for which the forest outputs a desired value. Finding an exact solution has a cost that is exponential on the number of leaves in the forest. We propose a simple but very effective approach: we constrain the optimization to only those input space regions defined by the forest that are populated by actual data points. The problem reduces to a form of nearest-neighbor search using a certain distance on a certain dataset. This has two advantages: first, the solution can be found very quickly, scaling to large forests and high-dimensional data, and enabling interactive use. Second, the solution found is more likely to be realistic in that it is guided towards high-density areas of input space.
翻译:我们考虑为分类或回归森林(例如随机森林)寻找反事实解释。这需要求解一个优化问题,以找到离给定实例最近的输入实例,使得该森林对该实例输出期望值。寻找精确解的成本随森林中叶节点数量呈指数增长。我们提出了一种简单但非常有效的方法:将优化约束限制在由森林定义的、且被实际数据点填充的输入空间区域。该问题简化为在特定数据集上使用特定距离度量进行最近邻搜索的形式。这有两个优点:其一,解可以非常快速地找到,可扩展至大规模森林和高维数据,并支持交互式使用;其二,找到的解更可能符合实际情况,因为它被引导向输入空间的高密度区域。