Expanding Training Data for Endoscopic Phenotyping of Eosinophilic Esophagitis

Juming Xiong, Hou Xiong, Quan Liu, Ruining Deng, Regina N Tyree, Girish Hiremath, Yuankai HuoarXiv 2025

TL;DR

This paper addresses the severe scarcity of training data for diagnosing Eosinophilic Esophagitis (EoE) in children by expanding a small in-house dataset of 435 images to 7,050 images using web mining, public datasets, and electronic textbooks. By training a Data-efficient Image Transformer (DeiT) on this augmented dataset, the authors significantly improved the model's ability to classify EoE phenotypes and distinguish them from other upper gastrointestinal conditions.

What Problem Does This Paper Address?

Eosinophilic Esophagitis (EoE) is a chronic, allergic inflammatory condition of the esophagus. Currently, definitive diagnosis requires invasive endoscopic biopsies to count eosinophils under a microscope. While AI-assisted endoscopic imaging using the standardized Eosinophilic Esophagitis Endoscopic Reference Score (EREFS) system offers a non-invasive alternative, developing these models is bottlenecked by data scarcity.

Because pediatric EoE is relatively rare and patient privacy regulations restrict data sharing, medical centers struggle to compile datasets large enough to train robust deep learning models. This data shortage leads to models that generalize poorly and frequently misclassify rare disease phenotypes or confuse EoE with other common upper gastrointestinal (GI) tract pathologies.

Methods

To overcome the data bottleneck, the authors developed a multi-source data mining and classification framework:

  1. Data Mining Pipeline: The team utilized the Icrawler open-source toolbox to scrape images from Google and social media (Twitter, Facebook, LinkedIn), alongside the NIH open-I API for medical literature images. They also extracted high-quality labeled images from pediatric GI electronic textbooks.
  2. Filtering & Verification: A basic AI model initially filtered out irrelevant scraped images, followed by expert review and verification by clinicians to ensure diagnostic accuracy (except for e-book images, which were assumed to have high-quality ground-truth labels).
  3. Classification Architecture: The authors deployed a Data-efficient Image Transformer (DeiT). Unlike standard Vision Transformers (ViTs) that require massive datasets to perform well, DeiT leverages a teacher-student distillation approach (using a CNN-based teacher) to train effectively on smaller, specialized datasets.
  4. Interpretability: To ensure clinical relevance and build trust, the authors integrated Gradient Attention Rollout to generate attention maps, visualizing exactly which visual features (e.g., rings, furrows, or exudates) the model focused on to make its predictions.

Datasets

The final dataset combined four distinct sources to create a comprehensive multi-label dataset totaling 7,050 images:

  • Site Data (In-house): 435 pediatric EoE endoscopy images from Vanderbilt University Medical Center.
  • Web-mined Data: 155 images mined from search engines and social media.
  • E-book Data: 54 highly accurate images from electronic textbooks (reserved exclusively for validation and testing).
  • Negative Control Data: 6,406 images from the public Kvasir dataset, representing other common upper GI conditions (Esophagitis, Z-line, Barrett's esophagus, Pylorus, and Retroflex stomach) to train the model against false positives.
Figure 1. This figure shows that we expanded our training set from 435 to 7050 images for training EoE deep learning models. The left panel shows that the traditional AI model only uses rare pediatric EoE data. The right panel shows that we employ a wider range of data from different sources.

Key Insights and Ideas

  • The Power of Negative Controls: Simply adding more EoE images isn't enough. By incorporating a massive public dataset (Kvasir) of non-EoE conditions, the model learned the background distribution of a normal or otherwise diseased upper GI tract, drastically reducing misclassifications.
  • Web-Mining for Rare Diseases: The study proves that unconventional data sources like social media and search engines, when properly vetted by clinicians, can successfully rescue AI models from the "small data" traps typical of rare diseases.
  • Explainability Aligns with Clinical Reality: The attention maps demonstrated that the transformer architecture naturally attends to the same pathophysiological markers that human gastroenterologists look for, such as white exudate plaques or concentric esophageal rings.

Key Results

The model trained on the combined dataset (Site + Web-mined) significantly outperformed the baseline model trained only on internal data across nearly all EoE metrics (measured by F1 Score):

  • Overall EoE Detection: F1 score increased from 57.79% to 60.00%.
  • Rings Phenotype: F1 score jumped from 55.81% to 67.80%.
  • Furrows Phenotype: F1 score improved from 47.37% to 58.95%.
  • Stricture Phenotype: The baseline model completely failed to detect strictures (0.00%), whereas the enhanced model achieved a 20.00% F1 score.
  • Non-EoE Classification: Performance remained exceptionally high and stable, slightly improving from 92.37% to 93.77%.

Limitations and Future Work

Despite the dataset expansion, certain rare phenotypes remain critically underrepresented. For instance, even after mining, the total number of stricture images across the entire dataset was only 27, explaining the low (though improved) F1 score of 20.00% for that class.

Additionally, the web-mining pipeline still requires manual verification by medical doctors to filter out noise from search engines and social media, making the data collection process difficult to scale fully automatically. Future work will likely focus on semi-supervised or self-supervised learning techniques to minimize the need for expert human annotation.

Summary updated

BibTeX
@misc{xiong2025expanding,
  author = {Juming Xiong and Hou Xiong and Quan Liu and Ruining Deng and Regina N Tyree and Girish Hiremath and Yuankai Huo},
  title = {{Expanding Training Data for Endoscopic Phenotyping of Eosinophilic Esophagitis}},
  year = {2025},
  eprint = {2502.04199},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.04199},
}
Figure