Source-linked AI summary
ViCE: Visual Counterfactual Explanations for Machine Learning Models
Oscar Gomez, Steffen Holter, Jun Yuan, Enrico Bertini
TL;DR
Black-box predictions in high-risk settings can be difficult for end-users to interpret. ViCE generates and visualizes minimal changes that could flip individual predictions, and its HELOC case study shows how user constraints affect the available counterfactuals. The paper presents the tool as a modular approach that can incorporate other counterfactual methods.
Problem
Black-box models can be hard to understand because their complex structures obscure how they produce predictions.
Source: §2 · p. 2Method
Results
In the HELOC case, a negative prediction at 29% had a counterfactual involving changes to three features, while locking time-dependent features left no change within the algorithm’s constraints.
Source: §4 · p. 4Takeaways & Limitations
The tool supports end-user exploration of prediction-changing options, and its modular design allows integration of other counterfactual-generation methods.
Source: §1 · p. 1, §6 · p. 4ViCE currently cannot effectively handle categorical features or multiclass and image-classification contexts, and its visualization displays around 30 features at most.
Source: §5 · p. 4
Abstract
from arXiv · showhide
The continued improvements in the predictive accuracy of machine learning models have allowed for their widespread practical application. Yet, many decisions made with seemingly accurate models still require verification by domain experts. In addition, end-users of a model also want to understand the reasons behind specific decisions. Thus, the need for interpretability is increasingly paramount. In this paper we present an interactive visual analytics tool, ViCE, that generates counterfactual explanations to contextualize and evaluate model decisions. Each sample is assessed to identify the minimal set of changes needed to flip the model's output. These explanations aim to provide end-users with personalized actionable insights with which to understand, and possibly contest or improve, automated decisions. The results are effectively displayed in a visual interface where counterfactual explanations are highlighted and interactive methods are provided for users to explore the data and model. The functionality of the tool is demonstrated by its application to a home equity line of credit dataset.
1 Introduction
High-performing machine-learning models are increasingly used in complex and high-risk applications, where end-users need to understand individual predictions. ViCE offers actionable suggestions about changes that could alter a prediction.
1 Introduction
- ViCE targets end-users seeking to understand individual predictions from models used in complex, high-risk applications.The introduction names client-facing people such as doctors and admissions officers as potential users.Source: §1 · p. 1
- Its explanations suggest changes that could alter a model’s prediction, such as changes a loan officer might consider for a rejected application.The tool describes what changes are required to alter the current state.Source: §1 · p. 1
2 Background and Related Works
ViCE addresses black-box model interpretation with a model-independent counterfactual algorithm. It extends earlier counterfactual approaches to continuous numerical data and presents explanations through visual analytics.
2 Background and Related Works
- ViCE’s model-independent explanation algorithm works without access to a model’s internal logic.Black-box models are described as hard to understand because of their complex structures.Source: §2 · p. 2
- Counterfactual explanations identify minimal feature-value changes that switch an instance’s prediction, complementing feature-contribution approaches such as LIME [18] and SHAP [11].The section also describes prior counterfactual-generation approaches by Wachter et al. and Ustun et al. [21].Source: §2 · p. 2
- Visual analytics systems support understanding, debugging, verification, and refinement, while ViCE focuses on how inputs can be changed to reach another prediction.The section contrasts ViCE’s question with WIT [23], which shows how predictions change after data are inferred.Source: §2 · p. 2
- Earlier black-box counterfactual tools addressed target-class changes, but the cited algorithm was designed for text and works only on binary inputs; ViCE extends it to continuous numerical data.The passage names Rivelo and Krause et al. as related tools.Source: §2 · p. 2
3 ViCE
ViCE combines a constrained counterfactual search with an interface for exploring predictions, feature distributions, and possible changes. Its design emphasizes minimal, feasible changes and supports user-selected constraints.
3 ViCE
- ViCE presents local counterfactuals for numeric features by showing which features must change and by how much to alter an instance’s prediction.Its iterative design process considered end-user questions about distributions, relevant features, possible changes, and actionable changes.Source: §3 · p. 2
3.1 Counterfactual Algorithm
- The algorithm discretizes each feature into Gaussian-based bins, then greedily moves feature values toward the opposite class until the prediction flips or constraints stop the search.The constraints limit the number of changed features and the number of bins crossed; the search chooses the move producing the largest output change at each iteration.Source: §3.1 · p. 2
3.2 Visual Interface
- The interface pairs prediction probability and correctness with feature values positioned against dataset densities, and displays suggested counterfactual changes and controls.Users can lock features, sort by standardized values, and select distributions for all, positive, or negative cases; the diabetes example visualizes a single local explanation.Source: §3.2 · pp. 2–3, Figure 1 · p. 3
- Counterfactuals are most often found for predictions near the 50% cutoff; predictions far above or below it may require changes beyond the algorithm’s limits.The interface can still support anomaly exploration when no counterfactual is available, and can accommodate other counterfactual-generation methods [9] [16] [21].Source: §3.2 · p. 3
3.3 Implementation
- ViCE accepts binary-classification datasets in CSV format, custom models with probability prediction, and real-time user inputs; its implementation uses 10 bins and sets w = l = 5.The default model is an SVM trained with scikit-learn; the application uses Flask, Python, D3, and JavaScript.Source: §3.3 · p. 3
4 Case Study
The HELOC case study uses ViCE to explore a homeowner’s credit-line prediction and candidate changes. The case illustrates how feature distributions and user-imposed constraints reveal what changes may or may not flip a prediction.
4 Case Study
- For the selected HELOC application, the model predicted a negative outcome with 29% probability, matching the ground truth.Feature-density views and sorting helped identify unusual values and compare the instance with other negative samples.Source: §4 · p. 4, Figure 2 · p. 4
- The counterfactual suggested increasing Number of Satisfying Trades and Months Since Most Recent Delinquency substantially, and Number of Inquiries in the Last 6 Months excluding last 7 days slightly.The authors note that time-based changes might be infeasible for a client seeking quick approval.Source: §4 · p. 4
- After time-dependent features were locked, the algorithm could not find a decision-changing explanation within its constraints; unlocking External Risk Estimate suggested large changes to that feature.The authors interpret this as evidence that time variables weigh highly in this instance’s decision, and that External Risk Estimate is strongly correlated with the model decision.Source: §4 · p. 4
5 Limitations
ViCE has scope and display limits: it does not effectively handle categorical features, multiclass classification, or image classification, and it can display around 30 features.
- Categorical features are not effectively handled; proposed options are presetting a search path or brute-force analysis of known categorical features.Source: §5 · p. 4
- The tool does not extend to multiclass classification or contexts such as image classification.Source: §5 · p. 4
- The visualization can display around 30 features, while larger datasets can be accommodated by sorting and displaying only the top k features.Source: §5 · p. 4
6 Conclusions and Future Work
ViCE presents counterfactual explanations that show the minimal changes needed to alter a prediction, demonstrated on a loan dataset. The authors describe the tool as modular and outline future interface and explanation extensions.
6 Conclusions and Future Work
- ViCE visualizes counterfactuals for non-binary data, showing each sample’s minimal changes needed to alter the model’s decision.Source: §6 · p. 4
- Users can customize explanations according to their requirements, and the tool was applied in a loan-dataset use case.Source: §6 · p. 4
- ViCE’s modular, black-box-based design allows integration of improved counterfactual-generation methods or multiple alternative explanations.Source: §6 · p. 4
- Future work includes letting users inspect custom changes, adding explanation methods and local-importance sorting, and aggregating instance explanations for model developers.Source: §6 · p. 5