Effective Biological Representation Learning by Masking Gene Expression

Kian Kenyon-Dean, Alina Selega, Ihab Bendidi, Jordan M. Sorokin, Luca Bertinetto, David Errington, Hayley Donnella, Oren KrausNeurIPS 2026

TL;DR

Despite training on hundreds of millions of cells, most "foundation models" for gene expression embarrassingly lose to simple linear baselines like PCA on unseen biological tasks. This paper reveals that the secret to beating those baselines isn't brute-force scale, but a domain-tailored Masked Autoencoder (TxFM) paired with a carefully curated dataset (DiverseRNA-1.4M). By rethinking both the math of RNA count reconstruction and what data goes into the pot, TxFM outperforms models trained on corpora over $100\times$ larger—and organically discovers real-world gene networks inside its own weights.

What Problem Does This Paper Address?

Imagine reading a symphony where every instrument plays simultaneously, half the notes are missing, and the microphone changes between recordings. That is RNA sequencing (RNA-seq): a snapshot of cellular state captured by counting thousands of RNA molecules at once, plagued by technical noise and experimental batch effects.

While deep representation learning revolutionized text and vision, applying it to transcriptomics has hit a wall. Recent benchmarks showed that massive transcriptomic foundation models consistently fail to beat raw, normalized RNA counts or Principal Component Analysis (PCA) when generalizing to new, unseen cellular contexts (inductive learning). This left researchers wondering: do raw gene counts already expose all the recoverable biology, or have we just been pretraining deep models the wrong way? The authors bet on the latter.

Methods

Unlike language, a cell's gene expression profile has no sequential word order—it is an unordered bag of molecular counts. To model this without external biological crutches (like pre-computed protein embeddings), the authors built TxFM, an asymmetric Masked Autoencoder (MAE):

Figure 1: Overview of our approach. TxFM is a self-supervised learning (SSL) model trained for masked reconstruction of partially observed gene expression count data x, from bulk and single-cell RNA-seq transcriptomic assays. We evaluate inductive representation quality of genetically per- turbed input cells (CLS token), and the functional relationships recalled by the transformer encoder’s gene codebook E ∈RG×d, and the MLP decoder’s gene reconstruction parameters D ∈RG×d.
  • Aggressive Masking & Bottlenecking: Input counts are normalized for sequencing depth and log-transformed. The model randomly reveals $K=2048$ observed genes (an ~90% masking ratio) to a Transformer encoder, concatenating each count with a learnable gene vector. Rather than using a heavy transformer decoder, TxFM forces all cellular context into a single [CLS] summary token, which a lightweight MLP decoder uses to reconstruct the entire genome's expression.
  • Poisson Loss + Rectified Tanh (Novel): Standard MSE or Negative Binomial (NB) losses struggle here—NB allows models to "cheat" by inflating dispersion parameters rather than learning rich latent representations. Instead, TxFM uses a Poisson likelihood loss, paired with a novel rectified tanh activation function. This clamps negative outputs while smoothly bounding the upper limit to the normalized library size, keeping gradients well-behaved across wildly varying expression levels.
  • Native Heterogeneity: Different experiments measure different subsets of genes. Instead of zero-padding missing features, TxFM only samples unmasked tokens and computes loss on the genes actually measured in a given sample.

Datasets

  • DiverseRNA-1.4M (Newly Curated): Instead of scraping noisy, 100M-cell atlases, the authors curated 1.43 million public samples spanning 44,349 unique genes, mixing 7 single-cell datasets and 2 bulk RNA-seq datasets (TCGA and GTEx) with a focus on cancer and perturbations. Crucially, for its largest subset (K562 CRISPRi cells), they applied phenoprint curation—filtering out ~75% of cells to keep only genetic perturbations that caused distinct transcriptional shifts.
  • Comparison & Evaluation: They also trained TxFM on the uncurated TF-Sapiens atlas (57M cells) for controlled comparisons. Models were evaluated inductively on three held-out CRISPRi genetic perturbation datasets (RPE1, HEPG2, Jurkat cell lines) and tested for intrinsic gene-network knowledge across five public interaction databases (CORUM, hu.MAP, Signor, Reactome-PPI, StringDB; ~155K relationships).

Key Insights and Ideas

  • Curation crushes brute-force scale: Training the exact same TxFM architecture on DiverseRNA-1.4M handily beat training it on the $40\times$ larger TF-Sapiens atlas, and outperformed competing foundation models trained on up to 266 million cells. Signal density matters vastly more than cell count.
  • 33,000 bulk samples punch like 450,000 single cells: Jointly training on bulk and single-cell RNA-seq unlocked a surprising synergy. Dropping just 33k bulk samples degraded single-cell perturbation performance as severely as deleting 450,000 perturbed single cells.
  • Biology lives on low-rank manifolds inside decoder weights: Without any supervision on how genes interact, TxFM's MLP decoder weights naturally organized into a map of functional biology (pathways and protein complexes)—beating sequence-based giants like ESM2 and EVO2 on pathway recall. Even cooler: shrinking model gene matrices via PCA boosted relationship recall across almost all transformer models (e.g., jumping 41–42% for STATE-SE and TranscriptFormer), showing that true biological programs concentrate in lower-dimensional subspaces.
Figure 2: Gene relationship recall as a function of PCA-postprocessing a model’s learned gene embedding parameters to n-components (codebook tokens and/or decoder reconstruction weights).

Key Results

  • Surpassing Baselines Inductively: Across held-out RPE1, HEPG2, and Jurkat cell lines, TxFM-B (trained on DiverseRNA-1.4M) achieved the highest overall score (39.11) and top linear probing accuracy (37.6%, 25.9%, and 23.8%), beating both normalized raw counts (36.29 overall) and 16 foundation models—including STATE-SE (36.43), which uses $4\times$ more parameters, $100\times$ more data, and ESM2 priors.
Table 2: Inductive SSL. Genetic perturbation representation learning results from model inference. Benchmarks on RPE1, HEPG2, and Jurkat cell lines, measuring linear separability of perturbations in cellular replicates across batches in an inductive SSL setting (data is unseen during pretraining). We report linear probing performance (lin; mean of top-1 and top-5 accuracy of linear classifier predicting perturbation identity, evaluated on held-out batches) (Bendidi et al., 2024), mean ± std across 5 random seeds. Overall is the mean of all six downstream tasks (batch effect correction, linear probing, latent space organization, perturbation consistency, biological relationship recall, and latent space interpretability), averaged across the three cell lines. Best is in bold. See § B.1.1 for task descriptions, § D for score breakdown by metric.
  • Outperforming Transductive PCA Zero-Shot: An out-of-the-box forward pass through pretrained TxFM (39.11) beat PCA fitted directly on the target evaluation data (38.72). Fine-tuning TxFM on the target data pushed the score to 41.21.
  • State-of-the-Art Gene Recall: TxFM's learned decoder weights recalled 43.9% of 155,390 known gene-gene relationships (at the 95th percentile cosine similarity threshold after PCA), topping Tahoe-3B (35.9%), ESM2 (29.7%), and EVO2 (21.3%).

Limitations and Future Work

  • Domain Bias: Because DiverseRNA-1.4M was curated with an emphasis on oncology and perturbations, its distributional biases might limit how well TxFM generalizes to unrelated biological contexts (like developmental biology or immunology).
  • Scaling Laws Remain Open: On DiverseRNA-1.4M, scaling the encoder from Small (57M) to Base (159M) helped, but jumping to Large (403M) plateaued despite lower training loss. Establishing true scaling laws for transcriptomics SSL—and mining TxFM's learned decoder manifolds to discover novel drug targets and biomarkers—are prime territories for future work.

Summary updated

Abstract

RNA sequencing produces rich and diverse datasets of gene expression, offering compelling insights into cellular state and function that have many applications in drug discovery. Modeling such data is challenging due to inherent technical noise and experimental batch effects, as evidenced by many existing transcriptomic foundation models (FMs) underperforming relative to linear baselines. Such results raise the question of whether deep representation learning provides a distinct advantage over the direct use of raw transcript counts. Our work explores this by developing a new self-supervised model, TxFM, with a focus on inductive representation learning evaluations. TxFM employs a masked autoencoding approach tailored to diverse RNA-seq count data, and our ablation study empirically identifies crucial architecture configurations required for strong transfer performance. Additionally, we curate a public training corpus, DiverseRNA-1.4M, and find that TxFM trained on this curated dataset yields high-fidelity gene representations that outperform FMs trained on atlas-scale corpora over $100\times$ larger. Overall, our results indicate that inductive self-supervised learning is a viable modeling approach for transcriptomics representation, provided a careful synthesis of model architecture and training data curation.
BibTeX
@inproceedings{kenyondean2026effective,
  author = {Kian Kenyon-Dean and Alina Selega and Ihab Bendidi and Jordan M. Sorokin and Luca Bertinetto and David Errington and Hayley Donnella and Oren Kraus},
  title = {{Effective Biological Representation Learning by Masking Gene Expression}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=N5JfcgHkY9},
}
Figure