Multi-Modal Foundation · InstaDeepAI
BulkRNABert
A transformer encoder model that extracts bulk RNA-seq embeddings for cancer classification and prognosis.
What BulkRNABert is
BulkRNABert is a transformer-based, encoder-only language model developed by InstaDeep and CentraleSupélec for transcriptomic profile analysis. It is designed to learn biologically meaningful representations from bulk RNA sequencing (bulk RNA-seq) data, which measures the average gene expression across cell populations in a tissue sample.
Trained on bulk RNA-seq profiles from The Cancer Genome Atlas (TCGA), the model captures complex gene expression patterns across different cancer types. It addresses the challenge of deriving dense, informative features from high-dimensional gene expression matrices.
Researchers can use BulkRNABert to extract numerical embeddings from patient expression profiles, enabling downstream cancer-related predictive tasks such as cancer type classification and survival analysis.
How it works
BulkRNABert adopts the BERT framework using an encoder-only transformer architecture. It is trained via self-supervised masked language modelling, where random gene expression values are masked out during training and the model learns to reconstruct them based on the context of surrounding gene expressions.
Input data consists of bulk RNA expression matrices that are log-transformed using log10(1 + x) and tokenized across the model's configured gene set. During inference, tokenized gene expression IDs pass through the transformer layers, and the resulting layer representations (such as layer 4 embeddings) can be pooled across genes to yield sample-level embeddings for downstream models. The model parameters are provided for PyTorch and JAX implementations.
Key facts
- Architecture
- Transformer encoder (BERT framework)
- Pre-training objective
- Masked language modelling
- Training data
- The Cancer Genome Atlas (TCGA) bulk RNA-seq profiles
- Input format
- Log-transformed bulk RNA-seq gene expression arrays
- Output
- Gene and sample-level transcriptomic embeddings
- Supported frameworks
- PyTorch, JAX
What you can use it for
- Cancer Type Classification
- Fine-tuning extracted transcriptomic embeddings to categorise patient samples into distinct tumour types or subtypes.
- Survival Analysis
- Using sample-level representation vectors to model patient survival outcomes and prognosis from bulk tumour transcriptomes.
- Transcriptomic Feature Extraction
- Converting high-dimensional bulk RNA-seq expression arrays into compact contextual embeddings for statistical analysis or machine learning workflows.
Run it here
We list this model but cannot run it yet: it ships Python code of its own, which a person approves before it runs here (our automatic check found nothing unusual in it).
Everything on this page still applies. Running it needs a loader for this repository, not a bigger machine.
Strengths and limits
Good at
- Pre-trained on large-scale clinical bulk RNA-seq cohorts from the TCGA dataset.
- Uses self-supervised masked language modelling to learn gene co-expression contexts without requiring diagnostic labels during pre-training.
- Provides model weights compatible with both PyTorch and JAX computational frameworks.
Watch out for
- For research use only: it is not a medical device and must not be used for diagnosis, treatment or any clinical decision.
- Requires bulk RNA-seq input arrays to strictly match the expected gene count and ordering specified in the model configuration.
- Depends on specific log-transformation preprocessing of gene expression values prior to tokenization.
- Requires custom remote code execution and a development version of the transformers library for PyTorch inference.
Inputs and outputs
You provide
Sequence or text
A protein or nucleotide sequence, or free text — whichever this model was trained on.
You get back
Mean-pooled representation, one vector per input.
Licence
Check the licence before commercial use · apache-2.0
The apache-2.0 licence carries terms worth reading before you depend on it.
Questions
Can I use BulkRNABert commercially?
Check the licence before commercial use. The apache-2.0 licence carries terms worth reading before you depend on it.
What kind of data does BulkRNABert take as input?
BulkRNABert expects numerical bulk RNA-seq expression profiles preprocessed with a log10(1 + x) transformation, matching the model's predefined gene dimensions.
Which dataset was used to train BulkRNABert?
The model was pre-trained on bulk RNA-seq profiles sourced from The Cancer Genome Atlas (TCGA).
How are embeddings generated from a sample?
After tokenizing the preprocessed expression array, the input IDs pass through the transformer encoder. Embeddings from a specific layer (such as layer 4) can be averaged across genes to create a single vector per sample.
How to cite it
Gélard, M., Richard, G., Pierrot, T., & Cournède, P.-H. (2025). BulkRNABert: Cancer prognosis from bulk RNA-seq based language models. Proceedings of the 4th Machine Learning for Health Symposium, in Proceedings of Machine Learning Research, 259:384-400. https://proceedings.mlr.press/v259/gelard25a.html
Written from BulkRNABert's own documentation (model card). Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.
