Fig. 1: Overview of the Graph Neural Network (GNN) pipeline for analyzing spatial neighborhoods in the tumor microenvironment (TME).

a Sample preprocessing: Multiplex immunofluorescence (mIF) slides are used to generate spatially resolved expression maps containing cell coordinates and marker expression data for each cell in a region of interest (ROI, green box). Based on these maps, cell type graphs are constructed; for clarity, only a small section of the ROI is shown here (black box). b GNN model architecture: The input to the GNN is a spatial neighborhood graph constructed around a center cell (highlighted in the cell type graph above) and includes all cells connected to it by up to four edges. The GNN consists of multiple Graph Isomorphism Network (GIN) layers that integrate information from neighboring nodes, generating node-level features (here we illustrate the operation only for the center cell of the graph). A pooling operation aggregates these into a graph-level representation, which is passed through a fully connected prediction head to obtain a neighborhood survival prediction (p). c–e GNN interpretability: Three approaches are used to interpret the model’s predictions: c analyzing the relationship between neighborhood composition and model predictions, d clustering the latent space of graph features using k-means clustering, and e applying targeted manipulations to selected subgraphs to assess the impact of specific changes on GNN predictions reflected in the differences of the predictions for the original subgraph (po) and the manipulated subgraph (pm).