# Semantics and explanation: why counterfactual explanations produce adversarial examples in deep neural networks

arXiv: https://arxiv.org/abs/2012.10076 · HTML: https://mlsanity.com/paper/2012.10076/

## Key facts

- Cited by 24 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 18 Dec 2020.

## Built on by (most cited first, 24 of 24)

- [Exploring Counterfactual Explanations Through the Lens of Adversarial Examples: A Theoretical and Empirical Analysis](https://mlsanity.com/paper/2106.09992/) (2021)
- [STEEX: Steering Counterfactual Explanations with Semantics](https://mlsanity.com/paper/2111.09094/) (2021)
- [Consistent Counterfactuals for Deep Models](https://mlsanity.com/paper/2110.03109/) (2021)
- [OCTET: Object-aware Counterfactual Explanations](https://mlsanity.com/paper/2211.12380/) (2022)
- [SketchXAI: A First Look at Explainability for Human Sketches](https://mlsanity.com/paper/2304.11744/) (2023)
- [Interpretation of Black Box NLP Models: A Survey](https://mlsanity.com/paper/2203.17081/) (2022)
- [Generating collective counterfactual explanations in score-based classification via mathematical optimization](https://mlsanity.com/paper/2310.12822/) (2023)
- [Explainability-Aware One Point Attack for Point Cloud Neural Networks](https://mlsanity.com/paper/2110.04158/) (2021)
- [Choose your Data Wisely: A Framework for Semantic Counterfactuals](https://mlsanity.com/paper/2305.17667/) (2023)
- [V-CECE: Visual Counterfactual Explanations via Conceptual Edits](https://mlsanity.com/paper/2509.16567/) (2025)
- [Counterfactual Explainer Framework for Deep Reinforcement Learning Models Using Policy Distillation](https://mlsanity.com/paper/2305.16532/) (2023)
- [Semantics, Ontology and Explanation](https://mlsanity.com/paper/2304.11124/) (2023)
- [Towards Non-Adversarial Algorithmic Recourse](https://mlsanity.com/paper/2403.10330/) (2024)
- [SCENIR: Visual Semantic Clarity through Unsupervised Scene Graph Retrieval](https://mlsanity.com/paper/2505.15867/) (2025)
- [Counterfactual Explanations on Robust Perceptual Geodesics](https://mlsanity.com/paper/2601.18678/) (2026)
- [Graph Edits for Counterfactual Explanations: A comparative study](https://mlsanity.com/paper/2401.11609/) (2024)
- [Reinterpreting 'the Company a Word Keeps': Towards Explainable and Ontologically Grounded Language Models](https://mlsanity.com/paper/2406.06610/) (2024)
- [Adversarial Robustness of Deep Reinforcement Learning based Dynamic Recommender Systems](https://mlsanity.com/paper/2112.00973/) (2021)
- [Exploring Effectiveness of Explanations for Appropriate Trust: Lessons from Cognitive Psychology](https://mlsanity.com/paper/2210.03737/) (2022)
- [Counterfactual Edits for Generative Evaluation](https://mlsanity.com/paper/2303.01555/) (2023)
- [Adaptive Adversarial Training Does Not Increase Recourse Costs](https://mlsanity.com/paper/2309.02528/) (2023)
- [ABIGX: A Unified Framework for eXplainable Fault Detection and Classification](https://mlsanity.com/paper/2311.05316/) (2023)
- [CF-OPT: Counterfactual Explanations for Structured Prediction](https://mlsanity.com/paper/2405.18293/) (2024)
- [Conceptual Contrastive Edits in Textual and Vision-Language Retrieval](https://mlsanity.com/paper/2503.01914/) (2025)

## Abstract (arXiv)

Recent papers in explainable AI have made a compelling case for counterfactual modes of explanation. While counterfactual explanations appear to be extremely effective in some instances, they are formally equivalent to adversarial examples. This presents an apparent paradox for explainability researchers: if these two procedures are formally equivalent, what accounts for the explanatory divide apparent between counterfactual explanations and adversarial examples? We resolve this paradox by placing emphasis back on the semantics of counterfactual expressions. Producing satisfactory explanations for deep learning systems will require that we find ways to interpret the semantics of hidden layer representations in deep neural networks.
