FmH2ST: foundation model-based spatial transcriptomics generation from histological images

Yuequn Wang, Jun Wang, Yanyu Xu, Ning Liu, Jia Liu, Yuliang Li, Guoxian YuNucleic 2025 · DOI

TL;DR

This paper introduces FmH2ST, a novel method that leverages foundation models to predict spatial gene expression from histology images. By integrating prior knowledge from large image datasets with fine-grained spot-level details, FmH2ST overcomes limitations in existing methods, leading to more accurate and denoised gene expression predictions with significant implications for cancer research and personalized medicine.

What Problem Does This Paper Address?

Spatial transcriptomics (ST) is a powerful technique for understanding gene expression patterns within tissues, offering crucial insights into biological processes and disease mechanisms. However, generating ST data is expensive and complex, limiting its widespread application. Predicting ST from readily available histological images (like H&E stains) is a promising alternative, but current methods face several challenges:

  • Lack of Prior Knowledge: Models are often trained on specific datasets, limiting their generalizability to new tissue types or conditions.
  • Inter-slice Heterogeneity: Gene expression can vary significantly between different tissue slices, even from the same sample, making it difficult to accurately represent individual spots.
  • Intra-slice Complexity: The relationships between spots within a single slice can be complex, with similar cell types or states not always being spatially adjacent. Existing methods often fail to capture these non-local, semantic relationships.

FmH2ST aims to address these limitations by developing a more robust and accurate method for predicting spatial gene expression from histological images.

Methods

FmH2ST employs a novel dual-branch framework to integrate information from different sources:

  1. Foundation Model Branch: This branch leverages a pre-trained foundation model (specifically, PathoDuet, a pathology foundation model) to extract rich prior knowledge from histological images.
  2. Multilevel Feature Extraction: It combines features from both individual spot images and the entire slice image to capture inter-slice heterogeneity. This helps differentiate spots from different slices by incorporating global tissue context.
  3. Dual-Graph Strategy: To model intra-slice complexity, it uses two types of graphs:
  4. Spatial Graph: Captures local dependencies based on spot coordinates.
  5. Learnable Feature Graph: Models semantic relationships between spots based on feature similarity, even if they are spatially distant. This graph is dynamically updated during training.
  6. These graph representations are then fused using an attention mechanism.
  7. Spot-Specific Feature Learning Branch: This branch focuses on extracting fine-grained details directly from individual spot images using:
  8. Multiscale Convolutions: To capture features at different resolutions.
  9. Transformer: To model global spatial dependencies within a slice.
  10. Graph Attention Network (GAT): To aggregate local features from neighboring spots.

The outputs from both branches are adaptively fused using an attention mechanism to create a final prediction. A collaborative dual-branch training strategy with a multicomponent loss function is used to ensure balanced training and prevent bias towards the foundation model.

Datasets

The study evaluated FmH2ST on two publicly available datasets:

  • Human HER2-positive breast cancer (HER2+) dataset: This dataset was measured using the 10x Visium platform and comprised 32 tissue sections from seven patients.
  • Human cutaneous squamous cell carcinoma (cSCC) dataset: This dataset also used the 10x Visium platform and included 12 tissue sections from four patients.

The authors performed leave-one-section-out cross-validation for evaluation.

Key Insights and Ideas

  • Foundation Models are Key: Integrating pre-trained foundation models is crucial for capturing broad biological prior knowledge, significantly improving prediction accuracy, especially in challenging scenarios where dataset-specific models struggle.
  • Slice Context Matters: Explicitly incorporating global slice-level features alongside spot-level features is essential for accurately modeling inter-slice heterogeneity and improving overall prediction.
  • Beyond Spatial Proximity: Semantic relationships between spatially distant but biologically similar spots are important for understanding intra-slice complexity. The learnable feature graph effectively captures these non-local connections.
  • Denoising as a Side Effect: FmH2ST's prediction process naturally denoises raw gene expression data, revealing clearer spatial patterns and enhancing cancer region delineation.
  • Preserving Biological Relationships: The method not only predicts gene expression but also maintains crucial gene co-expression patterns and enables more reliable inference of gene regulatory networks (GRNs).

Key Results

  • Superior Prediction Accuracy: FmH2ST consistently outperformed state-of-the-art methods (ST-Net, HisToGene, Hist2ST, THItoGene) across both HER2+ and cSCC datasets, achieving significantly higher Pearson Correlation Coefficient (PCC) values (e.g., improving mean PCC by 33.8% over THItoGene in the HER2+ dataset).
  • Improved Spatial Domain Identification: FmH2ST achieved the highest Adjusted Rand Index (ARI) for reconstructing spatial domains, showing a 22% improvement over THItoGene.
  • Enhanced Cancer Region Delineation: Predicted gene expression patterns revealed clearer cancer regions and subtle biological signals compared to raw data, aiding in the identification of tumor heterogeneity.
  • Accurate Gene Co-expression and GRN Inference: FmH2ST better preserved gene co-expression patterns and enabled the inference of GRNs with more biologically meaningful properties (higher R² and clustering coefficients), leading to the identification of key cancer-related regulators.

Limitations and Future Work

  • Foundation Model Dependency: The performance of FmH2ST is influenced by the quality and compatibility of the chosen foundation model, highlighting the importance of model selection.
  • Computational Cost: The dual-branch framework, while effective, has a slightly higher time complexity compared to single-branch methods.
  • Future Directions: The authors suggest extending the framework to accommodate more powerful pre-trained foundation models and adapting it for high-resolution ST datasets (e.g., single-cell resolution) to enable finer-grained analysis of cancer biology and gene regulation.

Summary updated

Abstract

Spatial transcriptomics (ST) reveals gene expression distributions within tissues. Yet, predicting spatial gene expression from histological images still faces the challenges of limited ST data that lack prior knowledge, and insufficient capturing of inter-slice heterogeneity and intra-slice complexity. To tackle these challenges, we introduce FmH2ST, a foundation model-based method for spatial gene expression prediction. Equipped with powerful foundation models pretrained on massive images, FmH2ST employs a dual-branch framework to integrate prior knowledge from foundation model and fine-grained details from spot images. The foundation model branch employs a multilevel feature extraction strategy to obtain enriched features with slice context for capturing inter-slice heterogeneity, and a dual-graph strategy to obtain spatial and semantic enriched features for modeling intra-slice complexity. The spot-specific learning branch leverages multiscale convolutions, Transformer, and graph neural network to extract fine-grained spot features. The outputs of two branches are adaptively fused for better prediction under a collaborative branch learning strategy. Experimental results show FmH2ST outperforms state-of-the-art methods on benchmark datasets. FmH2ST can denoise the raw gene expressions, reveal cancer spatial heterogeneity and gene co-expression patterns, and support the inference of gene regulatory networks. Overall, FmH2ST is effective for predicting ST, with potential applications in clinical diagnostics and personalized treatment.
BibTeX
@inproceedings{wang2025fmh,
  author = {Yuequn Wang and Jun Wang and Yanyu Xu and Ning Liu and Jia Liu and Yuliang Li and Guoxian Yu},
  title = {{FmH2ST: foundation model-based spatial transcriptomics generation from histological images}},
  booktitle = {Nucleic},
  year = {2025},
  doi = {10.1093/nar/gkaf865},
}
Figure