Excursions in Biology

As AI capabilities have increased there’s been a corresponding growth in attempts to endow agents and models with the right capabilities to advance science. Approaches are varied, from automating the discovery process altogether (Future House) to assisting scientists in designing and interpreting novel experiments (Google co-scientist).

Anyone working in computational biology long enough to remember the time before language models were ubiquitous might ask the following: what will the relationship between traditional parametric modeling and AI look like as models continue to improve? Will agents carry out experiments with massive auxiliary transformer models to predict responses to novel drugs, or will those agents understand the underlying biology so well that they can reason internally about such processes without the need for external models and training?

This post investigates the latter possibility. The precise setting and approach is motivated by related work with Hao Zhu and the AbuGoot lab. All work was supported by Prime Intellect through their RL residency.

Specifying the problem

Drug perturbations, in laboratory experiments, involve introducing some amount of a drug or small molecule to a controlled sample of cells. Often this is done with cell lines, which are uniform samples that can be traced to a common ancestor, in an attempt to make the results reproducible. After the sample has time to respond to the drug, measurements are performed. Those may be coarse-grained (how many cells in the sample) or fine-grained (aggregate gene expression for the sample). Since most types of measurements destroy the sample, one cannot simply perform before and after measurements. Instead baselines must be defined via matched control populations or statistical methods (e.g. comparing the results for a given drug to an average over all drugs).

Gene expression levels contain most of the information we would need to answer questions about drug effects. However, the task of predicting these is devilishly challenging for a variety of reasons. The measurements themselves come with numerous caveats (such as how the baseline values are computed and what the precise context of the experiment was) and experimental methodology/sample provenance alone can result in what looks like noise to a model which does not account for those details. If any of this experimental context is not well documented in the dataset being used it can be hard to separate genuine biology from experimental artifacts.

Even if we could account for every aspect of the experimental procedure, we currently lack the theory to predict perturbation results mechanistically. Pretraining may endow an agent with certain priors, but reasoning which can consistently derive expression changes across hundreds or thousands of genes would effectively be a huge step forward in the theory behind this process.

Our goal was to create a training and evaluation environment using drug perturbation data, utilizing agents as much as possible in the building process. Due to the difficulties above, we make the following two choices which we hope make our task more tractable. First, we shift the task from predicting fine-grained per-gene expression changes to predicting higher level observables (phenotypes). Second, we scaffold the reasoning process by requiring answers to intermediate questions on the way to the final phenotype prediction. In particular, we ask for

  • Gene/protein targets - where the drug binds
  • Mechanism of action (MoA) - target and binding mechanism
  • Genetic pathways affected
  • Phenotype - the overall effect of the drug on the cell sample.

Answering some of these (target genes, MoA) is a knowledge retrieval task, while others (pathways and phenotype) require reasoning about the experimental outcome.

The result is questions of the following form:

Compound (SMILES): CNCCCN1c2ccccc2CCc2ccccc12
Cell line: HT29
LINCS expression assay: 10 µM, 6h treatment (used for pathway, cell-cycle, stress, and
transcriptional-magnitude labels)
Reason through the following steps:

Step 1 — Target: Identify the primary protein target(s) this compound binds. Provide gene
symbol(s) separated by '|'.
Wrap your answer in <TARGET>...</TARGET>

Step 2 — MoA: State the mechanism of action of this compound in the canonical pharmacology
phrasing (e.g. 'HDAC inhibitor', 'serotonin receptor antagonist').
Wrap your answer in <MOA>...</MOA>

Step 3 — Pathways: Predict the top 5 Hallmark pathways most affected by treatment, each
annotated with direction ('up' or 'down'). Use the HALLMARK_ prefix and ':direction' suffix.
Wrap your answer in <PATHWAYS>HALLMARKX:up, HALLMARKY:down, ...</PATHWAYS>

Step 4 — Phenotype: Predict the dominant stress / death pathway activated by this compound.
Categories:
    • none: no significant stress pathway activation
    • apoptosis: intrinsic apoptotic pathway activated
    • UPR: unfolded protein response (ER stress) activated
    • DNA_damage: DNA-repair pathway activated
Wrap your answer in <STRESS>...</STRESS>.

The drug itself is described by its Simplified Molecular Input Line Entry System (SMILES) string, a standardized, compact description of its molecular structure. This example asks to predict a stress phenotype. Phenotypes are broken down into classes and each example in the environment requires predicting the outcome of a single phenotype class. Some classes (e.g. cell cycle, stress) are explicit coarse grainings of the genetic expression data in the sense that they derive directly from the per-gene expression levels. Others (e.g. viability) are observed from the samples without directly referencing the expression data.

Gauging difficulty

We first ran evals on a range of open weights models and frontier (at the time) models to see how challenging this task was. Two versions were tested: asking for the final phenotype answer only, or asking for the full prediction chain across intermediate steps.

Phenotype performance by model for full-chain and direct prediction
Model Full-chain phenotype Direct phenotype
Qwen3.5-0.8B0.1460.214
Qwen3.5-2B0.2730.340
Qwen3.5-9B0.2930.323
Qwen3.5-35B-A3B0.2610.296
Qwen3.5-122B-A10B0.3290.416
Qwen3.6-35B-A3B0.3500.384
Qwen3.5-397B-A17B0.4440.497
GPT-OSS-20B0.4370.448
GPT-OSS-120B0.4380.469
DeepSeek-V3.20.4370.447
GPT-5.40.4480.477
Claude Sonnet 40.4190.376
Gemini 3.1 Pro0.5440.610
Claude Opus 4.70.5690.562

Results were roughly in line with what one would expect - performance improves with model size within a fixed model family, and larger/more capable models tend to do better. The best performance, unsurprisingly, is from Opus and Gemini, while open models small enough to fine-tune quickly perform at roughly 50% of the SOTA level. The next thing we checked was how valuable the steps we decomposed the problem into were. This was done by supplying the model with the ground truth for previous steps in the chain and measuring performance on the remaining steps.

Phenotype performance as ground-truth intermediate reasoning steps are supplied
Model Base prompt only Given target Given target + MoA Given target + MoA + pathways
Qwen3.5-0.8B0.1460.2000.1580.197
Qwen3.5-2B0.2730.2970.2530.344
Qwen3.5-9B0.2930.3520.3540.420
Qwen3.5-35B-A3B0.2610.3100.3440.471
Qwen3.5-122B-A10B0.3290.4290.4330.501

Two nice things here:

  1. For the larger models, the further downstream the ground truth info is the better the performance
  2. For all but the smallest model, perfect answers to the intermediate steps improve the performance

For training, we decided to require models to provide answers to the intermediate steps. Even though this led to worse baseline performance for most models, we hoped that it would give us ways to track and reward the model's reasoning for each step, leading to more signal and better final results.

RL experiments

All fine-tuning for this research used flavors of reinforcement learning with verifiable rewards. Part of this was pure convenience - running RL experiments on Prime’s hosted lab is extremely smooth and cost-effective. Beyond this, it would also tell us how far we could lean on RL to solve the problems here without thinking deeply about algorithms. While it eventually became evident that there are some aspects of this problem RL on language models is likely not well suited for, one takeaway from the project as a whole is that a good enough training/eval framework makes it possible to learn quite a bit about a problem/environment using a fixed training algorithm.

We defined the reward function as a weighted sum of metrics for the intermediate steps, with weights skewed towards the later steps in the chain.

R = 0.15 F1target + 0.15 accuracyMoA + 0.25 F1signed pathway + 0.45 scorephenotype

The first training run was a straightforward probe of whether the multistep problem was learnable.

Initial reinforcement-learning results compared with the base model
Metric Qwen3.5-35B-A3B base Initial RL Δ vs. base
Phenotype score0.2610.465+0.204
Target F10.0290.203+0.174
MoA accuracy0.0300.170+0.140
Signed pathway F10.058
Aggregate reward0.1500.280+0.130
Format compliance0.6641.000+0.336

While the results looked promising, inspecting the reasoning traces and eval stats showed that this was mostly just learning about the class imbalances in the training data. The reasoning could only correctly identify the name or any other defining property of the drug from the chemical description in 5% of held-out examples. Compare this to Gemini 3.1, which is able to recall properties of small molecules from their SMILES consistently. It’s possible that some combination of training data mix and model size/capacity results in the smaller Qwen models not being able to retrieve this sort of information. While it would probably be more direct to rectify this with continued pretraining or SFT, we decided to build a lookup tool which models could use during RL. The thinking is that, should this work, we can use the tool to construct an SFT dataset or just use something like ECHO to help the model internalize the mappings the tool knows. The tool interface looks something like this:

identify_compound(smiles: str) -> {
    "exact_match": {"name": "..."} | None,        # InChIKey-canonical lookup
    "descriptors": {MW, logP, TPSA, rings, ...}, # RDKit physicochemical
    "scaffold": "...",                         # Bemis–Murcko scaffold SMILES
    "nearest_neighbors": [                   # top-5 Tanimoto similar
        {"name": "...", "similarity": 0.xx}, ...
    ]
}

Performance using this was improved, especially in the early intermediate steps/metrics.

Tool-assisted reinforcement-learning results
Metric Base + lookup tool (zero-shot) Initial RL (no lookup tool) Tool-assisted RL Δ vs. initial RL
Phenotype score0.3400.4650.529+0.064
Target F10.2470.2030.334+0.131
MoA accuracy0.0700.1700.250+0.080
Signed pathway F10.0960.0580.172+0.114
Aggregate reward0.2250.2800.369+0.089

This result felt like a proof of concept for the project - plugging the retrieval hole allowed the small model to learn to reason through the problem and recover performance close to some of the best generalist models (at the time). As usual, the question now became how to do a little better. Even just looking at the results table above, you can see that the different metrics that make up the RL reward cover a range of values, for both the base model and the post-RL checkpoints. It’s easy to imagine an advantage-based RL algorithm favoring larger improvements in easier metrics over small improvements in more challenging ones. The metrics themselves are not really comparable - beyond using different scoring functions, the different intermediate steps cover a range of intrinsic difficulties. For example, some classes of phenotypes (e.g. cell cycle) are multiple choice over a small set of answers while pathway prediction requires both pathway identification and direction of change (still technically multiple choice, but over a much larger answer set). We dug into this with small probes into each intermediate step, given perfect answers to the previous ones. For example, training on the step (target genes, MoA -> pathway) gives the following results.

Comparison of regular and pathway-focused training
Condition Entry point Target F1 MoA accuracy Signed pathway F1 Pathway name validity Pathway name F1 Direction accuracy
Tool-assisted full-chain RLFull chain from SMILES0.3120.2300.1740.8480.2240.420
Pathway-focused RLFull chain from SMILES0.2550.1100.1540.7900.2000.368
Tool-assisted full-chain RLGiven target + MoA0.1560.8340.2080.380
Pathway-focused RLGiven target + MoA0.1900.9900.2420.450

The difference is not huge, but the step-specific training does boost performance on the analogous eval (called “Given target + MoA” in the table) to levels above the regular training method. Interestingly after training on the full chain prediction, the tool-assisted full-chain RL checkpoint actually does worse when predicting from the ground truth target genes and MoA. This motivated a step-by-step curriculum approach: first train to predict target genes, then MoA, then pathways, finally phenotype. Since the curriculum approach would likely require more total training steps (even if each stage was shorter), we also checked how the phenotype performance scaled as we train further with the fixed mixed reward.

Phenotype performance by number of training steps
Step100150200250
Phenotype score0.5290.5180.5960.520

Unfortunately the performance is not monotonic in number of steps, and the peak at 200 steps may be partially random chance. We can set the high-water mark at 0.55 - 0.6 for the simple RL approach.

The curriculum run was posed as 40 steps for each intermediate step, followed by some final refresh on the full chain task at the end. A caveat was that we continue any step that did not seem to be reasonably converged in 40 steps. This ended up only happening for the first stage (a mix of target gene and MoA), likely because the model needed to also learn to use the lookup tool effectively. The final run spanned 4 curriculum stages and the final refresh stage.

Five-stage curriculum and training-step ranges
  1. Stage 1 Target gene Steps 0-80
  2. Stage 2 MoA Steps 80-120
  3. Stage 3 Pathway Steps 120-160
  4. Stage 4 Phenotype Steps 160-200
  5. Stage 5 Full chain Steps 200-250

Results from the full curriculum run compared to the control are below.

Full curriculum results compared with control training
Run (number of steps)Target geneMoAPathwayPhenotype
Control (200)0.3560.2800.1680.596
Control (250)0.3530.2700.1920.520
Curriculum (250)0.3790.3200.2060.635

We see basically every step improves from the curriculum approach. Looking back to the original evals, we also see this is not better than any other model tested, whether we look at direct phenotype prediction or the chained reasoning.

Learnings from agentic research

If we stop here, the story looks pretty neat. With minimal scaffolding and feedback, agents can build research environments which pass the smell test of initial evals (performance scales with model size, frontier models generalize to the new tasks), and open models can be fine-tuned to perform well on those tasks. The agents can not only run experiments, but devise new hypotheses and run something I’d call accelerated rather than auto-research, since some feedback still seems helpful.Most of this work was done with Claude Code (Opus 4.7/4.8) and Codex (GPT-5.5). I found that an important part of the accelerated research loop is the occasional debrief to cover any gotchas. In this case there were a couple.

Going back to the task construction in more detail, we pulled data from two different sources.

  1. LINCS L1000 Level-5: gene expression signatures for small molecule perturbations
  2. PRISM Repurposing 24Q2 Extended Primary: viability log-fold-change measurements for small molecule perturbations

LINCS data was used to produce phenotype labels that could be derived from gene expression data (e.g. cell cycle, stress). PRISM data was used to construct the viability phenotype labels. Both datasets contain identifying information for each perturbation experiment, things like which drug or compound is applied, which cell line it’s applied to, and protocol info like dose and time to measurement. This means the two datasets can be joined, and we can ask things like “given protocol X applied to drug D and cell line C, what is the effect on phenotype P?”

However, this join hides the fact that the experiments which produced the LINCS data and the experiments which produced the PRISM data were done in different labs. While we normalize for experiment protocol, things like sample source or finer details of the experimental procedure not noted in the protocol could lead to potential differences between the samples generated by each data source. This distinction is the first gotcha which I didn’t fully appreciate until I was going back through the results. Not a fatal flaw by any means, but important to know if we are trying to reason carefully about what the model might be learning from this training environment.

A more serious issue was one of the phenotypes constructed from the LINCS expression data. Cell cycle and stress both make sense as broad phenotypes you can infer from expression changes. Not only can they be defined using well-known sets of genes, but they correspond to higher level properties that affect how the cell behaves/will behave in the future. The original task, which was used for the training runs above, also included a phenotype called “magnitude”, which just tracked overall expression change across genes. At least to a non-expert, this seemed somewhat manufactured, and it was not clear what higher level property such a measurement would correspond to in the cells. Worse, it seemed like magnitude was especially easy for models to learn to predict through RL.

This raises the question of whether the fine-tuned models were specializing in certain phenotypes or improving evenly across the three (after removing magnitude).

Phenotype performance by category for curriculum and frontier models
CategorynCurriculum RLGemini 3.1 ProClaude Opus 4.7
Viability1020.7360.7320.750
Cell cycle950.5580.5160.495
Stress1030.4560.4470.408

We see that most of the performance gain relative to frontier models is from the expression-derived phenotypes. This didn’t contradict the previous conclusions from training, but it adds an asterisk to the claim that “RL boosts performance beyond frontier model levels”.

The larger lesson here is to be intentional about when you enter the agentic research loop. These observations should have come when I was building the task, not after results had already come in. Calibrating your level of trust in agents you work with is a crucial skill for working efficiently and without errors or misunderstandings. At the rate models/harnesses improve, this calibration needs to be almost continuously adapted. I imagine doing this well will be one of the most important skills for scientists to develop as agent-accelerated research becomes more common in every scientific field.

Now what?

There are two main directions which I find exciting at this point. The first is continuing with the research hill climbing on this task. After examining different training runs, rollouts/reasoning traces, and eval metrics, it is clear that the step of predicting gene/pathway perturbations given perfect context about the drug (target genes, MoA, etc.) is the weakest point in the reasoning chain. This is reasonable - the perturbation expression response is a complex process which is probably not easy to model in human language. An example of such reasoning would be the first steps to a novel biological theory of these mechanisms. A more common approach to these problems is to build black-box models for perturbation response (called virtual cells) using troves of experimental data. Finding ways to interpolate between those two methodologies and finding the sweet spot in that spectrum would likely be interesting to both AI and biology researchers.

The second is the meta question of AI-accelerated research, at least in the domain of biology. Using an analogy to computing, if we define “research complexity” as the ratio of experiment design time to experiment run time, we can see where the bottleneck usually arises in these types of computational biology tasks. Agents speed up experimental design and analysis because they can build software quickly. However, experiment run time stays high due to fundamental limits of the processes such experiments probe. This suggests that scientists in this field should be optimizing workflows, not just for agentic experiment design, but also finding ways to scale experiments up/down without losing control of the power of the conclusions they generate. This optimization should itself be done collaboratively by humans and agents.

Credit

I am thankful to Prime Intellect for research and computing support on this project. I am grateful to @omouamoua for organizing this residency cohort and for project mentorship along with @jessicafeiyali. Thanks as well to Jonathan, Omar, Hao, Nic, and others in the AbuGoot lab who taught me everything I know about biology.