Abstract
Background: Among solid malignancies, metastatic spread accounts for ~90% of cancer-related deaths. For unknown pulmonary lesions, accurate diagnosis is crucial for treatment. In diagnostically challenging cases like second primary tumor and cancer of unknown primary (CUP), traditional morphological analysis and immunohistochemistry (IHC) often remain inconclusive, delaying critical therapeutic intervention. Methods: We developed a deep learning model (DeepPMD) that makes predictions using H&E stained whole slide images and basic clinical data. The model was trained and validated on a single-center cohort of 793 patients, then externally validated on three additional cohorts totaling 1187 patients from independent centers. Results: DeepPMD achieved accurate prediction of tumor nature and site of origin, outperforming benchmarks in all tests. In external validation, the model achieved a macro-AUC of 0.974 (95% CI 0.949, 0.991) for origin prediction on excisional biopsies and 0.935 (95% CI 0.913, 0.953) on aspiration biopsies. Its diagnostic logic aligned with pathological criteria, and its CUP predictions showed high concordance with clinical predictions (consistency score 0.86). Conclusion: DeepPMD is an accurate, generalizable, and interpretable AI tool for identifying pulmonary tumor origins from WSIs. It can provide probability-ranked potential primary sites to guide targeted IHC testing, optimizing diagnostic workflow, shortening turnaround times, and conserving tissue samples.
Introduction
The lungs serve as a primary hub for cancer metastasis, with 20% to 54% of patients with extrathoracic malignancies eventually developing pulmonary metastases. When a clinician identifies a mass in the lung, the diagnostic stakes are exceptionally high: is this a new primary lung cancer, or a metastasis from a previous malignancy? The answer dictates the entire therapeutic trajectory, from surgical approach to systemic therapy selection.
Currently, pathologists rely on Immunohistochemistry (IHC) to determine a tumor's origin. While effective, IHC is expensive, time-consuming, and consumes precious, limited tissue samples—a significant drawback in the era of precision medicine where tissue must be conserved for molecular testing. In cases of "Cancer of Unknown Primary" (CUP), traditional methods often fail to provide a definitive answer, leading to treatment delays. DeepPMD (Deep Learning for Primary-Metastatic Differentiation) was developed to address these challenges by providing an automated, multimodal diagnostic aid.
The DeepPMD Framework
DeepPMD utilizes a multi-stage deep learning approach to mimic and enhance the diagnostic process of a human pathologist. The framework is built upon H-optimus-1, a massive vision foundation model pre-trained on over one million whole-slide images (WSIs), ensuring a robust capability for recognizing complex cellular patterns.
Unlike previous models that rely solely on visual data, DeepPMD incorporates patient-level clinical data, specifically age and gender. This multimodal integration allows the model to leverage clinical context, much like a pathologist would. The architecture employs a gated attention-based multiple instance learning (MIL) system with two parallel branches: one for binary classification (Primary vs. Metastatic) and another for six-class origin prediction (Lung, Gastrointestinal, Breast, Kidney, Liver, and Others).
Experimental Design and Multi-Center Validation
The study's strength lies in its rigorous validation across four independent medical centers in China. The discovery cohort from Southern Medical University included 773 patients, while external validation was conducted on three separate cohorts totaling 1,187 patients.
Crucially, the dataset included a variety of scanner brands and two distinct biopsy methods: excisional (surgical removal) and aspiration (needle-based). Aspiration biopsies are notoriously difficult for AI models due to fragmented tissue and lack of architectural context, yet they are increasingly common in clinical practice. DeepPMD was specifically tested to ensure robustness across these diverse clinical scenarios.
Key Results and Performance
DeepPMD demonstrated superior performance across all metrics, significantly outperforming the current state-of-the-art benchmark, TOAD.
- Accuracy and Generalization: In external validation, the model achieved a Macro-AUC of 0.974 for origin prediction on excisional biopsies. Even on challenging aspiration biopsies, it maintained a high Macro-AUC of 0.935.
- Specific Success: The model was exceptionally accurate in identifying renal (kidney) cancer, achieving an AUC of 0.999 on excisional samples.
- Solving the CUP Mystery: In cases of Cancer of Unknown Primary, DeepPMD achieved a consistency score of 0.86 with the eventual clinical diagnosis, a dramatic improvement over the TOAD model's score of 0.37.
- Interpretability: The model generates attention heatmaps that highlight microscopic regions driving its decisions. Analysis showed that DeepPMD focuses on established pathological features, such as "lepidic growth" in lung cancer or "dirty necrosis" in colorectal metastases, confirming that its logic aligns with human expertise.
Clinical Impact: The SmartPath System
To translate these findings into clinical practice, the authors introduced SmartPath. This system provides pathologists with a probability-ranked list of potential primary sites. By narrowing down the possibilities, SmartPath allows for a targeted, narrow IHC panel rather than a broad "shotgun" approach. This optimization shortens diagnostic turnaround times and preserves tissue for downstream genomic profiling.
Conclusion and Future Directions
DeepPMD represents a significant step forward in AI-assisted pathology. By combining a powerful vision foundation model with clinical "common sense," it offers a robust tool for differentiating primary and metastatic lung tumors. While the current model is limited to the six most common cancer origins and was validated primarily on Chinese populations, its success on diverse biopsy types and its high concordance with clinical outcomes in CUP cases suggest it could become a vital component of the modern oncological workflow. Future work will focus on expanding the range of identifiable origins and conducting prospective clinical trials to further validate its real-world utility.
Summary updated