Computationally Efficient Explainable AI: Bayesian Optimization for Computing Multiple Counterfactual Explanantions

University essay from KTH/Matematik (Avd.)

Abstract: In recent years, advanced machine learning (ML) models have revolutionized industries ranging from the healthcare sector to retail and E-commerce. However, these models have become increasingly complex, making it difficult for even domain experts to understand and retrace the model's decision-making process. To address this challenge, several frameworks for explainable AI have been proposed and developed. This thesis focuses on counterfactual explanations (CFEs), which provide actionable insights by informing users how to modify inputs to achieve desired outputs. However, computing CFEs for a general black-box ML model is computationally expensive since it hinges on solving a challenging optimization problem. To efficiently solve this optimization problem, we propose using Bayesian optimization (BO), and introduce the novel algorithm Separated Bayesian Optimization (SBO). SBO exploits the formulation of the counterfactual function as a composite function. Additionally, we propose warm-starting SBO, which addresses the computational challenges associated with computing multiple CFEs. By decoupling the generation of a surrogate model for the black-box model and the computation of specific CFEs, warm-starting SBO allows us to reuse previous data and computations, resulting in computational discounts and improved efficiency for large-scale applications. Through numerical experiments, we demonstrate that BO is a viable optimization scheme for computing CFEs for black-box ML models. BO achieves computational efficiency while maintaining good accuracy. SBO improves upon this by requiring fewer evaluations while achieving accuracies comparable to the best conventional optimizer tested. Both BO and SBO exhibit improved capabilities in handling various classes of ML decision models compared to the tested baseline optimizers. Finally, Warm-starting SBO significantly enhances the performance of SBO, reducing function evaluations and errors when computing multiple sequential CFEs. The results indicate a strong potential for large-scale industry applications.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)