Model interpretability has become an important problem in machine learning (ML) due to the increased effect algorithmic decisions have on humans. Counterfactual explanations can help users understand not only why ML models make certain decisions, but also give insight into how these decisions can be modified. We frame the problem of finding counterfactual explanations as an optimization task and extend previous work that could only be applied to differentiable models. In order to accommodate non-differentiable models such as tree ensembles, we propose using probabilistic model approximations in the optimization framework. We introduce a simple approximation technique that is effective for finding counterfactual explanations for predictions of the original model using a range of distance metrics. We show that our counterfactual examples are significantly closer to the original instances compared to other methods designed for tree ensembles for four distance metrics.
View on arXiv