|
Download README.md from zolabs/zo1: direct link, hf CLI and curl.
- Browser
- Download file 7.77 kB
-
https://huggingface.co/zolabs/zo1/resolve/main/README.md
- Command line
-
hf download hf://zolabs/zo1/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/zolabs/zo1/resolve/main/README.md
7.77 kB
| license: apache-2.0 | |
| extra_gated_heading: "Request access to zo1" | |
| extra_gated_description: "Access is reviewed manually. Your Hugging Face username, email and the answers below are shared with the repository owner and recorded with your request." | |
| extra_gated_button_content: "Submit access request" | |
| extra_gated_fields: | |
| Full name: text | |
| Affiliation: text | |
| Country: country | |
| Role: | |
| type: select | |
| options: | |
| - Academic researcher | |
| - Student | |
| - Industry researcher | |
| - label: Other | |
| value: other | |
| Intended use: text | |
| I agree to cite the zo1 paper when using this model: checkbox | |
| tags: | |
| - biology | |
| - single-cell | |
| - perturbation-response | |
| # zo1: predicting how cells respond to perturbations | |
| zo1 predicts how a cell's gene expression changes when you knock down a gene or treat the cell with a drug, in a cell | |
| type where that experiment has **not** been run. | |
| It learns from experiments in other cell types, measuring how responses in those "donor" contexts translate into the | |
| target context. The core is small and fast, a closed-form linear model, so most predictions need only numpy. For | |
| single-cell predictions, an optional neural flow head (20M parameters) adds realistic cell-to-cell variation around | |
| the predicted mean. | |
| ## What's in this repository | |
| | Model | Perturbation | Task | Genes | Folder | | |
| |---|---|---|---|---| | |
| | Replogle-Nadig | CRISPRi gene knockdown | predict one cell line (K562, RPE1, Jurkat or HepG2) from the other three | 2,000 | `weights/replogle_nadig/<line>/` | | |
| | Tahoe | drugs (small molecules) | predict a held-out cancer cell line from the other 49 cell lines in Tahoe-100M | 2,000 | `weights/tahoe/<line>/` | | |
| | Systema | CRISPRi / CRISPRa | perturbations never seen in any context, using the STRING gene network | 5,045–6,017 (the dataset's own gene list) | `weights/systema/<dataset>/` | | |
| The code is in `code/`: `infer.py` makes predictions, `train.py` retrains on new data, and `zo1/` holds the modules | |
| both use. | |
| ## Quick start | |
| ```bash | |
| pip install -r code/requirements.txt | |
| # Average expression change for two knockdowns in HepG2 (numpy only, takes seconds) | |
| python code/infer.py mean --model weights/replogle_nadig/hepg2 --perts ABCB7 GAR1 --out means.npz | |
| # 200 simulated single cells per knockdown, built from your own HepG2 control cells (needs torch) | |
| python code/infer.py cells --model weights/replogle_nadig/hepg2 --perts ABCB7 \ | |
| --controls my_hepg2_controls.npy --n_cells 200 --out cells.npz | |
| # A drug in a held-out cancer cell line (Tahoe) | |
| python code/infer.py tahoe --model weights/tahoe/PANC-1 --perts "[('Bortezomib', 0.05, 'uM')]" --out drug.npz | |
| # A gene that was never perturbed in training (Systema; uses the STRING network) | |
| python code/infer.py systema --model weights/systema/rpe1 --perts POLR2A --out gene.npz | |
| ``` | |
| Every command writes an `.npz` file with the predictions and the gene names. `tahoe` conditions use Tahoe-100M's | |
| `drugname_drugconc` strings; `weights/tahoe/donor_table.json` lists them all. | |
| **Input format.** Each model works on a fixed gene list (`config.json["genes"]`). Replogle-Nadig models use | |
| `log1p(counts per 10,000)`; Tahoe models use `log1p(raw counts)` on Tahoe's 2,000 variable genes; Systema models use | |
| the benchmark's own processing (`config.json["expression_space"]` says which). Control cells you pass | |
| in must use the same genes, in the same order, and the same normalisation. | |
| ## How well it works | |
| Scores below are Pearson correlations between predicted and measured expression changes (vs. control), across genes, | |
| averaged over perturbations the model never saw during training. Higher is better. | |
| **Replogle-Nadig.** Validation perturbations of the held-out line. Each number comes from a model trained without | |
| those perturbations; the released weights are then refit on train + validation. | |
| | held-out line | train perturbations | validation perturbations (scored) | released model fitted on | test perturbations (not used) | Pearson Δ | | |
| |---|---|---|---|---|---| | |
| | K562 | 852 | 283 | 1,135 | 401 | 0.410 | | |
| | RPE1 | 984 | 327 | 1,311 | 415 | 0.578 | | |
| | Jurkat | 962 | 320 | 1,282 | 437 | 0.430 | | |
| | HepG2 | 837 | 278 | 1,115 | 375 | 0.482 | | |
| The test perturbations are Arc's released State evaluation lists (407 / 421 / 449 / 380), minus the 5–12 per line | |
| that fail our knockdown QC on the public data; each `config.json["split"]` lists them. | |
| **Tahoe (drugs).** Validation drug-dose conditions of each held-out cell line (56 per line), from a model fitted | |
| without them. Each model draws on all 49 other cell lines; the other four held-out lines contribute only their train and | |
| validation conditions, never their test conditions (`config.json["donor_pool"]`). Score: Pearson correlation of predicted vs measured expression change, as above. | |
| | held-out cell line | folder | Pearson Δ | | |
| |---|---|---| | |
| | C32 | `weights/tahoe/C32` | 0.904 | | |
| | HOP62 | `weights/tahoe/HOP62` | 0.956 | | |
| | HepG2/C3A | `weights/tahoe/HepG2_C3A` | 0.897 | | |
| | Hs 766T | `weights/tahoe/Hs_766T` | 0.917 | | |
| | PANC-1 | `weights/tahoe/PANC-1` | 0.955 | | |
| Drug responses within one cell line are strongly correlated with each other, so even simple baselines score fairly | |
| high on this metric. Compare models on the same split, not across benchmarks. | |
| **Systema (genes never perturbed in training).** GEARS validation perturbations (split seed 1), from the model | |
| fitted on the training perturbations. Two scores, both Pearson correlations across genes: vs control (the usual | |
| "Pearson Δ") and vs the average perturbation (the harder Systema metric, which removes the response shared by all | |
| perturbations). | |
| | dataset | genes | validation perturbations | Pearson Δ vs control | Pearson Δ vs average perturbation | | |
| |---|---|---|---|---| | |
| | Replogle RPE1 (CRISPRi) | 5,805 | 106 | 0.601 | 0.410 | | |
| | Replogle K562 (CRISPRi) | 6,017 | 136 | 0.448 | 0.335 | | |
| | Adamson 2016 (CRISPRi) | 5,060 | 6 | 0.847 | 0.402 | | |
| | Norman 2019 (CRISPRa, incl. gene pairs) | 5,045 | 31 | 0.579 | 0.522 | | |
| ## Training data | |
| Every model was trained only on public datasets, with their original licences: | |
| | data | used for | licence | | |
| |---|---|---| | |
| | Replogle et al. 2022, K562 and RPE1 Perturb-seq (figshare) | Replogle-Nadig, Systema | CC-BY-4.0 | | |
| | Replogle et al. 2022 supplementary annotations (figshare) | Systema | CC0 | | |
| | Nadig et al. 2025, HepG2 and Jurkat Perturb-seq (GEO GSE264667) | Replogle-Nadig | public (NCBI GEO) | | |
| | Tahoe-100M (Tahoe Bio, Hugging Face) | Tahoe | CC0 | | |
| | Adamson 2016 and Norman 2019 (GEARS release) | Systema | public (Harvard Dataverse) | | |
| | STRING v12 human network | Systema | CC-BY-4.0 | | |
| All preprocessing is our own and is in `code/`. Each `config.json` records the processing rules, cell counts and | |
| source-file checksums. | |
| ## Retraining on your own data | |
| ```bash | |
| python code/train.py all --raw_dir RAW --work WORK --out my_weights/ | |
| ``` | |
| This runs four steps, which can also be run separately: | |
| 1. `build`: raw Perturb-seq `.h5ad` files to one normalised matrix (knockdown filter, 2,000 variable genes). | |
| 2. `split`: train/test sets for each held-out cell line. | |
| 3. `fit`: trains the models. One GPU, about 10 minutes per cell line. | |
| 4. `export`: writes weights in the format `infer.py` loads. | |
| `train.py --help` describes the input format for a new dataset. The Tahoe and Systema training code is in | |
| `code/zo1/benchmarks/`. | |
| ## License and access | |
| Apache-2.0. Access is free; requests are reviewed by hand, so please fill in the short form above. If you use zo1 in your work, please cite: | |
| ```bibtex | |
| @article{brilli2026zo1, | |
| title = {Retrieval, not pretraining: Zo-1 sets the state of the art in single-cell perturbation prediction}, | |
| author = {Brilli, Danai and Georgila, Maria}, | |
| journal = {arXiv preprint arXiv:2612.04139}, | |
| year = {2026} | |
| } | |
| ``` | |