Prediction residuals in spatial transcriptomics reveal microenvironmental heterogeneity in cancer
Abstract
Predictive models, as applied in computational pathology, are typically evaluated by accuracy, while their residuals are discarded as errors. In this paper we show that these residuals contain structured biological information. We introduce and validate a conditional discordance framework that uses foundation model prediction residuals to identify tissue regions where morphology and transcriptome diverge. The framework, applied to Xenium spatial transcriptomics data from 18 breast carcinoma sections across 2 cohorts, revealed spatially organized prediction errors with biological associations that varied across patients. In discovery, discordant regions showed higher EPCAM/KRT19 expression and lower expression of several stromal/macrophage markers, while cell mixture associations differed between patients. In two sections of P07, discordant regions enriched in tumor cells showed greater underprediction of transcription associated with EMT after composition adjustment, without a robust increase in observed program expression. Gene predictability is associated with spatial autocorrelation. Observed expression directions agreed across cohorts for 71 of 90 bridge genes; validation pathway profiles were more similar within patients, although the permutation test allowed only nine assignments ( p = 1 / 9 ). Application to four colorectal specimens supported broader use of the framework. The framework shows that prediction residuals carry biological information about microenvironmental heterogeneity, without identifying a universal EMT state.
// Source
Authors: Tomas Iešmantas
Institutions: Kaunas University of Technology