Ahmed Doghri Logo Image
Ahmed Doghri

cellcontext

The same perturbation lands differently in different cells. cellcontext keeps the cellular context in the model and cuts synthetic response error by 32.8%.

cellcontext reproduced benchmark result

A Cell Is Not An Empty Test Tube

A gene knockout does not have one universal answer. Cell state, lineage, and baseline expression all change the response. A global average can look sensible while missing the cells that matter.

cellcontext generates controlled expression profiles with shared perturbation effects and context-specific interactions. It then holds out context-perturbation pairs, which prevents the benchmark from rewarding memorization.

Keep The Context, Keep The Signal

The baseline learns one average effect per perturbation. The context-aware method retrieves the closest observed cellular state and transfers its residual response instead.

That is deliberately smaller than a single-cell foundation model. The mechanism stays visible, the failure mode stays measurable, and the whole experiment runs with the Python standard library.

The Number

Global averaging lands at 0.2699 mean absolute error. Context-aware transfer lands at 0.1813, a 32.8% reduction on held-out context-perturbation pairs.

The benchmark is synthetic and explicitly non-clinical. One deterministic test passes locally and in GitHub Actions on Python 3.9, 3.11, and 3.13.

Research Basis

Inspired by Nature Methods' 2025 perturbation-response benchmark. The portfolio number above comes from this repository's own controlled benchmark, not from the paper.

Tools Used

Python
Single-Cell Biology
Perturb-seq
Context Transfer
Benchmarking
unittest
GitHub Actions CI