Disentangling Shared and Target-Enriched Topics via Background-Contrastive Non-negative Matrix Factorization
Authors: Yixuan Li, Archer Y. Yang, Yue Li
Organizations: Department of Mathematics and Statistics, McGill University, Montreal, QC, Canada · Mila – Quebec AI Institute, Montreal, QC, Canada · School of Computer Science, McGill University, Montreal, QC, Canada
Biological signals of interest in high-dimensional data are often masked by dominant variation shared across conditions. This variation, arising from baseline biological structure or technical effects, can prevent standard dimensionality reduction methods from resolving condition-specific structure. The challenge is that these confounding topics are often unknown and mixed with biological signals. Existing background correction methods are either unscalable to high dimensions or not interpretable. We introduce background contrastive Non-negative Matrix Factorization (\model), which extracts target-enriched latent topics by jointly factorizing a target dataset and a matched background using shared non-negative bases under a contrastive objective that suppresses background-expressed structure. This approach yields non-negative components that are directly interpretable at the feature level, and explicitly isolates target-specific variation. \model is learned by an efficient multiplicative update algorithm via matrix multiplication such that it is highly efficient on GPU hardware and scalable to big data via minibatch training akin to deep learning approach. Across simulations and diverse biological datasets, \model reveals signals obscured by conventional methods, including disease-associated programs in postmortem depressive brain single-cell RNA-seq, genotype-linked protein expression patterns in mice, treatment-specific transcriptional changes in leukemia, and TP53-dependent drug responses in cancer cell lines.
Figures & tables
Figure 1: Schematic overview of the bcNMF framework. The figure illustrates the joint factorization of target and background datasets using bcNMF , with both datasets decomposed into shared non-negative topics. Each sample is represented by its topic activations.
Figure 2: Simulation results on blended MNIST-ImageNet data. a Schematic illustrating the construction of the target and background datasets. The target dataset comprises MNIST digits superimposed on ImageNet background patches, while the background dataset contains only natural images processed identically. b UMAP visualization of the coefficient matrix HX learned from standard NMF (top) and bcNMF (bottom) on the ten-digit dataset. c Interpretability of bcNMF topics. Each column of the basis matrix W is visualized as a 28×28 image (left), with topic usage for each digit represented as bubble plots (center). The mean reconstructed image for each digit, obtained by combining W with the corresponding average topic vector, is shown on the right. d Quantitative comparison of clustering performance. ARI scores for NMF, cPCA, and bcNMF on the binary and ten-digit tasks, with error bars indicating bootstrap standard errors estimated from repeated subsampling of the test data.
Figure 3: Down syndrome-associated protein expression in mice. a UMAP embedding of NMF topic usage for mouse protein expression data, colored by Down syndrome (DS) status. b UMAP embedding of bcNMF topic usage using control mice as background, colored by DS status. c Bar plot of ARI for DS classification using PCA, cPCA, NMF and bcNMF . Error bars indicate bootstrap standard errors estimated from 20 subsamples with replacement (300 target and 200 background samples per subsample). d Top ten proteins for each of the two most significant bcNMF topics. Heatmaps show protein loadings (left) and signed −log10p values from Welch’s two-sample t-tests comparing DS and non-DS groups (right).
Figure 4: bcNMF resolves condition-specific programs in single-cell RNA-seq from a leukemia transplant patient. a UMAP embedding of NMF topic usage ( K = 10), colored by condition (pre-transplant, blue; post-transplant, orange). b UMAP embedding of bcNMF topic usage using healthy bone marrow as background, colored by condition. c ARI for transplant status classification using PCA, cPCA, NMF and bcNMF . Error bars denote bootstrap standard errors from 20 stratified subsamples ( n = 6,000 cells per subsample). d Top five genes for each of the four most significant bcNMF topics. Heatmaps show gene loadings (left) and signed −log10p values from Welch’s two-sample t-tests comparing pre- and post-transplant cells (right). e Box plots of topic usage for two bcNMF topics (Topics 8 and 10) in pre- and post-transplant cells; each point represents a single cell.
Figure 5: bcNMF isolates TP53-dependent transcriptional responses in the MIX-seq idasanutlin dataset. a UMAP embedding of NMF topic usage (K = 20), colored by cell line identity. b UMAP embedding of NMF topic usage, colored by TP53 mutation status (wild-type, mutant). c UMAP embedding of bcNMF topic usage (K = 20) using wild-type cell lines as background, colored by cell line identity. d UMAP embedding of bcNMF topic usage, colored by TP53 mutation status. e Top five genes for each of the three most significant bcNMF topics. Heatmaps show gene loadings (left) and signed −log10p values from Welch’s two-sample t-tests comparing TP53 mutant and wild-type cells (right); bottom bars show topic-level significance. f Cell-line-specific genes from bcNMF topics enriched in wild-type clusters, excluding canonical TP53 targets. Heatmaps show gene loadings and Welch’s t-test-based significance scores. g Histogram of cell line composition within wild-type TP53 clusters identified in the bcNMF embedding. h Frequency of genes identified across the three most significant bcNMF topics 4, 8 and 19, with canonical TP53 targets highlighted in red. i Schematic of the TP53 regulatory network linking identified target genes. j ARI for TP53 mutation status alignment using PCA, cPCA, NMF and bcNMF . Bars show ARI computed on the full dataset; error bars indicate bootstrap standard errors estimated from 20 resampled target/background pairs
Figure 6: Revealing hidden disease-associated programs in single-cell RNA-seq from MDD. a UMAP embedding of NMF topics colored by cell types (astrocyte, oligodendrocyte). b UMAP embedding of bcNMF topics colored by cell types. c UMAP embedding of NMF topics colored by condition (case, control). d UMAP embedding of bcNMF topics colored by condition. e Top five genes for each of the five most significant bcNMF case-control topics (y-axis), with heatmap showing gene loadings and topic-wise regression p-values (bottom row) and MDD-associated pathway enrichment scores (right panel). f Bar plot of ARI for case-control clustering using PCA, cPCA, NMF, and bcNMF . Higher ARI indicates better recovery of disease-relevant groupings. Error bars were estimated by bootstrap with 20 independent resamples drawing 6,000 cells from the target dataset and 3,000 cells from the background dataset with replacement.
Figure 7: Runtime and clustering performance comparison. a Runtime of NMF and bcNMF implemented on CPU (NumPy) and GPU (PyTorch) as a function of the number of MNIST-ImageNet image samples. b Adjusted Rand Index (ARI) between ground-truth labels and clusters obtained from k-means applied to low-dimensional representations from PCA, cPCA, NMF, and bcNMF .
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure S1 : Extended enrichment analysis of disease-associated gene programs in MDD. (a) Multi-database enrichment of 25 validated MDD-associated genes across GO Biological Process, KEGG, and Reactome. The x-axis shows gene ratio (overlap / pathway size); point size and color reflect statistical significance ( −log10 adjusted p -value). Extracellular matrix and immune-inflammatory pathways show the strongest enrichment. (b) Gene-overlap network of the top enriched GO Biological Process terms. Nodes represent enriched terms colored by significance; edges indicate Jaccard similarity >0.2 . A central immune-inflammatory module is observed, with metabolic terms positioned peripherally.
Factor analysis, often regarded as a Bayesian variant of matrix factorization, offers superior capabilities in capturing uncertainty, modeling complex dependencies, and ensuring robustness. As the deep learning era arrives, factor analysis is receiving less and less attention due to their limited expressive ability. On the contrary, contrastive learning has emerged as a potent technique with demonstrated efficacy in unsupervised representational learning. While the two methods are different paradigms, recent theoretical analysis has revealed the mathematical equivalence between contrastive learning and matrix factorization, providing a potential possibility for factor analysis combined with contrastive learning. Motivated by the interconnectedness of contrastive learning, matrix factorization, and factor analysis, this paper introduces a novel Contrastive Factor Analysis framework, aiming to leverage factor analysis's advantageous properties within the realm of contrastive learning. To further leverage the interpretability properties of non-negative factor analysis, which can learn disentangled representations, contrastive factor analysis is extended to a non-negative version. Finally, extensive experimental validation showcases the efficacy of the proposed contrastive (non-negative) factor analysis methodology across multiple key properties, including expressiveness, robustness, interpretability, and accurate uncertainty estimation.
Zhibin Duan, Tiansheng Wen, Yifei Wang +3
Xidian University · MIT CSAIL · The University of Texas at Austin
Topic models learn gene programs from single-cell RNA sequencing (scRNA-seq) data, and the same counts are then used to test which genes and donors are associated with those programs. Count splitting is the standard remedy for this reuse, but it has not been tested when an encoder reads each cell's counts. On a 104,400-cell lupus cohort with 300 permuted null genes per run, naive tests rejected 36% of null gene-topic pairs at a nominal 5% level, and the usual two-way split rejected 38%, because the encoder sees the tested gene's own held-out count. Encoding topic usage on a separate third of the counts, with beta-binomial thinning, lowered this to 7.7% (6.7% for genes outside the model); for two other models, LDVAE and scETM, the rate was 7.0-7.3% (naive 51-59%). A label-free interferon program shifts in held-out counts in the lupus cohort and in a pre-specified COVID-19 cohort, and donor-level topic usage predicts disease (AUROC 0.96) beyond cell-type proportions (0.86 and 0.58 in the two cohorts). Calibration and prediction did not depend on the model. We do not claim better clustering, prediction or topic stability. Code, figures and result tables are public (MIT license; DOI 10.5281/zenodo.23307193).
Zheng Qu
Fei Tian College Northern Campus, Middletown, NY, 10940, USA
We present Supervised Deep Multimodal Matrix Factorization (SD3MF), an interpretable framework for integrative brain network analysis that generalizes Symmetric Nonnegative Matrix Tri-Factorization (SNMTF) from unsupervised single-graph clustering to supervised prediction over populations of multimodal graphs. SD3MF learns deep hierarchical factorizations for each modality together with a shared latent representation that aligns subjects across views. An encoder-decoder formulation jointly optimizes graph reconstruction and supervised prediction, while adaptive weights enable data-driven multimodal fusion. By representing each subject through community-level interaction matrices, the model yields interpretable and discriminative features. Experiments on multimodal connectome datasets show that SD3MF consistently outperforms strong deep learning baselines such as CNNs and GNNs, while enabling biologically interpretable insights. Code for reproducibility is available at: https://github.com/amjadseyedi/SD3MF.
Amjad Seyedi, Lifang He, Songlin Zhao +2
Dept. of Mathematics & Operational Research University of Mons, Mons, Belgium · Dept. of Computer Science & Engineering Lehigh University, Bethlehem, PA, USA · Dept. of Industrial & Systems Engineering Lehigh University, Bethlehem, PA, USA