A bulk RNA-seq encoder distilled from
ConvergeBio/virtual-cell-patient.
It maps bulk gene expression directly into the same 512-dimensional patient embedding space,
making single-cell-trained representations accessible when only bulk data is available.
Training objective: cosine distillation loss, with teacher embeddings produced by
virtual-cell-patient on matched single-cell RNA-seq data from the same patients.
Note:ConvergeBio/virtual-cell-distil-bulk-example is a minimal sample dataset
intended only to verify the data format and run a quick end-to-end check.
Metrics produced from this dataset should not be interpreted.
Fine-tuning for classification
The pretrained encoder can be fine-tuned on any bulk RNA-seq classification task.
A linear head is added on top; the encoder weights are initialised from the distilled
checkpoint and optionally frozen.
python
1from transformers import AutoModelForSequenceClassification
23model = AutoModelForSequenceClassification.from_pretrained(4"ConvergeBio/virtual-cell-distil-bulk",5 num_labels=2,6 ignore_mismatched_sizes=True,# classification head is randomly initialised7 trust_remote_code=True,8)
Binary classification (e.g. disease vs. healthy) with frozen encoder:
train.py expects a HuggingFace dataset with train (and optionally validation) splits.
Each row represents one patient sample:
Column
Shape
Type
Description
bulk_expression
[18301]
float32
Log-normalised bulk gene expression, aligned to gene_names.txt
labels
scalar
int
Class index
Input expression should be library-size normalised (target sum 10,000) and log1p
transformed. The gene axis must be aligned to the 18,301 genes in gene_names.txt —
missing genes are zero-filled, extra genes are dropped.
For a guide on building this dataset from raw count matrices, see the
example dataset.
Repository contents
File
Description
modeling_virtual_cell_distil.py
Full model implementation
config.json
Architecture config
gene_names.txt
Ordered list of 18,301 HGNC gene symbols
train.py
Classification fine-tuning script
requirements.txt
Python dependencies
model.safetensors
Pretrained encoder weights
Citation
If you use this model, please cite:
bibtex
1@article{convergecell2026,
2 author = {ConvergeBio},
3 title = {ConvergeCELL: An end-to-end platform from patient transcriptomics to therapeutic hypotheses},
4 year = {2026},
5 note = {Preprint available on bioRxiv},
6}