NOMATTERXAI: Generating "No Matter What" Alterfactual Examples for Explaining Black-Box Text Classification Models

Abstract

In Explainable AI (XAI), counterfactual explanations (CEs) are a well-studied method to communicate feature relevance through contrastive reasoning of ``what if'' to explain AI models' predictions. However, they only focus on important (i.e., relevant) features and largely disregard less important (i.e., irrelevant) ones. Such irrelevant features can be crucial in many applications, especially when users need to ensure that an AI model's decisions are not affected or biased against specific attributes such as gender, race, religion, or political affiliation. To address this gap, the concept of alterfactual explanations (AEs) has been proposed. AEs explore an alternative reality of ``no matter what'', where irrelevant features are substituted with alternative features (e.g., ``republicans'' -> ``democrats'') within the same attribute (e.g., ``politics'') while maintaining a similar prediction output. This serves to validate whether the specified attributes influence AI model predictions. Despite the promise of AEs, there is a lack of computational approaches to systematically generate them, particularly in the text domain, where creating AEs for AI text classifiers presents unique challenges. This paper addresses this challenge by formulating AE generation as an optimization problem and introducing NoMatterXAI, a novel algorithm that generates AEs for text classification tasks. Our approach achieves high fidelity of up to 95% while preserving context similarity of over 90% across multiple models and datasets. A human study further validates the effectiveness of AEs in explaining AI text classifiers to end users.

Cite

Text

Van Nguyen et al. "NOMATTERXAI: Generating "No Matter What" Alterfactual Examples for Explaining Black-Box Text Classification Models." AAAI Conference on Artificial Intelligence, 2025. doi:10.1609/AAAI.V39I23.34677

Markdown

[Van Nguyen et al. "NOMATTERXAI: Generating "No Matter What" Alterfactual Examples for Explaining Black-Box Text Classification Models." AAAI Conference on Artificial Intelligence, 2025.](https://mlanthology.org/aaai/2025/nguyen2025aaai-nomatterxai/) doi:10.1609/AAAI.V39I23.34677

BibTeX

@inproceedings{nguyen2025aaai-nomatterxai,
  title     = {{NOMATTERXAI: Generating "No Matter What" Alterfactual Examples for Explaining Black-Box Text Classification Models}},
  author    = {Van Nguyen, Tuc and Michels, James and Shen, Hua and Le, Thai},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year      = {2025},
  pages     = {24939-24947},
  doi       = {10.1609/AAAI.V39I23.34677},
  url       = {https://mlanthology.org/aaai/2025/nguyen2025aaai-nomatterxai/}
}