CoCo-ST: Comparing and Contrasting Spatial Transcriptomics data sets using graph contrastive learning

Jia Wu, Muhammad Aminu, Bo Zhu, Natalie I. Vokes, Hong Chen, Lingzhi Hong, Jianrong Li, Junya Fujimoto, Alissa Poteete, Monique B. Nilsson, Xiuning Li, Tina Cascone, David A. Jaffray, Nicholas E. Navin, Lauren A. Byers, Don L. Gibbons, John V. Heymach, Ken Chen, Chao Cheng, Jianjun Zhang, Yuqui Yang, Tao Wang, Bo WangResearch Square 2024

Abstract

Traditional feature dimension reduction methods have been widely used to uncover biological patterns or structures within individual spatial transcriptomics data. However, these methods are designed to yield feature representations that emphasize patterns or structures with dominant high variance, such as the normal tissue spatial pattern in a precancer setting. Consequently, they may inadvertently overlook patterns of interest that are potentially masked by these high-variance structures. Herein we present our graph contrastive feature representation method called CoCo-ST (Comparing and Contrasting Spatial Transcriptomics) to overcome this limitation. By incorporating a background data set representing normal tissue, this approach enhances the identification of interesting patterns in a target data set representing precancerous tissue. Simultaneously, it mitigates the influence of dominant common patterns shared by the background and target data sets. This enables discerning biologically relevant features crucial for capturing tissue-specific patterns, a capability we showcased through the analysis of serial mouse precancerous lung tissue samples.

Introduction

Spatial Transcriptomics (ST) has revolutionized our ability to study tissue architecture by providing a map of gene expression across physical space. Despite this advancement, analyzing ST data remains challenging. Standard dimensionality reduction techniques, such as Principal Component Analysis (PCA) or Non-negative Matrix Factorization (NMF), are inherently biased toward features with the highest variance. In many biological contexts, particularly early-stage carcinogenesis, the most significant signals—such as localized precancerous "hotspots"—are often low-variance compared to the surrounding healthy tissue. As a result, these critical features are frequently masked or discarded as noise by traditional algorithms.

To address this, we developed CoCo-ST (Comparing and Contrasting Spatial Transcriptomics), a graph contrastive learning framework designed to act as "biological noise cancellation." By explicitly comparing a target dataset against a background reference, CoCo-ST isolates unique biological patterns that would otherwise remain hidden.

The CoCo-ST Framework

Figure 1: Overview of the CoCo-ST framework for comparing and contrasting spatial transcriptomics datasets. Source, p. 1

Figure 1: Overview of the CoCo-ST framework for comparing and contrasting spatial transcriptomics datasets.

CoCo-ST operates by representing ST data as weighted graphs where nodes represent spatial "spots." Edges are established based on molecular similarity (gene expression) and physical proximity. The core of the method is a contrastive objective function that maximizes the variance in the target data while minimizing the variance of structures shared with the background.

Mathematically, this is formulated as a generalized eigenvalue problem. The resulting eigenvectors (contrastive components) represent a feature space where the unique aspects of the target tissue are most prominent. The framework is flexible, offering both linear and nonlinear extensions (using kernel Hilbert spaces) to capture complex biological relationships.

Experimental Validation

The researchers validated CoCo-ST using several high-resolution datasets:

  • Mouse Lung Carcinogenesis Model: An in-house dataset of serial lung tissue samples (MLP-1 through MLP-10) captured via 10x Genomics Visium, representing the progression from normal tissue to adenocarcinoma.
  • Matched scRNA-seq: Single-cell RNA sequencing data from the same mouse models, used as a reference for cell-type deconvolution.
  • Public Mouse Brain Data: Anterior and posterior brain slices used to demonstrate the method's ability to handle highly complex anatomical structures.

Key Insights and Results

One of the most striking results was CoCo-ST's ability to identify early-stage hyperplasia. While four other major methods (Seurat/PCA, STUtility/NMF, NSF, and MEFISTO) failed to distinguish these regions from normal tissue or misclassified them, CoCo-ST identified them clearly. This "noise cancellation" effect allowed for the discovery of 3,498 marker genes for adenoma regions (at a 5% false-discovery rate), including genes like Cxcl15 that were uniquely identified by this contrastive approach.

Furthermore, CoCo-ST revealed that small hyperplasia hotspots and larger adenomas share specific marker genes (Ctsh, Cxcl15, and Slc34a2), suggesting these regions are anatomically and functionally similar despite differences in size and variance. The method also enabled the reconstruction of a "spatial trajectory," mapping the evolution of cancer from normal endothelial domains through adjacent normal tissue and into adenoma states. It further highlighted the role of Tumor-Associated Macrophages (TAMs) and WNT signaling as key drivers of tumor growth and communication in specific spatial domains.

Conclusion and Future Work

CoCo-ST provides a robust solution for identifying subtle biological signals in spatial transcriptomics data. By leveraging contrastive learning, it overcomes the limitations of variance-based dimensionality reduction. While currently optimized for the Visium platform, the framework is platform-agnostic and holds potential for sub-cellular resolution technologies like Xenium or MERFISH. Future work will focus on incorporating supervised or semi-supervised learning and refining parameter selection to further enhance its discriminative power in diverse clinical and research settings.

Summary updated

BibTeX
@inproceedings{wu2024coco,
  author = {Jia Wu and Muhammad Aminu and Bo Zhu and Natalie I. Vokes and Hong Chen and Lingzhi Hong and Jianrong Li and Junya Fujimoto and Alissa Poteete and Monique B. Nilsson and Xiuning Li and Tina Cascone and David A. Jaffray and Nicholas E. Navin and Lauren A. Byers and Don L. Gibbons and John V. Heymach and Ken Chen and Chao Cheng and Jianjun Zhang and Yuqui Yang and Tao Wang and Bo Wang},
  title = {{CoCo-ST: Comparing and Contrasting Spatial Transcriptomics data sets using graph contrastive learning}},
  booktitle = {Research Square},
  year = {2024},
  doi = {10.21203/rs.3.rs-4359834/v1},
}
Figure