A General Search-Based Framework for Generating Textual Counterfactual Explanations

Authors

  • Daniel Gilo Department of Computer Science Technion - Israel Institute of Technology
  • Shaul Markovitch Department of Computer Science Technion - Israel Institute of Technology

DOI:

https://doi.org/10.1609/aaai.v38i16.29764

Keywords:

NLP: Interpretability, Analysis, and Evaluation of NLP Models, ML: Transparent, Interpretable, Explainable ML, PEAI: Accountability, Interpretability & Explainability, SO: Heuristic Search

Abstract

One of the prominent methods for explaining the decision of a machine-learning classifier is by a counterfactual example. Most current algorithms for generating such examples in the textual domain are based on generative language models. Generative models, however, are trained to minimize a specific loss function in order to fulfill certain requirements for the generated texts. Any change in the requirements may necessitate costly retraining, thus potentially limiting their applicability. In this paper, we present a general search-based framework for generating counterfactual explanations in the textual domain. Our framework is model-agnostic, domain-agnostic, anytime, and does not require retraining in order to adapt to changes in the user requirements. We model the task as a search problem in a space where the initial state is the classified text, and the goal state is a text in a given target class. Our framework includes domain-independent modification operators, but can also exploit domain-specific knowledge through specialized operators. The search algorithm attempts to find a text from the target class with minimal user-specified distance from the original classified object.

Published

2024-03-24

How to Cite

Gilo, D., & Markovitch, S. (2024). A General Search-Based Framework for Generating Textual Counterfactual Explanations. Proceedings of the AAAI Conference on Artificial Intelligence, 38(16), 18073-18081. https://doi.org/10.1609/aaai.v38i16.29764

Issue

Section

AAAI Technical Track on Natural Language Processing I