Chester: A Web Delivered Locally Computed Chest X-Ray Disease Prediction System

Joseph Paul Cohen, Paul Bertin, Vincent FrappierarXiv 2019 · OpenReview

TL;DR

This paper introduces "Chester," a web-based, locally computed system for chest X-ray disease prediction designed to bridge the gap between AI researchers and medical professionals. It offers a second opinion tool that runs entirely in the browser, preserving patient privacy and enabling widespread access to AI diagnostic capabilities.

What Problem Does This Paper Address?

The adoption of deep learning in healthcare, particularly for medical imaging, is hindered by several factors: uncertainty about business models, a lack of understanding of AI technology within hospitals, limited expertise in health data science, hospital inertia, data access issues, and regulatory hurdles. These challenges prevent effective collaboration between AI researchers and clinicians. Specifically, there's a need for accessible tools that allow medical professionals to experiment with and understand the capabilities and limitations of AI in diagnostics, fostering trust and facilitating integration.

Methods

The Chester system is built around three core components:

  • Out-of-Distribution (OoD) Detection: To ensure the model only processes relevant images, an Adversarially Learned Inference (ALI) model is used. This model learns to reconstruct chest X-rays, and its reconstruction error is used to identify images that fall outside the training distribution (e.g., images of other body parts, incorrect formatting, or unrelated natural images). This prevents the model from making potentially erroneous predictions on out-of-domain data.
  • Disease Prediction: A DenseNet-121 architecture, a standard for medical image analysis, is employed for predicting 14 common chest X-ray diseases. The model is trained on the ChestXray8 dataset. Data augmentation techniques like random rotation, translation, and scaling are explored to improve generalization.
  • Prediction Explanation: To build trust and provide insights, the system uses gradient saliency maps (specifically, a simplified version of Class Activation Maps) to highlight image regions that most influence the prediction. This allows users to see why the model made a particular diagnosis.

A key engineering challenge addressed is making this complex system run entirely in a web browser. This is achieved by converting PyTorch models to TensorFlow.js using ONNX, enabling computation via WebGL.

Datasets

  • Chest-Xray8: Used for training the disease prediction model. It contains 108,948 frontal-view X-ray images with 14 disease labels.
  • Pneumonia Dataset (Guangzhou Women and Childrens Medical Center): Used for evaluating out-of-distribution examples. It contains 5,232 chest X-rays, primarily of children, with labels for pneumonia and normal cases.
  • PadChest Dataset: Used for external validation. It comprises 160,000 chest X-rays with 194 labels, a superset of the ChestXray8 labels.
  • MURA Dataset: Used for evaluating out-of-distribution detection. It contains 40,561 musculoskeletal X-ray images.
  • CIFAR-100 and MNIST: Used as additional out-of-distribution datasets to test the robustness of the OoD detection.

Key Insights and Ideas

  • Browser-based AI for Healthcare: The core innovation is demonstrating that sophisticated deep learning models for medical diagnostics can be effectively deployed and run entirely within a web browser, even on mobile devices. This bypasses the need for complex server infrastructure and local installations.
  • Privacy-Preserving Diagnostics: By processing data locally on the user's machine, patient privacy is inherently protected, a critical concern in healthcare.
  • Bridging the AI-Clinician Divide: The system is explicitly designed as a "second opinion" tool, aiming to demystify AI for medical professionals and foster collaboration by providing an accessible, understandable interface.
  • Importance of OoD Detection: The paper highlights that robust out-of-distribution detection is crucial for reliable AI diagnostics, preventing the model from making confident but incorrect predictions on irrelevant inputs. The ALI model's reconstruction error proved effective for this.
  • Trade-offs in OoD Methods: While both AE with SSIM and ALI with SSIM showed promise for OoD detection, the ALI model was chosen for its informative reconstruction error, which can also indicate regions of interest.

Key Results

  • The Chester system successfully runs a DenseNet-121 model for disease prediction and an ALI model for OoD detection entirely within a web browser using TensorFlow.js.
  • The system demonstrates effective out-of-distribution detection, distinguishing chest X-rays from other image types like CIFAR and MNIST.
  • Gradient saliency maps provide visual explanations for predictions, highlighting relevant image regions.
  • The paper shows that data augmentation can improve model robustness without significantly harming performance on the original domain.
  • The web implementation's preprocessing pipeline was validated against the PyTorch pipeline, showing an average difference of ±3% in predictions, indicating reasonable consistency.

Limitations and Future Work

  • Computational Budget: The authors acknowledge a limited computational budget, which influenced the choice of methods (e.g., for prediction explanation).
  • Aleatoric Noise Sensitivity: The model shows some sensitivity to differences in preprocessing between the web and PyTorch pipelines, highlighting the impact of aleatoric noise in deep learning.
  • Dataset Limitations: The ChestXray8 dataset is noted to potentially contain labeling errors, and inconsistencies between datasets (e.g., ChestXray8 and PadChest) can affect performance for certain diseases.
  • Future Work: The authors suggest that the modular design of the system can be a blueprint for scaling other medical AI solutions globally. Further work could explore more advanced prediction explanation techniques and optimize the web computation pipeline for even faster performance.

Summary updated

Abstract

In order to bridge the gap between Deep Learning researchers and medical professionals we develop a very accessible free prototype system which can be used by medical professionals to understand the reality of Deep Learning tools for chest X-ray diagnostics. The system is designed to be a second opinion where a user can process an image to confirm or aid in their diagnosis. Code and network weights are delivered via a URL to a web browser (including cell phones) but the patient data remains on the users machine and all processing occurs locally. This paper discusses the three main components in detail: out-of-distribution detection, disease prediction, and prediction explanation. The system open source and freely available here: https://mlmed.org/tools/xray
BibTeX
@misc{cohen2019chester,
  author = {Joseph Paul Cohen and Paul Bertin and Vincent Frappier},
  title = {{Chester: A Web Delivered Locally Computed Chest X-Ray Disease Prediction System}},
  year = {2019},
  eprint = {1901.11210},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.11210},
}
Figure