Explaining k-Nearest Neighbors: Abductive and Counterfactual Explanations
Not on the map. Why?
Abstract (arXiv)
Despite the wide use of k-Nearest Neighbors as classification models, their explainability properties remain poorly understood from a theoretical perspective. While nearest neighbors classifiers offer interpretability from a ``data perspective'', in which the classification of an input vector barx is explained by identifying the vectors barv1, ldots, barvk in the training set that determine the classification of barx, we argue that such explanations can be impractical in high-dimensional applications, where each vector has hundreds or thousands of features and it is not clear what their relative importance is. Hence, we focus on understanding nearest neighbor classifications through a ``feature perspective'', in which the goal is to identify how the values of the features in barx affect its classification. Concretely, we study abductive explanations such as ``minimum sufficient reasons'', which correspond to sets of features in barx that are enough to guarantee its classification, and counterfactual explanations based on the minimum distance feature changes one would have to perform in barx to change its classification. We present a detailed landscape of positive and negative complexity results for counterfactual and abductive explanations, distinguishing between discrete and continuous feature spaces, and considering the impact of the choice of distance function involved. Finally, we show that despite some negative complexity results, Integer Quadratic Programming and SAT solving allow for computing explanations in practice.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). Builds on 29 of its 64 references that are in the map. First posted on arXiv 10 Jan 2025.
Builds on
29 of 64 references.
References · 29
- 2019Explainable Artificial Intelligence (XAI): Concepts, Taxonomies, Opportunities and Challenges toward Responsible AIcited by 1,552
- 2018A Survey Of Methods For Explaining Black Box Modelscited by 973
- 2016The Mythos of Model Interpretabilitycited by 721
- 2018Abduction-Based Explanations for Machine Learning Modelscited by 160
- 2018A Symbolic Approach to Explaining Bayesian Network Classifierscited by 131
- 2020On The Reasons Behind Decisionscited by 100
- 2020Model Interpretability through the Lens of Computational Complexitycited by 75
- 2020Explaining Naive Bayes and Other Linear Classifiers with Polynomial Time and Delaycited by 57
- 2022On Tackling Explanation Redundancy in Decision Treescited by 44
- 2021SAT-Based Rigorous Explanations for Decision Listscited by 40
- 2021Explanations for Monotonic Classifierscited by 39
- 2024When Large Language Models Meet Vector Databases: A Surveycited by 39
17 more
- 2021On Efficiently Explaining Graph-Based Classifierscited by 37
- 2022On Computing Probabilistic Explanations for Decision Treescited by 35
- 2019On the computation of counterfactual explanations -- A surveycited by 33
- 2021Provably efficient, succinct, and precise explanationscited by 32
- 2024Local vs. Global Interpretability: A Computational Complexity Perspectivecited by 23
- 2022On Computing Probabilistic Abductive Explanationscited by 18
- 2014From Causes for Database Queries to Repairs and Model-Based Diagnosis and Backcited by 13
- 2021Efficient Explanations With Relevant Setscited by 12
- 2016Causes for Query Answers from Databases: Datalog Abduction, View-Updates, and Integrity Constraintscited by 8
- 2022Provably Precise, Succinct and Efficient Explanations for Decision Treescited by 8
- 2022On the Complexity of Counterfactual Reasoningcited by 7
- 2023Explainable Data-Driven Optimization: From Context to Decision and Back Againcited by 7
- 2021Finding Relevant Points for Nearest-Neighbor Classificationcited by 3
- 2022Certifiable Robustness for Nearest Neighbor Classifierscited by 3
- 2024Is Integer Linear Programming All You Need for Deletion Propagation? A Unified and Practical Approach for Generalized Deletion Propagationcited by 2
- 2019New Results for the Complexity of Resilience for Binary Conjunctive Queries with Self-Joinscited by 1
- 2023Reducing Nearest Neighbor Training Sets Optimally and Exactlycited by 1
Built on by
Citing papers per year: 2025: 7; 2026: 3.
10 papers.
- 2025Explain Yourself, Briefly! Self-Explaining Neural Networks with Concise Sufficient Reasonscited by 12
- 2025SHAP Meets Tensor Networks: Provably Tractable Explanations with Parallelismcited by 8
- 2025Additive Models Explained: A Computational Complexity Approachcited by 3
- 2026Unifying Formal Explanations: A Complexity-Theoretic Perspectivecited by 2
- 2025Database Views as Explanations for Relational Deep Learningcited by 1
- 2025Uncovering Bugs in Formal Explainers: A Case Study with PyXAIcited by 1
- 2025Explaining Necessary Truthscited by 0
- 2025Efficient & Correct Predictive Equivalence for Decision Treescited by 0
- 2026On the Hardness of Computing Counterfactual and Semifactual Explanations in XAIcited by 0
- 2026Towards Rigorous Explainability by Feature Attributioncited by 0
- 2026Towards Rigorous Explainability by Feature Attribution17 Apr 2026
- 2026Unifying Formal Explanations: A Complexity-Theoretic Perspective20 Feb 2026
- 2026On the Hardness of Computing Counterfactual and Semifactual Explanations in XAI14 Jan 2026
- 2025Uncovering Bugs in Formal Explainers: A Case Study with PyXAI5 Nov 2025
- 2025SHAP Meets Tensor Networks: Provably Tractable Explanations with Parallelism24 Oct 2025
- 2025Additive Models Explained: A Computational Complexity Approach24 Oct 2025
- 2025Efficient & Correct Predictive Equivalence for Decision Trees22 Sep 2025
- 2025Database Views as Explanations for Relational Deep Learning11 Sep 2025
- 2025Explaining Necessary Truths16 Feb 2025
- 2025Explain Yourself, Briefly! Self-Explaining Neural Networks with Concise Sufficient Reasons5 Feb 2025