  We present counterfactual situation testing (CST), a causal data mining
framework for detecting discrimination in classifiers. CST aims to answer in an
actionable and meaningful way the intuitive question "what would have been the
model outcome had the individual, or complainant, been of a different protected
status?" It extends the legally-grounded situation testing of Thanh et al.
(2011) by operationalizing the notion of fairness given the difference using
counterfactual reasoning. For any complainant, we find and compare similar
protected and non-protected instances in the dataset used by the classifier to
construct a control and test group, where a difference between the decision
outcomes of the two groups implies potential individual discrimination. Unlike
situation testing, which builds both groups around the complainant, we build
the test group on the complainant's counterfactual generated using causal
knowledge. The counterfactual is intended to reflect how the protected
attribute when changed affects the seemingly neutral attributes used by the
classifier, which is taken for granted in many frameworks for discrimination.
Under CST, we compare similar individuals within each group but dissimilar
individuals across both groups due to the possible difference between the
complainant and its counterfactual. Evaluating our framework on two
classification scenarios, we show that it uncovers a greater number of cases
than situation testing, even when the classifier satisfies the counterfactual
fairness condition of Kusner et al. (2017).
