Skip to main content
BMC Medicine logoLink to BMC Medicine
. 2026 Aug 6;24:618. doi: 10.1186/s12916-026-05120-3

From fragile pipelines to reliable systems: error-correctable cascades in medical AI

Ke Zheng 1,#, Xueyi Zheng 1,#, Chunhua Qu 1,#, Jue Wang 2,3,#, Xiaobo Wen 1, Xinke Zhang 1, Sha Fu 2,3, Ruixuan Wang 4,✉, Dan Xie 1,✉, Muyan Cai 1,✉
PMCID: PMC13737821  PMID: 42983533

Abstract

Background

Artificial intelligence (AI) has achieved expert-level performance in medical imaging, but its clinical translation requires a reliable and interpretable system design. Decision-level hierarchical cascaded pipelines are widely used in medical AI, yet their benefits and limitations require further investigation.

Methods

We compared decision-level hierarchical cascaded and parallel architectures in medical imaging and revealed a trade-off between error vulnerability and diagnostic transparency. Based on these observations, we developed an error-aware framework integrating automated error detection, adaptive correction, and confidence-guided human-AI collaboration. The framework was evaluated on over 10,000 patient cases, including 6,103 colorectal pathology and 7,164 cervical cytology samples, with additional validation in endoscopic and ophthalmological imaging.

Results

Decision-level hierarchical cascaded systems, although susceptible to error amplification, were more aligned with hierarchical clinical reasoning and enabled more transparent decision pathways. The proposed framework mitigated error propagation through automated detection and correction. Combined with confidence-guided human-AI collaboration, it achieved absolute accuracy gains of 16.12 and 10.11 percentage points in colorectal pathology and cervical cytology, respectively, compared with parallel systems, with consistent gains across other imaging tasks.

Conclusions

Our study highlights the trade-off between error propagation and interpretability in hierarchical cascaded AI systems and demonstrates that error-aware design can improve their robustness and clinical applicability, contributing to the development of more reliable and human-centered medical AI.

Supplementary Information

The online version contains supplementary material available at https://doi.org/10.1186/s12916-026-05120-3.

Keywords: Error-aware AI, Clinical-grade diagnostics, Error correction, Decision-level hierarchical cascaded systems, Deep learning, Human-AI collaboration

Background

Artificial intelligence (AI) is transforming biomedical research and clinical practice [1–4], with particular impact in medical imaging, where algorithms now rival human experts in detecting disease [5, 6], predicting prognosis [7–9], and identifying biomarkers [10–12]. Over the past decade, deep learning models have progressed from single-task classifiers to sophisticated architectures capable of supporting complex diagnostic pipelines. These advances have been accelerated by large-scale foundation models, which promise unified and adaptive frameworks capable of integrating multimodal data and addressing diverse clinical tasks simultaneously [13–15]. Such achievement positions AI as a cornerstone technology for addressing pressing challenges in healthcare, from alleviating workforce shortages to reducing variability in diagnostic accuracy, ultimately advancing the promise of precision medicine.

Despite these remarkable advances, the integration of AI into routine clinical workflows remains limited. A critical barrier is the disconnect between the controlled conditions under which AI models are typically evaluated and the complexity of real-world diagnostic workflows [16, 17]. Unlike benchmark datasets that emphasize static, well-curated tasks, clinical practice is dynamic, heterogeneous, and sequential- characterized by multi-step decision-making where early errors may propagate downstream, compounding risks and undermining patient safety [18–20]. In decision-level hierarchical cascaded AI workflows, in which the output of one model informs subsequent stages, even small inaccuracies can amplify into significant diagnostic failures [21–23]. Yet, while hierarchical cascaded architectures are widely adopted in medical AI, the mechanisms by which errors propagate across stages and how they can be systematically mitigated remain insufficiently explored. Prevailing evaluation standards continue to prioritize isolated accuracy metrics [4, 24, 25], overlooking the cumulative and interacting nature of errors and ultimately determining clinical reliability.

Recent studies have begun to address related challenges through uncertainty estimation [26, 27], confidence modeling [28], and error-aware analysis [29] in medical imaging pipelines. However, these efforts have largely focused on reliability assessment at individual stages, while the broader dynamics of how errors arise, interact, and accumulate across cascaded diagnostic workflows remain unclear. Errors may not simply accumulate linearly; they can attenuate, amplify, or create feedback loops across stages [30, 31]. Without systematic methods to characterize, detect, and correct these error dynamics, the promise of AI-augmented medicine risks being undermined by hidden vulnerabilities. Addressing this challenge requires more than incremental improvements in benchmark performance; it calls for a paradigm shift toward frameworks that explicitly model, measure, and mitigate error propagation under clinically realistic workflows.

Here, we present a comprehensive analysis of AI diagnostic reliability in decision-level hierarchical cascaded workflows. First, we systematically compare hierarchical cascaded and parallel diagnostic architectures, showing that hierarchical cascaded systems offer superior accuracy and closer alignment with clinical reasoning, while remaining particularly vulnerable to error propagation. Second, we quantify how errors arise and propagate across hierarchical cascaded workflows, directly linking upstream reliability to downstream diagnostic performance. Third, to mitigate these limitations, we introduce an error-correctable cascade framework, a dynamic system that detects potential errors in upstream predictions and corrects them before they affect downstream diagnosis, together with a confidence-driven human-AI collaboration module that flags uncertain cases for expert review. Finally, extensive validation across histopathology, cytology, fundus, and endoscopic imaging tasks demonstrates the robustness, generalizability, and translational relevance of the proposed framework. Together, these advances provide a practical foundation for developing AI systems that are not only accurate but also more reliable, interpretable, and supportive of clinical decision-making.

Methods

Data acquisition

To comprehensively compare cascade and parallel systems, and to demonstrate that our method can be seamlessly integrated into existing architectures across diverse modalities to address the pervasive issue of diagnostic errors, we conducted experiments on four modalities comprising 30,935 samples, 21 subtasks, and 39 classes.

The first task involved intestinal biopsy diagnosis from H&E-stained histopathology slides, including 10 subtasks and 22 fine-grained classes, based on 6,103 whole-slide images collected at Sun Yat-sen University Cancer Center. Slides were scanned at 40× magnification (0.25 μm/pixel) using the PHILIPS Ultra-Fast Scanner (Philips Electronics N.V., Amsterdam, Netherlands) and the Aperio AT2 scanner (Leica Biosystems, Wetzlar, Germany), and stored in iSyntax and SVS formats, respectively. Diagnostic labels were obtained from corresponding pathology reports generated during routine clinical practice.

The second task was cervical cytology screening from pap smear slides, comprising 4 subtasks and 6 classes, using 7,164 whole-slide images from Sun Yat-sen Memorial Hospital. Slides were digitized at 40× magnification (0.25 μm/pixel) using the Pannoramic SCAN II scanner (3DHISTECH Co., Ltd., Budapest, Hungary) and saved in MRXS format. Diagnostic labels were extracted from corresponding cytological reports. For both pathology datasets, the inclusion criteria required complete diagnostic reports for each slide. Exclusion criteria included missing reports or slides compromised by artifacts such as tissue folds, fractures, or poor focus.

The third task focused on fundus disease diagnosis from retinal photographs, encompassing 5 subtasks and 8 classes, based on 6,392 publicly available images from the ODIR-2019 dataset. The fourth task involved ulcerative colitis scoring from endoscopic images, including 2 subtasks and 4 classes, based on 11,276 images obtained from the public LIMUC database [32]. Public datasets followed their original annotation protocols.

Each individual task was derived from a single data source rather than a multi-center cohort. Nevertheless, the overall benchmark spans multiple institutions, imaging modalities, acquisition devices, and clinical scenarios, introducing substantial real-world heterogeneity.

Data preprocessing

We adopted the preprocessing strategy described in CLAM to segment whole-slide images (WSIs). Downsampled WSIs were first transformed from the RGB to the HSV color space. Tissue regions were identified by thresholding the saturation channel, followed by morphological closing to fill small gaps and holes. Regions were further refined by applying an area threshold to remove spurious fragments, yielding the final tissue mask. Foreground regions were then partitioned into non-overlapping patches of 512 × 512 pixels at 20× magnification. A pre-trained image encoder (CONCH) [33] was applied to extract 512-dimensional representations for each patch, thereby constructing a slide-level feature set for downstream analysis. CONCH was selected because it is a widely adopted pathology foundation model that has demonstrated strong and robust performance across diverse computational pathology tasks [34].

Diagnostic tasks

Our diagnostic framework encompassed four medical imaging modalities: hematoxylin and eosin (H&E) stained biopsy slides for colorectal pathology, cytological slides for cervical screening, fundus photographs for retinal disease diagnosis, and endoscopic images for Mayo endoscopic scoring of ulcerative colitis.

For the colorectal biopsy task, samples were classified into 22 subcategories. The diagnostic process followed a three-tier structure: the first tier distinguished normal, adenocarcinoma, and adenoma, the second tier further divided adenocarcinoma and adenoma subtypes, and the third tier stratified samples into histological grades within each subtype. For the cervical cytology task, samples were classified into 6 subcategories. Diagnosis involved three tiers: the first tier separated normal from abnormal, the second tier distinguished cancer from precancerous lesions, and the third tier refined classification into cancer subtypes and specific precancerous categories. For the fundus disease task, samples were classified into 8 subcategories (Additional file 1: Fig. S1). The diagnostic hierarchy comprised three tiers: the first tier separated normal from abnormal, the second tier categorized abnormalities by pathophysiological type, and the third tier specified individual disease subtypes. For the ulcerative colitis task, samples were categorized into 4 classes (Additional file 1: Fig. S2). Diagnosis followed a two-tier structure: the first tier separated normal from abnormal, and the second tier graded the severity of abnormal cases.

Decision-level hierarchical cascades and parallel systems

Parallel and decision-level hierarchical cascaded architectures represent fundamentally distinct approaches to diagnostic prediction. The parallel system treats all subcategories as independent entities and performs a single multi-class prediction without considering hierarchical dependencies. In colorectal biopsy analysis, this manifests as a 22-class prediction task, producing an output vector of length 22, where each element corresponds to the probability of the sample belonging to a given category. Hierarchical cascaded systems, conversely, emulate clinical diagnostic reasoning through structured hierarchical decomposition. Taking the colorectal biopsy task as an example, diagnosis proceeds across three tiers. The first tier performs a three-class classification, distinguishing normal tissue, adenocarcinoma, and adenoma. The second tier consists of two independent seven-class models, one for adenoma subtyping and the other for adenocarcinoma subtyping. The third tier includes seven binary models for grading within each specific subtype. Consider a high-grade sessile serrated adenoma case: the system progresses from broad tissue classification (adenoma) through subtype determination (sessile serrated) to specific grading (high-grade). The final diagnosis is obtained by integrating predictions across all tiers. While this approach mirrors clinical decision-making, its sequential nature introduces potential error propagation, misclassification at early stages can direct cases through incorrect diagnostic pathways. To ensure a fair comparison, hierarchical cascaded and parallel systems were implemented using identical backbone architectures, feature representations, training datasets, optimization procedures, and hyperparameter settings. Thus, the observed differences primarily reflect the effects of decision organization and error propagation rather than disparities in model capacity or training configuration.

It should be noted that, in this study, the term decision-level hierarchical cascaded system refers to a hierarchical diagnostic framework in which upstream predictions determine the selection of downstream diagnostic branches. Unlike conventional data-level cascade architectures, where the output of one model serves directly as the input to subsequent models, all downstream predictors in our framework operate on the same slide-level feature representation. Consequently, the primary challenge lies in decision-level error propagation, whereby an incorrect upstream prediction may route a sample into an inappropriate diagnostic pathway and compromise downstream diagnostic performance. For conciseness, “hierarchical cascaded system” is used to refer to the decision-level hierarchical cascaded system described above.

Overview

To address error propagation in hierarchical cascaded models and to establish a clinically reliable diagnostic system, we developed three key components: an error detection and correction module, an ensemble module, and a confidence-driven human-AI collaboration module (Fig. 1c and Additional file 3: Alg. S1). First, the feature set Inline graphic extracted from each pathology slide is input to the first-tier predictor (implemented as TransMIL, ABMIL, or CLAM), where N denotes the number of image patches and d represents the dimensionality of each patch feature. As model outputs are inherently imperfect, erroneous predictions at upstream tiers may direct samples into incorrect diagnostic branches. To mitigate this, we introduced an error detection and correction module, which predicts whether the preceding tier’s output is reliable. If the module determines that an upstream prediction is incorrect, the sample is redirected to an alternative second-tier predictor, reducing error propagation across tiers. Second, confidence interval analysis showed that misclassified samples exhibited substantially lower confidence scores compared with correctly classified cases, indicating that the model struggles to process such cases effectively. To address this, we designed a confidence-driven human-AI collaboration module, which flags low-confidence cases for expert review. Expert feedback is then incorporated to correct the prediction and to guide subsequent tier selection, ensuring robust downstream diagnosis. Finally, we incorporated an ensemble module to aggregate predictions from multiple predictors within each tier, further enhancing overall accuracy and stability. Together, these modules form a dynamic correction framework that improves the reliability of hierarchical cascaded systems and better aligns model behavior with clinical requirements.

Fig. 1.

Fig. 1

Overview of the workflow. a. The dataset comprises four modalities, including 6,103 H&E-stained intestinal biopsy slides, 7,164 cervical cytology slides, 6,392 fundus images, and 11,276 endoscopic images, forming a large, multi-modal dataset. b. Differences between parallel, hierarchical cascaded, and the proposed method in diagnosing the same cases. c. Overall model architecture. The proposed framework combines the high performance and diagnostic transparency of hierarchical cascaded systems, addresses error propagation, and integrates a confidence-based human-AI collaboration module for cases beyond the model’s predictive capability. d. Diagnostic performance across four modalities, showing consistent improvement over the best parallel and hierarchical cascaded models. e. Architecture of the error detection and dynamic correction module, which uses an error detector to identify misclassified cases by the base model and routes them to another branch for re-prediction. f. Architecture of the confidence-based human-AI collaboration module, which selects low-confidence samples for expert review and feeds the corrected labels back to the model

Error detection and correction module

Errors in hierarchical cascaded systems can be mitigated from two perspectives: (i) reducing their occurrence by improving classification accuracy, and (ii) identifying and correcting errors once they arise. Guided by this principle, we designed an error detection and correction module. For each WSI, the patch-level features Inline graphic were aggregated into a slide-level representation h,

graphic file with name d33e496.gif

where Aggr denotes the aggregation operator implemented differently across TransMIL, ABMIL, or CLAM. To simultaneously perform the primary classification task and assess whether a sample correctly belongs to the current branch (i.e., whether the upstream classification was accurate), we adopted a dual-branch architecture. The classification branch employs a cosine classifier, which emphasizes the angular distance between features and achieves clearer inter-class separation with tighter intra-class clustering compared to conventional linear classifiers [35]. The normalized slide-level representation Inline graphic and class weight vectors Inline graphic are defined as,

graphic file with name d33e516.gif

where  C is the number of classes. The classification logits are then obtained as scaled cosine similarities,

graphic file with name d33e525.gif

with Inline graphic being a fixed scaling factor. The second branch is dedicated to error detection. This auxiliary branch applies a linear head to the aggregated bag representation, expressed as,

graphic file with name d33e534.gif

The resulting scalar err serves as an error score, which is mapped to a probability via a sigmoid function,

graphic file with name d33e543.gif

where Inline graphic represents the likelihood that the upstream classification is incorrect.

During training, the ground-truth class of each sample was used to generate labels for the error detection branch. For each downstream branch, samples belonging to the target category of that branch were labeled as “correct” (0), whereas samples from all other categories were labeled as “error” [1]. For example, when training the adenocarcinoma subtyping branch, adenocarcinoma samples were labeled as correct, while adenoma and non-neoplastic samples were labeled as error. These binary labels were then used to supervise the training of the error detection module. The model was trained using a dual-task optimization objective. The primary classification branch was supervised with cross-entropy loss, while the error detection branch was supervised with binary cross-entropy loss. The final loss function was computed as the weighted sum of the two losses, and the weighting factor was empirically set to 1 in all experiments. During inference, the output of the error detection branch was converted into an error probability using a sigmoid function, and a threshold of 0.5 was used as the decision boundary for branch correction. This threshold was consistently applied across all tasks and datasets without task-specific optimization, allowing us to evaluate the robustness and generalizability of the proposed framework under a unified setting.

Confidence-driven human-AI collaboration module

Through an analysis of confidence distributions, we observed that misclassified samples exhibited markedly lower confidence compared to correctly classified ones, indicating higher model uncertainty for these difficult cases. Confidence can therefore serve as a proxy to identify instances that the model is unlikely to handle reliably. To address this, we designed a confidence-driven human-AI collaboration module. A confidence threshold was introduced: if the maximum predicted probability of a sample fell below this threshold, the prediction was deemed highly uncertain. Such samples were automatically flagged for expert review, enabling human intervention to correct the model’s output. Expert review was performed by a single pathology expert (Muyan Cai) with over 10 years of diagnostic pathology experience, who independently reviewed all flagged whole-slide images. Since the review was conducted by one expert, inter-rater agreement was not assessed. This should be interpreted in light of the practical challenges associated with multi-expert review of whole-slide image datasets, including substantial time and workload demands. This design ensures that challenging cases are adaptively transferred to clinicians, thereby improving the robustness and clinical reliability of the hierarchical cascaded diagnostic system.

Ensemble module

To improve diagnostic robustness, we implemented an ensemble module that integrates predictions from multiple independent predictors. For each input sample x, three predictors produced probability outputs Inline graphic, where Inline graphic represents the class probability vector from model m over c classes. The final probability distribution was obtained by averaging across models,

graphic file with name d33e586.gif

where Inline graphic denotes the ensemble probability vector, with M = 3. Simple averaging was selected for its simplicity, robustness, and ability to combine multiple predictors without introducing additional parameters or task-specific tuning. By aggregating complementary model predictions, the ensemble module reduced variance and yielded more reliable and stable performance across diagnostic tasks.

Evaluation metrics and implementation details

All experiments were conducted using a five-fold cross-validation strategy. Three folds were allocated for training, one fold for validation, and one fold for testing. To ensure balanced class distributions across subsets, proportional random sampling was applied within each class. Since both hierarchical cascaded and parallel systems were evaluated, with the hierarchical cascaded framework comprising multiple hierarchical sub-models, we additionally constructed a fully independent test set to avoid potential data leakage. All folds were evaluated on this independent test set to ensure fair comparison. For cervical cytology screening and colorectal biopsy diagnosis, models were trained using the Adam optimizer with an L2 weight decay of 1e-5 and a learning rate of 1e-5. Training was performed with a batch size of 1, for a minimum of 50 epochs and up to 200 epochs, with early termination if validation loss failed to decrease within 20 consecutive epochs. For endoscopic diagnosis and fundus diagnosis, models were trained using the AdamW optimizer with an L2 weight decay of 1e-4 and an initial learning rate of 1e-4. A batch size of 32 was adopted, and training was run for 20 epochs. For the endoscopic diagnosis and fundus diagnosis tasks, the feature extractor was initialized with a ResNet-50 model pre-trained on ImageNet. Segmentation and patching of WSIs were performed on Intel(R) Xeon(R) Gold 6240 Central Processing Units (CPUs), and the models were trained on NVIDIA GeForce RTX 3090 Graphics Processing Units (GPUs).

Quantification and statistical analysis

Our main evaluation metric was the accuracy. Additionally, we employed the F1 score, sensitivity, specificity, and AUROC for performance evaluation. For each experiment, we reported the mean and standard deviation of the model’s internal and external test performances. A p-value less than 0.05 was considered statistically significant. Data pre-processing and model development were conducted using Python (version 3.8.0) and the deep learning platform Torch (version 1.9.0).

Related work

Computational pathology and medical AI

Recent advances in artificial intelligence have substantially improved performance across a wide range of medical imaging tasks, including computational pathology [36, 37], cytology [38, 39], fundus photography [40, 41], and endoscopic image analysis [42, 43]. In computational pathology, weakly supervised multiple-instance learning (MIL) frameworks have enabled whole-slide image analysis without requiring pixel-level annotations. More recently, pathology foundation models and vision-language models have further improved feature representation learning and model generalizability across diverse downstream tasks [44, 45]. Despite these advances, most existing studies evaluate AI systems on isolated diagnostic tasks, whereas real-world clinical diagnosis is inherently hierarchical and involves strong dependencies between consecutive decision-making stages.

Hierarchical cascaded learning systems

Hierarchical cascaded architectures have been widely adopted in medical AI because they naturally mirror the hierarchical structure of clinical decision-making [46–48]. Rather than solving a diagnostic task through a single multi-class prediction, hierarchical cascaded systems decompose complex problems into a sequence of simpler classification stages [4, 49, 50]. Such designs have been applied to improve interpretability and align model outputs with clinical reasoning processes [30]. However, the sequential dependency between stages makes hierarchical cascaded systems vulnerable to error propagation, where mistakes made at early stages may adversely affect downstream predictions. Although previous studies have reported the practical utility of hierarchical cascaded architectures, systematic quantitative analyses of error propagation and its impact on diagnostic performance remain limited. Several factors may contribute to this gap. First, hierarchical cascaded architectures are often designed based on their intuitive alignment with clinical workflows, and thus their architectural choices have typically been guided by task-specific considerations rather than direct comparisons with alternative designs. Second, most existing evaluations of medical AI systems have focused on benchmark-based tasks, where complex diagnostic workflows are often simplified into isolated prediction problems. Consequently, large-scale datasets capturing diverse diagnostic categories and sequential decision processes, which are required for evaluating architectural differences, remain challenging to obtain.

Error detection and correction in AI systems

Various approaches have been proposed to improve the reliability of AI systems through uncertainty estimation [51], out-of-distribution detection [52], confidence calibration [53], and error detection mechanisms [54]. Existing methods typically identify potentially unreliable predictions based on model confidence or feature-space characteristics and subsequently reject or flag such cases for further analysis [55]. While these strategies have shown promise in improving model robustness, most studies focus on error identification rather than actively correcting errors within multi-stage diagnostic pipelines. In contrast, our framework integrates error detection directly into the hierarchical cascaded architecture and enables dynamic correction of misrouted cases, thereby mitigating the downstream effects of error propagation.

Human-AI collaboration in medical diagnosis

Human-AI collaboration has emerged as an important strategy for improving the safety and trustworthiness of clinical AI systems [56]. Prior studies have shown that selectively referring uncertain cases to human experts can significantly improve diagnostic performance while maintaining workflow efficiency [57]. Most existing approaches rely on confidence-based triage, in which low-confidence predictions are flagged for review. Although effective, these methods are typically evaluated in single-stage diagnostic settings [58]. Our work extends this concept to hierarchical diagnostic workflows by integrating confidence-guided expert intervention within a dynamic hierarchical cascaded framework, enabling both uncertainty management and error correction across multiple diagnostic stages.

Results

Patient cohorts and cascade design

To rigorously evaluate the impact of AI system architecture on diagnostic accuracy and error mitigation, we curated a comprehensive intestinal biopsy cohort from hematoxylin and eosin (H&E)-stained histopathology slides. This cohort was purposefully structured to reflect the sequential logic of clinical decision-making, enabling a direct comparison between parallel and cascade modeling strategies. The cascade framework comprised three hierarchical stages: initial discrimination of distinguishing normal mucosa, adenomas, and adenocarcinomas; subsequent subtype classification within adenomas and adenocarcinomas; and final stratification of selected subtypes into low- and high-grade lesions. This design yielded 22 clinically meaningful, fine-grained diagnostic categories, providing a robust substrate for benchmarking model performance and error propagation. To assess generalizability, we incorporated external validation datasets spanning cervical cytology screening, fundus photography, and endoscopic imaging (Fig. 1).

Hierarchical cascaded systems enhance diagnostic accuracy and interpretability

We systematically compared the performance of cascade and parallel architectures within the intestinal biopsy cohort. In the parallel approach, models were tasked with direct, one-step classification across all 22 subtypes, requiring simultaneous differentiation of entities such as low-grade sessile serrated adenoma and high-grade adenocarcinoma not otherwise specified (NOS). In contrast, the cascade strategy decomposed the diagnostic process into sequential stages, mirroring clinical reasoning by progressively refining classification granularity, for example, first classifying adenoma, then subclassifying sessile serrated adenoma, and finally determining grade status (Fig. 2 and Additional file 3: Tables S1–S2).

Fig. 2.

Fig. 2

Performance comparison between hierarchical cascaded and parallel systems in the intestinal biopsy diagnosis task. a Hierarchical diagnostic structure of the intestinal biopsy task, comprising three levels: abnormality detection, subtyping, and grading. b Across different backbone architectures, hierarchical cascaded models consistently outperform parallel models. c Subtyping performance improves when adenocarcinoma and adenoma are first distinguished before further classification, indicating that even partial cascade designs can enhance predictive accuracy. d-f Additional metrics for the subtyping task. g-i Performance of the abnormality detection task, including precision, recall, F1-score, AUC, and corresponding confusion matrices. j Grading performance similarly improves when adenocarcinoma and adenoma are separated before grading. k. Performance of grading after subtyping each sample using task-specific models, which varies according to task difficulty and the number of training samples

Benchmarking three state-of-the-art multiple-instance learning (MIL) models-TransMIL [59], ABMIL [60], and CLAM [36], revealed a consistent and significant advantage for the cascade approach. In the parallel setting, models accuracies ranged from 0.6003 (95% confidence interval [CI] 0.5780–0.6227) to 0.6415 (95% CI 0.6143–0.6688). By contrast, the hierarchical framework achieved higher accuracies across all models: 0.6578 (95% CI 0.6418–0.6739), 0.6561 (95% CI 0.6369–0.6753), and 0.6578 (95% CI 0.6393–0.6763) (Additional file 3: Table S3). Statistical comparison showed that the improvement was significant for TransMIL (P < 0.005), while ABMIL and CLAM demonstrated a similar trend toward improved performance that did not reach statistical significance. Other evaluation metrics, including Precision, Recall, F1-score, and AUROC, can be found in the Additional file 3: Tables. Overall, the consistent performance gains observed across architectures support the robustness and generalizability of the cascade advantage.

Mechanisms of error propagation in cascade AI systems

To elucidate the dynamics of error propagation within hierarchical cascaded diagnostic frameworks, we systematically analyzed subtask-specific performance across the intestinal biopsy cohort. Initial abnormality detection (distinguishing normal mucosa, adenomas, and adenocarcinomas) consistently achieved high accuracies of 0.9199 (95% CI 0.9098–0.9301), 0.9240 (95% CI 0.9145–0.9334), and 0.9099 (95% CI 0.8972–0.9225) using TransMIL, ABMIL, and CLAM, respectively. By contrast, third-stage subtype grading of adenoma and adenocarcinoma subtypes showed greater variability, with accuracies ranging from 0.6000 (95% CI 0.4760–0.7240) to 0.9941 (95% CI 0.9826-1.0000) in accuracy (Additional file 2: Figs. S1–S2 and Additional file 3: Table S4–S16). These disparities reflect intrinsic differences in task complexity and data distribution, but also illustrate a key advantage of hierarchical cascaded systems: the ability to localize errors to specific subtasks, enabling targeted refinement and optimization, a capability not afforded by parallel architectures.

Despite these strengths, hierarchical cascaded architectures are inherently susceptible to error propagation, where upstream misclassifications can substantially degrade downstream performance. To quantify this effect, we implemented a two-step framework: step one performed abnormality detection, and step two conducted grading conditioned on the initial prediction. For adenocarcinoma grading, when cases were correctly identified at the first stage, the models achieved high downstream accuracies of 0.9424 (95% CI 0.9301–0.9548), 0.9287 (95% CI 0.9093–0.9480), and 0.9402 (95% CI 0.9308–0.9495) for TransMIL, ABMIL, and CLAM, respectively. However, when abnormality detection was incorrect, grading accuracy dropped dramatically to 0.1829 (95% CI 0.0956–0.2703), 0.1800 (95% CI 0.1313–0.2287), and 0.1568 (95% CI 0.1047–0.2089). Similar trends were observed in adenoma grading, with relative decreases of 41.26%, 50.71%, and 28.95% compared to correctly classified samples (Fig. 3 and Additional file 3: Tables S17–S19). These patterns were consistent across histological subtypes (Additional file 2: Fig. S3 and Additional file 3: Tables S20–S25). This marked decline is mainly attributable to error propagation in the hierarchical cascaded framework, where incorrect upstream predictions misdirect cases into the wrong downstream grading branch, underscoring the critical need for strategies to mitigate this effect for reliable clinical deployment of AI diagnostics.

Fig. 3.

Fig. 3

Impact of upstream model accuracy on downstream performance. a-c With TransMIL, ABMIL, and CLAM as backbones, misclassified adenocarcinoma and adenoma samples in the abnormality detection stage show substantially lower grading accuracy compared with correctly classified samples. d-f Other performance metrics for misclassified samples are also markedly inferior. g-i Corresponding confusion matrices. j Using TransMIL as the backbone, errors in the subtyping stage similarly reduce grading accuracy across most models. k-l Additional metrics, including precision, recall, F1-score, AUC, and corresponding confusion matrices

Dynamic error detection and correction substantially enhance cascade system reliability

To mitigate the impact of error propagation, we developed a dynamic error detection and correction module, strategically positioned after the first-stage abnormality detection and branching into adenoma or adenocarcinoma pathways. Misclassified cases, such as adenomas erroneously labeled as adenocarcinomas, were flagged by the error detection module and redirected for re-evaluation. This approach enabled accurate recovery of misclassified samples, ensuring that only correctly identified cases proceeded to subsequent subtype classification and grading.

We benchmarked the error detection module against three established out-of-distribution (OOD) detection methods: extra-classification (EC), outlier exposure (OE) [61], and energy-based detection (Energy) [62]. In the adenocarcinoma branch, our module achieved an error recognition accuracy of 0.9369 (95% CI, 0.9326–0.9411) using TransMIL, correctly detecting 93.69% of non-adenocarcinoma samples and outperforming the best comparator, EC [0.9152 (95% CI, 0.8984–0.9320)]. In the adenoma branch, the module maintained both high classification accuracy and robust error detection, effectively redirecting non-adenoma cases, a balance not achieved by alternative methods (Additional file 2: Fig. S4 and Additional file 3: Tables S26–S27).

We further evaluated the impact of the error detection module on the final three-stage classification performance. Using TransMIL as the backbone, three-stage classification accuracy increased to 0.6739 (95% CI 0.6665–0.6814) across 22 fine-grained classes, outperforming EC (0.6131, 95% CI 0.5762–0.6501), OE (0.6576, 95% CI 0.6406–0.6746), and Energy (0.6363, 95% CI 0.6201–0.6525). Similar gains were observed with ABMIL and CLAM architectures (Fig. 4 and Additional file 3: Table S28). Data distribution analysis using t-SNE [63] visualizations revealed clear separation between correctly and incorrectly classified samples (Fig. 4b), further validating the module’s ability to identify misclassifications.

Fig. 4.

Fig. 4

Effects of the proposed error detection and dynamic correction module and the confidence-based human-AI collaboration module. a Across different backbone models, both modules consistently improved performance. b t-SNE visualization of slide-level features shows that incorporating the error detection and dynamic correction module enables the model to capture discriminative features associated with misclassified samples, thereby facilitating their detection. c Performance comparison of different methods on adenoma subtyping and error detection. d Performance comparison of different methods on adenocarcinoma subtyping and error detection. The proposed approach not only preserves strong performance on the primary tasks but also effectively identifies misclassified samples. e-h Confidence distributions of CLAM, TransMIL, ABMIL, and the ensemble model on adenoma subtyping. Misclassified and correctly classified samples occupy distinct confidence intervals, with misclassifications predominantly concentrated in low-confidence regions, supporting the feasibility of the confidence-based human-AI collaboration module

Finally, ensemble integration of TransMIL, ABMIL, and CLAM yielded additional performance gains, with the final model achieving an accuracy of 0.7102 (95% CI 0.6994–0.7211), corresponding to improvements of 6.87% and 5.24% over the best-performing parallel and cascade baselines, respectively (Additional file 3: Table S29). These results demonstrate that dynamic error detection and correction are essential for enhancing the reliability and safety of hierarchical cascaded diagnostic AI systems, providing a robust pathway toward reliable clinical deployment.

Confidence-driven human-AI collaboration drives substantial performance gains

While the integration of error correction and ensemble modules markedly improved the reliability of hierarchical cascaded diagnostic systems, challenges persisted in the accurate classification of low-confidence samples. Visualization of model confidence distributions revealed a pronounced separation between correctly and incorrectly classified cases, even after error correction (Fig. 4e-h).

In the second-stage adenocarcinoma subtyping task, the ensemble model demonstrated that 23.4%, 15.9%, and 9.9% of the correctly classified samples fell below confidence thresholds of 0.9, 0.8, and 0.7, respectively. In contrast, misclassified samples were disproportionately represented at these thresholds, accounting for 74.5%, 69.1%, and 59.1% of cases, which exceeded the rates for correct classifications by 51.1%, 53.2%, and 49.2% (Additional file 3: Tables S30–S45). These findings indicate that model confidence is a robust indicator of error-prone predictions and can be leveraged as a secondary filter for uncertainty.

Building on this insight, we designed a confidence-driven human-AI collaboration module that flags uncertain samples for expert review during the critical second-stage adenoma and adenocarcinoma. When we integrated the error detection module and ensemble framework, this approach yielded substantial improvements in overall diagnostic accuracy. At confidence thresholds of 0.7, 0.8, and 0.9, the final three-stage classification accuracy increased to 0.7446 (95% CI 0.7352–0.7540), 0.7722 (95% CI 0.7630–0.7814), and 0.8027 (95% CI 0.7969–0.8084), respectively. These gains surpassed the initial cascade system by 8.68%, 11.44%, and 14.49% over the initial cascade system, and 10.31%, 13.07%, and 16.12% over the parallel system (Additional file 3: Table S46). Collectively, these results demonstrate that this integrative framework of error correction, ensembling, and human-AI collaboration offers a pragmatic and scalable strategy for enhancing diagnostic performance, paving the way for safer and more reliable deployment of AI-assisted diagnostics in clinical practice.

Generalization across diagnostic modalities: application to cervical cytology screening

To further assess the generalizability of our approach, we extended the cascade framework to cervical cytology screening, a domain characterized by complex, multi-step diagnostic workflows (Additional file 3: Tables S47–S48). This task involved sequential classification of slides as normal or abnormal, differentiation of precancerous lesions from carcinoma within the abnormal branch, and further subtyping precancerous lesions (ASCUS, HSIL, LSIL) or carcinomas (adenocarcinoma, squamous cell carcinoma). Consistent with findings in intestinal biopsy pathology, cascade systems outperformed parallel architectures, achieving accuracies of 0.8295 (95% CI 0.8043–0.8547), 0.8448 (95% CI 0.8226–0.8671), and 0.8624 (95% CI 0.8436–0.8811) for TransMIL, ABMIL, and CLAM, compared to 0.8166 (95% CI 0.8026–0.8305), 0.7101 (95% CI 0.6725–0.7478), and 0.7695 (95% CI 0.7123–0.8267) for their parallel counterparts (Fig. 5, Additional file 2: Fig. S5 and Additional file 3: Tables S49–S53).

Fig. 5.

Fig. 5

Model performance on the cervical cytology screening task. a Hierarchical diagnostic structure comprising three levels: abnormality detection, malignancy classification, and subtyping. b Across different backbone models, hierarchical cascaded systems consistently outperformed parallel systems. c The proposed modules significantly improved performance in cervical cytology screening, demonstrating the scalability of our approach. d-e Performance of different backbone models on abnormality detection and malignancy classification. f-g Confidence distributions of the ensemble model and TransMIL in malignancy classification. Misclassified samples were more frequently associated with lower confidence scores compared with correctly classified cases

Incorporation of the error detection module after initial abnormality screening further improved performance, with gains of 0.5%, 3.39%, and 3.03% for the three backbone models. The addition of the ensemble module yielded an additional 3.91% improvement (Additional file 3: Table S54). Finally, deployment of the confidence-driven human-AI collaboration module resulted in accuracies of 0.9093 (95% CI 0.9036–0.9150), 0.9132 (95% CI 0.9077–0.9187), and 0.9177 (95% CI 0.9128–0.9226) at confidence thresholds of 0.7, 0.8 and 0.9, respectively. These thresholds required expert review for only 0.95%, 1.48%, and 2.15% of samples, demonstrating that performance gains were achieved with minimal additional expert workload. Overall, this substantially outperformed the baseline cascade and parallel systems (Additional file 3: Tables S55–S63). These findings demonstrate that the proposed integrative strategy, which combines error correction, model ensembling, and confidence-driven human-AI collaboration, not only mitigates the pervasive challenge of error propagation but also generalizes effectively across distinct diagnostic modalities.

Robust generalization across medical imaging modalities

To rigorously assess the versatility and scalability of our error-mitigation framework, we extended its application beyond histopathology and cytology to encompass additional medical imaging modalities, including fundus photography and endoscopic imaging. These modalities present distinct diagnostic challenges and data characteristics, providing a stronger test of the generalizability of our approach (Fig. 6). Due to practical constraints in involving specialists from multiple clinical disciplines, the confidence-driven human-AI collaboration module was not included in this analysis.

Fig. 6.

Fig. 6

Extended validation across other medical imaging modalities. a Hierarchical diagnostic structure of the fundus disease diagnosis task, comprising three levels: abnormality detection, disease classification, and subtyping. b Comparison among parallel, hierarchical cascaded, and the proposed method, where our approach achieved the highest accuracy. c Performance across five subtasks in the hierarchical cascaded fundus diagnosis. d Hierarchical diagnostic structure of the endoscopy task, comprising two levels: abnormality detection and grading. e Comparison among parallel, hierarchical cascaded, and the proposed method, where our approach achieved the best performance. These results indicate that our method generalizes well to modalities with distinct characteristics and remains robust regardless of the number of diagnostic levels

In the fundus image classification task, we implemented a three-tier diagnostic architecture to categorize eight clinically relevant disease states. Comparative analysis revealed that the parallel and hierarchical cascaded baselines achieved accuracies of 0.6646 and 0.6724, respectively, while our integrative error-mitigation strategy further elevated performance to 0.6966 (Additional file 3: Tables S64–S65). Similarly, in the endoscopic task, which followed a two-tier classification of four disease categories, our method outperformed both baselines, achieving an accuracy of 0.8078 compared with 0.7681 for the parallel system and 0.7728 for the hierarchical cascaded system. (Additional file 3: Tables S66–S67 and Additional file 1: Fig. S3). Although the performance gains in fundus and endoscopic tasks were relatively smaller, these experiments demonstrated the cross-modality generalizability of our framework. The simplified benchmark settings may partly limit the observed improvements, while consistent gains across modalities support its broader applicability. Ablation experiments were conducted to evaluate the contribution of each proposed module, with results provided in Additional file 3: Table S68. The consistent improvements across multiple tasks and imaging modalities highlight the robustness of our framework in reducing error propagation and enhancing diagnostic performance. By explicitly addressing error propagation and accumulation, our approach not only enhances diagnostic accuracy but also establishes a new standard for reliability in AI-assisted medical decision-making.

Discussion

The evolution of medical AI has been marked by a persistent tension between achieving benchmark accuracy and delivering clinical utility. While recent advances in single-task [64, 65] and multimodal models have set new standards for performance in controlled settings [66–68], their dependence on static training paradigms and curated datasets often fails to capture the complexity and unpredictability of real-world clinical workflows [69, 70]. Crucially, clinical decision-making is inherently sequential, hierarchical, and susceptible to error propagation, yet the systemic dynamics of diagnostic uncertainty remain largely unaddressed. Recent work has further highlighted that challenges such as overreliance on AI outputs, optimization detached from clinical utility, and insufficient human oversight represent broader systemic risks in digital medicine [71]. By combining error-aware cascades and confidence-driven human-AI collaboration, our framework addresses several of these challenges, preserving human oversight while improving diagnostic reliability and clinical utility. Moreover, the integration of confidence monitoring and expert review provides a transparent decision pathway that supports accountable and reliable deployment in real-world practice.

Our study provides a comprehensive analysis of how upstream errors in hierarchical cascaded diagnostic architectures can amplify downstream misclassifications, fundamentally impacting reliability at the point of care. By systematically comparing hierarchical cascaded and parallel AI systems across large-scale colorectal biopsy and cervical cytology cohorts, we show that hierarchical cascaded designs, despite their vulnerability to error propagation, consistently deliver superior accuracy, enhanced interpretability, and closer alignment with the logic of clinical reasoning. Notably, hierarchical cascaded systems achieved accuracy gains of 3.36% and 8.02% over parallel approaches, and downstream grading accuracy was observed to be 5.41 times higher when upstream classification was correct. These findings establish a quantitative foundation for the design of error-aware diagnostic architectures and highlight the critical importance of managing uncertainty throughout the diagnostic process. Compared with the parallel architecture, the hierarchical cascaded framework introduced additional training costs due to the optimization of multiple sequential models. However, this overhead occurs only during offline training and does not affect inference efficiency after deployment, making it acceptable for practical clinical applications. Using the colorectal biopsy task as a representative example, the average inference times of the parallel TransMIL, ABMIL, and CLAM models were 6.412 ms, 1.202 ms, and 3.120 ms per sample, respectively. For the hierarchical cascaded framework, the most computationally demanding configuration (TransMIL) required 19.422 ms per sample. Peak GPU memory consumption remained below 1 GB. These results indicate that the computational overhead of the proposed framework is modest and compatible with practical clinical deployment.

To address the inherent limitations of hierarchical cascaded systems, we introduce a dynamic error-correctable cascade framework that integrates automated error detection, correction, and confidence-guided human-AI collaboration. Unlike prior approaches that rely on retrospective interpretability or assume upstream reliability [72], our framework proactively manages uncertainty during inference, enabling adaptive correction and targeted expert intervention. Validation across four distinct imaging modalities, including histopathology, cytology, fundus photography, and endoscopy, demonstrates substantial reductions in diagnostic errors and highlights both the robustness and the clinical value of this approach.

The implications of our work extend well beyond improvements in accuracy. Clinical decision-making is inherently hierarchical, progressing from broad screening to fine-grained stratification [73]. While trustworthy AI encompasses multiple dimensions, including fairness, privacy, governance, robustness, and transparency, this study specifically focuses on trustworthiness from the perspectives of decision transparency, error resilience, human oversight, and clinical accountability. Our confidence-driven human-AI collaboration framework and error-aware cascades align naturally with this structure. High-confidence cases are automatically processed by the AI, substantially reducing the number of cases requiring clinician review and thus alleviating cognitive burden, while low-confidence cases are routed to experts to ensure critical decisions retain human oversight, clarifying decision accountability. The system integrates seamlessly into routine workflows, operating on a “human-in-the-loop as needed” principle to avoid disrupting standard clinical operations. Rather than pursuing full automation, the framework selectively involves clinicians when model confidence is insufficient, preserving human oversight at critical decision points. This design is consistent with emerging human-centered perspectives on clinical AI deployment, which emphasize workflow integration, clinician usability, adaptive oversight, and collaborative decision support as prerequisites for trustworthy implementation [74]. Additional analyses showed that confidence-guided human-AI collaboration was substantially less effective in the parallel system, where confidence scores could not effectively stratify samples (Additional file 3: Table S69). This finding further highlights the advantage of hierarchical cascaded architectures in supporting targeted expert intervention and efficient workload allocation. By integrating error detection, correction, and human oversight into the diagnostic workflow, our framework provides a practical approach toward improving specific dimensions of reliable medical AI.

From a clinical deployment perspective, the proposed framework can be integrated into existing digital pathology workflows following routine whole-slide image scanning. After automated analysis, the system presents hierarchical diagnostic predictions, confidence scores, decision pathways, attention heatmaps, and top contributing regions together with the original slide image through an interactive interface (Additional file 1: Fig. S4). Cases with low confidence or potential diagnostic uncertainty are automatically flagged for expert review, allowing pathologists to inspect relevant regions and confirm, modify, or override AI predictions. This human-in-the-loop workflow enables AI to assist routine interpretation while preserving expert oversight for challenging cases, providing a practical pathway toward clinical implementation.

Despite these advances, several limitations warrant consideration. First, although our study includes over 10,000 cases and validates the proposed framework across multiple imaging modalities, broader evaluation across additional imaging modalities, patient populations, disease types, and prospective clinical settings is still needed to further assess generalizability. The fundus and endoscopic experiments were primarily included to evaluate the cross-modality generalizability of the proposed framework. Future studies should further assess its performance in diseases with more complex diagnostic hierarchies. Moreover, stratification into sub-tasks inevitably reduces sample sizes at deeper diagnostic tiers, highlighting the need for larger and more diverse datasets. Second, although the proposed framework substantially reduces error propagation, a small number of samples may still be misclassified with high confidence and therefore escape confidence-guided review. Performance may also be challenged by rare disease patterns or underrepresented diagnostic categories. Furthermore, because branch correction depends on the accuracy of the error-detection module, incorrect error predictions may occasionally lead to unnecessary branch switching and potential over-correction. While infrequent in our experiments, these failure modes remain important considerations for future optimization and real-world deployment. The human-AI collaboration module was evaluated by a single experienced pathologist, which may limit the assessment of inter-observer variability. Future studies involving multiple experts and inter-rater agreement analysis are warranted to provide a more comprehensive evaluation of human-AI collaborative decision-making. Third, the complexity of real-world clinical pathways often exceeds the two- and three-tier structures examined here; future work should explore model robustness and optimization in more intricate diagnostic hierarchies. Finally, the integration of multi-modal data into dynamic diagnostic frameworks remains an open challenge, and extending validation to these more complex tasks will be a focus of subsequent research.

Ethical considerations

Ethical considerations are essential for the responsible deployment of AI in clinical practice. Beyond improving diagnostic performance, reliable clinical AI requires consideration of broader socio-technical factors, including risk management, human oversight, accountability, and appropriate allocation of decision-making responsibilities. The proposed error-aware framework aligns with human-centered AI principles by identifying potential model failures, mitigating error propagation, and supporting clinicians in making informed decisions rather than replacing expert judgment. The datasets used in this study reflect real-world disease distributions and therefore exhibit a degree of class imbalance, which may affect performance on underrepresented disease categories. Although the hierarchical cascaded framework partially alleviates this issue by reducing task complexity at each diagnostic stage, future work should further improve fairness and robustness for rare diseases and minority classes. Importantly, the proposed human-AI collaboration module is intended to support, rather than replace, clinical decision-making. By directing expert review toward low-confidence cases, the framework aims to improve the allocation of clinical resources while maintaining patient safety. Its effective deployment nevertheless requires appropriate clinician training, transparent model outputs, and a clear understanding of the model’s limitations to ensure meaningful human oversight and accountability. In addition, prospective multi-center validation, together with careful consideration of data security, patient privacy, regulatory compliance, and clinical governance, will be essential before routine clinical implementation.

Conclusions

In conclusion, our study positions hierarchical cascaded architectures as both a challenge and an opportunity for medical AI. While susceptible to error propagation, hierarchical cascaded designs offer transparency and clinical alignment that parallel systems cannot achieve. By introducing and validating a dynamic, error-correctable cascade framework across multiple modalities, we provide a blueprint for the reliable deployment of AI in medicine. This work advances the field beyond isolated accuracy improvements, laying the groundwork for robust, interpretable, and clinically meaningful AI solutions that support precision medicine in real-world practice.

Supplementary Information

Below is the link to the electronic supplementary material.

12916_2026_5120_MOESM1_ESM.docx (777.6KB, docx)

Supplementary Material 1: Additional file 1: Figures S1–S4.

12916_2026_5120_MOESM2_ESM.docx (1.3MB, docx)

Supplementary Material 2: Additional file 2: Figures S1–S4.

12916_2026_5120_MOESM3_ESM.docx (356.5KB, docx)

Supplementary Material 3: Additional file 3: Tables S1–S69 and Algorithm S1.

Acknowledgements

We sincerely thank the pathologists and clinical collaborators for their expertise in diagnostic evaluation, case review, and annotation support. We also appreciate the assistance of our research team members in data management and computational experiments.

Author contributions

MC, RW, and DX conceived and designed the study. KZ, XZ, JW, and CQ collected the samples and acquired the image data. XZ, JW, SF, and MC provided the clinical and pathological data from multiple medical centers. KZ, RW, and XZ performed the machine learning. KZ, CQ, and XZ did the statistical analyses. All authors vouch for the data, analyses, and interpretations. KZ, RW, XZ, JW, CQ, and MC wrote the first draft of the manuscript, and all authors read and approved the final manuscript.

Funding

This work was supported by grants from the National Natural Science Foundation of China (grant No. 82373190 and 82403737), Natural Science Foundation of Guangdong Province (No. 2024A1515012448), Science and Technology Program of Guangzhou (No. 2025A04J3599), China Postdoctoral Science Foundation (No. 2024M753786), Chih Kuang Scholarship for Outstanding Young Physician-Scientists of Sun Yat-sen University Cancer Center (No. CKS-SYSUCC-2023005), Young Talents Program of Sun Yat-sen University Cancer Center (No. YTP-SYSUCC-0025), and National High-Level Medical Talent Program (National Health Commission Document No. [2024]41).

Data availability

The source code of our model is publicly available at https://github.com/LexieK7/Error under the MIT License. Due to patient privacy obligations and institutional regulations, access to the whole slide images and annotation data used in this study is restricted. These datasets were obtained with institutional permissions via IRB (Institutional Review Board) approval and are therefore not publicly available. However, for non-commercial and academic purposes, interested parties may request access to the data supporting the findings of this study directly from the corresponding author. The publicly available ODIR-2019 [75] dataset can be downloaded from https://odir2019.grand-challenge.org/. The LIMUC [76] dataset is available from Zenodo (https://doi.org/10.5281/zenodo.5827695). The pre-trained CONCH model can be accessed at https://github.com/mahmoodlab/CONCH/tree/main .

Declarations

Ethics approval and consent to participate

The Institutional Ethics Committee (B2025-131-01) ethically approved all patient-related information obtained, and informed consent was waived for this retrospective study.

Consent for publication

Not applicable.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Ke Zheng, Xueyi Zheng, Chunhua Qu and Jue Wang contributed equally to this work.

Contributor Information

Ruixuan Wang, Email: wangruix5@mail.sysu.edu.cn.

Dan Xie, Email: xiedan@sysucc.org.cn.

Muyan Cai, Email: caimy@sysucc.org.cn.

References

  • 1.Zhou SK, Greenspan H, Davatzikos C, Duncan JS, van Ginneken B, Madabhushi A, et al. A review of deep learning in medical imaging: Imaging traits, technology trends, case studies with progress highlights, and future promises. Proc IEEE Inst Electr Electron Eng. 2021;109(5):820–38. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Rajpurkar P, Chen E, Banerjee O, Topol EJ. AI in health and medicine. Nat Med. 2022;28(1):31–8. [DOI] [PubMed] [Google Scholar]
  • 3.Dayarathna S, Islam KT, Uribe S, Yang G, Hayat M, Chen Z. Deep learning based synthesis of MRI, CT and PET: Review and analysis. Med Image Anal. 2024;92:103046. [DOI] [PubMed] [Google Scholar]
  • 4.Zheng X, Wang R, Zhang X, Sun Y, Zhang H, Zhao Z, et al. A deep learning model and human-machine fusion for prediction of EBV-associated gastric cancer from histopathology. Nat Commun. 2022;13(1):2790. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Shen P, Yang Z, Sun J, Wang Y, Qiu C, Wang Y, et al. Explainable multimodal deep learning for predicting thyroid cancer lateral lymph node metastasis using ultrasound imaging. Nat Commun. 2025;16(1):7052. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Wei Y, Yang M, Zhang M, Gao F, Zhang N, Hu F, et al. Focal liver lesion diagnosis with deep learning and multistage CT imaging. Nat Commun. 2024;15(1):7040. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Liang J, Zhang W, Yang J, Wu M, Dai Q, Yin H, et al. Deep learning supported discovery of biomarkers for clinical prognosis of liver cancer. Nat Mach Intell. 2023;5(4):408–20. [Google Scholar]
  • 8.Li J, Chen J, Tang Y, Wang C, Landman BA, Zhou SK. Transforming medical imaging with Transformers? A comparative review of key properties, current progresses, and future perspectives. Med Image Anal. 2023;85:102762. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Skrede OJ, De Raedt S, Kleppe A, Hveem TS, Liestøl K, Maddison J, et al. Deep learning for prediction of colorectal cancer outcome: a discovery and validation study. Lancet. 2020;395(10221):350–60. [DOI] [PubMed] [Google Scholar]
  • 10.El Nahhas OSM, Loeffler CML, Carrero ZI, van Treeck M, Kolbinger FR, Hewitt KJ, et al. Regression-based Deep-Learning predicts molecular biomarkers from pathology slides. Nat Commun. 2024;15(1):1253. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Lee SH, Jang HJ. Deep learning-based prediction of molecular cancer biomarkers from tissue slides: A new tool for precision oncology. Clin Mol Hepatol. 2022;28(4):754–72. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.El Nahhas OSM, van Treeck M, Wölflein G, Unger M, Ligero M, Lenz T, et al. From whole-slide image to biomarker prediction: end-to-end weakly supervised deep learning in computational pathology. Nat Protoc. 2025;20(1):293–316. [DOI] [PubMed] [Google Scholar]
  • 13.Ma D, Pang J, Gotway MB, Liang J. A fully open AI foundation model applied to chest radiography. Nature. 2025;643(8071):488–98. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Xiang J, Wang X, Zhang X, Xi Y, Eweje F, Chen Y, et al. A vision–language foundation model for precision oncology. Nature. 2025;638(8051):769–78. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Wang J, Wang K, Yu Y, Lu Y, Xiao W, Sun Z, et al. Self-improving generative foundation model for synthetic medical image generation and clinical applications. Nat Med. 2025;31(2):609–17. [DOI] [PubMed] [Google Scholar]
  • 16.Topol EJ. Welcoming new guidelines for AI clinical research. Nat Med. 2020;26(9):1318–20. [DOI] [PubMed] [Google Scholar]
  • 17.Chang Q, Yan Z, Zhou M, Qu H, He X, Zhang H, et al. Publisher Correction: Mining multi-center heterogeneous medical data with distributed synthetic learning. Nat Commun. 2023;14(1):6765. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Finlayson SG, Subbaswamy A, Singh K, Bowers J, Kupke A, Zittrain J, et al. The Clinician and Dataset Shift in Artificial Intelligence. N Engl J Med. 2021;385(3):283–6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Moor M, Banerjee O, Abad ZSH, Krumholz HM, Leskovec J, Topol EJ, et al. Foundation models for generalist medical artificial intelligence. Nature. 2023;616(7956):259–65. [DOI] [PubMed] [Google Scholar]
  • 20.Yang J, Dung NT, Thach PN, Phong NT, Phu VD, Phu KD, et al. Generalizability assessment of AI models across hospitals in a low-middle and high income country. Nat Commun. 2024;15(1):8270. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Ganguli I, Simpkin AL, Lupo C, Weissman A, Mainor AJ, Orav EJ, et al. Cascades of Care After Incidental Findings in a US National Survey of Physicians. JAMA Netw open. 2019;2(10):e1913325. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Wang C, Chen B, Liang S, Shao J, Li J, Yang L, et al. China Protocol for early screening, precise diagnosis, and individualized treatment of lung cancer. Signal Transduct Target Therapy. 2025;10(1):175. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Swanson K, Wu E, Zhang A, Alizadeh AA, Zou J. From patterns to patients: Advances in clinical machine learning for cancer diagnosis, prognosis, and treatment. Cell. 2023;186(8):1772–91. [DOI] [PubMed] [Google Scholar]
  • 24.Yamashita R, Long J, Longacre T, Peng L, Berry G, Martin B, et al. Deep learning model for the prediction of microsatellite instability in colorectal cancer: a diagnostic study. Lancet Oncol. 2021;22(1):132–41. [DOI] [PubMed] [Google Scholar]
  • 25.Wagner SJ, Reisenbüchler D, West NP, Niehues JM, Zhu J, Foersch S, et al. Transformer-based biomarker prediction from colorectal cancer histology: A large-scale multicentric study. Cancer Cell. 2023;41(9):1650–e614. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Kurz A, Hauser K, Mehrtens HA, Krieghoff-Henning E, Hekler A, Kather JN, et al. Uncertainty Estimation in Medical Image Classification: Systematic Review. JMIR Med Inf. 2022;10(8):e36427. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Zou K, Chen Z, Yuan X, Shen X, Wang M, Fu H. A review of uncertainty estimation and its application in medical imaging. Meta-Radiology. 2023;1(1):100003. [Google Scholar]
  • 28.Mehrtash A, Wells WM, Tempany CM, Abolmaesumi P, Kapur T. Confidence Calibration and Predictive Uncertainty Estimation for Deep Medical Image Segmentation. IEEE Trans Med Imaging. 2020;39(12):3868–78. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Feiner LF, Menten MJ, Hammernik K, Hager P, Huang W, Rueckert D, et al. Propagation and Attribution of Uncertainty in Medical Imaging Pipelines. UNSURE. 2023;14297:1–11. [Google Scholar]
  • 30.Jiang R, Yin X, Yang P, Cheng L, Hu J, Yang J, et al. A transformer-based weakly supervised computational pathology method for clinical-grade diagnosis and molecular marker discovery of gliomas. Nat Mach Intell. 2024;6(8):876–91. [Google Scholar]
  • 31.Edupuganti V, Mardani M, Vasanawala S, Pauly J. Uncertainty Quantification in Deep MRI Reconstruction. IEEE Trans Med Imaging. 2021;40(1):239–50. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Polat G, Kani HT, Ergenc I, Ozen Alahdab Y, Temizel A, Atug O. Improving the Computer-Aided Estimation of Ulcerative Colitis Severity According to Mayo Endoscopic Score by Using Regression-Based Deep Learning. Inflamm Bowel Dis. 2023;29(9):1431–9. [DOI] [PubMed] [Google Scholar]
  • 33.Lu MY, Chen B, Williamson DFK, Chen RJ, Liang I, Ding T, et al. A visual-language foundation model for computational pathology. Nat Med. 2024;30(3):863–74. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Neidlinger P, El Nahhas OSM, Muti HS, Lenz T, Hoffmeister M, Brenner H, et al. Benchmarking foundation models as feature extractors for weakly supervised computational pathology. Nat Biomedical Eng. 2026;10(6):1113–23. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Wojke N. Bewley AJIWCoAoCV. Deep Cosine Metric Learning for Person Re-identification. 2018:748–56.
  • 36.Lu MY, Williamson DFK, Chen TY, Chen RJ, Barbieri M, Mahmood F. Data-efficient and weakly supervised computational pathology on whole-slide images. Nat Biomedical Eng. 2021;5(6):555–70. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Lee Y, Park JH, Oh S, Shin K, Sun J, Jung M, et al. Derivation of prognostic contextual histopathological features from whole-slide images of tumours via graph deep learning. Nat Biomedical Eng. 2022;6(12):1452–66. [DOI] [PubMed] [Google Scholar]
  • 38.Wang J, Yu Y, Tan Y, Wan H, Zheng N, He Z, et al. Artificial intelligence enables precision diagnosis of cervical cytology grades and cervical cancer. Nat Commun. 2024;15(1):4369. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 39.Xue P, Dang L, Kong L-H, Tang H-P, Xu H-M, Weng H-Y, et al. Deep learning enabled liquid-based cytology model for cervical precancer and cancer detection. Nat Commun. 2025;16(1):3506. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 40.Zhou Y, Chia MA, Wagner SK, Ayhan MS, Williamson DJ, Struyven RR, et al. A foundation model for generalizable disease detection from retinal images. Nature. 2023;622(7981):156–63. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 41.Zhang X, Li Q, Liang Y, Lai C, Cao J, Feng Y, et al. AI framework for multidisease detection via retinal imaging. Nat Med. 2026;32:2494–503. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Xue P, Tang C, Li Q, Li Y, Shen Y, Zhao Y, et al. Development and validation of an artificial intelligence system for grading colposcopic impressions and guiding biopsies. BMC Med. 2020;18(1):406. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 43.Ali S. Where do we stand in AI for endoscopic image analysis? Deciphering gaps and future directions. npj Digit Med. 2022;5(1):184. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 44.Chen RJ, Ding T, Lu MY, Williamson DFK, Jaume G, Song AH, et al. Towards a general-purpose foundation model for computational pathology. Nat Med. 2024;30(3):850–62. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 45.Xu Y, Wang Y, Zhou F, Ma J, Jin C, Yang S, et al. A multimodal knowledge-enhanced whole-slide pathology foundation model. Nat Commun. 2025;16(1):11406. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 46.Sharma AE, Kerr DA, Cipriani NA. Small biopsies in the head and neck: Bone and soft tissue. Semin Diagn Pathol. 2023;40(5):353–70. [DOI] [PubMed] [Google Scholar]
  • 47.Kümmerlin I, ten Kate F, Smedts F, Horn T, Algaba F, Trias I, et al. Diagnostic problems in the subtyping of renal tumors encountered by five pathologists. Pathol - Res Pract. 2009;205(1):27–34. [DOI] [PubMed] [Google Scholar]
  • 48.Ross E, Swallow J, Kerr A, Chekar CK, Cunningham-Burley S. Diagnostic layering: Patient accounts of breast cancer classification in the molecular era. Soc Sci Med. 2021;278:113965. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 49.Liu Z, Yuan Y, Zhang C, Zhu Q, Xu X, Yuan M, et al. Hierarchical classification of early microscopic lung nodule based on cascade network. Health Inform Sci Syst. 2024;12(1):13. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 50.Wang G, Li W, Ourselin S, Vercauteren T. Automatic Brain Tumor Segmentation Based on Cascaded Convolutional Neural Networks With Uncertainty Estimation. Front Comput Neurosci. 2019;13:56. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 51.Banerji CRS, Chakraborti T, Harbron C, MacArthur BD. Clinical AI tools must convey predictive uncertainty for each individual patient. Nat Med. 2023;29(12):2996–8. [DOI] [PubMed] [Google Scholar]
  • 52.Azizi S, Culp L, Freyberg J, Mustafa B, Baur S, Kornblith S, et al. Robust and data-efficient generalization of self-supervised machine learning for diagnostic imaging. Nat Biomedical Eng. 2023;7(6):756–79. [DOI] [PubMed] [Google Scholar]
  • 53.Kompa B, Snoek J, Beam AL. Second opinion needed: communicating uncertainty in medical machine learning. npj Digit Med. 2021;4(1):4. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 54.Fang Z, Johnston A, Cheuy LY, Na HS, Paschali M, Gonzalez C, et al. Automated real-time assessment of intracranial hemorrhage detection AI using an ensembled monitoring model (EMM). npj Digit Med. 2025;8(1):608. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 55.Myers PD, Ng K, Severson K, Kartoun U, Dai W, Huang W, et al. Identifying unreliable predictions in clinical risk models. npj Digit Med. 2020;3(1):8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 56.Wang G, Zhang K, Jiang J, Wang C, Bi H, Liang H, et al. Human–large language model collaboration in clinical medicine: a systematic review and meta-analysis. npj Digit Med. 2026;9(1):195. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 57.Chen M, Wang Y, Wang Q, Shi J, Wang H, Ye Z, et al. Impact of human and artificial intelligence collaboration on workload reduction in medical image interpretation. npj Digit Med. 2024;7(1):349. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 58.Zhang R, Gatsonis C, Steingrimsson JA. Role of calibration in uncertainty-based referral for deep learning. Stat Methods Med Res. 2023;32(5):927–43. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 59.Shao Z, Bian H, Chen Y, Wang Y, Zhang J, Ji X, Transmil. Transformer based correlated multiple instance learning for whole slide image classification. Adv Neural Inf Process Syst. 2021;34:2136–47. [Google Scholar]
  • 60.Ilse M, Tomczak J, Welling M, editors. Attention-based deep multiple instance learning. International conference on machine learning; 2018: PMLR.
  • 61.Hendrycks D, Mazeika M, Dietterich T. Deep anomaly detection with outlier exposure. arXiv preprint arXiv:181204606. 2018.
  • 62.Liu W, Wang X, Owens J, Li Y. Energy-based out-of-distribution detection. Adv Neural Inf Process Syst. 2020;33:21464–75. [Google Scholar]
  • 63.Maaten Lvd, Hinton GE. Visualizing Data using t-SNE. J Mach Learn Res. 2008;9:2579–605. [Google Scholar]
  • 64.Zhang M, Wong SW, Wright JN, Wagner MW, Toescu S, Han M, et al. MRI Radiogenomics of Pediatric Medulloblastoma: A Multicenter Study. Radiology. 2022;304(2):406–16. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 65.Shaikh N, Conway SJ, Kovacevic J, Condessa F, Shope TR, Haralam MA, et al. Development and Validation of an Automated Classifier to Diagnose Acute Otitis Media in Children. JAMA Pediatr. 2024;178(4):401–7. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 66.Zhou H-Y, Yu Y, Wang C, Zhang S, Gao Y, Pan J, et al. A transformer-based representation-learning model with unified processing of multimodal input for clinical diagnostics. Nat Biomedical Eng. 2023;7(6):743–55. [DOI] [PubMed] [Google Scholar]
  • 67.Lu MY, Chen B, Williamson DFK, Chen RJ, Zhao M, Chow AK, et al. A multimodal generative AI copilot for human pathology. Nature. 2024;634(8033):466–73. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 68.Huang Z, Bianchi F, Yuksekgonul M, Montine TJ, Zou J. A visual–language foundation model for pathology image analysis using medical Twitter. Nat Med. 2023;29(9):2307–16. [DOI] [PubMed] [Google Scholar]
  • 69.Fahrner LJ, Chen E, Topol E, Rajpurkar P. The generative era of medical AI. Cell. 2025;188(14):3648–60. [DOI] [PubMed] [Google Scholar]
  • 70.Chen RJ, Ding T, Lu MY, Williamson DFK, Jaume G, Song AH, et al. Towards a general-purpose foundation model for computational pathology. Nat Med. 2024;30(3):850–62. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 71.Müller H, Patel VL, Shortliffe EH, Jurisica I, Holzinger A. Seven deadly sins in artificial intelligence for digital medicine. npj Digit Med. 2026;540(9). [DOI] [PMC free article] [PubMed]
  • 72.Yang Z, Wei T, Liang Y, Yuan X, Gao R, Xia Y, et al. A foundation model for generalizable cancer diagnosis and survival prediction from histopathological images. Nat Commun. 2025;16(1):2366. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 73.Dekker E, Tanis PJ, Vleugels JLA, Kasi PM, Wallace MB. Colorectal cancer. Lancet. 2019;394(10207):1467–80. [DOI] [PubMed] [Google Scholar]
  • 74.Plass M, Holzinger A, Reihs R, Müller H. Integrating AI into clinical practice: Human-centered design requirements for next-generation sequencing workflows. Comput Med Imaging Graph. 2026;130:102758. [DOI] [PubMed] [Google Scholar]
  • 75.ODIR-2019. Ocular Disease Intelligent Recognition Dataset. Grand Challenge https://odir2019.grand-challenge.org/dataset (2019).
  • 76.Polat G, Kani HT, Ergenc I, Ozen Alahdab Y, Temizel A, Atug O. Labeled Images for Ulcerative Colitis (LIMUC) Dataset. Zenodo. 2022. 10.5281/zenodo.5827695. [DOI] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

12916_2026_5120_MOESM1_ESM.docx (777.6KB, docx)

Supplementary Material 1: Additional file 1: Figures S1–S4.

12916_2026_5120_MOESM2_ESM.docx (1.3MB, docx)

Supplementary Material 2: Additional file 2: Figures S1–S4.

12916_2026_5120_MOESM3_ESM.docx (356.5KB, docx)

Supplementary Material 3: Additional file 3: Tables S1–S69 and Algorithm S1.

Data Availability Statement

The source code of our model is publicly available at https://github.com/LexieK7/Error under the MIT License. Due to patient privacy obligations and institutional regulations, access to the whole slide images and annotation data used in this study is restricted. These datasets were obtained with institutional permissions via IRB (Institutional Review Board) approval and are therefore not publicly available. However, for non-commercial and academic purposes, interested parties may request access to the data supporting the findings of this study directly from the corresponding author. The publicly available ODIR-2019 [75] dataset can be downloaded from https://odir2019.grand-challenge.org/. The LIMUC [76] dataset is available from Zenodo (https://doi.org/10.5281/zenodo.5827695). The pre-trained CONCH model can be accessed at https://github.com/mahmoodlab/CONCH/tree/main .


Articles from BMC Medicine are provided here courtesy of BMC

RESOURCES