a Kaplan-Meier plot showing DRFS according to TLS ST signature quartiles in combined TNBC cohorts: ST TNBC (N = 92), METABRIC (N = 334), and SCAN-B (N = 518). The two-sided P value was obtained using the likelihood ratio test from a Cox regression stratified by study. b TLS ST signature levels by pCR status in TNBC (red) and luminal HR+/HER2− (orange) patients treated with paclitaxel plus pembrolizumab in I-SPY2 trial (N = 69). Two-sided P value was derived from the Wilcoxon test. Boxes represent the interquartile range (IQR), with the median shown as a bold horizontal line; whiskers extend to the most extreme data point within 1.5 times the IQR. c, d Predictions of PFS (N = 572) (c) and radiological response (RECIST) (N = 842) (d) using TLS ST signature and other reported signatures in metastatic non-breast cancers treated with immune checkpoint inhibitors. TLS ST signature: HR, FDR (p) for PFS (by Cox regression using log likelihood test, stratified by study) (c); OR, FDR (p) for RECIST (by logistic regression using Wald test, random effect by study) (d). FDR by Benjamini & Hochberg method to adjust two-sided P values. e Association of the TLS ST signature with PFS before and after adjusting for various immune signatures in metastatic non-breast cancers treated with immune checkpoint inhibitors (N = 572). f Association of different immune signatures with PFS after adjusting for the TLS ST signature in the same cohort (N = 572). Two-sided P values were derived from likelihood ratio tests on nested models. Significant P values (<0.05) are highlighted in blue. Circles represent HR, with error bars indicating the 95% confidence interval (CI). Source data are provided as a Source Data file. BC breast cancer, detox-iCAF detoxification pathway inflammatory cancer-associated fibroblast S1, DRFS distant relapse-free survival, GGI genomic grade index, HR hazard ratio, HR+ hormone receptor positive, IFNγ-iCAF interferon gamma signaling pathway cancer-associated fibroblast S1, OR odds ratio, PFS progression-free survival, Q1-4 quartiles 1–4, ST spatial transcriptomics, TAM tumor associated macrophages, TLS tertiary lymphoid structure, Trm tissue-resident memory T cell, VCpredTN veliparib carboplatin prediction triple negative.