The Challenge
Histopathology images are incredibly diverse—varying in tissue architecture, cellular density, and staining. Traditional ensemble methods often fail to capture this nuance because they use static weights, treating every input image exactly the same.
We needed a system that could "look" at an image and decide which model expert (ResNet, DenseNet, or EfficientNet) was best suited to analyze it.
The Solution: DIAE
We developed the Dynamic Input-Adaptive Ensemble (DIAE). It introduces a lightweight "Gate" (a small CNN) that analyzes the input image and predicts specific weights for each backbone model.
The system combines three powerful backbones:
ResNet152
Extracts deep hierarchical features for tissue architecture.
DenseNet121
Captures fine-grained cellular details like nuclear morphology.
EfficientNetV2-L
Handles multi-scale features efficiently.
To ensure stability, we use a temperature-controlled softmax for the weights and blend them with globally learned weights. This gives us the best of both worlds: dynamic adaptation and stable performance.
The Results
Tested on a verified dataset of +2k SQUH thyroid histopathology images, DIAE significantly outperformed individual models and static ensembles.
| Model | Accuracy | AUC-ROC | Sensitivity | Specificity |
|---|---|---|---|---|
| ResNet152 | 94.22% | 98.87% | 94.74% | 93.84% |
| DenseNet121 | 92.83% | 97.91% | 92.45% | 93.18% |
| EfficientNetV2-L | 93.67% | 98.45% | 93.59% | 93.74% |
| DIAE Ensemble | 97.05% | 99.93% | 94.74% | 99.19% |
Crucially, we achieved a Specificity of 99.19% (only 1 false positive out of 123 benign cases) and a Sensitivity of 94.74%. This high specificity makes the system extremely reliable for clinical decision support.
This work is fully reproducible. The dataset consists of +2k images from SQUH. Training was performed using PyTorch with mixed precision and a fixed seed for consistency.