CoDeC: Constraints-Guided Diverse Counterfactuals
Abstract
In explainable AI, a prominent approach is to explain the predictions of a classifier (such as a Neural Network) using counterfactuals (CFs), namely instances resulting from perturbations that lead to a change of the classification label. We propose to demonstrate a prototype system called CoDeC, which computes CF-based explanations for a given classifier and prediction. Uniquely, CoDeC computes a diverse set of CFs that adhere to denial constraints, which are defined with respect to a database of instances. These constraints may be mined from e.g. a training set, and/or manually crafted. They are then intuitively used to guide the generation of realistic CFs. The implementation is based on combining a previously proposed solution for finding diverse CFs (DiCE) with an iterative approach that first looks for CFs while disregarding the constraints, then looks for tuples in the proximity of the obtained CFs that further satisfy the constraints, and repeats the process if necessary. We will demonstrate CoDeC in the context of explanations for neural models trained and deployed with respect to the Adult Income and NY-housing datasets. ID 𝑡1 𝑡2 𝑡3 𝑡4 Education Bachelors Masters Assoc_voc Doctorate Edu-Num 13 14 11 16 Occupation Exec_managerial Protective_serv Tech_support Exec_managerial Hours 55 35 40 55 Label ≥ $50𝐾 ≥ $50𝐾 < $50𝐾 ≥ $50𝐾 Table 2: CFs generated by DiCE [8] and by CoDeC. DiCE generates CFs that violate the DCs, while CoDeC ensures that the generated CFs will satisfy them. Method Education Edu-Num Occupation Hours Prob.? Input Bachelors 13 Tech_support 27 – Doctorate 16 Tech_support 27 No DiCE Doctorate 13 Exec_managerial 38 DC1 Doctorate 11 Exec_managerial 27 DC1,2 Doctorate 16 Tech_support 27 No CoDeC Masters 14 Exec_managerial 38 No Bachelors 13 Protective_serv 46 No
Assigned reviewers
No reviewers assigned yet.
Candidates from the panel ranked by taxonomy affinity
| # | Reviewer | Match | Load | Why |
|---|