Reliable and Trustworthy Machine Learning for Health Using Dataset Shift Detection

Chunjong Park, Anas Awadalla, Tadayoshi Kohno, Shwetak Patel

TL;DR

Machine learning models for health often fail dangerously when they encounter "out-of-distribution" data (like a blurry photo or background noise), yet they rarely signal uncertainty. This paper demonstrates that state-of-the-art detection methods can identify these "dataset shifts" across various medical modalities. By presenting these shifts as human-interpretable "Confidence Scores," developers can significantly improve user trust and medical decision-making.

The Problem: Silent Failures in Health ML

Deep learning models are increasingly used for mobile health (mHealth) tasks like screening for skin cancer or analyzing lung sounds. However, these models are notoriously brittle. They are trained on "in-distribution" data collected by experts under controlled conditions. When a regular consumer uses the app, they might provide "out-of-distribution" (OOD) data: a photo taken in poor lighting, audio with heavy background noise, or even a picture of a dog instead of a skin lesion.

The core problem is that standard classifiers are designed to pick the "most likely" class from their training set. They lack a "none of the above" option. Consequently, a model might confidently classify a picture of a face as "melanoma" simply because it has no other category to choose from. In a medical context, these "hallucinated" diagnoses are not just wrong—they are potentially fatal.

Model accuracy drops significantly on out-of-distribution datasets.

As shown above, model accuracy plummets on shifted datasets. For example, the lung sound model's accuracy dropped from 78.5% to just 2.1% when using a different type of stethoscope.

Detecting the Unknown: Methods and Datasets

The authors investigate three "plug-and-play" OOD detection methods that do not require retraining the original medical models:

  1. Mahalanobis Distance: Measures how far a new input's internal feature representation is from the "average" representation of the training classes.
  2. Gram Matrices: Looks at the pairwise correlations between features at different layers of the network, essentially checking if the "style" or "texture" of the input matches what the model expects.
  3. Energy-Based Models: Uses the "energy" (a function of the model's raw output scores) to determine if an input is a good fit for the model's learned distribution.

The study evaluates these methods across three distinct medical modalities:

  • Skin Lesion (Images): Trained on HAM10000. Evaluated against ISIC 2017 (near-OOD) and Face/CIFAR-10 (far-OOD).
  • Lung Sound (Audio): Trained on ICBHI 2017. Evaluated against Stethoscope (near-OOD) and AudioSet (far-OOD).
  • Parkinson’s Disease (Motion/Accelerometer): Trained on mPower. Evaluated against Kaggle Parkinson’s, MotionSense, and MHEALTH.

Translating Math to Trust: The Confidence Score

Crucially, the authors translate these technical OOD scores into a Confidence Score (0–100). They use a piecewise scaling method where scores above 90 represent data the model is "sure" about (in-distribution), while lower scores signal potential dataset shifts.

User study flow demonstrating how the Confidence Score was presented to participants.

To test the real-world impact of this metric, the researchers conducted a user study with 192 participants, guiding them through a simulated diagnostic interface that included these Confidence Scores.

Key Insights and Results

  • Modality-Agnostic Detection: The Mahalanobis and Gram matrix methods proved remarkably robust. They achieved >95% detection accuracy for far-OOD data, successfully identifying anomalies whether the input was a picture or a sound wave.
  • Trust Calibration, Not Just Trust: The goal isn't to make users trust AI more, but to trust it appropriately. The user study showed that the Confidence Score significantly improved perceived trustworthiness ($p < 0.001$). It helped users disregard results with a low score, preventing them from making medical decisions based on faulty AI logic.
  • The Learning Effect: Interestingly, after seeing a few examples, users began to "learn" what the model found confusing. This suggests that providing uncertainty metrics can actually train users to provide better quality data over time.

Limitations and Future Work

  • The "Near-OOD" Challenge: While the methods are great at catching "far-OOD" data (like a dog vs. a lung sound), they still struggle with "near-OOD" data (like a different brand of medical sensor). Detecting these subtle shifts remains an open problem.
  • Simulated Stakes: The user study was conducted via Amazon Mechanical Turk with hypothetical scenarios. Real-world medical decisions involve much higher emotional and physical stakes, which might change how users weigh Confidence Scores.
  • UI/UX Optimization: The paper uses a simple 0-100 score, but future work should investigate the most effective way to communicate this uncertainty (e.g., via color coding, icons, or descriptive text) to prevent user alarm or confusion.

Summary updated

BibTeX
@inproceedings{park2021reliable,
  author = {Chunjong Park and Anas Awadalla and Tadayoshi Kohno and Shwetak Patel},
  title = {{Reliable and Trustworthy Machine Learning for Health Using Dataset Shift Detection}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=hNMOSUxE8o6},
}
Figure