Table of Contents
Fetching ...

TwinPurify: Purifying gene expression data to reveal tumor-intrinsic transcriptional programs via self-supervised learning

Zhiwei Zheng, Kevin Bryson

TL;DR

Tumor purity variation in bulk transcriptomics obscures tumor-intrinsic programs and hinders molecular discovery. TwinPurify introduces a external-reference-free, self-supervised framework based on a Barlow Twins objective that uses adjacent-normal tissue as structured perturbations to disentangle tumor signals, yielding purified embeddings. Across three large breast cancer cohorts and multiple platforms, TwinPurify outperforms reconstruction-based baselines in recovering tumor-intrinsic and immune signals, improves molecular subtyping and histological grading, and enhances survival-prediction using embedding-derived gene sets. The approach reveals interpretable, orthogonal transcriptional axes tied to immune and cell cycle programs, providing a scalable and transferable tool for reusing bulk data in precision oncology.

Abstract

Advances in single-cell and spatial transcriptomic technologies have transformed tumor ecosystem profiling at cellular resolution. However, large scale studies on patient cohorts continue to rely on bulk transcriptomic data, where variation in tumor purity obscures tumor-intrinsic transcriptional signals and constrains downstream discovery. Many deconvolution methods report strong performance on synthetic bulk mixtures but fail to generalize to real patient cohorts because of unmodeled biological and technical variation. Here, we introduce TwinPurify, a representation learning framework that adapts the Barlow Twins self-supervised objective, representing a fundamental departure from the deconvolution paradigm. Rather than resolving the bulk mixture into discrete cell-type fractions, TwinPurify instead learns continuous, high-dimensional tumor embeddings by leveraging adjacent-normal profiles within the same cohort as "background" guidance, enabling the disentanglement of tumor-specific signals without relying on any external reference. Benchmarked against multiple large cancer cohorts across RNA-seq and microarray platforms, TwinPurify outperforms conventional representation learning baselines like auto-encoders in recovering tumor-intrinsic and immune signals. The purified embeddings improve molecular subtype and grade classification, enhance survival model concordance, and uncover biologically meaningful pathway activities compared to raw bulk profiles. By providing a transferable framework for decontaminating bulk transcriptomics, TwinPurify extends the utility of existing clinical datasets for molecular discovery.

TwinPurify: Purifying gene expression data to reveal tumor-intrinsic transcriptional programs via self-supervised learning

TL;DR

Tumor purity variation in bulk transcriptomics obscures tumor-intrinsic programs and hinders molecular discovery. TwinPurify introduces a external-reference-free, self-supervised framework based on a Barlow Twins objective that uses adjacent-normal tissue as structured perturbations to disentangle tumor signals, yielding purified embeddings. Across three large breast cancer cohorts and multiple platforms, TwinPurify outperforms reconstruction-based baselines in recovering tumor-intrinsic and immune signals, improves molecular subtyping and histological grading, and enhances survival-prediction using embedding-derived gene sets. The approach reveals interpretable, orthogonal transcriptional axes tied to immune and cell cycle programs, providing a scalable and transferable tool for reusing bulk data in precision oncology.

Abstract

Advances in single-cell and spatial transcriptomic technologies have transformed tumor ecosystem profiling at cellular resolution. However, large scale studies on patient cohorts continue to rely on bulk transcriptomic data, where variation in tumor purity obscures tumor-intrinsic transcriptional signals and constrains downstream discovery. Many deconvolution methods report strong performance on synthetic bulk mixtures but fail to generalize to real patient cohorts because of unmodeled biological and technical variation. Here, we introduce TwinPurify, a representation learning framework that adapts the Barlow Twins self-supervised objective, representing a fundamental departure from the deconvolution paradigm. Rather than resolving the bulk mixture into discrete cell-type fractions, TwinPurify instead learns continuous, high-dimensional tumor embeddings by leveraging adjacent-normal profiles within the same cohort as "background" guidance, enabling the disentanglement of tumor-specific signals without relying on any external reference. Benchmarked against multiple large cancer cohorts across RNA-seq and microarray platforms, TwinPurify outperforms conventional representation learning baselines like auto-encoders in recovering tumor-intrinsic and immune signals. The purified embeddings improve molecular subtype and grade classification, enhance survival model concordance, and uncover biologically meaningful pathway activities compared to raw bulk profiles. By providing a transferable framework for decontaminating bulk transcriptomics, TwinPurify extends the utility of existing clinical datasets for molecular discovery.
Paper Structure (19 sections, 6 equations, 5 figures, 1 table)

This paper contains 19 sections, 6 equations, 5 figures, 1 table.

Figures (5)

  • Figure 1: TwinPurify embedding workflow for generating purified cancer gene expression embeddings. Cancer bulk‑RNA profiles are synthetically “contaminated” with varying fractions of adjacent-normal tissue expression to produce two perturbed views. Both views are passed through a shared encoder aligned via the Barlow‑Twins loss.
  • Figure 2: Downstream predictions under increasing adjacent-normal distortion.a. The trained encoder maps held-out cancer samples with real normal admixture into the learned embedding space. These embeddings serve as input features for tumor-subtype classification and cancer grade prediction. b-d. Macro-F1 scores of PAM50 subtype classification for the SCAN-B, METABRIC, and TCGA cohorts, respectively, as the dilution rate increases, across four models: autoencoder (AE), variational autoencoder (VAE), TwinPurify (TP), and principal component analysis (PCA). e-f. Macro-F1 scores of cancer grade classification for the SCAN-B and METABRIC cohorts as the dilution rate increases, evaluated using the same four models.
  • Figure 3: PAM50 subtype transitions under increasing adjacent-normal distortion in the SCAN-B cohort. Plots depict how PAM50 subtype predictions for SCAN-B test samples (n=2257) change across different dilution levels. GT indicates the original ground truth labels, and subsequent bars show predictions under increasing distortion. Results are shown for four models: autoencoder (AE), variational autoencoder (VAE), TwinPurify (TP), and principal component analysis (PCA).
  • Figure 4: Biological validation of learned embeddings.a Pearson correlation is computed between each learned dimension and the original (uncontaminated) cancer profiles. Preranked gene lists derived from correlated dimensions are analyzed by gene set enrichment analysis (GSEA) to recover known oncogenic pathways. b The number of significantly enriched pathways (FWER $<$ 0.05/ number of dimensions for embedding-based and FWER $<$ 0.05 for non-embedding based) within the GO Biological Process collection for each model: differnial gene analysis(DE), BlitzGSEA, BT-with-noise(Barlow-Twins with Gaussian noise), GOAT, autoencoder (AE), variational autoencoder (VAE), TwinPurify(TP), and principal component analysis (PCA). c The number of significantly enriched pathways with the same constraint like above, within the Immunologic Signature gene sets for the same eight models.
  • Figure 5: Functional relevance and survival association of embedding dimensions.a Significantly enriched pathways (FWER $<$ 0.01) identified from TwinPurify embeddings after summarization. Each cell shows the number of child terms within a summarized parent term, and color intensity indicates the normalized enrichment score (NES). b-g Kaplan-Meier survival analyses based on the top and bottom ranked genes (20 each per dimension) derived from preranked gene lists across six models, with 160 genes used per model.