Weakly supervised end-to-end artificial intelligence in gastrointestinal endoscopy

Lukas Buendgens, Didem Çifçi, Narmin Ghaffari Laleh, Marko van Treeck, Maria Teresa Koenen, Henning W. Zimmermann, Till Herbold, Thomas J. Lux, Alexander Hann, Christian Trautwein, Jakob Nikolas KatherScientific 2022

Abstract

Artificial intelligence (AI) is widely used to analyze gastrointestinal (GI) endoscopy image data. AI has led to several clinically approved algorithms for polyp detection, but application of AI beyond this specific task is limited by the high cost of manual annotations. Here, we show that a weakly supervised AI can be trained on data from a clinical routine database to learn visual patterns of GI diseases without any manual labeling or annotation. We trained a deep neural network on a dataset of N = 29,506 gastroscopy and N = 18,942 colonoscopy examinations from a large endoscopy unit serving patients in Germany, the Netherlands and Belgium, using only routine diagnosis data for the 42 most common diseases. Despite a high data heterogeneity, the AI system reached a high performance for diagnosis of multiple diseases, including inflammatory, degenerative, infectious and neoplastic diseases. Specifically, a cross-validated area under the receiver operating curve (AUROC) of above 0.70 was reached for 13 diseases, and an AUROC of above 0.80 was reached for two diseases in the primary data set. In an external validation set including six disease categories, the AI system was able to significantly predict the presence of diverticulosis, candidiasis, colon and rectal cancer with AUROCs above 0.76. Reverse engineering the predictions demonstrated that plausible patterns were learned on the level of images and within images and potential confounders were identified. In summary, our study demonstrates the potential of weakly supervised AI to generate high-performing classifiers and identify clinically relevant visual patterns based on non-annotated routine image data in GI endoscopy and potentially other clinical imaging modalities.

Introduction

The development of clinical AI for gastrointestinal (GI) endoscopy has traditionally been hindered by the "annotation bottleneck." Supervised learning models, such as those used for polyp detection, require experts to manually label thousands of images—a process that is labor-intensive, expensive, and difficult to scale across the hundreds of possible GI pathologies. This study, published in Scientific Reports, proposes a "top-down" weakly supervised approach, training a deep neural network on routine clinical data without manual image-level annotations.

Methods

The researchers developed a weakly supervised end-to-end learning workflow utilizing a ResNet-18 convolutional neural network architecture.

Data Acquisition and Preprocessing

The primary dataset consisted of 29,506 gastroscopies (209,041 images) and 18,942 colonoscopies (164,133 images) from University Hospital RWTH Aachen. Instead of manual labels, the model utilized ICD-10 codes from the final medical reports as "weak labels." Every image within an examination inherited the diagnosis of that exam, regardless of whether the specific frame showed the pathology.

Figure 1: Data acquisition and image preprocessing pipeline.

Training Strategy

The model was trained on over 400,000 images using transfer learning from ImageNet. To ensure robust evaluation, the team employed examination-level cross-validation, ensuring that images from the same patient were not split between training and test sets.

Figure 2: Examination-level cross-validation and weakly supervised training logic.

Results

The AI system demonstrated high diagnostic performance across 42 common diseases. In gastroscopy, it achieved an Area Under the Receiver Operating Curve (AUROC) of 0.773 for esophageal cancer and 0.703 for candidiasis. In colonoscopy, performance was even higher for certain conditions, such as hemorrhoids (AUROC 0.930), ulcerative colitis (0.775), and rectal cancer (0.749).

External validation at University Hospital Wuerzburg confirmed the model's generalizability, with AUROCs reaching 0.832 for diverticulosis and 0.825 for rectal cancer. Explainability analysis using Grad-CAM heatmaps and a human "Reader Study" verified that the model was identifying clinically relevant visual patterns, although it occasionally picked up on confounders like surgical clips or specific endoscope positions.

Discussion

This study proves that deep learning models can extract meaningful signals from "noisy" routine clinical data. By allowing images to inherit examination-level labels, the system bypasses the need for manual annotation while remaining robust to the fact that many images in a diseased exam may appear normal.

However, limitations remain. The "ground truth" labels derived from endoscopy reports may contain human error, as they are not always confirmed by histopathology. Additionally, the dataset is subject to selection bias, as it consists of images manually captured by endoscopists during procedures rather than continuous video streams.

Conclusion

Weakly supervised AI represents a scalable path forward for medical imaging. By leveraging existing clinical databases, high-performing diagnostic tools can be developed for a wide range of diseases, potentially uncovering new visual biomarkers and streamlining clinical workflows across various imaging modalities.

Summary updated

BibTeX
@inproceedings{buendgens2022weakly,
  author = {Lukas Buendgens and Didem Çifçi and Narmin Ghaffari Laleh and Marko van Treeck and Maria Teresa Koenen and Henning W. Zimmermann and Till Herbold and Thomas J. Lux and Alexander Hann and Christian Trautwein and Jakob Nikolas Kather},
  title = {{Weakly supervised end-to-end artificial intelligence in gastrointestinal endoscopy}},
  booktitle = {Scientific},
  year = {2022},
  doi = {10.1038/s41598-022-08773-1},
}
Figure