Source-linked AI summary
DECE: Decision Explorer with Counterfactual Explanations for Machine Learning Models
Furui Cheng, Yao Ming, Huamin Qu
TL;DR
Complex model decisions can be difficult to interpret, and instance-focused counterfactual methods do not provide the subgroup overview and feasible changes needed for broader exploration. DECE combines interactive instance- and subgroup-level counterfactual analysis with constraint customization. Three use cases and an expert interview demonstrate its effectiveness, while the interview evidence is limited to medical students acting as decision-makers.
Problem
Existing counterfactual methods mostly explain individual instances, while examining model boundaries and biases also calls for subgroup overviews and feasible real-world changes.
Source: §1 · p. 2Method
Results
Takeaways & Limitations
DECE combines subgroup counterfactual exploration with actionable instance examples to help users explore and understand model decisions.
Source: §7 · p. 9The expert interviews involved only medical students as decision-makers, and the authors call for user studies with model developers, data scientists, and lay users.
Source: §7 · p. 9
Abstract
from arXiv · showhide
With machine learning models being increasingly applied to various decision-making scenarios, people have spent growing efforts to make machine learning models more transparent and explainable. Among various explanation techniques, counterfactual explanations have the advantages of being human-friendly and actionable -- a counterfactual explanation tells the user how to gain the desired prediction with minimal changes to the input. Besides, counterfactual explanations can also serve as efficient probes to the models' decisions. In this work, we exploit the potential of counterfactual explanations to understand and explore the behavior of machine learning models. We design DECE, an interactive visualization system that helps understand and explore a model's decisions on individual instances and data subsets, supporting users ranging from decision-subjects to model developers. DECE supports exploratory analysis of model decisions by combining the strengths of counterfactual explanations at instance- and subgroup-levels. We also introduce a set of interactions that enable users to customize the generation of counterfactual explanations to find more actionable ones that can suit their needs. Through three use cases and an expert interview, we demonstrate the effectiveness of DECE in supporting decision exploration tasks and instance explanations.
1 INTRODUCTION
DECE addresses the difficulty of explaining complex model decisions and the need for counterfactuals that support population-level exploration and feasible changes. It combines instance- and subgroup-level counterfactual exploration with interactions for refining explanations and examining model behavior.
- Complex machine-learning decision pathways can be difficult to explain, while limited interpretability may contribute to hidden biases and hinder deployment.Source: §1 · p. 1
- Counterfactual explanations describe minimal changes that yield a desired prediction and can support decision understanding, future recommendations, and model-bias analysis.They provide exact model predictions rather than approximations.Source: §1 · pp. 1–2
- Existing counterfactual methods largely focus on individual instances, leaving a need for population or subgroup overviews and feasible real-world constraints.Source: §1 · p. 2
- DECE supports interactive subgroup creation and comparison, constraint editing, and discovery of simple decision rules through counterfactual analysis.The paper illustrates checking a diabetes rule involving BMI below 30 against counterfactual examples.Source: §1 · p. 2
- The contributions include a visualization system for exploring model decisions and a subgroup counterfactual method for exploratory analysis and hypothesis refinement.Source: §1 · p. 2
- Three use cases and an expert interview demonstrate DECE’s effectiveness in supporting decision exploration and instance explanations.Source: §1 · p. 2
2 RELATED WORK
Prior work develops counterfactual generation and model-explanation visualizations, while DECE focuses on conveying counterfactual information for subgroups and supporting actionable exploration. It also addresses the model-specificity common in visualization techniques with a model-agnostic approach spanning instances and subsets.
2.1 Counterfactual Explanation
- Counterfactual research has emphasized generating and evaluating explanations, whereas DECE focuses on visualizing counterfactual information for subgroups and helping users find feasible, actionable examples.Source: §2.1 · p. 2
2.2 Visual Analytics for Explainable Machine Learning
- Many explainable-ML visualizations are model-specific; DECE studies counterfactuals through a model-agnostic visualization approach for both instances and subsets.Source: §2.2 · p. 2
3 DESIGN REQUIREMENTS
The design process identifies two user-interest levels for counterfactual explanations: individual instances and subgroups. These levels reflect the different kinds of model understanding sought by decision subjects and by developers or decision-makers.
- The authors identify instance-level and subgroup-level explanations as two key user-interest levels after reviewing explainable-ML design studies and counterfactual characteristics.Source: §3 · p. 3
- Decision subjects are more interested in explanations of predictions for individual profiles than in understanding the model globally.Source: §3 · p. 3
R1 Examine the diverse counterfactuals to an instance. Access-
The requirements span diverse and customizable explanations for individual instances and iterative subgroup analysis. Users should be able to refine groups and summarize the distribution of their counterfactual examples.
- Instance explanations should offer diverse counterfactuals that users can compare and choose among, rather than only one closest option.Source: R1 Examine the diverse counterfactuals… · p. 3
- Users should be able to specify preferences or constraints directly when multiple generated counterfactuals do not match their needs.Source: R1 Examine the diverse counterfactuals… · p. 3
- Subgroup analysis should let users select and iteratively refine groups, including groups formed from prior knowledge or hypotheses about the model.The text gives low-glucose patients labeled healthy as an example for exploring diabetes counterfactuals.Source: R1 Examine the diverse counterfactuals… · p. 3
- Users should be able to summarize subgroup counterfactual distributions to examine shared patterns and verify hypotheses about general prediction behavior.Source: R1 Examine the diverse counterfactuals… · p. 3
R5 Compare the counterfactual examples of different sub-
Comparing counterfactual examples across groups can help reveal potential model biases and guide subgroup refinement.
R5 Compare the counterfactual examples of different sub-
- Comparisons across groups can reveal potential model biases and help users progressively refine subgroups toward those with the same predicted outcome.For example, users can compare the actions different genders or ethnic groups need to achieve the same desired annual income.Source: R5 Compare the counterfactual examples… · p. 3
4 COUNTERFACTUAL EXPLANATION
The section develops counterfactual explanations that balance validity, proximity, and diversity, with user constraints supporting actionable examples. It also introduces subgroup-level counterfactuals for testing and refining hypotheses about model behavior.
4.1 Generating Counterfactual Examples
- Counterfactual generation balances validity, proximity, and diversity, while supporting actionable examples through proximity, diversity, sparsity, and user constraints.The three-part loss optimizes validity, distance from the original instance, and diversity; users can specify preferences or constraints.Source: §4.1 · pp. 3–4
- Proximity uses weighted Heterogeneous Manhattan-Overlay Metric (HMOM), with normalized Manhattan distance for continuous features and an overlap metric for categorical features.The continuous-feature distance is weighted by 1/(1+MAD_f), where MAD_f is the feature’s median absolute deviation.Source: §4.1 · pp. 3–4
- Users can constrain feature changes; stochastic gradient descent applies masked gradients to immutable features and clips values to feasible ranges every K iterations.The constraints determine whether and within what range a feature value may change.Source: §4.1 · p. 4
- A feature-selection step improves sparsity by retaining the top-k features per example and masking gradients for other features during optimization.The resulting counterfactuals change at most k feature values.Source: §4.1 · p. 4
- Post-hoc validity addresses unrealistic continuous-valued counterfactuals by projecting them to meaningful values and iteratively refining the projections.The refinement updates the feature with the largest absolute normalized gradient until the example is valid or a step limit is reached.Source: §4.1 · p. 4
4.2 Rule Support Counterfactual Examples
- R-counterfactuals support subgroup analysis by changing one feature at a time while keeping other feature values within the subgroup’s ranges.Multiple r-counterfactuals are generated for each feature to analyze their effects on the subgroup’s predictions.Source: §4.2 · p. 4
- A hypothesis is an if-else rule about predictions for a subgroup defined by feature-range constraints, which may be continuous intervals or selectable categories.Users assess whether the model’s predictions on the collected subgroup conform to the hypothesis and whether it may generalize to unseen instances.Source: §4.2 · p. 4
- Counterfactuals can challenge a subgroup hypothesis and suggest refinements; if all generated examples fall outside its feature ranges, the claim is supported even against potentially unseen examples.Users may refine or reject the hypothesis based on the r-counterfactual groups.Source: §4.2 · p. 4
5 DECE
DECE combines instance- and subgroup-level counterfactual exploration in complementary views. Users can inspect individual examples, summarize and refine subgroups, and compare their counterfactuals.
5.1 Overview
- DECE uses separate data-storage, counterfactual-engine, and visual-analysis modules to support configurable models, datasets, and counterfactual constraints.Source: §5.1 · p. 5
- The instance and table views form an exploratory workflow: instance-level examples suggest hypotheses, subgroup counterfactuals assess them, and instance inspection helps verify or reject them.Source: §5.1 · p. 5
5.2 Visualization of Subgroup with R-counterfactuals
- Side-by-side histograms compare original and counterfactual subgroup distributions by prediction class; feature-range boxes or categorical bars show the selected subgroup and its Gini impurity cue.Source: §5.2 · p. 5
- Sankey links map original bins to counterfactual bins, encoding flow amount with opacity and relative flow to input-bin size with width; the sparse links make this more space-efficient than a matrix.Source: §5.2 · p. 5, Figure 4 · p. 5
- A Gini-based information-gain sparkline helps users find subgroup splits, then refine continuous ranges by dragging handles or categorical selections by clicking bars.Source: §5.2 · p. 5
5.3 Table View
- The table view links feature-distribution charts, subgroup summaries, and instance details, enabling filtering, sorting, subgroup refinement, and side-by-side subgroup comparison.Source: §5.3 · p. 6
5.4 Instance View
- The instance view lets users set counterfactual targets, sparsity and feature constraints, then inspect valid and invalid examples alongside the original instance.Source: §5.4 · p. 6
6 EVALUATION
The evaluation presents three usage scenarios for decision-makers, model developers, and decision subjects, then reports interviews with medical students.
6.1 Usage Scenario: Diabetes Classification
- After three refinements, 86 patients (11% of 768) formed a fully plausible negative-prediction subgroup under the stated age, glucose, BMI, and DPF limits.The final filtering excluded blood pressure below 40; the authors also report a low-blood-pressure pattern that persisted in another clean-data model and was linked through research to diabetic neuropathy.Source: Figure 5 · p. 7, §6.1 · p. 7
6.2 Usage Scenario: Credit Risk
- Whole-dataset counterfactuals associated extremely large credit amounts or long debt duration with bad-risk predictions.The scenario used a neural network on the German Credit Dataset, with 74.5% test accuracy.Source: §6.2 · p. 7
- Instance and subgroup counterfactuals indicated that gender played a more important role in predictions for a wealthy male subgroup, with matched female comparisons showing different CF patterns.The authors conclude that this is a strong sign the model might behave unfairly toward different genders.Source: §6.2 · p. 8, Figure 6 · p. 8
6.3 Usage Scenario: Graduate Admissions
- After locking university rating and CGPA and constraining GRE and TOEFL scores, Vincent selected a counterfactual suggesting GRE 317, TOEFL 100, and a stronger recommendation letter.The customized search used GRE < 320 and TOEFL < 100.Source: §6.3 · p. 8, Figure 7 · p. 9
6 EVALUATION
- Three medical students with clinical internships explored DECE after a 30-minute introduction and a 20-minute session using the diabetes dataset.The semi-structured interviews gathered feedback on user experience, possible scenarios, and improvements.Source: §6.4 · p. 9
6.4 Expert Interview
- E1 and E2 found the system easy to use, while E3 initially misunderstood the instance lens; interviewees saw clinical uses but noted patient-knowledge and domain-specific needs.Suggestions included marking attributes not applicable and optionally showing reference ranges.Source: §6.4 · p. 9
7 DISCUSSION AND CONCLUSION
DECE supports exploration of classification-model decisions through subgroup counterfactuals and interactive constraints for generating actionable examples. Its current design has defined data and model scope, with further system improvements and user studies identified as future work.
7 DISCUSSION AND CONCLUSION
- DECE combines subgroup counterfactual analysis with interactive feature constraints to probe classification decision boundaries and generate actionable examples.The authors demonstrate it through three scenarios in finance, education, and healthcare, and an expert interview.Source: §7 · p. 9
- The table view fits nine subgroup rows or about 1,000 instance rows on a typical 1920 × 1080 laptop screen.About ten feature columns can usually be displayed; users can collapse features or widen columns to inspect details.Source: §7 · p. 9
- About 16 seconds were needed to generate single counterfactual examples for the 10,459-instance HELOC2 dataset on a 2.5GHz four-core Intel Core i5.Optimization converges more slowly on datasets with many categorical attributes; the authors suggest smoothing categorical variables and parallelism as future strategies.Source: §7 · p. 9
- The prototype supports differentiable binary classifiers on tabular data; multiclass support is described as an extension, while non-differentiable and unstructured-data models remain future work.For multiclass classification, users could select a target counterfactual class or the system could heuristically select one.Source: §7 · p. 9
- The proposed subgroup workflow iteratively refines a group using class and impurity distributions until it is comparatively pure.The authors characterize findings on such a subgroup as salient and valid.Source: §7 · p. 9
- Further work includes improving categorical subgroup cells and instance-view customization, and evaluating effectiveness with broader user groups and domains.The reported expert interviews involved medical students; planned studies would include model developers, data scientists, and lay users for the instance view.Source: §7 · p. 9