Introduction

Surgical intervention remains the primary treatment modality for resectable non-small cell lung cancer (NSCLC) patients. Despite this, approximately 50–60% of patients experience recurrence within five years post-surgery1,2. The five-year survival rate for early-stage NSCLC post-recurrence exceeds 70%, whereas it plummets to less than 30% for locally advanced stages3. Identifying patients at high risk of early recurrence is crucial, as it allows for timely therapeutic intervention to control tumor progression and reduce mortality. CD8+ tissue-resident memory T cells (CD8+TRM) are pivotal regulators within the tumor microenvironment and are postulated to be the primary tumor-reactive CD8+ T cells in human malignancies. However, their prognostic value remains contentious4,5,6,7. Preclinical studies suggest that the antitumor immune efficacy of CD8+TRM may be contingent upon their activation state and spatial distribution4,8,9,10,11.

Elevated expression of PD-1 or TIM-3 on CD8+TRM is often indicative of heightened protective immunity and immunological surveillance4,8,9,10. Yet, the prognostic implications of CD8+TRM in different NSCLC stages, characterized by diverse activation states, remain elusive. Spatial distribution encompasses both anatomical localization and cell–cell interactions12,13,14,15. Anatomical localization refers to primary lesions and tumor-draining lymph nodes (TDLN). Traditionally, the invasion margin (IM) of the primary lesion has been regarded as the frontline of antitumor response compared to the tumor center (TC)16,17. Recent studies, however, highlight the significance of tumor-specific memory CD8+T cells derived from the TDLN as key responders for prognosis and PD-1/PD-L1 immunotherapy responses18,19. Notably, CD8+TRM cells can exert their antitumor effects either by directly attacking cancer cells or by indirectly facilitating the recruitment of activated cytotoxic T cells to the tumor site20,21,22. Hence, elucidating the interactions between tumor-specific CD8+TRM and tumor cells is paramount. Overall, identifying the tumor-reactive CD8+TRM subpopulations and their anatomical activation sites in NSCLC patients may enhance the precision of prognostic predictions across different NSCLC stages.

Therefore, this study utilizes multiplex immunohistochemistry (mIHC) data analysis to deeply investigate the activation state and spatial localization of CD8+TRM cells in the primary tumor and TDLN microenvironment of NSCLC. It aims to assess the differences in the quantity of different CD8+TRM functional subsets and their proximity to tumor cells during disease progression, and explore their stage-dependent prognostic value to guide postoperative recurrence risk stratification for patients.

Results

Clinical and pathological characteristics of patients

The clinical and pathological characteristics of 271 NSCLC patients are summarized in Table 1. Of these patients, early-stage (IA-IIA) and locally advanced-stage (IIB-IIIB) NSCLC accounted for 62.7% (170/271) and 37.3% (101/271), respectively. There were no significant differences in age, gender, or smoking index between the two groups (all P > 0.05). However, the incidence of lung squamous cell carcinoma (LUSC) was significantly higher in the locally advanced group compared to the early-stage group (49.5% vs 25.3%, P < 0.001). The 5-year recurrence rates for early and locally advanced NSCLC were 44.7% and 60.4%, respectively (P = 0.017), and the 5-year OS was 14.7% and 29.7% (P = 0.005), respectively. The baseline characteristics of patients with early and locally advanced NSCLC are detailed in Supplementary Tables 1 and 2, respectively. The overall study design is illustrated in Fig. 1.

Table 1 Patient characteristics
Fig. 1: Workflow diagram.
Fig. 1: Workflow diagram.
Full size image

Source of samples from non-small cell lung cancer patients and preparation of tissue microarrays (a). Multispectral images of multicolor immunofluorescence staining (b) and schematic representation of defined cell characterization density and proximity (c). Pattern diagram illustrating the density and spatial distribution changes of different activation states of CD8+ tissue-resident memory T cells as the tumor progresses (d) and their prognostic stratification outcomes (e). TC tumor center, IM invasion margin, TDLN tumor-draining lymph nodes, CD8+ TRM CD8+ tissue-resident memory T cells, CD8+ TRM1 PD-1TIM-3CD8+ TRM, CD8+ TRM2 PD-1+TIM-3CD8+ TRM, CD8+ TRM3 PD-1TIM-3+CD8+ TRM, CD8+ TRM4 PD-1+TIM-3+CD8+ TRM.

Increased infiltration of CD8+TRM3&4 in the IM region of locally advanced NSCLC compared to early-stage

To elucidate the dynamic alterations in the activation states of CD8+TRM during the progression of NSCLC, we conducted a comparative analysis of the density differences of tumor-specific CD8+TRM within the IM and TC of early-stage vs locally advanced NSCLC.

Marker colocalization was used to identify tumor cells (CD8CK+), CD8+ T cells (CD8+T, CD8+CK), tissue-resident memory CD8+ T cells (CD8+TRM, CD103+CD8+CK), PD-1TIM-3CD8+ TRM (CD8+TRM1, PD-1TIM-3CD103+CD8+CK), PD-1+TIM-3CD8+TRM (CD8+TRM2, PD-1+TIM-3CD103+CD8+CK), PD-1TIM-3+CD8+TRM (CD8+TRM3, PD-1TIM-3+CD103+CD8+CK), and PD-1+TIM-3+CD8+TRM (CD8+TRM4, PD-1+TIM-3+CD103+CD8+CK).

In the IM region, we observed a significantly higher density of CD8+TRM in locally advanced NSCLC compared to early-stage NSCLC (35 [15,58] vs 24 [11,44], P < 0.001) (Fig. 2a). This increase was particularly pronounced in the CD8+TRM3 and CD8+TRM4 subsets (CD8+TRM3: 7 [2,14] vs 4 [1,8], P = 0.003; CD8+TRM4: 5 [1,12] vs 3 [1,7], P = 0.025) (Fig. 2a–c). Conversely, the densities of CD8+TRM1 and CD8+TRM2 subsets did not exhibit statistically significant differences (CD8+TRM1: 13 [8,25] vs 11 [5,21], P = 0.059; CD8+TRM2: 2 [1,4] vs 3 [1,6], P = 0.285) (Fig. 2a and Supplementary Table 3). Within the TC region, locally advanced NSCLC maintained consistent infiltration levels of overall CD8+TRM, as well as CD8+TRM1&3&4 (Fig. 2d–f). Although statistical analysis indicated a lower density of CD8+TRM2 in locally advanced NSCLC, the median values [Q1, Q3] for both locally advanced and early-stage NSCLC were 1 [0, 1] and 1 [0, 3], respectively, suggesting no significant difference (Supplementary Table 3).

Fig. 2: Individual plots and representative images of the density of CD8+TRM in different activation states in NSCLC at different stages.
Fig. 2: Individual plots and representative images of the density of CD8+TRM in different activation states in NSCLC at different stages.
Full size image

Differences in CD8+TRM and its subsets in the invasive margin (IM) areas between early-stage and locally advanced non-small cell lung cancer (ac). Differences in CD8+TRM and its subsets in the tumor center (TC) region between early-stage and locally advanced NSCLC (df). Scale bar, 200 μm. CD8+TRM CD8+ tissue-resident memory T cells, CD8+TRM1 PD-1TIM-3CD8+TRM, CD8+ TRM2 PD-1+TIM-3CD8+TRM, CD8+TRM3 PD-1TIM-3+CD8+TRM, CD8+TRM4 PD-1+TIM-3+CD8+TRM.

Subgroup analyses of LUSC and lung adenocarcinoma (LUAD) revealed that the aforementioned differences were not significant within these specific histological subtypes (Supplementary Tables 4 and 5). These findings imply that during the progression of NSCLC, the activation states of memory function-possessing, tissue-resident CD8 cells within the tumor microenvironment undergo significant alterations, particularly within the IM region.

Descriptive analysis of CD8+TRM3&4 infiltration in TDLN+ compared to TDLN−

The metastasis of cancer cells to lymph nodes is a common early manifestation of tumor progression. We delved deeper into the differences in the infiltration of tumor-specific CD8+TRM between TDLN that were negative (TDLN−) and positive (TDLN+) for tumor involvement. We employed mIHC staining on TDLNs from 5 NSCLC patients (TDLN+: n = 3; TDLN−: n = 2) (Fig. 3a). Given the heterogeneity of immune cell infiltration within lymph nodes, we conducted quantitative assessments of CD8+TRM subsets across 11 regions of interest (ROIs) in these 5 TDLNs, comprising 5 ROIs from 2 TDLN− and 6 ROIs from 3 TDLN+.

Fig. 3: Multiple immunohistochemical and cellular characterization images of negative tumor-draining lymph nodes (TDLN−) and positive TDLN (TDLN+).
Fig. 3: Multiple immunohistochemical and cellular characterization images of negative tumor-draining lymph nodes (TDLN−) and positive TDLN (TDLN+).
Full size image

Multiple immunohistochemical images of TDLN− and TDLN+ (a). Differences in infiltration of each CD8 subpopulation in lymph node specimens of TDLN− and TDLN+ (b). Scale bar, 100 μm. CD8+TRM CD8+ tissue-resident memory T cells, CD8+TRM1 PD-1TIM-3CD8+TRM, CD8+TRM2 PD-1+TIM-3CD8+TRM, CD8+TRM3 PD-1TIM-3+CD8+TRM, CD8+TRM4 PD-1+TIM-3+CD8+TRM.

As depicted in Fig. 3b, the densities of CD8+TRM were relatively low in both TDLN− and TDLN+ (TDLN−: 4 [1,5]; TDLN+: 8 [7,26]). Upon further subdivision into subsets, we observed that CD8+TRM in TDLN− were predominantly CD8+TRM3 (4 [1,5]). Similarly, in TDLN+, the majority of CD8+TRM were also CD8+TRM3 (5 [4,24]), with a minority being CD8+TRM4 (2 [1,2]). Due to the limited number of ROIs, statistical analysis was not performed. These findings suggest that there are distinct functional states of CD8+TRM in TDLN− and TDLN+. The presence of TDLN+ may also play a crucial role in the anti-tumor response in cancer patients.

The high density of CD8+TRM4 in early-stage NSCLC patients may be associated with recurrence

To further elucidate the prognostic significance of specific CD8+TRM subsets within primary lesions at various stages of NSCLC, we analyzed the density differences of functionally distinct CD8+TRM between patients with and without recurrence, aiming to identify recurrence-associated CD8+TRM subpopulations (Supplementary Table 6). In the early IM region of NSCLC patients, the density of CD8+TRM4 in recurrent patients was slightly higher than in non-recurrent patients (4 [2,10] vs 3 [1,6], P = 0.026), with a consistent trend observed in early LUAD (4 [2,10] vs 2 [0, 5], P = 0.006). However, due to small intergroup differences, these data did not undergo further Cox regression analysis. Importantly, in locally advanced NSCLC, the different activation states of CD8+TRM were not associated with recurrence.

Diminished interaction between CD8+TRM2&4 and tumor cells in IM and TC regions during tumor progression

We further investigated the heterogeneity of spatial interactions between CD8+TRM and tumor cells within primary lesions at early and locally advanced stages of NSCLC. Interaction was quantified by proximity, defined as the number of tumor cells having at least one CD8+TRM phenotype within 30 microns, with higher proximity indicating potentially frequent contact between CD8+TRM and tumor cells.

In the IM region (Fig. 4a, b), the CD8+TRM-tumor cell proximity was significantly lower in locally advanced NSCLC compared to early-stage NSCLC (239 [99, 389] vs 310 [148, 633], P = 0.009). The reduction in contact was primarily observed in CD8+TRM2 (17 [5,51] vs 50 [14, 116], P < 0.001), followed by CD8+TRM4 (48 [8, 109] vs 58 [18, 167], P = 0.044). There was no significant change in the proximity of CD8+TRM1 and CD8+TRM3 to tumor cells (125 [40, 281] vs 167 [60, 314], P = 0.136; 46 [10, 102] vs 56 [18, 138], P = 0.063). Similarly, in the TC region (Fig. 4a, c), the proximity of CD8+TRM-tumor cells was also lower in locally advanced compared to early-stage NSCLC (245 [85, 529] vs 364 [159, 918], P = 0.008). Significant reductions were noted in the proximity of CD8+TRM1, CD8+TRM2, and CD8+TRM4 within 30 microns of tumor cells (CD8+TRM1: 72 [20, 230] vs 152 [46, 404], P = 0.001; CD8+TRM2: 9 [0, 33] vs 42 [10, 130], P < 0.001; CD8+TRM4: 85 [16, 167] vs 124 [20, 317], P = 0.031), while the proximity of CD8+TRM3 remained unchanged (62 [21, 195] vs 74 [19, 219], P = 0.916).

Fig. 4: Spatial interactions between CD8+ T cells and tumor cells change dynamically with the progression of non-small cell lung cancer (NSCLC).
Fig. 4: Spatial interactions between CD8+ T cells and tumor cells change dynamically with the progression of non-small cell lung cancer (NSCLC).
Full size image

Radar plots comparing the spatial distribution patterns of early and intermediate-late NSCLC in the invasive margin (IM) (a, left) and tumor center (TC) (a, right) regions by nonparametric tests, highlighting important findings, with the blue font representing attenuated spatial interactions in intermediate and late stages compared to early stages. *P < 0.05, **P < 0.01, ***P < 0.001. Representative multiplex immunofluorescence plots depicting the spatial distances of CD8+TRM-tumor cells between early and middle-to-late-stage NSCLC in IM (b) and TC (c). Scale bar, 100 μm. IM invasion margin, TC tumor center, CD8+TRM CD8+ tissue-resident memory T cells, CD8+TRM1 PD-1TIM-3CD8+TRM; CD8+TRM2 PD-1+TIM-3CD8+TRM, CD8+TRM3 PD-1TIM-3+CD8+TRM, CD8+TRM4 PD-1+TIM-3+CD8+TRM.

Fig. 5: The impact of CD8+ TRM functional subsets on 5-year RFS in early-stage NSCLC patients.
Fig. 5: The impact of CD8+ TRM functional subsets on 5-year RFS in early-stage NSCLC patients.
Full size image

In patients with early-stage lung squamous cell carcinoma, ROC curves for IM CD8+TRM, IM CD8+TRM1, IM CD8+TRM2, and IM CD8+TRM3 proximities are presented (a), along with a multifactorial Cox regression forest plot incorporating IM CD8+TRM2 proximity and clinicopathological characteristics (b). For early-stage lung squamous cell carcinoma patients, ROC curves for TC and IM CD8+TRM4 proximities are depicted (c), accompanied by a multifactorial Cox regression forest plot including TC CD8+TRM4 proximity and clinicopathological characteristics (d). LUSC lung squamous cell carcinoma, LUAD lung adenocarcinoma, IM invasion margin, TC tumor center, ROC receiver operating characteristic, AUC area under the curve, HR hazard ratio, CI confidence interval, CD8+TRM CD8+ tissue-resident memory T cells, CD8+TRM1 PD-1TIM-3CD8+TRM, CD8+TRM2 PD-1+TIM-3CD8+TRM, CD8+TRM3 PD-1TIM-3+CD8+TRM, CD8+TRM4 PD-1+TIM-3+CD8+TRM.

Histological subgroup analyses revealed that, in LUSC (Supplementary Table 7), despite the overall unchanged proximity of CD8+TRM-tumor cells in IM and TC regions with disease progression, the proximity of CD8+TRM2 to tumor cells was significantly lower (IM CD8+TRM2 proximity: 22 [8,62] vs 45 [17, 122], P = 0.044; TC CD8+TRM2 proximity: 5 [0, 32] vs 43 [14,88], P = 0.004). A similar trend was observed in LUAD, consistent with overall patient data (Supplementary Table 8). In conclusion, tumor progression is associated with a diminished interaction between CD8+TRM and tumor cells in both IM and TC regions, particularly involving PD-1+TIM-3CD8+TRM2 and PD-1+TIM-3+CD8+TRM4 subsets. These findings highlight the evolving tumor microenvironment and its impact on immune cell-tumor interactions.

Decreased CD8+TRM2/ increased CD8+TRM4 interactions with tumor cells favor early LUSC/LUAD recurrence

We assessed the relationship between specific interactions of CD8+TRM with tumor cells in primary tumors and postoperative recurrence in NSCLC (Supplementary Table 9). Our study did not find a relationship between the proximity of CD8+TRM and its subsets to tumor cells and early NSCLC recurrence. Histological subgroup analysis indicated that in the IM region of early LUSC patients, recurrent patients had CD8+TRM, CD8+TRM1, CD8+TRM2, and CD8+TRM3 located further from tumor cells. The ROC curve showed that CD8+TRM2 had the highest area under curve (AUC)value of 0.761 (Fig. 5a). Multivariable Cox regression analysis adjusting for gender, age, smoking index, and pT stage revealed that low IM CD8+TRM2 proximity was an independent risk factor for early LUSC recurrence (Fig. 5b). In early LUAD patients, closer proximity of CD8+TRM4 in TC and IM regions to tumor cells was associated with a higher risk of recurrence, with AUC values of 0.625 and 0.616, respectively (Fig. 5c), and low TC IM CD8+TRM4 proximity was identified as an independent protective factor for early LUAD recurrence (Fig. 5d). However, no relationship was found between functional subsets of CD8+TRM and proximity to tumor cells in relation to local advanced NSCLC recurrence. These results suggest that the spatial positioning of CD8+TRM relative to tumor cells primarily impacts the prognosis of early rather than locally advanced disease.

Discussion

This study systematically elucidates the heterogeneity of CD8+TRM with different activation states within the primary lesions and TDLNs during the progression of NSCLC, while also exploring their prognostic value across various stages of the disease. As tumor staging progressed, we observed an increase in the number of CD8+TRM3 and CD8+TRM4 within the primary tumor, a trend similarly reflected in the TDLNs. Prognostic analyses revealed that CD8+TRM exhibits stage-dependent prognostic characteristics. Specifically, in the IM region of the primary lesion, low proximity of CD8+TRM2 to tumor cells and high proximity of CD8+TRM4 to tumor cells were positively associated with postoperative recurrence in patients with early LUSC and LUAD, respectively. These findings enhance our understanding of the role of CD8+TRM in NSCLC at various stages, highlighting their potential as biomarkers for clinical prognostic stratification. Improved insights into CD8+TRM dynamics could provide valuable guidance for tailoring therapeutic strategies and improving patient outcomes in NSCLC.

Our study reveals that CD8+TRM are extensively present in primary NSCLC tissues, constituting between 31% and 52% of the CD8+ T cell population, consistent with previous research findings23. We also observed a significant increase in the density of CD8+TRM within the IM region of primary NSCLC lesions as the tumor progresses, particularly notable for CD8+TRM3 and CD8+TRM4 subsets. Meanwhile, the infiltration of CD8+TRM in the TC region remained stable. This indicates a potential dynamic redistribution of tumor-specific memory cells throughout NSCLC progression, influenced by the tissue region. This stage-dependent difference in CD8+TRM infiltration may have distinct prognostic implications for different stages of NSCLC. Interestingly, we noted that in locally advanced NSCLC, the increased CD8+TRM subsets within the IM region exhibited upregulation of immune checkpoint inhibitors PD-1 and/or TIM-3. This finding may support the concept that dysfunctional CD8+ T cell populations adopt the characteristics of tissue-resident memory T cells, thereby maintaining a persistent presence in the tumor24. These insights suggest that the dynamic changes in CD8+TRM distributions and their functional states could play crucial roles in the prognosis and therapeutic targeting of NSCLC across its stages. Understanding these nuances could enhance the strategic management of NSCLC, potentially improving clinical outcomes through more tailored therapeutic approaches.

Due to the accessibility of tumor tissue samples, CD8+TRM has been extensively studied in the tumor microenvironment. However, their presence and function in TDLNs remain less explored. Preclinical studies have identified novel antigen-specific memory T cells in TDLNs that may serve as primary responders to PD-1/PD-L1 blockade therapy25. When examining the composition of CD8+TRM in lymph nodes, we observed similar dynamic changes in both lymph nodes and primary lung lesions during tumor progression. Specifically, there was an increase in the density of CD8+TRM3 and CD8+TRM4 subsets from early to locally advanced stages of NSCLC. Despite these findings underscoring the value of CD8+TRM subsets in NSCLC progression, the origin of CD8+TRM within TDLNs and the mechanisms driving their distribution remain to be elucidated. Interestingly, a preclinical study on triple-negative breast cancer indicated that tumor-specific memory T cells form at the tumor site and migrate to distant metastatic sites to exert immune protection26. This suggests a potential direction for investigating the origin of tumor antigen-specific CD8+TRM in lung cancer TDLNs.

Our previous research described the impact of CD8+TRM infiltration patterns within the primary lesions of NSCLC on prognosis. We found that models integrating CD8+TRM density, CD8+TRM epithelial/stromal ratio, and spatial interactions between CD8+TRM and tumor cells were associated with a worse prognosis in NSCLC, but with lower risk ratios than clinical staging. Based on these findings, we not only recognized the important value of CD8+TRM typing, but also realized the possible heterogeneity of intratumoral CD8+TRM in early and locally advanced NSCLC. Therefore, we further elucidated the changes in CD8+TRM subsets with disease progression and their stage-dependent prognostic value, particularly observing their differences within draining lymph nodes. CD8+TRM infiltrating primary tumors can improve the prognosis of various solid tumors through cytotoxic effects or by secreting pro-inflammatory cytokines such as IFN-γ and TNF4,7,27,28,29,30,31,32,33,34,35. However, our study did not find prognostic value for CD8+TRM within primary NSCLC lesions, which may be due to the absence of tissue-specific analysis in previous studies5,6,7. Interestingly, our analysis of CD8+TRM subclusters revealed that PD-1+TIM-3CD8+TRM2 cells and PD-1+TIM-3+CD8+TRM4 might play a crucial role in anti-tumor immunity. The reduced/increased spatial distance from tumor cells was associated with early-stage, as opposed to locally advanced, NSCLC post-surgery recurrence. This stage-dependent prognostic mechanism might be explained by the greater distance between PD-1+TIM-3CD8+TRM2 cells and tumor cells during tumor progression, hindering their direct cytotoxic action.

Immune checkpoint inhibitor (ICI) therapy, represented by PD-(L)1 inhibitors, can induce potent anti-tumor immune responses. However, only a small fraction of patients with solid tumors benefit from ICI treatment36,37,38,39,40,41. Several cancer studies have demonstrated that CD8+ T cells with tissue-resident memory phenotypes may act as effector cells under ICI therapy7,29,42,43,44. In NSCLC patients, those with high levels of CD8+TRM benefit from anti-PD-1 therapy combined with chemotherapy4. Our team identified that PD-1+TIM-3CD8+TRM2 has superior prognostic value in early-stage NSCLC patients. Combined with previous studies suggesting that PD-1+TIM-3CD8+ TRM2 cells may serve as progenitor-exhausted T cells capable of functionally responding to PD-1 checkpoint inhibitors, we hypothesize that high levels of intratumoral PD-1+TIM-3CD8+TRM2 cells could contribute to the benefit from neoadjuvant immunotherapy. However, no related studies have been conducted so far. We plan to retrospectively collect primary lesion samples before and after neoadjuvant ICI treatment and perform multicolor immunofluorescence staining to explore their correlation with therapeutic efficacy. Furthermore, we discovered that CD8+TRM might have stage-dependent prognostic value, affecting the prognosis of early-stage rather than locally advanced NSCLC. This suggests that when identifying biomarkers for ICI benefit, stratification by stage may be necessary.

We acknowledge several limitations of our study. Firstly, while retrospective mIHC data allowed for precise quantification of PD-1 and TIM-3 expression on CD8+TRM and their two-dimensional spatial distribution, revealing prognostic value, the high cost of mIHC necessitates the development of more economical and accessible predictive models in future studies. Techniques such as radiogenomics could be explored to predict the status of CD8+TRM within tumors and identify high-risk recurrence populations. Secondly, due to the limited number of lymph node samples, we were unable to conduct statistical analyses comparing CD8+TRM cells between TDLN+ and TDLN− groups or between primary lesions and paired lymph nodes. Future studies with larger sample sizes are needed to confirm these findings. Thirdly, although our study revealed the prognostic value of CD8+TRM in baseline primary lesions for early-stage NSCLC, prospective studies are required to explore the relationship between tumor-specific CD8+TRM and the benefit from neoadjuvant ICI therapy.

In summary, our study has elucidated changes in the composition and spatial localization of CD8+TRM within the primary lesions and TDLN microenvironments during tumor progression, highlighting its prognostic significance in early-stage NSCLC. These findings contribute to a deeper understanding of the role of CD8+TRM in NSCLC and may guide future strategies for patient stratification and therapeutic intervention.

Methods

Patient cohort

Patients were eligible for inclusion if: histologically confirmed stage IA-IIIB primary NSCLC; no prior neoadjuvant therapy; adequate resected tissues for tissue microarrays (TMAs) construction and mIHC detection; complete baseline and follow-up data. We excluded patients with: combined second primary tumors; loss to follow-up; and prior preoperative neoadjuvant therapy. Recurrence-free survival (RFS) time and overall survival (OS) time at 5-year follow-up45,46. This study was approved by the Ethical Review Committee of Shandong Cancer Hospital (SDTHEC 2022007013) and complied with the Declaration of Helsinki. This study was a retrospective analysis without informed consent.

Sample collection

Postoperative paraffin-embedded (FFPE) tumor tissues from patients were collected to prepare TMAs47,48. Each FFPE block was sectioned and stained with hematoxylin and eosin. All sections were examined by M.Z. (reviewed by H.Y.) and four representative areas were selected: two representing the tumor peripheral regions adjacent to normal lung tissue, and two representing more central tumor area49. The TMA Grand Master automated arrayer from 3DHISTECH was used to transfer four 1-mm cores onto the TMAs. Additionally, tumor-draining lymph node samples from five paired patients were collected (three positive and two negative). These samples, along with the prepared TMAs and FFPE blocks, were sectioned into slices with a thickness of 3 μm microns using a LEICA RM2245 sliding microtome. Subsequently, the slices were positioned in a TEC-2500 water bath-slide dryer maintained at a temperature of 50 °C.

MIHC staining

MIHC was performed on TMAs samples of NSCLC using the following antibodies36,50,51: CD8 (Abcam, ab199016, dilution 1:500), PD-1 (Zsbio, ZM-0069, dilution 1:200), CD103 (Abcam, ab224202, dilution 1:200), CK (Zsbio, ZM-0069, dilution 1:200), and TIM-3 (Cell Signaling Technology, #45208, dilution 1:100). The primary antibodies were detected with isotype-specific HRP-conjugated detection kits (Akoya Bioscience, working solution), followed by tyramide signal amplification (TSA) using Opal fluorophores (Opal 690, dilution 1:150; Opal 620, dilution 1:150; Opal 570, dilution 1:150; Opal 520, dilution 1:150; Opal 650, dilution 1:150; Akoya Bioscience). Slides were counterstained with spectral DAPI (Akoya Bioscience, dilution 1:25) and mounted with anti-fade fluorescence mounting medium ab104135 (Abcam, working solution).

Image analysis

The slides were scanned using the Vectra Polaris system (Akoya Bioscience), and the multispectral images were subjected to spectral decomposition, tissue region segmentation, cell segmentation, and cell phenotype identification using inForm (2.4.8, Akoya Bioscience) software’s built-in spectral library. A pathologist reviewed each image to identify artifacts, staining defects, and necrosis. The counts of phenotypes were normalized to the total cell counts for the entire area to calculate the density of phenotypes per 1000 cells. To assess the spatial interaction between phenotype and tumor cells, spatial proteomic analyses were conducted using proximity analysis. Proximity was defined as the number of tumor cells having at least one CD8+TRM phenotype within 30 microns, a distance previously suggested to represent physiologically plausible direct cell–cell interactions11,13,52. Each patient’s TC or IM was represented by one to two TMA cores. When two cores were available, the maximum number of cells was used to compute the density and proximity scores.

Statistical analysis

To compare the differences in categorical data, the Chi-square test and Fisher’s exact test were employed. Comparisons of continuous variables between two groups were conducted by the Mann–Whitney U-test. Obtain the optimal cutoff value using the pROC package in R language (R 4.1.2)53,54. Plotting and statistical analyses were implemented in SPSS (version 25.0), GraphPad Prism (version 9.0), and R (version 4.1.2). Statistical tests were two-sided, and a P value < 0.05 was considered significant.