Abstract
Spatial transcriptomics is costly, motivating the prediction of spatial gene expression from routine hematoxylin and eosin (H&E) slides. Existing methods use tissue context to refine visual features but keep pretrained gene priors fixed across specimens. Since the relevance of such a prior may vary with tissue context, we propose HistoGPA, which conditions the gene prior itself on the slide being analyzed. A slide-level histological representation modulates a memory of pretrained gene embeddings before each spatial location queries it through cross-attention, and also gates context into the local features. Across ten cancer-specific tasks from HEST-1k, HistoGPA achieves a macro-averaged gene-wise Pearson correlation of 0.300 on the HEST-Bench genes, compared with 0.260 for the strongest of four recent methods. Capacity-matched ablations demonstrate the importance of slide-specific information and show that conditioning the gene prior provides benefits beyond visual context modulation, while pretrained gene embeddings outperform random tokens.