A multi-task and explainable swin transformer framework for cross-scale computational pathology in gastrointestinal cancer

Background: Accurate identification and segmentation of tumor and microenvironment features in gastrointestinal cancer (GC) pathology images are crucial for diagnosis, yet challenging for traditional methods. This study aims to develop and validate a deep learning (ML) framework integrating multi-task learning and interpretability mechanisms for cross-scale automatic classification and segmentation of tumor and microenvironmental structures in gastrointestinal cancer histopathological patches, and to evaluate its robustness, output consistency, and decision transparency under controlled benchmark settings. Methods: We constructed a multi-task learning (MTL) model integrating Swin Transformer, DeepLabV3+, and R2U-Net for joint classification and segmentation. The model was trained and validated on approximately 99,000 H&E-stained images from the GasHisSDB and GCHTID datasets. Preprocessing included color normalization and quality control. Performance was evaluated via five-fold cross-validation. Explainability was assessed using Grad-CAM, Score-CAM, and Layer-wise Relevance Propagation (LRP), with validation from pathology experts. Results: The multi-task model achieved a classification F1-score of 0.938 ± 0.007 and a segmentation Dice coefficient of 0.839 ± 0.009 on the test set. Compared with ResNet-50, Swin-T obtained higher classification performance, with improved F1-score (0.945 vs. 0.917) and AUC (0.965 vs. 0.907). For small-volume tissues, the LYM Dice reached 0.781. In cross-domain transfer from GCHTID to GasHisSDB, the model achieved an F1-score of 0.902. Under staining perturbations, the Dice decreased by only 2.4%, and Grad-CAM correlation reached r = 0.86. The expert-model agreement rate (EMAR) was 0.864, with a Cohen's κ of 0.79. Conclusion: The proposed cross-scale multi-task Transformer framework achieves high-precision recognition and multi-component segmentation of gastrointestinal cancer histopathological images, demonstrating stability and interpretability across scale variations, cross-dataset evaluations, and staining perturbation tests. Overall, this study emphasizes the establishment and validation of a methodological paradigm integrating multi-task joint learning, cross-scale generalization assessment, and interpretable evidence review. As the current validation was conducted under controlled benchmark conditions using strongly annotated patch-level data, the framework should be regarded as a clinically relevant, preclinical validation system. Its feasibility for routine clinical implementation requires further verification through large-scale whole-slide image (WSI) cohorts, prospective multicenter studies, and workflow integration assessments.

Authors

Institutions

Publication Details

Journal
Frontiers in Oncology
Published
2026-04-21
DOI
https://doi.org/10.3389/fonc.2026.1749675
Primary Topic
AI in cancer detection
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A multi-task and explainable swin transformer framework for cross-scale computational pathology in gastrointestinal cancer

Xiaoyun Wang, Ting Yang, Qing-Chun Feng, Hai-Long Guo
Frontiers in Oncology
AI in cancer detection
article

A multi-task and explainable swin transformer framework for cross-scale computational pathology in gastrointestinal cancer

Xiaoyun Wang, Ting Yang, Qing-Chun Feng, Hai-Long Guo
article en

Abstract

Background: Accurate identification and segmentation of tumor and microenvironment features in gastrointestinal cancer (GC) pathology images are crucial for diagnosis, yet challenging for traditional methods. This study aims to develop and validate a deep learning (ML) framework integrating multi-task learning and interpretability mechanisms for cross-scale automatic classification and segmentation of tumor and microenvironmental structures in gastrointestinal cancer histopathological patches, and to evaluate its robustness, output consistency, and decision transparency under controlled benchmark settings. Methods: We constructed a multi-task learning (MTL) model integrating Swin Transformer, DeepLabV3+, and R2U-Net for joint classification and segmentation. The model was trained and validated on approximately 99,000 H&E-stained images from the GasHisSDB and GCHTID datasets. Preprocessing included color normalization and quality control. Performance was evaluated via five-fold cross-validation. Explainability was assessed using Grad-CAM, Score-CAM, and Layer-wise Relevance Propagation (LRP), with validation from pathology experts. Results: The multi-task model achieved a classification F1-score of 0.938 ± 0.007 and a segmentation Dice coefficient of 0.839 ± 0.009 on the test set. Compared with ResNet-50, Swin-T obtained higher classification performance, with improved F1-score (0.945 vs. 0.917) and AUC (0.965 vs. 0.907). For small-volume tissues, the LYM Dice reached 0.781. In cross-domain transfer from GCHTID to GasHisSDB, the model achieved an F1-score of 0.902. Under staining perturbations, the Dice decreased by only 2.4%, and Grad-CAM correlation reached r = 0.86. The expert-model agreement rate (EMAR) was 0.864, with a Cohen's κ of 0.79. Conclusion: The proposed cross-scale multi-task Transformer framework achieves high-precision recognition and multi-component segmentation of gastrointestinal cancer histopathological images, demonstrating stability and interpretability across scale variations, cross-dataset evaluations, and staining perturbation tests. Overall, this study emphasizes the establishment and validation of a methodological paradigm integrating multi-task joint learning, cross-scale generalization assessment, and interpretable evidence review. As the current validation was conducted under controlled benchmark conditions using strongly annotated patch-level data, the framework should be regarded as a clinically relevant, preclinical validation system. Its feasibility for routine clinical implementation requires further verification through large-scale whole-slide image (WSI) cohorts, prospective multicenter studies, and workflow integration assessments.

Frontiers in OncologyVol. 16
Jiading District Central Hospital (CN)
Peace, Justice and strong institutions
Openalex Percentile: Top 19%
AI in cancer detection
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.