Blog 5 min read

A baseline that never read the question scored 0.833

I built a system that takes a phenotype described in plain English and returns a compound and a dose from a public drug-screening archive. Then I scored the same predictions with something that ignores the question entirely, and most of the result went away.

I spent a few weeks building a system that does something I had wanted to try for a while: you describe, in ordinary English, how you would like cultured cells to look, and it answers with a compound and a dose from an archive of microscopy images that was collected for other reasons. Say make the mitochondria dimmer without killing the cells and it returns a ranked shortlist, a dose-response curve, and the measurements behind each row. If nothing in the library does what you asked, it says so.

The whole argument in three acts. A request is typed and the ranking lands. Four of the five rows are red, meaning they score higher on kill most of the cells than on the request itself. Then the real wells: the top-ranked one has lost two thirds of its cells, and the one three rows down has the same cell density as its reference. The ranking alone would have sent you to the first.

On compounds whose chemical scaffold it had never seen, it reached an AUC of 0.842. That is a respectable number for this kind of task, and for about a day I believed it.

Then I ran a control that costs one line of code. I took the system’s own prediction for a single request, kill most of the cells, and used that one vector of scores to rank candidates for every other request. This scorer is blind to the question. It does not know whether you asked about mitochondria or nuclei or cell shape.

It scored 0.833.

Where the skill actually was

The behaviour-specific part of that model, the part that depended on what was asked, was about +0.01 AUC. Everything else was one axis: how toxic the compound is.

The cause is not the model. It is in how the measurements are defined. CellProfiler reports per-cell features as averages over the cells it can segment, and the cells it can segment are the ones still present. A dying cell rounds up and condenses, so it reads brighter per unit area in every channel. The two things are therefore welded together in the data. Measured on this archive, against a 3.5% base rate of cell loss:

predicateshare of satisfying wells that had also lost their cells
brighter DNA staining69%
brighter actin66%
brighter mitochondria64%
smaller nuclei62%
elongated cells16%
Left: for each per-cell predicate, the share of satisfying wells that also lost their cells, against a 3.5 per cent base rate. Right: per-cell mitochondrial intensity against surviving cell fraction, with the wells satisfying the literal brighter predicate highlighted and concentrated where the cells are gone.
The confound, measured. On the left, every per-cell predicate against the 3.5% base rate of cell loss, dashed. Only elongation is close to clean. On the right, the same thing as a scatter: the wells that satisfy brighter mitochondria sit where the cells have gone.

So make the mitochondria brighter, read literally off the features, is substantially a synonym for kill the cells. A model fitted to that target learns the shortcut, and it is right to: the shortcut is what the label says.

The fix, and what it costs

Redefine every per-cell predicate as a conjunction: X, and the cells were not killed. The headline falls from 0.842 to 0.799. The margin over the question-blind baseline rises from +0.010 to +0.104, which is ten times larger. A set of requests that looked achievable turns out to be impossible, because combinations like bigger nuclei and brighter mitochondria only ever occur in dying cells.

A lower number that means something is worth more than a higher number that does not.

I then checked whether this was a quirk of microscopy by repeating it on a transcriptomic archive, where the dominant axis is a generic stress response rather than cell death. Against a 17.4% base rate, it accompanies 78% to 86% of every stress-shaped pathway predicate. The only clean predicates are the three growth axes, and they are rare. The shape is the same in both: the dominant axis of a compound library is how much damage the compound did, and anything that does not control for it ends up measuring it.

What it saves, counted in wells

AUC says how a ranking is ordered. It does not say what a screen costs. The question a screening group actually asks is whether a budget of k wells contains something that does what was asked.

Share of held-out goals solved within a budget of 8, 24, 48, 96 and 384 wells, for the model, a toxicity-only baseline, a dose-only baseline and random order.
Where the goal-conditioning actually pays. 64 held-out requests on unseen chemistry, 38 of them combinations whose concept was never trained. At eight wells, one row of a 96-well plate, the model solves 42% against 20%. At 384 wells it reaches 98% against 81%, so about one request in five is not reachable along the toxicity route at any budget. In the shaded band nothing is separable, and at 48 wells ranking by dose alone beats the model outright.

Read honestly, that is a mixed result and I report it that way. Random order needs a median of 267 wells to reach a first real hit and the model needs 12, which sounds decisive until the question-blind baseline is put beside it at 18. The paired difference at eight wells is +22%, 95% CI [+11%, +33%], McNemar p = 0.0005. Between 16 and 96 wells there is nothing to claim.

What I would ask of anyone doing this

Report a request-blind baseline beside every number. It is free once you have a trained model: take its prediction for one fixed, dominant request and score everything else with it. If the margin is small, the benchmark is measuring that axis and not the task you wrote down. The dominant axis is domain-specific, cytotoxicity here, and plausibly solubility or assay interference or sequence length elsewhere, but the control is the same.

I would not have found my own mistake without it.

I have since learned that Seal et al. (2026) reached the same recommendation from the other direction: many assays in widely used bioactivity benchmarks are predicted accurately by counting cells, so a cell-count baseline belongs beside every result. Their object is the benchmark’s assay labels; mine is phenotype requests defined from the image features themselves. The control is the same.

The honest limits

This selects from a library that already exists; it designs nothing. Every number is retrospective and no prediction has been tested at a bench. The held-out compounds are unseen chemistry under the same measurement conditions, so transfer to a new batch is unmeasured. The behaviours are eight image features, not clinical endpoints.

The test that would settle it is small. Two sealed shortlists of eight wells per request, one from the model and one from the baseline, run blind, about 480 wells in total, decided by a paired test specified in advance. It is fair whether or not the system wins, which is the only reason it is worth running.


The paper is here. The code, the full request set with its splits, the evaluation protocol with both trivial baselines printed beside every number, and the exact prompt given to the vision-language branch are on GitHub.

Built on RxRx3-core, published by Recursion. Independent work, with no specific funding, carried out while I held a postdoctoral position at the University of Vermont.

Comments

Questions, corrections and disagreement are all welcome — especially on the unpublished work.