Multimodal contrastive learning for spatial gene expression prediction using histology images

Wenwen Min, Zhiceng Shi, Jun Zhang, Jun Wan, Changmiao Wang

TL;DR

This paper introduces mclSTExp, a novel multimodal deep learning model that predicts spatial gene expression from standard H&E histology images. By combining Transformer-based spatial feature extraction with contrastive learning to fuse image and gene expression data, mclSTExp significantly outperforms existing methods, offering a cost-effective way to unlock insights from spatial transcriptomics.

What Problem Does This Paper Address?

Spatial transcriptomics (ST) technology has revolutionized our understanding of gene expression within tissues, revealing intricate spatial patterns. However, the high cost of ST limits its widespread application. This paper addresses this barrier by proposing a method to predict spatial gene expression using readily available and inexpensive H&E histology images. While previous attempts have explored this, they haven't fully leveraged the rich multimodal information from both histology images and the spatial context of gene expression data. The challenge is to effectively integrate these diverse data sources to achieve accurate gene expression prediction.

Methods

The core of mclSTExp lies in its multimodal approach:

  • Spot as "Words": Inspired by Natural Language Processing, each spatial spot's gene expression data is treated as a "word." A Transformer encoder, specifically using a multi-head self-attention mechanism, is employed to capture intrinsic features and integrate spatial context for these "words." Learnable positional encodings are added to represent the spatial location of each spot.
  • Image Encoding: H&E image patches corresponding to each spot are processed by a pre-trained DenseNet-121 encoder to extract visual features.
  • Multimodal Fusion via Contrastive Learning: The key innovation is the use of contrastive learning to fuse the image features and the spatially-aware gene expression features. The model is trained to maximize the similarity between corresponding image patches and gene expression spots (positive pairs) while minimizing similarity for mismatched pairs (negative pairs). This forces the model to learn a shared embedding space where visual and gene expression information are aligned.
  • Prediction: For a new H&E image, visual features are extracted. These features are then used to query the learned embedding space to find the most similar spot features. The gene expression of these top-k similar spots is then aggregated (weighted by similarity) to predict the gene expression for the new image.

Datasets

The model was evaluated on three real-world datasets:

  • HER2+ breast cancer dataset: Consisting of 32 tissue sections.
  • CSCC (Cutaneous Squamous Cell Carcinoma) dataset: Consisting of 12 tissue sections.
  • Alex+10x dataset: Consisting of 9 tissue slices.

The evaluation used a leave-one-out cross-validation strategy, where one slice was used for testing and the rest for training.

Key Insights and Ideas

  • Bridging the Cost Gap: The most significant insight is the demonstration that high-quality spatial gene expression prediction is achievable from significantly cheaper H&E images, democratizing access to ST-like insights.
  • Transformer for Spatial Context: Treating spatial spots as "words" and using Transformers effectively captures the complex spatial relationships and dependencies within gene expression data.
  • Contrastive Learning for Multimodal Alignment: The contrastive learning framework is crucial for aligning the visual features from H&E images with the gene expression and spatial information, creating a powerful joint representation.
  • Interpretability Beyond Prediction: The model not only predicts gene expression but also shows promise in identifying cancer-specific overexpressed genes, immune-related genes, and specialized spatial domains, offering biological interpretability.

Key Results

  • Superior Prediction Accuracy: mclSTExp consistently outperformed five other state-of-the-art methods across all three datasets.
  • On the HER2+ dataset, mclSTExp achieved a 23.01% higher average PCC (All Considered Genes - ACG) and a 32.89% higher PCC (Top 50 Highly Expressed Genes - HEG) compared to the second-best method, BLEEP.
  • Similar significant improvements were observed for CSCC and Alex+10x datasets.
  • Robustness: The model demonstrated high PCC values on a majority of individual tissue slices across datasets.
  • Biological Relevance: Visualizations of predicted gene expression for key cancer-related genes (e.g., GANS, FN1, FASN) showed high correlations with observed expression, and the model identified genes with known prognostic value in breast cancer.

Limitations and Future Work

  • Low PCC Slices: The paper notes that for certain slices (e.g., E1-F3 in HER2+, slice 1142243F in Alex+10x), PCC values were low across all methods. This is attributed to potential issues with gene detection sensitivity/specificity in ST technology or non-biological variations.
  • Future Directions: The authors suggest further investigation into the contributions of each component of mclSTExp through ablation studies (which were conducted and are detailed in supplementary materials). The paper also implicitly suggests that further refinement of image preprocessing and feature extraction could lead to even better performance. The ability to identify spatial domains also opens avenues for further research in computational pathology and personalized medicine.

Summary updated

BibTeX
@inproceedings{min2024multimodal,
  author = {Wenwen Min and Zhiceng Shi and Jun Zhang and Jun Wan and Changmiao Wang},
  title = {{Multimodal contrastive learning for spatial gene expression prediction using histology images}},
  booktitle = {Briefings},
  year = {2024},
  doi = {10.1093/bib/bbae551},
}

Loading related content...

Figure