Doctor XAI: Decoding Sequential Medical Predictions through Ontological Intelligence

An ontology-based approach to black-box sequential data classification explanations

Cecilia Panigutti, Alan Perotti, Dino Pedreschi
Summary
Problem
Method
Results
Takeaways
Abstract

This paper introduces Doctor XAI, a model-agnostic explainability framework specifically designed for sequential, multi-label black-box classifiers in healthcare. Applied to the Doctor AI recurrent neural network, it achieves high local fidelity by generating ontology-aware synthetic neighborhoods and extracting human-understandable decision rules.

TL;DR

The paper introduces Doctor XAI, a framework designed to open the "black box" of sequential clinical models like RNNs. By utilizing medical ontologies (ICD-9), it generates smart perturbations that reflect clinical reality, flattening temporal data into interpretable decision rules with high fidelity (~0.89 F1) and human-readable logic.

Background & Motivation: The Opaque Reality of AI in Medicine

Deep Learning models, particularly Recurrent Neural Networks (RNNs) like Doctor AI, have shown remarkable accuracy in predicting future diagnoses from Electronic Health Records (EHR). However, their "black-box" nature is a deal-breaker in healthcare due to:

  1. Trust & Safety: Doctors cannot verify the "why" behind a high-risk prediction.
  2. Regulatory Compliance: GDPR Article 22 requires "meaningful information about the logic involved" in automated decisions.

Existing XAI tools like LIME were built for tabular or image data. They fail in medicine because they treat medical codes as independent features, ignoring that "Food Poisoning" and a "Broken Wrist" are semantically distinct, whereas two types of "Carotid Artery Stenosis" are siblings in a hierarchy.

Methodology: The Doctor XAI Pipeline

The authors propose a multi-stage pipeline that bridges the gap between complex sequences and simple rules.

1. Ontological Distances & Selection

Instead of simple Jaccard similarity, Doctor XAI uses Wu-Palmer Similarity and Dynamic Time Warping (DTW). This identifies "neighbors" in the dataset who have clinically similar histories, not just overlapping codes.

2. Smart Perturbation (The Blue Path)

Standard XAI uses random noise. Doctor XAI uses the ICD-9 Ontology. It selectively masks concepts at various levels of the hierarchy (e.g., masking all "Acid-base balance disorders" rather than a single specific code). This explores the black-box's sensitivity to broad clinical conditions.

The Explanation Pipeline

3. Temporal Encoding

To feed a sequence into a Decision Tree (the surrogate model), the authors use a Binary Exponential Decay Encoder. Recent visits are weighted higher () than older ones (, etc.), preserving the "recency effect" of clinical events in a flat vector.

Experimental Validation

Using the MIMIC-III dataset, the authors compared three pipelines:

  1. Doctor XAI (Ontology + Ontological Perturbation)
  2. Ontological + Normal Perturbation
  3. Non-ontological Baseline

Key Findings:

  • Fidelity Advantage: The ontological pipeline consistently achieved higher fidelity (the degree to which the explanation matches the black box) compared to non-semantic methods.
  • Neighborhood Density: Training the surrogate model on a dense synthetic neighborhood yielded better results than using limited real historical data.

Fidelity Comparison

Case Study: From Math to Medicine

The true power of Doctor XAI is seen in its output (Figure 9). Instead of a list of feature weights (as in SHAP), it provides a Decision Rule.

  • Example Rule: "If ICD-9 584.5 (Acute Kidney Failure) was observed in the last three visits AND code 518.81 (Acute Respiratory Failure) was present, then predict X."

Explanation Example

Critical Insight & Conclusion

Doctor XAI proves that context matters. In specialized domains like medicine, purely statistical explainability is insufficient. By "teaching" the XAI the hierarchical structure of medicine, the researchers created a tool that speaks the doctor's language.

Limitations: The method currently focuses on classification (predicting the next diagnosis code). Future work is needed to adapt this to regression tasks (e.g., predicting length of stay or mortality risk) and to further reduce the complexity of the generated rules as the "neighborhood" grows.

Summary (Takeaway): For AI to be deployed in high-stakes environments, our interpretability tools must be as sophisticated as the domain's own structured knowledge.

Find Similar Papers

Try Our Examples

  • Search for recent papers that extend model-agnostic XAI techniques like LIME or SHAP specifically for time-series or sequential data in the medical domain.
  • How does the "Attention is not Explanation" debate (e.g., Jain & Wallace, 2019) compare to post-hoc surrogate methods like Doctor XAI in clinical decision support?
  • What are the latest developments in using Medical Ontologies (UMLS, SNOMED-CT) to improve the robustness and interpretability of Deep Learning models in EHR analysis?
Contents
Doctor XAI: Decoding Sequential Medical Predictions through Ontological Intelligence
1. TL;DR
2. Background & Motivation: The Opaque Reality of AI in Medicine
3. Methodology: The Doctor XAI Pipeline
3.1. 1. Ontological Distances & Selection
3.2. 2. Smart Perturbation (The Blue Path)
3.3. 3. Temporal Encoding
4. Experimental Validation
4.1. Key Findings:
5. Case Study: From Math to Medicine
6. Critical Insight & Conclusion