When a machine learning model outputs a prediction, it provides a single snapshot of a high-dimensional decision space. Traditional explainability methods, such as static feature importance plots, describe what the model found important on average or at that specific coordinate. However, humans do not naturally build intuition from static snapshots; we learn by interacting with our environment, testing hypotheses, and observing the consequences.
Interactive counterfactual probing shifts the paradigm from passive explanation to active exploration. By allowing users to manually tweak input features—sliding a bar, toggling a clinical code, or reordering a timeline—and observing the updated prediction in real time, this approach transforms an opaque model into a responsive sandbox. The core mechanism relies on a tight, real-time feedback loop: Input Manipulation $\rightarrow$ Instant Re-inference $\rightarrow$ Visual Feedback. This loop allows domain experts to perform intuitive sensitivity analysis, map local decision boundaries, and evaluate hypothetical scenarios without writing code.
Mapping Local Decision Boundaries
To trust a model's prediction, a practitioner needs to understand its sensitivity. If a minor, irrelevant change in an input flips the final output, the model may be brittle or overfitted. Conversely, if a major change yields no difference, the model might be insensitive to critical signals.
By interactively manipulating input variables, users can perform counterfactual reasoning to see exactly how a model's final decision responds to specific features. In Visual Explanation of Evidence with Additive Classifiers, Poulin et al. demonstrated that decomposing classification scores into interactive visual evidence allows users to observe real-time changes in a model's output weight. This interactive probing helps users build an accurate mental model of the classifier's decision boundaries and underlying logic.
This concept was expanded to a model-agnostic framework by Wexler et al. in The What-If Tool: Interactive Probing of Machine Learning Models. The authors showed that manual probing of individual data points can catch subtle logic bugs and data-processing errors that aggregate automated testing completely misses. By slicing through the high-dimensional space one manual adjustment at a time, practitioners can verify whether a model's local sensitivity aligns with real-world domain expectations.
Simulating Interventions in High-Stakes Domains
In fields like medicine and industrial maintenance, predictions are only useful if they lead to safe, effective actions. Interactive counterfactual simulation bridges the gap between prediction (what will happen) and prescription (what we should do about it).
In clinical settings, this mechanism transforms risk calculators from passive diagnostic readouts into active motivational and decision-support tools:
- Shared Decision-Making: Foraker et al., in their work on the SPHERE tool (EHR-based Visualization Tool: Adoption Rates, Satisfaction, and Patient Outcomes), integrated real-time "what-if" scenarios directly into Electronic Health Records (EHR). This allows clinicians to visually demonstrate to patients how specific lifestyle modifications would immediately improve their composite cardiovascular health scores.
- Visualizing Health Trajectories: Similarly, Arandjelovic et al. (Visualization of patient specific disease risk prediction) and Osuala et al. (Bringing Modern Machine Learning into Clinical Practice Through the Use of Intuitive Visualization and Human–Computer Interaction) developed interactive interfaces where clinicians can toggle discrete history variables or diagnoses. This simulation demonstrates how managing precursor conditions directly alters future prognostic trajectories, serving as a persuasive communication tool for patient education.
When dealing with complex, sequential deep learning models trained on temporal data, interactive simulation requires specialized visual architectures. In CarePre: An Intelligent Clinical Decision Assistance System, Jin et al. designed a framework where physicians can interactively add, remove, or reorder clinical events within a patient's timeline to simulate potential treatment impacts in real time. To validate deep clinical models, Li et al. developed DG-Viz (Marrying Medical Domain Knowledge With Deep Learning on Electronic Health Records: A Deep Visual Analytics Approach), which allows experts to manually add or remove specific medical codes. This tests the model's sensitivity against established medical knowledge graphs, ensuring the network's internal logic remains clinically sound.
This same paradigm applies to industrial settings. In VisioRed: A Visualisation Tool for Interpretable Predictive Maintenance, Paraschos et al. enabled operators to explore "what-if" scenarios by modifying feature values at specific time steps. To guide the user, the system automatically suggests modifications for high-importance features, turning raw failure predictions into actionable prescriptive maintenance strategies.
Actionable Recourse and Human-AI Dynamics
Beyond understanding a model or simulating an intervention, users often want to know the optimal path to flip an unfavorable outcome—a concept known as algorithmic recourse.
Instead of forcing users to rely on automated, generic recommendations, interactive probing allows individuals to actively shape their own recourse plans. In GAM Coach: Towards Interactive and User-centered Algorithmic Recourse, Wang et al. demonstrated that an interactive "what-if" exploration interface empowers users to freely adjust input values according to their personal constraints. This interactive freedom significantly enhances their understanding of model behavior and allows them to specify meaningful, customized preferences for changing a model's decision.
[User Input / Preference] ──> [Interactive "What-If" Probing] ──> [Real-Time Output Update]
▲ │
└─────────────────── [Iterative Recourse Plan] ─────────────────┘
However, interactive counterfactual simulation is not without its pitfalls. The immediate responsiveness of an interface can sometimes create a false sense of security. In Understanding the Effect of Out-of-distribution Examples and Interactive Explanations on Human-AI Decision Making, Liu et al. discovered a critical friction point in human-AI collaboration: while interactive counterfactual explanations (such as adjusting sliders or deleting words) make users feel that an AI system is more useful, they do not automatically improve human decision accuracy on out-of-distribution data and can inadvertently reinforce existing human biases.
To mitigate these cognitive risks, researchers suggest two complementary paths:
- Model Simplicity: Radin argues in Why Are We Using Black Box Models in AI When We Don’t Need To? A Lesson From An Explainable AI Competition that for high-stakes decisions, pairing interactive interfaces with inherently simple, fully interpretable models allows for robust real-time sensitivity analysis without the dangerous opacity of deep black boxes.
- Agentic Interfaces: Moving towards modern architectures, Imrie et al. propose in Redefining digital health interfaces with large language models that large language models should act as intelligent agents interfacing with validated clinical tools. This allows clinicians to conduct interactive counterfactual reasoning through a conversational interface, making "what-if" exploration a natural dialogue rather than a manual configuration of sliders.
Ultimately, interactive counterfactual simulation works because it aligns machine learning interpretability with human cognitive strengths. By turning static data points into dynamic, responsive landscapes, it allows domain experts to use their natural intuition to probe, audit, and collaborate with predictive models safely.
Key Foundational Work
Visual Explanation of Evidence with Additive Classifiers (2006) — contributed 2 concept elements to this direction.
EHR-based Visualization Tool: Adoption Rates, Satisfaction, and Patient Outcomes (2015) — contributed 1 concept elements to this direction.