Diffusion Generative Modeling for Spatially Resolved Gene Expression Inference from Histology Images

Sichen Zhu, Yuchen Zhu, Molei Tao, Peng Qiu

Introduction

In modern pathology, the integration of morphological data with molecular insights is crucial for understanding disease progression and tissue heterogeneity. Hematoxylin and Eosin (H&E) staining remains the clinical standard due to its cost-effectiveness and ubiquity, providing a detailed view of cellular architecture. Conversely, Spatial Transcriptomics (ST) offers a high-resolution map of gene activity, yet its high cost and technical complexity limit its routine clinical application.

The challenge lies in bridging this gap: can we infer gene expression directly from H&E images? While previous computational approaches have attempted this using regression-based deep learning, they often struggle with the inherent stochasticity of biological systems. This paper introduces Stem (SpaTially resolved gene Expression inference with diffusion Model), a generative framework that redefines gene expression inference as a conditional generation task rather than a deterministic regression problem.

The "One-to-Many" Challenge in Histology

Existing tools typically treat the mapping from an image patch to a gene profile as a regression task. However, the authors argue that this approach is fundamentally flawed because the relationship is "one-to-many." Two cell clusters may appear morphologically identical under a microscope but exist in different functional states or microenvironments, resulting in distinct transcriptomic profiles.

Regression models, by design, attempt to minimize the mean squared error, which often leads them to output a "blurry average" of possible expressions. This "mean trap" results in the loss of biological heterogeneity—the very variation that is critical for identifying cancer subtypes or understanding immune responses.

Methodology: The Stem Architecture

Stem addresses these limitations by utilizing a conditional diffusion framework. The architecture is built upon three core components:

  1. Conditional Diffusion Modeling: Instead of predicting a single vector, Stem learns the underlying distribution of gene expressions. By starting with Gaussian noise and iteratively refining it based on the histology image, the model can sample multiple plausible expression profiles, capturing the natural variance of the data.
  2. Integration of Pathology Foundation Models: To extract high-level features from H&E slides, Stem leverages pre-trained foundation models such as UNI and CONCH. These models, trained on millions of pathology images, provide robust morphological embeddings. The authors found that concatenating features from multiple foundation models captures complementary biological information more effectively than any single model.
  3. Diffusion Transformer (DiT) Backbone: Stem employs a transformer-based architecture to process gene expression as a sequence of tokens. This allows the model to capture complex inter-gene dependencies and spatial relationships within the tissue.

To accurately assess the model's ability to capture biological diversity, the researchers introduced the Relative Variation Distance (RVD). Unlike standard correlation metrics like Pearson Correlation (PCC), RVD measures how well the predicted distribution's spread matches the ground truth, exposing models that merely predict the mean.

Experimental Results

Stem was evaluated across four diverse datasets: Kidney Visium (healthy and diseased), HER2ST (breast cancer), Human Prostate Cancer (PRAD), and Healthy Mouse Brain.

State-of-the-Art Accuracy

Stem consistently outperformed existing methods, including HisToGene, BLEEP, and TRIPLEX, across standard metrics such as Mean Squared Error (MSE) and PCC. More importantly, it achieved significantly lower RVD scores, demonstrating its superior ability to preserve the "texture" and heterogeneity of real biological data.

Biological and Clinical Relevance

The model's predictions were validated through downstream tasks:

  • Tissue Segmentation: Unsupervised clustering of Stem’s predicted gene profiles successfully identified distinct histological regions, such as invasive cancer versus healthy breast glands, aligning with expert pathologist annotations.
  • Marker Gene Visualization: Stem accurately reconstructed the spatial patterns and intensities of key cancer markers (e.g., GNAS, FASN), whereas competing models often produced smoothed or inaccurate heatmaps.

Discussion and Future Directions

By shifting the paradigm from regression to generative modeling, Stem provides a more faithful representation of the complex relationship between tissue morphology and gene expression. However, the use of diffusion models introduces a trade-off in inference speed due to the iterative sampling process.

Future research will focus on optimizing sampling efficiency and exploring more sophisticated conditioning mechanisms. Incorporating global tissue context and spatial coordinates could further enhance the model's understanding of the local "neighborhood" of each image patch, leading to even more precise spatial transcriptomic reconstructions.

Conclusion

Stem represents a significant advancement in computational pathology. By capturing the inherent heterogeneity of gene expression, it moves us closer to a future where high-resolution molecular maps can be generated from standard histology slides, potentially democratizing access to spatial transcriptomics in clinical and research settings.

Summary updated

BibTeX
@inproceedings{zhu2025diffusion,
  author = {Sichen Zhu and Yuchen Zhu and Molei Tao and Peng Qiu},
  title = {{Diffusion Generative Modeling for Spatially Resolved Gene Expression Inference from Histology Images}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=FtjLUHyZAO},
}
Figure