Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Mar 19;9(1):76.
doi: 10.1038/s41698-025-00866-0.

Prediction and analysis of tumor infiltrating lymphocytes across 28 cancers by TILScout using deep learning

Affiliations

Prediction and analysis of tumor infiltrating lymphocytes across 28 cancers by TILScout using deep learning

Huibo Zhang et al. NPJ Precis Oncol. .

Abstract

The density of tumor-infiltrating lymphocytes (TILs) serves as a valuable indicator for predicting anti-tumor responses, but its broad impact across various types of cancers remains underexplored. We introduce TILScout, a pan-cancer deep-learning approach to compute patch-level TIL scores from whole slide images (WSIs). TILScout achieved accuracies of 0.9787 and 0.9628, and AUCs of 0.9988 and 0.9934 in classifying WSI patches into three categories-TIL-positive, TIL-negative, and other/necrotic-on validation and independent test sets, respectively, surpassing previous studies. The biological significance of TILScout-derived TIL scores across 28 cancers was validated through comprehensive functional and correlational analyses. A consistent decrease in TIL scores with an increase in cancer stage provides direct evidence that the lower TIL content may stimulate cancer progression. Additionally, TIL scores correlated with immune checkpoint gene expression and genomic variation in common cancer driver genes. Our comprehensive pan-cancer survey highlights the critical prognostic significance of TILs within the tumor microenvironment.

PubMed Disclaimer

Conflict of interest statement

Competing interests: The authors declare no competing interests.

Figures

Fig. 1
Fig. 1
Workflow of model training and TIL score prediction.
Fig. 2
Fig. 2. Performance of the InceptionResNetV2 model and examples of patch prediction and patch-level TIL map construction.
A InceptionResNetV2 model performance using 10-fold cross-validation. The fold-9 model was selected for optimal performance (with the highest accuracy and lowest loss value). B Confusion matrix of the fold-9 InceptionResNetV2 model on the validation set. 0, TIL-positive patches; 1, TIL-negative patches; 2, non-tumor/necrotic patches. C kernel density estimation of TIL scores across all samples. The red dotted line marks the TIL scores corresponding to the highest density. D Examples of explaining individual predictions by SHAP visualization. SHAP values for each imputed feature (RGB values of each pixel) were computed and visualized according to the trained model. Positive values indicate a positive contribution to the prediction, while negative values indicate a negative contribution. E Two examples of WSIs, patch prediction and patch-level TIL map construction. Different colors mark different patch labels according to prediction results. A patch-level TIL map was constructed according to the positions of each patch within the WSI.
Fig. 3
Fig. 3. Pan-cancer analysis of TIL scores.
A TIL score distribution across 28 cancer types. Blue dashed line: the average TIL score across all cancer types; blue dots: mean values of TIL scores for each cancer type. B Correlations between TIL score and clinical features. Color-filled squares indicate a significant relationship between TIL scores and features (Kruskal–Wallis test, P < 0.05). Grey squares indicate that no information about these features was provided for the corresponding cancer types. C Correlations between TIL scores and immune cell fractions. PCCs Pearson correlation coefficients. Color-filled squares indicate significant relationships (P < 0.05). D Forest plots of survival analysis. HR values below and greater that 1 indicate that TIL scores are associated with a decrease and increase in the risk of death (OS and DSS) or recurrence (PFI), respectively. 95% CI 95% confidence interval (CI) of HR. Blue squares indicate significant effects of TIL scores on outcomes (OS, DSS, PFI) (the upper 95% CI less than 1). I2 inter-group heterogeneity test index, assessing the degree of variability among studies (different cancer types in our study) that was attributable to heterogeneity rather than to chance,. A value of P > 0.1 indicates a lack of heterogeneity among effects (different cancer types). A fixed-effects model was used if the P-value of I2 was greater than 0.1, otherwise, a random-effects model was considered. The size of the square represents the weight or contribution of each cancer type to the overall effect estimate. E Pearson correlations between TIL score and expressions of immune checkpoint genes (ICGs). Color-filled circles indicate a significant relationship (P < 0.05). F TIL score distribution in different stages across 25 cancer types. A P < 0.05 indicates that TIL score distribution has a significant difference. “*”, P < 0.05; “**”, P < 0.01; “***”, P < 0.001. G Correlations between TIL scores and Immune scores, TIDE scores, IPS and TMB values. The vertical solid line is the dividing line where the P-value equals 0.05. Cancer types with P < 0.05 are labeled. H Correlations between TIL scores and OS-based TME risk scores. The vertical solid line is the dividing line where the P-value equals 0.05. Cancer types with P < 0.05 are labeled.
Fig. 4
Fig. 4. Gene Set Enrichment Analysis.
NES normalized enrichment score. Z-NES, Z-score normalized NES.
Fig. 5
Fig. 5. Effects of SNVs and CNVs of 25 cancer driver genes on TIL score distributions.
A Effects of SNV on TIL score distributions. TIL scores were compared in SNV and non-SNV patient groups. B Effects of CNV (copy deletion) on TIL score distributions. TIL scores were compared in the deletion and non-deletion patient groups. C Effects of CNV (copy amplification) on TIL score distributions. TIL scores were compared in the amplification and non-amplification patient groups. Color-filled squares indicate significant differences in TIL score distributions for two groups (SNV and non-SNV, CNV and non-CNV) (t-test). Gray squares indicate the number of SNV and CNV cases for a gene in a cancer type is 0. Filled numbers represent the patient numbers and proportions of CNV or SNV for each gene in each cancer type. “*”, P < 0.05; “**”, P < 0.01; “***”, P < 0.001.
Fig. 6
Fig. 6. Performance of different prognostic models for predicting OS in CESC, LIHC, LUAD, SARC, and SKCM.
M0, effects of TIL scores on OS; M1, prognostic models based on clinical data only; M2, prognostic models established by clinical data combined with TIL scores. A C-indices of M1 and M2 in each cancer type in a five-fold cross-validation. Horizontal lines indicate average C-indices across all cancer types for two types of models. B Kaplan–Meier curves of patient stratification for OS across different cancer types under different models. M0, Effects of TIL scores on OS. C The corresponding average aggregated SurvSHAP(t) values of each variable for M2 models. SurvSHAP(t) is a kind of time-dependent explanations of machine learning survival models. An aggregated SurvSHAP(t) value of one variable represents its importance measure in one case. Average aggregated SurvSHAP(t) value of one variable represents its global importance across all samples in the model.

Similar articles

Cited by

References

    1. Binnewies, M. et al. Understanding the tumor immune microenvironment (TIME) for effective therapy. Nat. Med.24, 541–550 (2018). - PMC - PubMed
    1. Hinshaw, D. C. & Shevde, L. A. The tumor microenvironment innately modulates cancer progression. Cancer Res.79, 4557–4566 (2019). - PMC - PubMed
    1. Wu, T. & Dai, Y. Tumor microenvironment and therapeutic response. Cancer Lett.387, 61–68 (2017). - PubMed
    1. Stanton, S. E. & Disis, M. L. Clinical significance of tumor-infiltrating lymphocytes in breast cancer. J. Immunother. Cancer4, 59 (2016). - PMC - PubMed
    1. Tramm, T. et al. Tumor-infiltrating lymphocytes predict improved overall survival after post-mastectomy radiotherapy: a study of the randomized DBCG82bc cohort. Acta Oncol.61, 153–162 (2022). - PubMed

LinkOut - more resources