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.
翻译:解释机器学习分类器决策的突出方法之一是使用反事实示例。当前在文本领域生成此类示例的大多数算法都基于生成式语言模型。然而,生成式模型通过最小化特定损失函数进行训练,以满足对生成文本的特定要求。对要求的任何更改都可能需要代价高昂的重新训练,从而可能限制其适用性。本文提出一个基于搜索的通用框架,用于在文本领域生成反事实解释。该框架具有模型无关、领域无关、随时可用的特性,且无需重新训练即可适应需求变化。我们将该任务建模为搜索问题:初始状态为待分类文本,目标状态为指定目标类别的文本。框架包含领域无关的修改算子,同时可通过专用算子利用领域特定知识。搜索算法旨在从目标类别中寻找与原始分类对象保持用户指定最小距离的文本。