Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

PertMind

Project Page Hugging Face License

PertMind is a biological language model built around a central discovery: cellular perturbation atlases can be turned into reinforcement-learning environments, where measured gene responses act as computable reward signals for biological reasoning. Rather than relying on manually curated reasoning traces, PertMind combines trusted-trajectory supervised initialization with perturbation-derived reinforcement signals to train a model for perturbation-centered inference and representation learning.

This GitHub repository is the project landing page. The model weights, tokenizer, and runnable inference scripts are available at Hugging Face: tzcfly/PertMind.

Figure 1

Figure 1. Schematic scope of the capabilities enabled by PertMind. Reasoning-based applications use natural-language inference for perturbation-response prediction, perturbation prioritization, mechanism reasoning, and proposal planning. Embedding-based applications encode PertMind-generated biological profiles into reusable molecular, cellular, and donor representations for reference mapping, cellular perturbation-response prediction, and donor-level tumor-state reference mapping. The figure summarizes the intended capability space, not benchmark performance. Within this space, the quantitatively evaluated subset in the Results comprises forward perturbation-response prediction, reverse perturbation-condition inference, phenotypic-screen hit prioritization, biological-process naming, and molecular, cellular, and donor-level reference mapping.

Highlights

  • Perturbation-derived reinforcement learning: PertMind treats public perturbation endpoints as verifiable reward signals for biological reasoning, using gene-, pathway-, and format-level supervision.
  • Transfer beyond the post-training task: Although trained on forward perturbation-response prediction, PertMind is designed to support reverse perturbation identification, double-perturbation reasoning, phenotypic-screen prioritization, and biological-process interpretation without task-specific post-training.
  • Reasoning plus representations: PertMind-generated biological profiles can also be reused as molecular-, cellular-, and donor-level representations for downstream mapping and prediction tasks.

What is evidence-supported today

The current release distinguishes between the full intended capability space illustrated in Figure 1 and the subset quantitatively evaluated in the manuscript. Evidence-supported evaluations cover forward perturbation-response prediction, reverse perturbation-condition inference in single- and double-perturbation settings, phenotypic-screen hit prioritization, biological-process naming, and molecular, cellular, and donor representation tasks.

Mechanism reasoning and proposal planning remain part of the intended application scope shown in Figure 1, but the figure should not be read as a benchmark summary or as evidence that every illustrated use case has already been quantitatively validated.

How PertMind is trained

PertMind starts from Qwen3-4B Base and uses cellular perturbation data as a reinforcement-learning interface. Gene-centered queries are paired with measured response labels, retrieved biological context, and pathway-side supervision when informative. A trusted set of model-generated trajectories first provides structured supervised initialization, after which reinforcement learning optimizes experimentally grounded gene outcomes, pathway-direction signals, and output format consistency.

This design is intended to test whether reinforcement on experimental endpoints can concentrate reusable biological strategies that are already accessible to a pretrained language model.

Model Access

All public release artifacts for inference are hosted at Hugging Face:

Quick Start

Create a clean environment:

conda create -n pertmind python=3.11 -y
conda activate pertmind

Download the released model repository and install dependencies:

git lfs install
git clone https://huggingface.co/tzcfly/PertMind
cd PertMind
pip install -r requirements.txt

If you have multiple Python environments on the machine, verify that the active interpreter is the one from pertmind:

which python
python -c "import sys; print(sys.executable)"

Run a single prompt with vLLM:

python inference_vllm.py \
  --model . \
  --prompt "In HCT116, predict how LMBR1 changes expression of SLC26A6."

Run a single prompt with Transformers:

python inference_transformers.py \
  --model . \
  --prompt "In HCT116, predict how LMBR1 changes expression of SLC26A6."

Start the terminal chat interface:

python tui_chat.py --model . --backend vllm

Useful TUI commands:

/reset  clear conversation history
/exit   quit

Tested Setup

The released Hugging Face package was smoke-tested with:

  • Python 3.11
  • PyTorch 2.10.0
  • Transformers 5.14.0
  • vLLM 0.19.1

The model package is approximately 7.5 GB in bfloat16. A GPU with at least 16 GB VRAM is recommended for basic inference. Larger context lengths and vLLM serving may require more VRAM, and the first vLLM run may spend extra time compiling and caching CUDA graphs.

Scope And Limitations

  • PertMind is aligned to experimentally observed perturbation endpoints, but endpoint correctness does not by itself establish faithful causal mechanisms.
  • The capability overview in Figure 1 is broader than the currently quantified evaluation subset.
  • PertMind is intended for research use and hypothesis generation, not as a substitute for experimental validation.

License

Released under the Apache-2.0 License.

About

PertMind: perturbation-derived reinforcement learning for emergent biological reasoning

Resources

Stars

8 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors