- Published on
- 33 min read
CellGemma explained: how Google DeepMind's single-cell model works, how to use it, and where it falls short

- Authors

- Name
- BioTech Bench
Table of contents
- What you'll learn
- What problem is CellGemma solving? (And why older single-cell AI models hit a wall)
- How CellGemma works under the hood (without the machine-learning jargon)
- Seeing the math by hand in Python: why the mean-shift trap fools standard models
- How to use CellGemma in practice: a step-by-step guide
- Strong points: where CellGemma genuinely shines
- 1. First broad-coverage model to beat the population mean-shift wall across all 32 splits
- 2. Real prospective wet-lab validation: sensitizing resistant thyroid cancer to CAR-T cells
- 3. True Apache 2.0 open weights that run on a single GPU
- 4. Four intervention modalities inside one shared representation
- Weak points and honest caveats: where CellGemma falls short
- 1. 48.9% recovery means 51.1% of the true biological signal is still missing
- 2. mRNA is not surface protein — and surface protein does not guarantee cell killing
- 3. Heavy bias toward immortalized human cancer lines and blood immune cells
- 4. Stage 2 ExpressionDecoders do not cross-transfer across assays
- 5. Out-of-distribution chemistry and "on-target, off-tumor" clinical risk
- Comparison: CellGemma vs. other single-cell perturbation and foundation models
- My take: how BSc and MSc biology students should actually use it
- Resources
Picture a Tuesday afternoon meeting during your Master's thesis project. Your cancer cell line ignores the immunotherapy your lab studies because the tumor cells barely express the target protein on their plasma membrane. Your supervisor points at the -80 °C chemical library list and asks a deceptively simple question: "Is there a small-molecule drug we could add for 48 hours to force those cells to put the antigen back on their surface?"
If you try answering that solely at the wet-lab bench, the math turns brutal fast. Screening even 20 candidate compounds across three cell lines and three concentrations by flow cytometry or single-cell RNA sequencing (scRNA-seq) will eat two months in the tissue-culture hood and most of your consumable budget. Screening 15,000 compounds — or knocking down all ~20,000 human protein-coding genes one by one — is flatly out of reach for almost every academic group on Earth.
On December 1, 2026, researchers at Google DeepMind, Google Research, the University of Pennsylvania, and the University of Michigan (co-led by first authors Eric Wang and Parsa Mahmoudieh, with senior authors Daniel J. Baker and Shekoofeh Azizi) released CellGemma (google/cellgemma-e4b) under an Apache 2.0 open-weights license alongside their technical report, "Predicting Transcriptional Responses to Diverse Perturbations with CellGemma". Instead of needing a data-center cluster, the model fits on a single modern workstation GPU and predicts how a human cell's transcriptome shifts after you hit it with a drug, a CRISPR edit, a cytokine, or a clinical treatment.
Let's get one confusion out of the way immediately: despite having "Gemma" in the name, CellGemma is not a chatbot. If you type "What does TP53 do?" into it, it won't write you an essay. You feed it a baseline single-cell expression profile plus an experimental intervention, and it outputs a ranked list of genes predicted to move up or down beyond generic background cell stress — which a lightweight neural network head then converts into log-fold changes across ~20,000 human genes.
Here is the plain-language breakdown for BSc and MSc students across molecular biology, biotechnology, biomedical sciences, and early bioinformatics: what problem CellGemma solves, why earlier single-cell AI models kept tripping over a simple statistical baseline, how you can run it yourself, where it genuinely shines, and where it falls short.
What you'll learn
- Why predicting perturbation responses is much harder than standard scRNA-seq clustering, and why a 2025 Nature Methods paper showed most earlier deep-learning models losing to a simple population average
- How CellGemma works under the hood, from its
19,881whole-gene vocabulary and564 million-cell pretraining corpus to its two-stageCellGemma LLM+ExpressionDecoderdesign - Why subtracting the "mean shift" matters, demonstrated in a 45-line pure-Python script you can run on any laptop in two seconds
- How to use
google/cellgemma-e4bstep by step, including GPU memory requirements, picking the rightdecoders/<dataset>/head, and formatting chemical SMILES or CRISPR prompts - CellGemma's biggest strengths, backed by its
48.9%benchmark score across 32 held-out splits and a real wet-lab CAR-T sensitization screen in resistant thyroid cancer - The honest weak points, including why
51.1%of biological signal stays unrecovered, why mRNA upregulation inTPC-1cells still didn't guarantee CAR-T killing, and why non-cancer/non-human projects can't just plug it in
What problem is CellGemma solving? (And why older single-cell AI models hit a wall)
If you've worked through what single-cell RNA-seq measures or built your first UMAP in Seurat, you already know what standard scRNA-seq gives you: a snapshot of which mRNAs are present inside thousands of individual cells right now. That snapshot is great for cataloging cell types in a tumor biopsy, but by itself it is observational. It tells you what cells are, not what they would do if you perturbed them with something new.
Over the past few years, high-throughput single-cell perturbation assays changed the scale of experimental data we can collect:
- Perturb-seq pairs pooled lentiviral CRISPR knockouts, CRISPRi knockdowns, or CRISPRa activations with droplet scRNA-seq so every sequenced cell reveals both which guide RNA it received and how its entire transcriptome responded.
- Multiplexed chemical transcriptomics (
SciPlexnuclear hashing and split-pool platforms likeTahoe-100M) barcodes cells across thousands of wells treated with different small molecules and doses, then sequences millions of cells together.
With hundreds of millions of perturbed cells suddenly available in public repositories, computational labs raced to build single-cell foundation models (scGPT, Geneformer, GEARS, scFoundation, C2S-Scale) trained much like language models — hoping to predict the outcome of drugs or gene knockouts nobody had tested yet.
Then came a sobering reality check. In August 2025, Constantin Ahlmann-Eltze, Wolfgang Huber, and Simon Anders published a landmark paper in Nature Methods (doi:10.1038/s41592-025-02772-6) showing that on unseen genetic perturbations, celebrated deep-learning foundation models did not outperform dirt-simple linear baselines — and often didn't even beat predicting the dataset-wide average perturbation shift.
How could billion-parameter neural networks look great in their original papers and still lose to a simple average? Two reasons every bench biologist will recognize right away:
- Raw correlation is inflated by housekeeping genes and zeros. In any single human cell, roughly 90% of the ~20,000 protein-coding genes sit at zero UMIs (a thyroid cell doesn't transcribe insulin
INSor hemoglobinHBB), while ribosomal and cytoskeletal genes (EEF1A1,ACTB,GAPDH) always sit near the top. If your "model" lazily predicts that a drug changes nothing at all, your predicted post-treatment cell will still correlate with the real treated cell at Pearsonr > 0.90. - Every dish experiment triggers a loud, shared stress response. Dissociate cells, bathe them in
0.1%DMSO or transduce them with lentivirus, and apply almost any bioactive compound: heat-shock chaperones (HSPA1A), ER-stress sensors (DDIT3), and cell-cycle brakes (CDKN1A,GADD45A) shoot up across the entire plate, while proliferation markers (MKI67,TOP2A) dip. That shared generic response — the mean shift — accounts for a huge chunk of all differential gene expression. Standard models spent most of their capacity re-learning generic plate stress instead of isolating the subtle pathway signature unique to your compound.
CellGemma was built from the ground up around that exact lesson.
How CellGemma works under the hood (without the machine-learning jargon)
Instead of asking a neural network to predict an entire 20,000-gene post-treatment cell from scratch, Wang, Mahmoudieh, and colleagues redesigned three pieces of the modeling stack: how genes are tokenized, what data the model sees, and how discrete gene rankings turn back into continuous expression numbers.
1. Whole-gene tokens (19,881 human genes) instead of chopped-up subwords
Standard large language models read English text through a subword tokenizer. Common English words get a single token, while unfamiliar scientific strings get sliced into syllable-sized chunks: a gene symbol like GPNMB gets chopped into GP + NM + B, and CDKN1A becomes CD + KN + 1 + A. That wastes context window space and forces early transformer layers to memorize spelling before they can model transcription factor networks.
Building on earlier Cell2Sentence (C2S) work — which turns a single cell's count vector into an ordered "sentence" of gene names sorted from highest to lowest expression — CellGemma starts from Google's compact Gemma 4 E4B backbone and expands its vocabulary to roughly 282,000 tokens by adding 19,881 dedicated human protein-coding gene tokens.
Even better, its output tokens carry explicit direction signs:
+GENE(such as+GPNMB) means this gene shifts higher than the dataset's average perturbation response.-GENE(such as-EPHA2) means this gene shifts lower than the dataset's average perturbation response.
If you glance at the Hugging Face model card and wonder why Gemma 4 E4B is described as having "8B total parameters / ~4.5B effective parameters", here is the plain-English translation: Gemma 4 E4B stores large lookup tables called per-layer embeddings (bringing total stored weights to ~8 billion), while only ~4.5 billion parameters participate in the heavy matrix math on each token across its 42 transformer layers. Practically, that gives you big-vocabulary expressiveness at the speed and memory footprint of a small workstation model.
2. Two-phase training: 564 million baseline cells, then 15,905 perturbations
CellGemma learns biology in two phases, much like a student taking foundational cell biology before specializing in pharmacology:
- Unperturbed pretraining (
564 millionsingle-cell profiles, ~500 billiontokens): First, the model reads hundreds of millions of unperturbed human cells compiled from CELLxGENE, the Human Cell Atlas (HCA), and scBaseCount. Predicting missing or subsequent genes in ordered cell sentences teaches the weights baseline co-regulation — which surface markers define a T cell versus a thyroid epithelial cell, and which target genes rise wheneverMYCorSTAT1is active. - Perturbation fine-tuning (
10public datasets,15,905perturbations,235cell lines,20tissue lineages): Next, the team fine-tuned CellGemma across four distinct biological intervention classes:- Small-molecule drugs (represented by concentration plus their SMILES string — a standard plain-text line notation for chemical structures, like
CC(=O)OC1=CC=CC=C1C(=O)Ofor aspirin):Tahoe-100M(tahoe),EmeraldBay(emeraldbay),SciPlex(sciplex), and bulkLINCS L1000(l1000). - CRISPR genetic perturbations (knockouts, CRISPRi knockdowns, CRISPRa activations, and two-gene combinations):
Nadig/ReploglePerturb-seq (nadig/replogle),Normancombinatorial CRISPRa (norman), and theVirtual Cell Challenge(vcc). - Cytokines and immune signaling proteins:
Parse Biosciences 10M PBMC(parse) andDongimmune cytokine profiles (dong). - Clinical patient tumor cohorts:
TISCH2(tisch).
- Small-molecule drugs (represented by concentration plus their SMILES string — a standard plain-text line notation for chemical structures, like
3. The two-stage residual pipeline: CellGemma LLM + ExpressionDecoder
Transformers are great at discrete sequence reasoning and terrible at spitting out 20,000 calibrated decimal numbers in text. Worse, a log1p-normalized UMI count from a 10x Genomics droplet assay does not sit on the same numerical scale as a split-pool Parse library or a LINCS L1000 z-score.
To solve both problems cleanly, CellGemma splits prediction into two stages, illustrated in Figure 1:

Figure 1. Architecture of the two-stage CellGemma inference pipeline. Stage 1 (google/cellgemma-e4b) takes the baseline single-cell sentence (Source:), the dataset-wide average response (Mean Global prediction:), and the intervention (Perturbation:) and predicts only the prioritized residual gene tokens (+GENE / -GENE). Stage 2 (decoders/<dataset>/) uses a lightweight, assay-matched multilayer perceptron (ExpressionDecoder) to translate those discrete residual rankings plus baseline expression into continuous post-perturbation expression and log-fold change (LFC) vectors. Generated in R (ggplot2) from the official architecture specifications in Wang, Mahmoudieh et al. (2026).
Look at how clean that division of labor in Figure 1 is:
- Stage 1 (
google/cellgemma-e4b) is handed the dataset'sMean Global predictionright inside the prompt. Because the generic plate shift is already given, the language model spends 100% of its output budget ranking the residual — the genes that behave differently under this specific drug or CRISPR guide compared with the average treatment in that experiment. - Stage 2 (
ExpressionDecoder) is a small multilayer perceptron (MLP — a classic feedforward neural network just a few megabytes in size, saved underdecoders/<dataset>/alongsideconfig.jsonandmean_delta_global.json). It takes Stage 1's ranked+GENE/-GENEtokens plus your cell's starting expression vector and reconstructs continuous post-perturbation expression values calibrated to your specific sequencing platform.
Seeing the math by hand in Python: why the mean-shift trap fools standard models
Before touching a GPU or Hugging Face library, let's build concrete intuition for why CellGemma's residual setup works. You can run the standard-library Python script below on any Windows, Mac, or Linux laptop right now — zero external packages required.
We'll take a 15-gene slice of a single thyroid carcinoma droplet (2,500 total UMIs) containing all four gene classes you meet in real scRNA-seq count matrices: five silent non-thyroid tissue markers (0 UMIs), three abundant housekeeping genes (EEF1A1, ACTB, GAPDH), four generic plate-stress genes (HSPA1A, DDIT3, CDKN1A, GADD45A), and three pathway-specific genes responding to an EphB4/EphA2 kinase inhibitor (MKI67, EPHA2, and the CAR-T target GPNMB). Then we'll apply standard single-cell log normalization (log(UMI / total_UMI * 10,000 + 1)), build the baseline cell sentence, and compare raw Pearson r against mean-subtracted residuals:
import math
# 15-gene slice of a single-cell transcriptome (raw UMI counts + 1,118 background UMIs):
# - 5 silent non-thyroid genes (90%+ of real scRNA-seq genes are zeros)
# - 3 high-expression housekeeping genes
# - 4 generic drug/culture stress genes (shift in almost EVERY perturbation)
# - 3 pathway-specific genes responsive to EphB4/EphA2 kinase inhibition
genes = [
"INS", "ALB", "HBB", "MYH7", "SYN1", # Unexpressed tissue markers (0 UMIs)
"EEF1A1", "ACTB", "GAPDH", # High-abundance housekeeping
"HSPA1A", "DDIT3", "CDKN1A", "GADD45A", # Shared culture / drug stress
"MKI67", "EPHA2", "GPNMB", # Specific drug-response biology
]
umi_ctrl = [0, 0, 0, 0, 0, 520, 420, 310, 18, 6, 14, 9, 45, 38, 2]
total_ctrl = sum(umi_ctrl) + 1118 # 2,500 total UMIs captured in the droplet
# Standard scRNA-seq log1p(CP10K) normalization: log(UMI / total_UMI * 10,000 + 1)
base_expr = [math.log1p((c / total_ctrl) * 10000) for c in umi_ctrl]
# Dataset-wide Mean Global delta across hundreds of compounds in the plate
mean_global_delta = [
0.00, 0.00, 0.00, 0.00, 0.00,
-0.02, -0.02, -0.03,
+1.85, +1.40, +1.25, +0.95,
-0.55, -0.10, +0.08,
]
# Observed post-treatment log1p(CP10K) after EphB4/EphA2 inhibitor treatment
obs_delta = [
0.00, 0.00, 0.00, 0.00, 0.00,
-0.01, -0.01, -0.04,
+1.80, +1.35, +1.30, +0.90,
-1.45, -1.35, +2.48,
]
obs_post = [b + d for b, d in zip(base_expr, obs_delta)]
mean_shift_post = [b + d for b, d in zip(base_expr, mean_global_delta)]
residuals = [od - md for od, md in zip(obs_delta, mean_global_delta)]
def pearson(x, y):
mx, my = sum(x) / len(x), sum(y) / len(y)
num = sum((a - mx) * (b - my) for a, b in zip(x, y))
den = math.sqrt(sum((a - mx) ** 2 for a in x) * sum((b - my) ** 2 for b in y))
return num / den
# Ordered baseline "cell sentence" (expressed genes only, ranked high -> low)
cell_sentence = [
g for val, g in sorted(zip(base_expr, genes), reverse=True) if val > 0
]
print("Baseline cell sentence (10 expressed genes, ordered high -> low):")
print(" " + " ".join(cell_sentence))
print("\nWhy raw expression correlation is a trap:")
print(f" No-change baseline vs. observed post-treatment (raw Pearson r) : {pearson(obs_post, base_expr):.3f}")
print(f" Mean-Shift baseline vs. observed post-treatment (raw Pearson r): {pearson(obs_post, mean_shift_post):.3f}")
print(f" Mean-Shift baseline vs. observed shift (Pearson delta) : {pearson(obs_delta, mean_global_delta):.3f}")
print("\nExpressed gene decomposition (log1p CP10K):")
print(f" {'Gene':<8} {'Base':>6} {'Obs_Delta':>10} {'Mean_Global':>12} {'Residual':>10}")
for g, b, od, md, res in zip(genes[5:], base_expr[5:], obs_delta[5:], mean_global_delta[5:], residuals[5:]):
print(f" {g:<8} {b:6.2f} {od:+10.2f} {md:+12.2f} {res:+10.2f}")
residual_tokens = [
f"{'+' if res > 0 else '-'}{g}"
for _, res, g in sorted(
[(abs(r), r, g) for g, r in zip(genes, residuals) if abs(r) >= 0.25],
reverse=True,
)
]
print("\nStage 1-style ranked residual tokens (|residual| >= 0.25):")
print(" " + " ".join(residual_tokens))
Baseline cell sentence (10 expressed genes, ordered high -> low):
EEF1A1 ACTB GAPDH MKI67 EPHA2 HSPA1A CDKN1A GADD45A DDIT3 GPNMB
Why raw expression correlation is a trap:
No-change baseline vs. observed post-treatment (raw Pearson r) : 0.932
Mean-Shift baseline vs. observed post-treatment (raw Pearson r): 0.967
Mean-Shift baseline vs. observed shift (Pearson delta) : 0.703
Expressed gene decomposition (log1p CP10K):
Gene Base Obs_Delta Mean_Global Residual
EEF1A1 7.64 -0.01 -0.02 +0.01
ACTB 7.43 -0.01 -0.02 +0.01
GAPDH 7.12 -0.04 -0.03 -0.01
HSPA1A 4.29 +1.80 +1.85 -0.05
DDIT3 3.22 +1.35 +1.40 -0.05
CDKN1A 4.04 +1.30 +1.25 +0.05
GADD45A 3.61 +0.90 +0.95 -0.05
MKI67 5.20 -1.45 -0.55 -0.90
EPHA2 5.03 -1.35 -0.10 -1.25
GPNMB 2.20 +2.48 +0.08 +2.40
Stage 1-style ranked residual tokens (|residual| >= 0.25):
+GPNMB -EPHA2 -MKI67
Pause on those three correlation lines in the output, because they explain two years of single-cell AI debates in ten seconds:
- Predicting literally nothing (
No-change baseline) scoresr = 0.932on raw post-treatment expression. Across a full 20,000-gene transcriptome with 18,000 zeros, that number routinely clears0.97. Whenever you read an AI biology preprint bragging about raw post-perturbation Pearsonr, check immediately whether they subtracted the unperturbed control. - Even on expression changes (
Pearson delta), the naiveMean-Shift baselinescores0.703without knowing a single thing about your drug. It getsHSPA1A,DDIT3,CDKN1A, andGADD45Aright simply because every stressed dish in the dataset pushed those four genes up — while completely missing+GPNMB (+2.48)and-EPHA2 (-1.35). - Subtracting
Mean_Globalmakes the generic stress genes vanish. Look at Figure 2: in Panel A, orange stress bars crowd the plot right alongside your real biology; in Panel B, onceMean_Globalis subtracted out, all four stress genes collapse to±0.05and the true compound-specific residual tokens —+GPNMB,-EPHA2, and-MKI67— stand alone.

Figure 2. Total observed expression shift (Obs_Delta, Panel A) versus mean-subtracted residual shift (Obs_Delta - Mean_Global, Panel B) across the ten expressed genes in our walkthrough. Conditioning on the dataset-wide Mean Global response strips away shared plate stress (amber) so Stage 1 only needs to rank true perturbation-specific shifts (teal). Output of the walkthrough data plotted in R (ggplot2).
How to use CellGemma in practice: a step-by-step guide
🔗 huggingface.co/google/cellgemma-e4b
Unlike web-portal tools such as the AlphaFold3 Server, there is no point-and-click form where you upload an Excel spreadsheet of qPCR values. You interact with CellGemma in Python through Hugging Face transformers, either inside a Google Colab notebook (the fastest route for BSc and MSc students) or on a local Linux GPU workstation.
Here is how to set up a real run without getting tripped up by VRAM errors or mismatched decoders.
Step 1: Check your GPU hardware before downloading 16+ GB of weights
Because google/cellgemma-e4b holds ~8 billion total parameters, loading the full weights in native bfloat16 precision takes roughly 18–20 GB of GPU video memory (VRAM):
- Native
bfloat16(~18–20 GBVRAM): Runs at full precision on a single NVIDIARTX 3090/RTX 4090(24 GB),RTX A5000, university clusterA100/L40S, or a Google ColabL4(22.5 GB) /A100runtime. - 4-bit
NF4quantization viabitsandbytes(~6–8 GBVRAM): Compresses the weights so you can explore prompts and run modest virtual screens on a free Google ColabT4(16 GB) GPU or a modern 16 GB desktop card, trading a small dip in numerical precision for much lower memory use. - CPU-only laptops: Don't try running full single-cell inference on a standard 16 GB student laptop without an NVIDIA GPU. Even if RAM swap keeps Python alive, generating thousands of tokens across hundreds of cells on CPU will crawl at minutes per cell.
Step 2: Pick the matching Stage 2 decoders/<dataset>/ head first
Inside the google/cellgemma-e4b Hugging Face repository, the decoders/ folder ships pretrained Stage 2 ExpressionDecoder MLPs (config.json, model.safetensors, and mean_delta_global.json) for all 10 fine-tuning datasets. Before you format a single cell, pick the decoder whose experimental assay and normalization closest match your question:
- Small-molecule drug screens:
tahoe(Tahoe-100Msingle-cell cancer drug atlas — best default for human cancer cell-line drug screens),emeraldbay,sciplex(SciPlexmultiplexed cancer lines), orl1000(bulkLINCS L1000landmark expression signatures). - CRISPR knockdowns, knockouts, and activations:
nadig/replogle(genome-scale Perturb-seq CRISPRi inK562andRPE1),norman(single and paired-guide CRISPRa inK562), orvcc(Virtual Cell Challengeperturbation split). - Cytokine stimulation and clinical tumor samples:
parse(Parse 10Mcytokine-treated human PBMCs),dong(immune cytokine responses), ortisch(TISCH2clinical tumor cohorts).
Step 3: Build the exact Stage 1 prompt in Python
CellGemma expects a strict non-conversational prompt template wrapped in Gemma turn markers (<|turn>user ... <turn|>\n<|turn>model\n), beginning with a fixed instruction preamble followed by Source:, Mean Global prediction:, and Perturbation:.
For small molecules, you include both the concentration and the compound's SMILES string (you can copy any compound's Canonical SMILES straight off PubChem — below we use PubChem CID 16747388 for NVP-BHG712, the lead kinase inhibitor from the CellGemma thyroid cancer study). Let's run a small pure-Python prompt builder locally to inspect the exact string Stage 1 expects:
PREAMBLE = (
"Examine how the single-cell sample, captured in 'Source:', responds "
"transcriptionally to the perturbation under the stated experimental conditions. "
"You are given the dataset-wide average prediction in 'Mean Global prediction:' "
"and you need to predict the residual from that mean to the true final expression."
)
def build_cellgemma_prompt(source_sentence, mean_global_context, perturbation_spec):
return (
f"<|turn>user\n"
f"{PREAMBLE}\n\n"
f"Source: {source_sentence}\n"
f"Mean Global prediction: {mean_global_context}\n"
f"Perturbation: {perturbation_spec}\n"
f"<turn|>\n"
f"<|turn>model\n"
)
nvp_bhg712_smiles = "CN1N=CC2=C1C(=NC(=N2)NC3=CC(=C(C=C3)C(=O)NC4=CC=CC(=C4)C(F)(F)F)C)C5=CN=CC=C5"
prompt = build_cellgemma_prompt(
source_sentence="IHH-4 thyroid carcinoma cell | EEF1A1 ACTB GAPDH MKI67 EPHA2 HSPA1A CDKN1A GADD45A DDIT3 GPNMB",
mean_global_context="+HSPA1A +DDIT3 +CDKN1A +GADD45A -MKI67",
perturbation_spec=f"Small molecule NVP-BHG712 | concentration: 0.5 uM | SMILES: {nvp_bhg712_smiles}",
)
print(prompt, end="")
<|turn>user
Examine how the single-cell sample, captured in 'Source:', responds transcriptionally to the perturbation under the stated experimental conditions. You are given the dataset-wide average prediction in 'Mean Global prediction:' and you need to predict the residual from that mean to the true final expression.
Source: IHH-4 thyroid carcinoma cell | EEF1A1 ACTB GAPDH MKI67 EPHA2 HSPA1A CDKN1A GADD45A DDIT3 GPNMB
Mean Global prediction: +HSPA1A +DDIT3 +CDKN1A +GADD45A -MKI67
Perturbation: Small molecule NVP-BHG712 | concentration: 0.5 uM | SMILES: CN1N=CC2=C1C(=NC(=N2)NC3=CC(=C(C=C3)C(=O)NC4=CC=CC(=C4)C(F)(F)F)C)C5=CN=CC=C5
<turn|>
<|turn>model
In a real run using the official Hugging Face Colab notebook, your Source: line carries the full rank-ordered sentence of expressed human protein-coding genes from a control cell in your .h5ad (Scanpy/AnnData) or exported Seurat count matrix, while Mean Global prediction: is populated directly from the matching dataset's mean_delta_global.json baseline file.
Step 4: Load google/cellgemma-e4b on a GPU runtime
Because the Linux machine we build this blog on has no NVIDIA GPU attached, we won't fake a model.generate() console printout here. Instead, here are the two clean, syntax-verified helper functions (load_cellgemma_stage1 and predict_residual_tokens) you can paste directly into a Google Colab GPU cell after installing transformers, accelerate, safetensors, and bitsandbytes:
def load_cellgemma_stage1(model_id="google/cellgemma-e4b", use_4bit=False):
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
tokenizer = AutoTokenizer.from_pretrained(model_id)
quant_cfg = (
BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_quant_type="nf4",
)
if use_4bit
else None
)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
quantization_config=quant_cfg,
device_map="auto",
)
model.eval()
return tokenizer, model
def predict_residual_tokens(prompt, tokenizer, model, max_new_tokens=1024):
import torch
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
prompt_len = inputs["input_ids"].shape[1]
with torch.inference_mode():
output_ids = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
do_sample=False,
)
return tokenizer.decode(output_ids[0][prompt_len:], skip_special_tokens=True)
Notice do_sample=False inside model.generate(). When you use a conversational chatbot to brainstorm an email, random sampling (temperature > 0) makes the prose feel varied. When you are ranking drug candidates across 1,000 perturbations for a thesis experiment, you want deterministic greedy decoding so running the same cell and SMILES string twice gives you the exact same ranked +GENE / -GENE token list. From there, the official evaluation script on the google/cellgemma-e4b model card passes those decoded tokens and your baseline expression vector through decoders/<dataset>/model.safetensors to hand back a 20,000-gene log-fold change vector ready for volcano plots or pathway enrichment.
Strong points: where CellGemma genuinely shines
Plenty of AI-for-biology announcements look impressive in a blog graphic and fall apart the moment an independent benchmark tests held-out biology. Four things about the CellGemma release stand up well under scrutiny.
1. First broad-coverage model to beat the population mean-shift wall across all 32 splits
Wang, Mahmoudieh, and colleagues evaluated CellGemma across 32 held-out generalization splits spanning the 10 perturbation datasets — testing unseen drugs, unseen chemical mechanisms of action, unseen cell lines, unseen human donors, and unseen two-gene CRISPR combinations across the full transcriptome without cherry-picking top variable genes.
Instead of raw Pearson r, they scored every model on Normalized Recovery: a 0% to 100% scale where 0% means predicting no change and 100% equals the experimental agreement between real biological replicates in the wet lab. Figure 3 plots the headline numbers from Figure 3a of the technical report:

Figure 3. Mean Normalized Recovery of differential-expression correlation across 32 held-out full-transcriptome perturbation settings (0% = no change predicted; 100% = experimental replicate ceiling). CellGemma (48.9%) is the only broad-coverage model in the benchmark to surpass the 32.7% population Mean-Shift Baseline across all 32 individual splits, outperforming much larger general cell-sentence models (C2S-Scale 27B, 16.2%) and earlier single-cell foundation models (scGPT, 12.8%; GEARS, 25.9%; STATE-SE, 26.9%; TxPert, 30.8%). Plotted in R (ggplot2) from the published Figure 3a benchmark values in Wang, Mahmoudieh et al. (2026).
Two patterns in Figure 3 are worth highlighting for anyone studying computational biology:
- Formulation beats raw parameter count. Look at
C2S-Scale (27B)at16.2%versusCellGemma (4.5B effective)at48.9%, and notice how even a simplerResidual Feedforward MLPbaseline hits40.4%. Scaling a language model to 27 billion parameters doesn't save you if the model wastes its tokens predicting static housekeeping genes; explicitly separating the residual from the mean shift plus giving every human gene its own atomic token triples signal recovery at a fraction of the compute cost. - Zero collapses across 32 splits. Earlier specialized models occasionally beat the mean-shift baseline on one familiar dataset (such as
K562CRISPRi) and crashed below average on unseen chemical structures or donor PBMCs. CellGemma cleared the mean-shift bar in all 32 out of 32 held-out settings.
2. Real prospective wet-lab validation: sensitizing resistant thyroid cancer to CAR-T cells
Benchmarks on archived datasets are necessary, not sufficient. The most compelling section of the paper is a prospective wet-lab collaboration with Carl H. June's and Daniel J. Baker's immunotherapy team at the University of Pennsylvania.
CAR-T cell therapy (engineering a patient's T cells to recognize a tumor surface antigen) cures subsets of leukemia and lymphoma, yet routinely fails in solid tumors because carcinoma cells express too little of the target surface protein for CAR-T cells to latch onto. In thyroid carcinoma, GPNMB (Glycoprotein Nonmetastatic Melanoma Protein B) is an attractive CAR-T target, except aggressive human thyroid cancer lines (B-CPAP, IHH-4, and TPC-1) express low or near-undetectable baseline surface GPNMB and shrug off GPNMB-directed CAR-T cells.
The team used CellGemma to run over one million virtual simulations — combining an in silico genome-wide genetic screen (~20,000 human genes) with a virtual screen of 15,000 small-molecule compounds — hunting for drugs predicted to push +GPNMB strongly upward without killing T-cell targetability. From the top concordance hits, they ordered just five small molecules (NVP-BHG712, marimastat, DMH-1, tesaglitazar, and TGX-221) and tested them at the bench:
NVP-BHG712(a small-moleculeEphB4/EphA2receptor tyrosine kinase inhibitor) drove concentration-dependent increases in surfaceGPNMBprotein across all three thyroid carcinoma cell lines (B-CPAP,IHH-4, andTPC-1), boostedGPNMBCAR-T killing inB-CPAP, and turned previously completely unresponsiveIHH-4cells into sensitive CAR-T targets.Marimastat(a matrix metalloproteinase inhibitor) andDMH-1(a BMP type I receptor inhibitor) selectively upregulated surfaceGPNMBand enhanced CAR-T cytotoxicity inB-CPAPcells.
Think about the experimental funnel there: instead of pipetting 15,000 compounds on a robotic screening deck, a lab tested five vials and walked away with three active hits (60% protein-level hit rate) and one lead compound (NVP-BHG712) that rescued CAR-T killing across multiple lines.
3. True Apache 2.0 open weights that run on a single GPU
In our review of Profluent's OpenCRISPR-1 and our guide to AlphaFold3, we pointed out how licensing fine print often trips researchers up: AlphaFold3's web server restricts commercial drug discovery and caps daily jobs, while many biological foundation models release restricted non-commercial weights or require multi-node H100 clusters.
Releasing google/cellgemma-e4b and all ten ExpressionDecoder heads under Apache 2.0 on Hugging Face is a big deal for both academic labs and biotech spin-outs:
- Your unpublished data stays on your own machine. If your thesis project involves proprietary patient-derived organoids or a novel chemical series from a medicinal chemistry collaborator, you never have to upload sequences or SMILES strings to an external cloud API.
- Fine-tuning is legally and computationally practical. With LoRA (Low-Rank Adaptation) or a custom Stage 2
ExpressionDecoderMLP, a Master's student with one 24 GB GPU can adapt CellGemma to an internal Perturb-seq plate over a weekend.
4. Four intervention modalities inside one shared representation
Previously, if you wanted to model genetic knockouts you installed GEARS, and if you wanted to model chemical dose responses you trained a separate Morgan-fingerprint drug network (CPA or ChemCPA). Because CellGemma encodes drugs, CRISPR guides, cytokines, and clinical treatments into one shared 19,881-gene residual space, you can compare genetic phenocopying directly — asking which small molecule's +GENE/-GENE signature best mimics knocking down an undruggable transcription factor, just as the UPenn team did when pairing their 20,000-gene and 15,000-compound screens for GPNMB.
Weak points and honest caveats: where CellGemma falls short
Now for the real talk. Whenever Google DeepMind drops a biological model backed by a cancer immunotherapy story, social media immediately starts talking about "virtual cells replacing wet-lab drug screens." Do not write that in your thesis introduction. Both the benchmark numbers and the authors' own discussion section point to five serious limitations you need to understand before trusting a CellGemma prediction.
1. 48.9% recovery means 51.1% of the true biological signal is still missing
Look back at the shaded gray zone on the right half of Figure 3. Recovering 48.9% of replicate-level differential-expression signal across held-out perturbations is a major step past 32.7% — and it still leaves more than half of the achievable biological signal unrecovered.
Even inside the flagship UPenn thyroid screen, two of the five top-prioritized compounds tested at the bench — tesaglitazar and TGX-221 — produced zero detectable increase in surface GPNMB across any tested cell line, while marimastat and DMH-1 worked in B-CPAP and failed in IHH-4 and TPC-1. CellGemma is an experiment-prioritization filter that turns a 15,000-compound haystack into a 10-tube bench test; it is never proof that a pathway works.
2. mRNA is not surface protein — and surface protein does not guarantee cell killing
The single most educational result in the entire CellGemma paper is what happened in the third thyroid carcinoma line, TPC-1. When treated with NVP-BHG712, TPC-1 cells behaved just as CellGemma predicted at the antigen level: surface GPNMB protein went up. Yet when the researchers co-cultured those GPNMB-positive TPC-1 cells with GPNMB CAR-T cells, functional tumor killing stayed limited.
Why? Because CellGemma only sees and predicts polyadenylated mRNA. Between a +GPNMB transcript token and a dead cancer cell sit at least four layers of post-transcriptional cell biology the model never observes:
- Translation, folding, and membrane trafficking: Higher mRNA doesn't always reach the plasma membrane with the right glycosylation or epitope conformation.
- Post-translational signaling: Phosphorylation cascades, ubiquitin-mediated degradation, and allosteric enzyme inhibition happen in minutes without changing mRNA abundance of the modified protein itself.
- Cell-intrinsic resistance: Even when a CAR-T cell binds
GPNMBonTPC-1, high tumor expression of anti-apoptotic proteins (BCL2,BCL2L1), impaired death-receptor signaling (FAS,TNFRSF10B), weak adhesion (ICAM1), or inhibitory checkpoint ligands can blunt T-cell cytotoxicity.
3. Heavy bias toward immortalized human cancer lines and blood immune cells
Look at where CellGemma's fine-tuning perturbations actually come from: Tahoe-100M (50 human cancer cell lines), SciPlex (A549, MCF7, K562), Replogle and Norman (K562 chronic myelogenous leukemia and RPE1 retinal pigment epithelium), and Parse / Dong (peripheral blood mononuclear cells).
As the authors state candidly in their report, that leaves two massive blind spots for biology students:
- Non-human organisms are completely unsupported out of the box. All
19,881gene tokens are human HGNC protein-coding gene symbols. If your BSc or MSc project studies Arabidopsis, budding yeast, zebrafish, Drosophila, bacteria, or even primary mouse tissues without careful human-ortholog mapping (which still misses mouse-specific paralogs and lineage calibration), CellGemma won't run natively on your genes. - Primary healthy human tissues and 3D organoids are under-represented. Predicting how
K562suspension cells in RPMI media react to a kinase inhibitor is much easier than predicting how a mature human cardiomyocyte, a quiescent hematopoietic stem cell, or a vascularized brain organoid responds in vivo.
4. Stage 2 ExpressionDecoders do not cross-transfer across assays
If your lab sequences cells with plate-based full-length Smart-seq3 or runs bulk RNA-seq analyzed with DESeq2, you cannot blindly pass Stage 1 outputs into decoders/tahoe/ or decoders/l1000/ and trust the continuous log-fold changes. Each Stage 2 MLP learned the dropout profile, library-size scaling, and mean_delta_global.json baseline of one specific dataset. Applying CellGemma quantitatively to a new assay requires sequencing a small pilot batch of vehicle controls plus reference perturbations so you can compute your own dataset mean shift and retrain a lightweight Stage 2 MLP.
5. Out-of-distribution chemistry and "on-target, off-tumor" clinical risk
For completely novel chemical scaffolds whose mechanism of action sits far outside Tahoe-100M and L1000 (for example, macrocyclic molecular glues, covalent PROTAC degraders, or antisense oligonucleotides), CellGemma falls back on much weaker chemical priors and tends to regress conservatively toward the mean shift.
And on the translational biology side, the authors highlight an important clinical safety catch: if you give a patient a systemic small molecule like NVP-BHG712 to force thyroid tumors to upregulate GPNMB, what if that drug also upregulates GPNMB on healthy kidney podocytes, macrophages, or osteoblasts? Sensitizing healthy tissues to CAR-T attack causes severe on-target, off-tumor toxicity — another reason primary healthy-tissue expression checks remain essential.
Comparison: CellGemma vs. other single-cell perturbation and foundation models
If you're writing a literature review or choosing a model to benchmark for a Master's project, here is how CellGemma stacks up against the main single-cell models evaluated in the 2026 benchmark:
| Model | Core architecture | Parameter size | Perturbation types supported | 32-split recovery | Runs on 1 GPU? | License / access |
|---|---|---|---|---|---|---|
| CellGemma | Gemma 4 E4B (19,881 gene tokens) + MLP | 8B total / 4.5B effective | Drugs, CRISPR, cytokines, clinical | 48.9% | Yes (~18 GB) | Apache 2.0 (open weights) |
| C2S-Scale (27B) | Gemma-based Cell2Sentence LLM | 27B | Multi-task scRNA-seq + text QA/captions | 16.2% | No (multi-GPU) | Open weights (Gemma license) |
| TxPert | Perturbation transformer | Medium foundation model | Chemical + genetic (30 of 32 splits) | 30.8% | Yes | Research release |
| STATE-SE | State embedding + Set Transformer | 600M | Distributional single-cell perturbations | 26.9% | Yes | Open source |
| GEARS | Gene co-expression + GO graph neural net | Lightweight (~tens of M) | Genetic (single & multigene CRISPR) | 25.9% | Yes (laptop) | MIT (open source) |
| scGPT | Custom masked-expression transformer | ~50M | Embedding, annotation, perturbation | 12.8% | Yes | MIT (open source) |
| Mean-Shift Baseline | Dataset-wide average delta vector | None (simple arithmetic) | Any dataset with reference perturbations | 32.7% | Instant (CPU) | Public math |
Notice that scGPT and C2S-Scale aren't "bad models" — they were designed as Swiss-army-knife encoders or conversational cell-captioning tools for cell-type annotation, batch integration, and natural-language Q&A, tasks that CellGemma cannot do at all. CellGemma wins on perturbation forecasting precisely because it gave up being a generalist chatbot to focus entirely on mean-subtracted perturbation residuals.
My take: how BSc and MSc biology students should actually use it
If you strip away the press-release headlines, CellGemma is the first open single-cell perturbation model I'd genuinely recommend spending a weekend testing — mainly because its authors took the 2025 linear-baseline critique seriously instead of sweeping it under the rug. Giving ~20,000 human genes dedicated tokens, handing the model the dataset's Mean Global shift upfront so it stops re-predicting heat-shock chaperones, and shipping everything under Apache 2.0 at a size that fits on one Colab L4 or lab RTX 4090 are smart, practical engineering decisions.
Whether you should use it right now depends on what kind of student project you're running:
- If you're a wet-lab BSc or MSc student working on human cancer or immune cells: Use CellGemma as a funnel before you order reagents, never as a substitute for a bench experiment. If you have baseline scRNA-seq for your cell line and want to shortlist 8–10 compounds out of an institutional 2,000-drug library (or pick 10 candidate CRISPRi targets that might upregulate a receptor or reverse a drug-resistance signature), running a virtual screen in Google Colab over a weekend can genuinely sharpen your hypotheses — as long as you validate hits at the protein and functional level by flow cytometry, Western blot, or killing assays.
- If you study non-human organisms, microbiology, plants, or already ran your RNA-seq experiment: Skip CellGemma cleanly. For analyzing an experiment you already sequenced, classical statistical tools — DESeq2 for bulk counts, Seurat or
Scanpyplus pseudobulk differential expression for single-cell data — remain the gold standard. - If you're doing a computational biology or bioinformatics Master's thesis: CellGemma is a goldmine of thesis ideas. Because the weights, tokenizer, and all ten
ExpressionDecoderheads are Apache 2.0, you can benchmark zero-shot vs. LoRA-fine-tuned performance on primary patient organoids, test how 4-bit quantization affects top-50+GENEranking stability, or train custom Stage 2 decoders for spatial transcriptomics andSmart-seq3datasets — just make sure your very first control column in every thesis figure is theMean-Shift Baseline.
Treat CellGemma as a fast, free hypothesis generator that clears the population-average bar while still missing half the messy reality of a living cell, and it will serve you well.
Working on a drug screen, Perturb-seq dataset, or immunotherapy thesis project where virtual screening could narrow down your bench list — or skeptical that mRNA foundation models can capture post-transcriptional biology? Drop a comment below.
Resources
| Resource / Paper | Link | What it covers |
|---|---|---|
CellGemma weights & decoders (google/cellgemma-e4b) | huggingface.co/google/cellgemma-e4b | Official Apache 2.0 model weights, 19,881-gene tokenizer, 10 ExpressionDecoder heads, & Colab |
| CellGemma Technical Report (Wang, Mahmoudieh et al.) | storage.googleapis.com/deepmind-media/gemma/cellgemma-report.pdf | Full December 2026 preprint: 32-split benchmark, architecture, and UPenn GPNMB CAR-T validation |
| Google DeepMind CellGemma announcement | blog.google/technology/google-deepmind/cellgemma-predicting-cell-responses-to-help-accelerate-cancer-research/ | High-level overview of the Gemma 4 E4B biology release and cancer research partnership |
| Ahlmann-Eltze, Huber & Anders (2025), Nature Methods | doi.org/10.1038/s41592-025-02772-6 | Landmark benchmark showing earlier perturbation models failing to beat simple linear baselines |
| PubChem: NVP-BHG712 (CID 16747388) | pubchem.ncbi.nlm.nih.gov/compound/16747388 | Canonical SMILES structure and target profile (EphB4/EphA2) for the top thyroid CAR-T hit |
| CELLxGENE Discover | cellxgene.cziscience.com | Public human single-cell RNA-seq atlas contributing to CellGemma's 564M-cell pretraining corpus |
| What is single-cell RNA sequencing? (BioTech Bench) | /blog/what-is-single-cell-rna-sequencing-scrna-seq-explained | Beginner-friendly walkthrough of droplet barcoding, UMIs, sparsity, normalization, and UMAPs |
| Your first scRNA-seq analysis in R with Seurat | /blog/seurat-scrna-seq-tutorial-beginners | Hands-on R tutorial from raw single-cell count matrix to QC, clustering, and marker annotation |
Keep reading
OpenCRISPR-1 review: how Profluent's AI-designed gene editor compares to SpCas9 on mechanism, patents, and open-source licensing
A deep dive into Profluent's OpenCRISPR-1 — from the 1.25-million-operon language model that wrote it to a residue-by-residue alignment against SpCas9, head-to-head editing data, Cas9 patent thickets, and what its free license actually covers.
ToolUniverse: Democratizing AI Scientists — What It Means for Biology
A plain-language breakdown of ToolUniverse, the open-source platform from Harvard that wants to give every biologist their own AI research assistant — with 1000+ scientific tools under one roof.
Best Linux distros for bioinformatics: Fedora, Ubuntu, and Debian compared
After years of bouncing from Ubuntu to Debian and flashing half a dozen other ISOs onto a USB stick at midnight, Fedora Workstation finally cured my distro-hopping habit. Here is an honest, hands-on comparison of the top three Linux distributions for bioinformatics — where each one shines, where it bites you, and how to set up a machine you will not want to wipe six months later.