Skip to content

About

Pre-registered test of fine-tuning google/cellgemma-e4b on human brain Perturb-seq. Result: no gene-specific predictive skill.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

cellgemma-brain

Does fine-tuning google/cellgemma-e4b on human brain CRISPR screens teach it to predict the effect of silencing a specific gene? This repository holds a pre-registered test of that question, with the code that ran it and the results. For this fine-tuning procedure on the public brain data available today, the answer is no.

Result

I fine-tuned CellGemma with low-rank adapters and a brain-trained expression decoder on 24 cohorts of microglia, astrocytes, neurons and neural progenitors. I then tested it on held-out studies against 64 pass criteria fixed before training. The run was valid and failed 30 of the 64 checks. No fine-tuned variant beat a baseline that predicts the average response of other perturbations, and predictions scored no better for the correct target than for a shuffled one. In three of the four main held-out cohorts, non-targeting control guides still produced hundreds of predicted genes. The model's existing interferon-gamma response survived fine-tuning. An independent audit of the result files confirmed the verdict.

The full write-up is docs/gate2_writeup.md. The decision file, with every check and its value, is results/gate2_pass_fail.json.

Contents

  • docs/gate2_writeup.md: the write-up of the result
  • docs/gate2_design.md: the locked design, including splits, baselines, scores and the pass rule
  • docs/gate2_independent_audit.md: the independent audit of the result files
  • docs/gate1_prespecification.md: quality-control and baseline rules for the first benchmark
  • results/: the Gate 2 decision, scoreboards and per-target tables, and the Gate 1 baseline results
  • src/cellgemma_brain/: prompt builder, GEO parsers, expression decoder, splits and scoring
  • scripts/: data download and benchmark build (00 to 07), and the Gate 2 pipeline in scripts/gate2/ (05 to 10)
  • slurm/: the two scripts that submit and run the Gate 2 stages on a Slurm cluster
  • environment/Containerfile: the Apptainer recipe for the Python and CUDA environment
  • data/sanity/: the prompts and references for the interferon-gamma retention check
  • tests/: unit and integration tests for splits, prompt serialization, decoder, scoring and job orchestration

Data

All 24 cohorts come from public human Perturb-seq screens.

Accession Study Cell type Perturbation
GSE335887 McQuade and Kampmann, Neuron 2026 microglia CRISPRi
GSE289721 Cardona et al. 2025 microglia CRISPRi
GSE311359 MS risk loci Perturb-seq in iPSC microglia, 2025 microglia CRISPRi
GSE182308 Leng et al., Nat Neurosci 2022 astrocytes CRISPRi
Tian 2021 (scPerturb) Tian et al., Nat Neurosci 2021 neurons CRISPRi, CRISPRa
GSE142078 Lalli et al., Genome Res 2020 neurons CRISPR
GSE272093 Leng et al., Neuron 2024 neurons, assembloids CRISPRi
GSE289235 CRISPRi screen for modifiers of neuronal activity neurons CRISPRi
GSE200774 Townsley, Deans et al., Nat Commun 2025 neurons CRISPRa
GSE319096 NDD-gene CRISPR screen, 2026 neurons CRISPR knockout
GSE284197 Cortical cell-fate TF CRISPRi screen, Nature 2025 neural progenitors, neurons CRISPRi
GSE250378 Sun et al. 2024 neural progenitors CRISPRi

results/dataset_catalog.json lists every candidate screen that was checked, with the reason each one was included or excluded.

Reproducing the analysis

The code needs Python 3.11 or later and the packages in requirements.txt. The tests run on a laptop:

pip install -e . pytest
pytest

Without local data, 282 tests pass and 13 skip. The skipped tests need a copy of the CellGemma tokenizer and of the processed benchmark in cache/dev/. The interferon-gamma replay test also needs the assets from cellgemma-microglia-eval. Set CELLGEMMA_MICROGLIA_EVAL to a checkout of that repository to run it.

The full run needs a Slurm cluster with GPUs of at least 80 GB. Build the container from environment/Containerfile, and set CGB_BASE, CGB_SCRATCH, CGB_SIF, SL_PARTITION and GPU_CONSTRAINT for your cluster (see slurm/config.sh). Then download the model and data, and build the benchmark:

python scripts/00_download_assets.py --datasets expanded --data-root "$CGB_SCRATCH/data"
python scripts/01_build_brain_perturb_bench.py --datasets expanded --data-root "$CGB_SCRATCH/data" --out-subdir processed_all
python scripts/04_summarize_multilineage.py --data-root "$CGB_SCRATCH/data" && python scripts/07_dataset_catalog.py

The Gate 2 stages run through slurm/submit_gate2.sh. Submit prep, preflight and main in that order:

bash slurm/submit_gate2.sh prep

The preflight measures training speed and picks either the two-fold design or the pre-registered 70/30 fallback. If it picks the fallback, main stops and asks you to rerun prep with GATE2_MODE=7030. The final job writes the scoreboards and gate2_pass_fail.json.

Notes on the published files

The recorded run digests in results/ and in the audit refer to the files as they ran. The published copies differ from those files in one way. Paths and settings specific to the cluster that was used were removed from the Slurm scripts, the container recipe, some code comments and Section 4 of the design. No analysis logic changed. The commit IDs mentioned in the design and the audit refer to the development history, which is not published.

Related work

cellgemma-microglia-eval is the zero-shot evaluation of CellGemma on human microglia that motivated this test.

License

MIT. See LICENSE.

About

Pre-registered test of fine-tuning google/cellgemma-e4b on human brain Perturb-seq. Result: no gene-specific predictive skill.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages