Knowledge or sparsity? Gene set masks in a single-cell VAE

Abstract Background. Some knowledge-guided single-cell models assign gene sets to latent variables; each value then reports the activity of a known pathway. Earlier work shows that randomized versions of supervised pathway-informed networks, with the same share of zero weights, can match or outperform the curated ones. Whether the knowledge in the gene sets, or only their sparsity, explains how well unsupervised single-cell models capture a cell’s response is not known. Methods. We trained a variational autoencoder (VAE) with a linear decoder on peripheral blood mononuclear cells from eight lupus patients, stimulated with interferon-β or left as controls. The decoder was either unrestricted (vanilla) or masked; the masks were the 50 Hallmark gene sets or co-expressed gene groups found in the data. Fully random, within-set random and expression-matched random masks with the same sparsity served as references. Variants were scored on held-out reconstruction and on how well the decoder reproduces the shift in expression on stimulation, with Spearman’s rho to capture all genes without discrimination and Pearson’s r to account for the strongest responders. We repeated the comparison with Reactome pathways and with a second dataset of interferon-β-stimulated cells (four benchmarks from two datasets). Results. Every mask worsened the fit relative to the vanilla model in all tested seeds. In all four benchmarks, gene set masks reproduced the shift in expression slightly better than the random masks with Spearman correlation and better with Pearson correlation. With the Hallmark sets on the lupus data, they recovered 10% (Spearman, 95% CI [8, 11]) and 56% (Pearson, 95% CI [49, 62]) of the gap between the fully random mask and the vanilla model. They also reached a lower test loss than the random masks in seven of eight comparisons. Co-expressed groups reproduced the shift better than the gene sets in all four benchmarks and fitted better than the Hallmark sets on the lupus data. Conclusion. In these data, random masks of the same sparsity decode the response almost on par with the gene set mask. Uncurated groups of co-expressed genes found in the data exceed the gain of the gene set mask over the random masks. The curated sets offset part of the fit lost by restricting the decoder. Only the curated sets assign each latent variable a biological name chosen before training.

Authors

Publication Details

Journal
Research Square
Published
2026-11-02
DOI
https://doi.org/10.21203/rs.3.rs-11542814/v1
Primary Topic
Single-cell and spatial transcriptomics
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Knowledge or sparsity? Gene set masks in a single-cell VAE

George Miliarakis
2 links
Research Square
Single-cell and spatial transcriptomics
preprint

Knowledge or sparsity? Gene set masks in a single-cell VAE

George Miliarakis
preprint en

Abstract

Abstract Background. Some knowledge-guided single-cell models assign gene sets to latent variables; each value then reports the activity of a known pathway. Earlier work shows that randomized versions of supervised pathway-informed networks, with the same share of zero weights, can match or outperform the curated ones. Whether the knowledge in the gene sets, or only their sparsity, explains how well unsupervised single-cell models capture a cell’s response is not known. Methods. We trained a variational autoencoder (VAE) with a linear decoder on peripheral blood mononuclear cells from eight lupus patients, stimulated with interferon-β or left as controls. The decoder was either unrestricted (vanilla) or masked; the masks were the 50 Hallmark gene sets or co-expressed gene groups found in the data. Fully random, within-set random and expression-matched random masks with the same sparsity served as references. Variants were scored on held-out reconstruction and on how well the decoder reproduces the shift in expression on stimulation, with Spearman’s rho to capture all genes without discrimination and Pearson’s r to account for the strongest responders. We repeated the comparison with Reactome pathways and with a second dataset of interferon-β-stimulated cells (four benchmarks from two datasets). Results. Every mask worsened the fit relative to the vanilla model in all tested seeds. In all four benchmarks, gene set masks reproduced the shift in expression slightly better than the random masks with Spearman correlation and better with Pearson correlation. With the Hallmark sets on the lupus data, they recovered 10% (Spearman, 95% CI [8, 11]) and 56% (Pearson, 95% CI [49, 62]) of the gap between the fully random mask and the vanilla model. They also reached a lower test loss than the random masks in seven of eight comparisons. Co-expressed groups reproduced the shift better than the gene sets in all four benchmarks and fitted better than the Hallmark sets on the lupus data. Conclusion. In these data, random masks of the same sparsity decode the response almost on par with the gene set mask. Uncurated groups of co-expressed genes found in the data exceed the gain of the gene set mask over the random masks. The curated sets offset part of the fit lost by restricting the decoder. Only the curated sets assign each latent variable a biological name chosen before training.

Research Square
Single-cell and spatial transcriptomics
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon