Fig. 1: Study schema and specimens collected.

a Top panel: Patients with recurrent GBM were treated with off-label neoadjuvant anti-PD1 ~14 days before surgical resection. Tumors were collected for bulk RNA analysis and FFPE sections. Bottom panel: Patients with high-risk resectable melanoma were enrolled in a randomized phase 2 trial (NCT02519322). Tumors were collected at baseline and on-treatment for FFPE sections. Patients were randomized to receive neoadjuvant nivolumab (green) or ipilimumab plus nivolumab (red). b Scheme of micro-tumor analysis. A heterogeneous tumor is analyzed in smaller parts (micro-tumors), where each micro-tumor is deeply characterized and has its own local therapy response (e.g., abundance of T cells). These micro-tumors are used to build a model, which can reveal the important variables that determine the response. c Scheme of immune neighbor analysis. Immune cell–cell interaction is quantified by counting the number of adjacent immune-cell neighbors for each immune cell. The same density of cells can yield different average neighbor numbers. d Molecular response of neoadjuvant anti-PD1 treatment in recurrent GBM determined by bulk gene signatures. The genes and samples were arranged with hierarchical clustering. mNR molecular nonresponder, mR molecular responder, FFPE formalin-fixed paraffin-embedded, RECIST response evaluation criteria in solid tumors, ORR overall response rate, trAEs treatment-related adverse events. Green coloration represents low expression; red coloration represents high expression. Schemes in (a), (b), and (c) were created with BioRender.com. Source data are provided as a Source Data file.