Deep learning based semi-automated model can predict lineage in patients with pituitary neuroendocrine tumors

Wu Guo-qing, Z. Ning, Xiaorong Yan, Jianfang Li, Chao Ma, Haixia Cheng, Zixiang Cong, Junjun Li, Shengyu Sun, Yongfei Wang, Xingli Deng, Changzhen Jiang, Hong Chen, Hui Ma, Jinhua Yu, Nidan QiaoActa 2025

Abstract

Pituitary neuroendocrine tumors (PitNETs) represent the most prevalent category of neuroendocrine neoplasms. Contemporary classification paradigms emphasize transcription factor immunohistochemistry (IHC) as a cornerstone for molecular subtyping and risk stratification. However, the clinical adoption of this approach is hindered by the lack of standardized interpretative thresholds for antibody staining and limited global availability of specialized reagents, particularly in resource-limited settings. To address these challenges, we developed a semi-automated computational framework that predicts PitNET lineages directly from hematoxylin and eosin (H&E)-stained histology slides. The pipeline employs a dynamic confidence threshold: samples below this threshold undergo confirmatory IHC staining and manual pathological review, while those surpassing it are classified automatically. In prospective validation, this approach achieved a 68.9% reduction in diagnostic workload while maintaining 95.9% overall accuracy. Similar efficacy was observed in functional (74.4% workload reduction, 99.0% accuracy) and external (39.3% reduction, 95.1% accuracy) cohorts. Statistical analysis confirmed non-inferiority between semi-automated predictions and fully manual IHC-based evaluations in all the cohorts. Furthermore, we implemented a deep learning-based virtual IHC staining module, generating synthetic transcription factor images demonstrating high morphological concordance with ground-truth IHC slides. Notably, our computational analysis revealed distinct histomorphological correlates of lineages: SF1-lineage tumors exhibited homogeneous cellular architecture characterized by densely packed, compact cells with reduced cytoplasmic volume, whereas PIT1-lineage neoplasms displayed larger cells with expanded intercellular spacing and disorganized spatial arrangements.

Introduction

Pituitary neuroendocrine tumors (PitNETs) are the most common neuroendocrine neoplasms, and their accurate classification is vital for clinical management. Recent World Health Organization (WHO) guidelines have shifted the diagnostic focus toward molecular subtyping based on specific transcription factors: SF1, TPIT, and PIT1. These lineages are critical for risk stratification, as certain subtypes exhibit significantly more aggressive clinical behavior than others.

Despite its importance, the current gold standard—immunohistochemistry (IHC) staining—presents significant practical hurdles. IHC requires expensive, specialized reagents that are often unavailable in resource-constrained environments. Furthermore, the process is time-consuming and prone to interobserver variability due to the lack of standardized interpretation thresholds. This study introduces a deep learning-based framework designed to predict these molecular lineages directly from standard, low-cost Hematoxylin and Eosin (H&E) histology slides, potentially revolutionizing the speed and accessibility of PitNET diagnostics.

Methods

Computational Pipeline and Feature Extraction

The developed pipeline processes Whole Slide Images (WSIs) of H&E-stained tissue through a multi-stage approach. Given the gigapixel scale of WSIs, the system first employs Otsu thresholding to isolate tissue areas from the background. The tissue is then divided into 256x256 pixel patches. To minimize computational redundancy while ensuring representative sampling, the researchers applied K-means clustering to the patches, selecting the most informative tiles for further analysis.

Figure 1: Visualization of the Whole Slide Image (WSI) processing pipeline, showing tissue segmentation and patch extraction for deep learning analysis.

Feature extraction is performed using a hybrid CTransPath encoder, which integrates a Convolutional Neural Network (CNN) with a multi-scale Swin Transformer. This architecture, pre-trained on a vast repository of pathology images, generates 768-dimensional feature vectors. An attention-based fusion mechanism then dynamically weights these patches, aggregating them into a final slide-level prediction.

Semi-Automated Triage System

A core innovation of this study is the "semi-automated" triage system. Rather than providing a forced-choice classification for every slide, the model generates a confidence index (ranging from 0 to 1). Slides with high-confidence scores (e.g., >0.8) are automatically classified. Slides falling below this threshold are flagged for manual review and traditional IHC staining by a pathologist. This "human-in-the-loop" design ensures that the AI acts as a high-efficiency filter without sacrificing diagnostic rigor.

Results and Validation

The model was validated across four independent cohorts to ensure robustness and generalizability:

  1. Training/Internal Validation: 1,328 patients from Huashan Hospital.
  2. Prospective Validation: 268 patients (2022 onwards).
  3. Functional Cohort: 256 patients with functional PitNETs.
  4. External Validation: 206 patients from four geographically distinct centers.

In the prospective cohort, the semi-automated approach reduced the IHC staining workload by 68.9% while maintaining a 95.9% overall accuracy. Performance was even higher in the functional cohort, which saw a 74.4% workload reduction and 99.0% accuracy. Even in the external cohort, which introduced variability in staining and scanning equipment, the model maintained 95.1% accuracy with a 39.3% workload reduction by adjusting the confidence threshold to 0.9. Statistical analysis confirmed that these semi-automated results were non-inferior to fully manual IHC-based evaluations.

Discussion and Insights

Explainability and Virtual IHC

The model's attention mechanism provides inherent interpretability. By generating heatmaps of high-attention areas, the researchers demonstrated that the AI focuses on regions that mirror physical IHC staining patterns. This "virtual immunostaining" capability allows pathologists to visualize the morphological drivers of the AI's decision.

Biological Discovery

Beyond diagnostic utility, the AI revealed subtle morphological features distinguishing the lineages. SF1-lineage tumors were found to have densely packed, compact cells with low cytoplasmic volume. In contrast, PIT1-lineage neoplasms were characterized by larger cells and more disorganized, expanded intercellular spacing. These findings suggest that deep learning can uncover histopathological patterns that are difficult for the human eye to quantify consistently.

Economic Impact

Implementing this framework offers substantial cost benefits. For a mid-sized clinical center processing 200 cases annually, the authors estimate a reduction in diagnostic costs from 120,000 CNY to approximately 80,200 CNY, accounting for both hardware and operational expenses.

Conclusion

This semi-automated deep learning framework provides a scalable, cost-effective solution for PitNET lineage prediction. By successfully triaging cases and maintaining high accuracy across diverse cohorts, the model demonstrates the potential of AI to alleviate the diagnostic burden on pathology departments while improving the accessibility of precision medicine in neuro-oncology.

Summary updated

BibTeX
@inproceedings{guoqing2025deep,
  author = {WU Guo-qing and Z. Ning and Xiaorong Yan and Jianfang Li and Chao Ma and Haixia Cheng and Zixiang Cong and Junjun Li and Shengyu Sun and Yongfei Wang and Xingli Deng and Changzhen Jiang and Hong Chen and Hui Ma and Jinhua Yu and Nidan Qiao},
  title = {{Deep learning based semi-automated model can predict lineage in patients with pituitary neuroendocrine tumors}},
  booktitle = {Acta},
  year = {2025},
  doi = {10.1186/s40478-025-02104-x},
}
Figure