Counterfactual explanations are often conflated with contrastive explanations, but do actually state which changes to a given input would be necessary to achieve a contrastive output, i.e. the foil, by providing an example [1]}. Counterfactual explanations are a common method humans naturally use when attempting to explain something and answer the question of Why not ...? [2]}, [3]}. In XAI, counterfactual explanations are usually used for classification tasks [4]}. Counterfactual explanations should be minimal, which means they should change as little in the original input as possible to cross the decision boundary of the model between the fact and foil class [5]}, [6]}. In the context of generating counterfactuals explanations, the foil class will be referred to as target class. Since counterfactual explanations are a way for a user to understand what they would need to change in order to achieve a more favorable outcome for themselves, many researchers have emphasized that counterfactual explanations should be actionable and feasible, i.e., should provide a user with an example that is achievable and realistic in real life [7]}, [8]}.
In certain scenarios, modern approaches for generating counterfactual explanations have shown significant advantages over feature attribution mechanisms in terms of mental model creation and explanation satisfaction [9]}.
[10]} name multiple advantages of counterfactual explanations, such as being able to detect biases in a model, providing insight without attempting to explain the complicated inner state of the model, and often being efficient to compute.
