tahoebio/Rhaister
Rhaister
Back to basics: Observed statistics are sufficient to predict drug responses
๐ Read the paper
Rhaister predicts perturbation responses in unseen (cell, perturbation) combinations from aggregated summary statistics. It operates directly on the output of standard single-cell analysis pipelines โ log2 fold change, Mann-Whitney U-test p-values, and expression deltas โ enabling training in seconds and prediction in milliseconds.
Overview
Large-scale cellular perturbation screens measure how cells respond to drugs, cytokines, and genetic perturbations across many biological contexts. Rhaister learns from observed (context, perturbation) combinations to predict responses for unseen combinations, expressing each unseen perturbation as a linear combination of observed panel perturbations.
Key properties:
- Operates on summary statistics (not single cells), compatible with agentic reasoning workflows
- Trains in seconds, predicts in milliseconds
- Outperforms virtual cell models (STATE) that are orders of magnitude more expensive
- Performance approaches the half-sample reference ceiling (how well the data can predict itself)
- Supports both fewshot (unseen combinations) and zeroshot (unseen cell lines) prediction
Method
Fewshot model
For each unseen (context c\, perturbation p\**) combination, Rhaister fits an additive baseline via alternating least squares and a drug-as-linear-combination ridge regression:
- Additive ALS: y = ฮผ + ฮฑ_c + ฮฒ_p โ global mean + context effect + perturbation effect
- Drug ridge: expresses each unseen perturbation as a weighted combination of panel perturbations, learned per held-out context via ridge regression
- Calibration network: a small MLP that maps (|FC|, -logโโp, log reference expression, gene-level statistics) to calibrated p-values
Three views are predicted jointly: log2 fold change (Y), Mann-Whitney p-values (P), and expression deltas (D). Final p-values are an even blend of ridge and calibration network predictions.
Zeroshot model (Rhaister-O)
For entirely unseen cell lines with no perturbation panel, Rhaister-O uses only baseline (DMSO) expression to predict responses:
y(c\, p, g) = ฮฒ(p,g) + ฮณ(p,g) ยท x(c\,g)
where x is the baseline pseudobulk expression. See docs/zeroshot_architecture.md for the full model description.
Datasets
Results
Transcriptional prediction (fewshot)
Zeroshot prediction (Rhaister-O)
Sensitivity prediction (Rยฒ)
All numbers are reproducible from the code in this repository. See CLAUDE.md for full reproduction instructions.
Installation
Download the repository from the HuggingFace Hub and install it:
from huggingface_hub import snapshot_download
# Download the full repo into ./Rhaister
snapshot_download("tahoebio/Rhaister", local_dir="Rhaister")cd Rhaister
uv pip install -e ".[dev]"<details> <summary>Alternative: install with <code>git clone</code></summary>
git clone https://huggingface.co/tahoebio/Rhaister
cd Rhaister
uv pip install -e ".[dev]"</details>
Data is loaded automatically from HuggingFace the first time a dataset is used, and cached locally thereafter. Set RHAISTER_DATA_ROOT to point to a local data directory to use existing data instead.
Usage
# Fewshot model (tahoe_5_holdout by default)
python -m rhaister.train [experiment_name]
# Other datasets
python -m rhaister.train parse_test --split parse/split_0
python -m rhaister.train replogle_test --split replogle_nadig/split_0
# Zeroshot model
HP_ZEROSHOT=1 python -m rhaister.train zs_test
# Multi-split evaluation
python -m rhaister.eval_splits [experiment_name]
# Unit tests
python -m pytest tests/ -vRepository structure
rhaister/ # Python package
โโโ train.py # Model: ALS + drug ridge + calnet (fewshot & zeroshot)
โโโ prepare_combined.py # Data loading, evaluation (6 State metrics), logging
โโโ state_metrics.py # Six metric functions from the State paper
โโโ eval_splits.py # Multi-split evaluation harness
splits/ # Dataset configs (dataset.toml) and train/test split TOMLs
tests/ # Unit tests (57 tests)
scripts/ # Helper scripts (baselines, sweeps, data prep)
figures/ # Paper figure generation
docs/ # Architecture docs, zeroshot model descriptionCitation
If you use Rhaister in your work, please cite:
@article{svensson2026back,
title={Back to basics: Observed statistics are sufficient to predict drug responses},
author={Svensson, Valentine and Khan, Umair and Heydari, Hamed and Ubas, Airol A and Thomas, Nicole and Merico, Daniele and Goodarzi, Hani and Yu, John and Alidoust, Nima and Gandhi, Shreshth},
journal={bioRxiv},
pages={2026--06},
year={2026},
publisher={Cold Spring Harbor Laboratory},
doi={10.64898/2026.06.09.731197},
url={https://doi.org/10.64898/2026.06.09.731197}
}License
Apache 2.0. See LICENSE.
