Tissue phenotypes arise from molecular states of individual cells and their spatial organisation, so spatial omics assays can help reveal how they emerge. Here, the authors apply graph neural networks to classify tissue phenotypes from spatial omics patterns, and use this approach to understand patterns in cancers and their microenvironments.