Abstract
Gene expression profiling provides profound insights into molecular mechanisms, but its time-consuming and costly nature often presents significant challenges. In contrast, whole-slide hematoxylin and eosin (H&E) stained histological images are readily accessible and allow for detailed examinations of tissue structure and composition at the microscopic level. Recent advancements have utilized these histological images to predict spatially resolved gene expression profiles. However, state-of-the-art works treat gene expression prediction as a multi-output regression problem, where each gene is learned independently with its own weights, failing to capture the shared dependencies and co-expression patterns between genes. Besides, existing works can only predict gene expression values for genes seen during training, limiting their ability to generalize to new, unseen genes. To address the above limitations, this paper presents GeneQuery, which aims to solve this gene expression prediction task in a question-answering (QA) manner for better generality and flexibility. Specifically, GeneQuery takes gene-related texts as queries and whole-slide images as contexts and then predicts the queried gene expression values. With such a transformation, GeneQuery can implicitly estimate the gene distribution by introducing the gene random variable. Besides, the proposed GeneQuery consists of two architecture implementations, i.e., spot-aware GeneQuery for capturing patterns between images and gene-aware GeneQuery for capturing patterns between genes. Comprehensive experiments on spatial transcriptomics datasets show that the proposed GeneQuery outperforms existing state-of-the-art methods on known and unseen genes. More results also demonstrate that GeneQuery can potentially analyze the tissue structure.
Introduction
Spatial Transcriptomics (ST) is a transformative technology that maps gene activity to specific tissue locations. However, the high cost and labor-intensive nature of ST limit its widespread clinical application. Standard H&E histology images, conversely, are ubiquitous and inexpensive. This has led to the development of deep learning models that attempt to predict gene expression patterns directly from visual features in histology images.
Current state-of-the-art models, such as STNet and HistoGene, typically frame this task as a multi-output regression problem. This approach suffers from two primary limitations:
- Independence Assumption: By treating each gene as an independent output, these models fail to account for the biological co-expression patterns and dependencies between genes.
- Closed-Set Limitation: Regression-based models are restricted to predicting only the specific genes present in the training set. Generalizing to "unseen" genes requires complete model retraining.
The GeneQuery Framework
To overcome these hurdles, GeneQuery reformulates spatial gene expression prediction as a Question-Answering (QA) task. In this paradigm, the histology image serves as the "context," and biological descriptions of genes serve as "queries."
Methodology and Architecture
GeneQuery treats the gene as a random variable ($g$) rather than a fixed output index. This allows the model to learn a distribution over gene expressions, enabling zero-shot prediction for genes not encountered during training.
The architecture consists of several key components:
- Image Encoder: A ResNet50 backbone extracts visual features from 224x224 pixel "spots" within a whole-slide image.
- Gene Encoder: A BERT-based encoder (specifically Clinical BERT) processes gene metadata, including names, functions, and descriptions. To enhance these queries, the researchers utilized GPT-4 to generate rich biological descriptions, providing the model with deeper semantic context.
- Cross-Fusion Layers: A Transformer-based module aligns and fuses visual and textual features.
- Dual Implementations: The framework offers two variants: Spot-aware GeneQuery, which focuses on spatial patterns across a slide, and Gene-aware GeneQuery, which emphasizes genetic relationships at a specific spot.
Experimental Evaluation
The model was evaluated on three diverse spatial transcriptomics datasets: GSE240429 (human liver), HER2+ (human breast tumor), and HBD (human breast cancer subtypes).
Key Results
- Performance Gains: GeneQuery consistently outperformed baseline models like STNet, HistoGene, and BLEEP. On the GSE dataset, it achieved significantly higher Pearson Correlation Coefficients (PCC) across Highly Expressed Genes (HEG) and Highly Variable Genes (HVG).
- Zero-Shot Generalization: In tests where a large portion of genes (up to 80%) were withheld during training, GeneQuery maintained predictive capability on these unseen genes, demonstrating its ability to leverage textual biological knowledge.
- LLM Synergy: The inclusion of GPT-4 generated descriptions improved performance by 1.8% to 3.6%, highlighting the value of high-quality textual queries in biological modeling.
- Tissue Analysis: Beyond numerical prediction, GeneQuery's latent space effectively captured tissue morphology, allowing for accurate segmentation of structures like invasive cancer and connective tissue.
Conclusion
GeneQuery represents a significant shift in spatial gene expression prediction. By moving from rigid regression to a flexible QA framework, it captures complex biological dependencies and enables the prediction of unseen genes. While absolute correlation values remain a challenge due to the inherent noise in H&E-to-gene mapping, GeneQuery sets a new benchmark for generality and flexibility in computational pathology.
Summary updated