Abstract
Within the topic of explainable AI, counterfactual explanations to classifiers have received significant recent attention. We study counterfactual explanations that try to explain why a data point received an undesirable classification by providing the closest data point that would have received a desirable one. Within the context of one the simplest and most popular classification models—k-nearest neighbors (k-NN)—the solution to such optimal counterfactual explanation is still very challenging computationally. In this work, we present techniques that significantly improve the computational times to find such optimal counterfactual explanations for k-NN.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Achterberg, T.: Constraint integer programming. Ph.D. thesis, TU Berlin (2007)
Artelt, A., Hammer, B.: On the computation of counterfactual explanations – a survey (2019). https://arxiv.org/abs/1911.07749
Dolan, E.D., Moré, J.J.: Benchmarking optimization software with performance profiles. Math. Program. 91, 201–213 (2002)
Forel, A., Parmentier, A., Vidal, T.: Explainable data-driven optimization: from context to decision and back again. In: 40th International Conference on Machine Learning (ICML 2023) (2023). https://publications.polymtl.ca/56889/
Guidotti, R.: Counterfactual explanations and how to find them: literature review and benchmarking. Data Min. Knowl. Discov. 1–55 (2022)
Gurobi Optimization, LLC: Gurobi Optimizer Reference Manual (2023). https://www.gurobi.com
Parmentier, A., Vidal, T.: Optimal counterfactual explanations in tree ensembles. In: International Conference on Machine Learning, pp. 8422–8431. PMLR (2021)
Pedregosa, F., et al.: Scikit-learn: machine learning in python. J. Mach. Learn. Res. 12(Oct), 2825–2830 (2011)
Perron, L., Didier, F.: CP-SAT. https://developers.google.com/optimization/cp/cp_solver/
Roland, M., Forel, A., Vidal, T.: Adaptive partitioning for chance-constrained problems with finite support (2023). https://arxiv.org/abs/2312.13180
Russell, C.: Efficient search for diverse coherent explanations. In: Proceedings of the Conference on Fairness, Accountability, and Transparency, pp. 20–28 (2019)
Song, Y., Luedtke, J.: An adaptive partition-based approach for solving two-stage stochastic programs with fixed recourse. SIAM J. Optim. 25(3), 1344–1367 (2015)
Vu, D.M., Hewitt, M., Boland, N., Savelsbergh, M.: Dynamic discretization discovery for solving the time-dependent traveling salesman problem with time windows. Transp. Sci. 54(3), 703–720 (2020)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Contardo, C., Fukasawa, R., Rousseau, LM., Vidal, T. (2024). Optimal Counterfactual Explanations for k-Nearest Neighbors Using Mathematical Optimization and Constraint Programming. In: Basu, A., Mahjoub, A.R., Salazar González, J.J. (eds) Combinatorial Optimization. ISCO 2024. Lecture Notes in Computer Science, vol 14594. Springer, Cham. https://doi.org/10.1007/978-3-031-60924-4_24
Download citation
DOI: https://doi.org/10.1007/978-3-031-60924-4_24
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-60923-7
Online ISBN: 978-3-031-60924-4
eBook Packages: Computer ScienceComputer Science (R0)