TIGTEC: Token Importance Guided TExt Counterfactuals

Abstract

Counterfactual examples explain a prediction by highlighting changes in an instance that flip the outcome of a classifier. This paper proposes TIGTEC, an efficient and modular method for generating sparse, plausible and diverse counterfactual explanations for textual data. TIGTEC is a text editing heuristic that targets and modifies words with high contribution using local feature importance. A new attention-based local feature importance is proposed. Counterfactual candidates are generated and assessed with a cost function integrating a semantic distance, while the solution space is efficiently explored in a beam search fashion. The conducted experiments show the relevance of TIGTEC in terms of success rate, sparsity, diversity and plausibility. This method can be used in both model-specific or model-agnostic way, which makes it very convenient for generating counterfactual explanations.

Cite

Text

Bhan et al. "TIGTEC: Token Importance Guided TExt Counterfactuals." European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2023. doi:10.1007/978-3-031-43418-1_30

Markdown

[Bhan et al. "TIGTEC: Token Importance Guided TExt Counterfactuals." European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases, 2023.](https://mlanthology.org/ecmlpkdd/2023/bhan2023ecmlpkdd-tigtec/) doi:10.1007/978-3-031-43418-1_30

BibTeX

@inproceedings{bhan2023ecmlpkdd-tigtec,
  title     = {{TIGTEC: Token Importance Guided TExt Counterfactuals}},
  author    = {Bhan, Milan and Vittaut, Jean-Noël and Chesneau, Nicolas and Lesot, Marie-Jeanne},
  booktitle = {European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases},
  year      = {2023},
  pages     = {496-512},
  doi       = {10.1007/978-3-031-43418-1_30},
  url       = {https://mlanthology.org/ecmlpkdd/2023/bhan2023ecmlpkdd-tigtec/}
}