MEGAN: Mixture of Experts for Robust Uncertainty Estimation in Endoscopy Videos

Damola Agbelese, Krishna Chaitanya, Pushpak Pati, Chaitanya Parmar, Pooya Mobadersany, Shreyas Fadnavis, Lindsey Surace, Shadi Yarandi, Louis R. Ghanem, Molly Lucas, Tommaso Mansi, Oana Gabriela Cula, Pablo F. Damasceno, Kristopher Standish

TL;DR

MEGAN (Multi-Expert Gating Network) combines Evidential Deep Learning (EDL) with a novel gating architecture to address the challenge of human expert disagreement in medical video annotations. Evaluated on large-scale ulcerative colitis endoscopy videos, MEGAN significantly improves both disease severity classification and uncertainty calibration, while reducing physician annotation workloads by 10% through automated triaging.

What Problem Does This Paper Address?

Deep learning models deployed in clinical settings are notoriously overconfident, even when making incorrect predictions. To combat this, researchers use Uncertainty Quantification (UQ) methods like Monte Carlo (MC) Dropout or Deep Ensembles. However, these traditional approaches are computationally expensive, requiring multiple forward passes or multiple models at inference time, making real-time deployment difficult.

More importantly, existing UQ methods typically assume a single, flawless "ground truth" label during training. In reality, medical imaging tasks—especially subjective ones like evaluating endoscopy videos for Ulcerative Colitis (UC) severity using the Mayo Endoscopic Subscore (MES)—suffer from massive inter-rater variability. Different gastroenterologists often assign different scores to the same video. Standard models ignore this disagreement, leading to poorly calibrated confidence metrics.

This paper introduces a way to inherently capture this inter-rater variability while maintaining real-time inference efficiency.

Methods

The authors propose MEGAN, a framework that aggregates predictions and uncertainty estimates from multiple "AI experts."

  1. Evidential Deep Learning (EDL) Base Models: Instead of outputting standard softmax probabilities, the base models use a Softplus activation to parameterize a Dirichlet distribution. This allows a single model to quantify both class probabilities and a dedicated uncertainty score in a single forward pass.
  2. Multi-Expert Diversity: The authors train $K$ independent EDL models using different network architectures and, crucially, different expert labels (e.g., some models are trained on local reader scores, others on central reader scores).
  3. The Gating Network (GN): Once the base EDL models are trained, their weights are frozen. A lightweight Gating Network is introduced to dynamically weight and combine their outputs. The GN consists of four Multi-Layer Perceptron (MLP) modules:
  4. Shared MLP: Learns a common feature representation from the expert models.
  5. Probability MLP: Generates weights to blend the class probabilities.
  6. Uncertainty MLP: Generates weights to blend the uncertainty estimates.
  7. Epsilon MLP: Outputs a refinement term ($\epsilon_i$) that adaptively bumps up the final uncertainty score for incorrect predictions and lowers it for correct ones.
Fig. 1. Overview of MEGAN architecture variants. MEGAN-Gated uses a trainable gating network (GN) to optimally combine predictions from multiple pre-trained EDL models to output a final prediction and uncertainty score.

The entire gating network is optimized using a composite loss function that balances classification accuracy with uncertainty calibration penalties.

Datasets

The models were trained and evaluated on a massive dataset consisting of endoscopy videos from four distinct clinical trials across 30 countries, totaling 2,411 patients and 4,911 videos (~71 million frames):

  • UNIFI & JAKUC: Used for 4-fold cross-validation training and initial testing.
  • QUASAR: Kept entirely separate as an unseen prospective validation set (14 million frames) to test how well the model generalizes to completely new clinical trial environments.

Key Insights and Ideas

  • Disagreement as a Feature, Not a Bug: By training different base models on conflicting human annotations (local vs. central readers), MEGAN translates human clinical disagreement directly into mathematical model uncertainty.
  • The Epsilon Correction: The inclusion of the Epsilon MLP acts as a safety valve. If the expert models are collectively confident but wrong, the gating network learns to recognize the underlying feature pattern and manually injects uncertainty ($\epsilon_i$), drastically lowering the Expected Calibration Error (ECE).
  • The "Class 2" Ambiguity: In UC grading (scale 0–3), Class 2 represents moderate disease activity and is notoriously borderline. The authors found that for Class 2, the uncertainty patterns actually reversed—even correct predictions showed high uncertainty. This mirrors true clinical reality, where even human consensus on Class 2 is highly unstable.

Key Results

The authors benchmarked two variants: MEGAN-Naive (simple averaging of experts) and MEGAN-Gated (using the trainable gating network).

On the completely unseen QUASAR clinical trial dataset, MEGAN-Gated achieved:

  • A 3.5% absolute improvement in F1-score over the best single-model baseline.
  • A 30.5% reduction in Expected Calibration Error (ECE), demonstrating vastly superior calibration.
Method        | Unseen Set QUASAR F1 (↑) | Unseen Set QUASAR ECE (↓)
-------------------------------------------------------------------
Baseline [2]  |          0.654           |          0.221
Single EDL    |          0.647           |          0.154
MEGAN-Naive   |          0.663           |          0.124
MEGAN-Gated   |          0.680           |          0.107

Uncertainty-Guided Stratification

By setting class-specific uncertainty thresholds, MEGAN was used to filter out "confident" cases from "uncertain" ones. On the QUASAR dataset, it successfully retained 429 videos as highly confident (achieving a high F1-score of 0.774) and flagged the remaining difficult cases for human review. This effectively reduces the manual video review workload for clinicians by 10% compared to standard baselines.

Fig. 2. Results on unseen QUASAR data comparing MEGAN-Gated to EDL and MEGAN-Naive: (a) Table displays uncertainty-based results categorized by thresh- old (tc): the first column shows confident videos below the threshold, while the second column shows uncertain videos above it. This demonstrates that MEGAN can filter a higher number of confident samples with an improved F1 score. (b) Three boxplots illustrate how MEGAN-Gated utilizes uncertainty to distinguish between correct and incorrect predictions across each ground truth class more accurately. (c) Two reliabil- ity diagrams and confidence histograms for the unseen QUASAR dataset demonstrate that MEGAN outperforms EDL.

Limitations and Future Work

While MEGAN marks a major step forward for robust clinical UQ, a few limitations remain:

  • Multi-Stage Pipeline: Training MEGAN requires a two-stage process (first training individual EDL experts, then freezing them to train the gating network). An end-to-end training framework could be more elegant but might risk losing expert diversity.
  • The Class 2 Hurdle: Because Class 2 is inherently ambiguous, the model struggles to achieve low uncertainty even when it guesses correctly. Future iterations might benefit from ordinal loss functions that penalize distant misclassifications more severely.

The authors suggest that this multi-expert gating approach is highly generalizable and could easily be extended to other subjective medical imaging domains, such as dermatology or ophthalmology.

Summary updated

Abstract

Reliable uncertainty quantification (UQ) is essential in medical AI. Evidential Deep Learning (EDL) offers a computationally efficient way to quantify model uncertainty alongside predictions, unlike traditional methods such as Monte Carlo (MC) Dropout and Deep Ensembles (DE). However, all these methods often rely on a single expert's annotations as ground truth for model training, overlooking the inter-rater variability in healthcare. To address this issue, we propose MEGAN, a Multi-Expert Gating Network that aggregates uncertainty estimates and predictions from multiple AI experts via EDL models trained with diverse ground truths and modeling strategies. MEGAN's gating network optimally combines predictions and uncertainties from each EDL model, enhancing overall prediction confidence and calibration. We extensively benchmark MEGAN on endoscopy videos for Ulcerative colitis (UC) disease severity estimation, assessed by visual labeling of Mayo Endoscopic Subscore (MES), where inter-rater variability is prevalent. In large-scale prospective UC clinical trial, MEGAN achieved a 3.5% improvement in F1-score and a 30.5% reduction in Expected Calibration Error (ECE) compared to existing methods. Furthermore, MEGAN facilitated uncertainty-guided sample stratification, reducing the annotation burden and potentially increasing efficiency and consistency in UC trials.
BibTeX
@misc{agbelese2025megan,
  author = {Damola Agbelese and Krishna Chaitanya and Pushpak Pati and Chaitanya Parmar and Pooya Mobadersany and Shreyas Fadnavis and Lindsey Surace and Shadi Yarandi and Louis R. Ghanem and Molly Lucas and Tommaso Mansi and Oana Gabriela Cula and Pablo F. Damasceno and Kristopher Standish},
  title = {{MEGAN: Mixture of Experts for Robust Uncertainty Estimation in Endoscopy Videos}},
  year = {2025},
  eprint = {2509.12772},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2509.12772},
}
Figure