Building an AI Scientist TernaryTx · future.bio · Pluto House · Anthropic London · Jul 2026

Does the rat body predict human harm?

~90% of drugs that clear animal safety still fail in humans, a third of it toxicity. We asked whether rat liver gene expression adds anything to chemical structure when predicting toxicity — and stress-tested every promising signal until it broke or held.

Bottom line Gene expression helps a little, but the wall is cross-dataset comparability, not data volume — and for real human liver injury, structure alone still wins.
Tox21
Does rat expression add to structure?
Yes — small, stress-response-specific
Scaling
Does more animal data help?
No — comparability is the ceiling
Human DILI
Predict real clinical liver injury?
No — structure alone wins
Withdrawal
Predict drugs pulled from market?
Biology edges it — but noisy
01

The hypothesis

Toxicity is where the animal→human translation gap bites hardest. Chemical structure already predicts many toxic mechanisms — but structure is blind to what a dose actually does to a living liver. Gene expression is that readout.

Core question. Given a compound's SMILES, does adding the rat liver's transcriptional response improve prediction of the 12 Tox21 human toxicity-mechanism assays?

Sharper sub-hypothesis. Expression should help the stress-response mechanisms — which act through gene regulation and leave a transcriptional footprint — more than the nuclear-receptor binding mechanisms, where the molecule's shape already is the answer. Call it the SR > NR prediction.

02

The data

Two rat toxicogenomics resources, cross-referenced to a human assay panel by standardized chemistry.
672
unique rat compounds
TG-GATEs ∪ DrugMatrix
613
carry a Tox21 label
the full labelled cohort
177
primary supervised set
clean single-platform liver expression
256
pooled with TG-GATEs
177 + 79 new · ComBat-merged

Reading the ladder. 613 compounds have Tox21 labels, but clean expression exists for only 177 — the Affymetrix Rat 230-2 liver arm, chosen so DrugMatrix and TG-GATEs share a platform (coverage traded for a clean batch correction). Pooling a second rat source was expected to reach ~271, but the single-dose fetch realised 256 — only 79 genuinely new compounds. Matching throughout is on InChIKey connectivity (desalt → neutralise → key), identical across all three sources.

Nuclear-receptor · 7

Receptor binding — a function of molecular shape.
NR-ARNR-AR-LBDNR-AhR NR-AromataseNR-ERNR-ER-LBDNR-PPARγ

Stress-response · 5

Cellular damage programs — expressed through genes.
SR-ARESR-ATAD5SR-HSE SR-MMPSR-p53
03

The pipeline

Modular, config-driven, and leakage-safe end to end — each stage independently runnable and cached.
curate
Link & key
InChIKey match across TG-GATEs, DrugMatrix, Tox21
signature
logFC
treated − matched vehicle, high-dose liver
correct
ComBat
batch = data source; validated on shared drugs
reduce
PCA · 100
fit on the train fold only
fuse
Structure ⊕ GE
z-scored blocks, balanced
evaluate
Masked CV
per-assay AUC + AUPRC + CIs
▍locked Every data-dependent transform — PCA, scalers, ComBat, the frozen Tox21 head — is fit inside the training fold only. Repeated stratified cross-validation; fixed seeds; splits persisted.
How the models actually work

The plan named a "masked multitask MLP head." What actually ran is simpler, more honest at this sample size, and fully interpretable — no neural net was trained.

// features → prediction (all transforms fit in the train fold only) SMILES ──► ECFP4 · 2048-bit ──► PCA·128 ─┐ ├─ z-score ─► concat ─► Logistic × 12 logFC · 31k probes ──► PCA·100 ──────────────► ─┘ (one per assay, masked)

01Not one model — twelve

One independent classifier per Tox21 assay, each trained only on the compounds where that assay was measured. Tox21's sparse labels are handled by subsetting, not a masked loss — same guarantee, no network needed.

The cost: no parameter sharing. A sparse assay (NR-PPARγ, 12 actives) can't borrow strength from a dense one (SR-ARE, 99) — which is the entire theoretical case for the MLP.

02A linear head, on purpose

LogisticRegression · L2 · class-balanced. At N ≈ 140/fold with ~228 features, the regularised linear model is the stable choice, and balancing is what makes AUC — not accuracy — the honest metric on a 5–27%-active problem.

It also keeps the science interpretable: "does expression add?" is just "do the GE components earn nonzero weight beside structure?"

03Why not the fancier models

Gradient-boosted trees (Baseline 2) were the high-capacity test — and they overfit: 0.733 < 0.757. Flexibility is a liability when data is scarce, which is the empirical case against a neural net too.

The joint multitask MLP is deferred, not rejected — blocked by the Intel-Mac torch stack, documented as a swap-in for a torch-capable machine.

04No leakage, anywhere

Both scalers, both PCAs, ComBat, and the frozen Tox21 model feeding Validation B's Approach A are fit inside the training fold only.

That discipline is exactly what made the Approach-A leakage visible — cross-fitting caught it and collapsed a fake 0.646 to a real 0.465.

04

Experiments & results

Each finding is paired with the check that could have killed it. Verdicts are color-coded: signal nuanced null.
Part 1 — Does gene expression add? (Tox21, N=177)
R1Signal

Rat expression adds a small, stress-response-specific benefit.

Three models, identical except the feature block. Gene expression alone already beats chance — proof the rat transcriptome carries human-toxicity signal.

0.757structure only (AUC)
0.679expression only
0.766structure + expression
+0.026SR-panel ΔAUC
SR-p53
+.048
SR-MMP
+.042
NR-PPARγ
+.048
NR-ER
+.027
NR-AhR
−.006
NR-ER-LBD
−.028

Why. Expression helps stress-response and the two transcriptionally active receptors (PPARγ, ER are ligand-activated transcription factors), and does nothing for the pure ligand-binding assays (AR-LBD, ER-LBD) where structure already hits ~0.90. The SR > NR prediction holds.

R2Gotcha caught

The benefit only appears once the two feature blocks are balanced.

Before z-scoring the PCA blocks, structure's high-variance components drown out the 100 expression dimensions and fusion loses. Documented as a before/after so the win can't be dismissed.

−0.041macro ΔAUC, blocks unbalanced
+0.009macro ΔAUC, z-scored

Why. An L2 head penalizes all coefficients equally, so an unscaled block with larger variance is effectively ignored. This is exactly the "expression drowned out" artifact — and why the effect is real but fragile.

R3 · R4Holds under stats

100 components is optimal, and SR > NR is significant at the repeat level.

The stress-response benefit grows monotonically with the number of expression components — it's distributed signal, not overfit noise. And the panel contrast survives a formal test.

+0.026SR − NR panel ΔAUC
[.014,.037]95% CI — excludes 0
0.074assay-level Mann-Whitney p

Why. The repeat-level test is significant; the assay-level test is a strong trend (only 12 assays, and PPARγ/ER break the clean split for a good biological reason). The real divide is "acts through gene regulation" vs "acts through binding."

R5 · R5bFragile

The benefit is model- and encoder-dependent — and ECFP beat ChemBERT.

Two robustness probes. Gradient-boosted trees overfit at N=177 and erase the gain. A frozen ChemBERT structure encoder turned out weaker than plain ECFP fingerprints.

0.733GBM structure (overfits) vs 0.757
0.681ChemBERT structure vs 0.757 ECFP
robustSR > NR holds under both encoders

Why ChemBERT loses — a coordinate mismatch, not a knowledge gap. ECFP is a sparse, axis-aligned basis where each bit is a substructure, so a linear head reads "has reactive group X → active" straight off — exactly how these assays fire. A frozen transformer stores the same facts in a dense basis rotated for a different objective (reconstructing SMILES tokens); re-isolating "has a nitroaromatic" from 768 entangled dimensions is a learning problem you can't solve at N=177. So the loss is expected — and it strengthens the study: "does GE add?" ran against a genuinely strong, literature-appropriate baseline, not a weak one. It fires especially cleanly here because SR toxicity is driven by reactive structural alerts — the very substructures ECFP enumerates and a fingerprint was built for.

Ran it → next card That "cheap next try" (ECFP-counts + physchem + L1) and the deferred neural net were both run — see the next card. Short version: N is the ceiling, not the encoder or the head.
R5c · R5dChoice validated

We gave structure its best shot — and finally ran the deferred neural net. Both confirm the setup.

Two "did we under-model this?" probes: a richer counts+physchem structure baseline, and the regularized multitask MLP the torch env had blocked. Neither overturns the result — and the MLP is decisively worse.

0.763counts+physchem structure (vs 0.757 ECFP)
0.725raw + L1 sparse head — worse than 0.763
0.680multitask MLP fusion (vs 0.766 logistic)
survivesGE benefit holds, still SR-tilted

Why it all points one way. A richer representation lifts structure just +0.006 (inside the CI); L1 on 2066 raw features is worse, because N=177 can't estimate that many sparse coefficients; and the MLP — small and heavily regularized — still loses on every arm, overfitting generic variance. Tellingly the MLP's SR-specificity collapses (SR +0.060 ≈ NR +0.057): the linear head isn't just stronger here, it's the one that keeps the mechanism legible. N is the ceiling, not the encoder or the head — which points the lever back at data comparability and the rat→human layer.

Part 2 — Does more animal data help? (N=177 → 256)
R6 · R7The wall

More data didn't help — matched data helped, in proportion to how comparable it was.

Pooling a second rat dataset (TG-GATEs, +79 compounds) with a mismatched exposure window (hours) washed the signal out. The time-matched version (days) recovered it partway. The recovered signal tracks cross-dataset agreement.

N=177 · clean
+.025
SR ΔAUC
single protocol
+256 · hours
0.38
SR → +.001
ComBat agreement r · washed out
+256 · days
0.44
SR → +.013
ComBat agreement r · recovered

Why. Even same-platform, same-organ rat liver signatures for identical molecules agree only r ≈ 0.44 after batch correction — a 24-hour liver and a 5-day liver are different biological states. The bottleneck is comparability, not sample size. It's the measurable, in-rat preview of the animal→human gap.

Part 3 — Does it predict real clinical harm? (retrospective validation)
Val AReframed

Held-out Tox21 is infeasible by construction — the cross-validation already is that test.

Every rat compound with a Tox21 label is, by definition, in the supervised set (it's the intersection). There is no external hold-out — so the out-of-fold CV already answers it.

Why. The supervised set is (TG-GATEs ∪ DrugMatrix) ∩ Tox21. Honest to say so rather than manufacture a set that doesn't exist.

Val BStructure wins

For real human liver injury (DILIrank), the model adds nothing over structure.

A leakage-safe ladder on 134 shared drugs. The sanity gate passed first — measured Tox21 → DILI ≈ chance, reproducing the published near-random result — then structure beat everything.

Structure (ECFP)
0.699
Fused representation
0.600
Measured Tox21
0.550
Predicted Tox21 · cross-fit
0.465
Raw rat expression
0.516

The decisive check. The chained pipeline (predicted Tox21 → DILI) looked promising at 0.646 — but that was leakage. Regenerating the Tox21 predictions out-of-fold collapsed it to 0.465 ≈ chance. A ~0.12-AUC illusion only cross-fitting exposes.

Val B · 2ndBiology edges it — noisy

For market withdrawal, the pattern flips: biology beats structure.

A separate, noisier target (ChEMBL withdrawal status). Here structure is near-chance — withdrawal is driven by in-vivo/clinical effects, not molecular shape — and Tox21/expression features win.

0.56structure (≈ chance)
0.65measured Tox21

Treat as a lead, not a headline. Only 35 withdrawn positives, a heterogeneous label (drugs are pulled for efficacy and commercial reasons too), and the predicted-Tox21 number swings between encoders — so it's a genuine, honest contrast worth chasing with a larger tox-specific set.

05

What it all says

yes · small
Does rat expression add to structure for Tox21?
A modest, stress-response-specific, encoder-robust benefit — but fragile: it needs feature balancing and a regularized head.
no
Does more animal data strengthen it?
No. Cross-dataset comparability caps out at r ≈ 0.44; matched exposure recovers signal, mismatched destroys it.
no
Does it predict real human liver injury?
No. Structure alone wins; the one promising result was leakage, caught by cross-fitting.
maybe
Does it predict drug withdrawal?
Biology edges structure when the outcome is about in-vivo effect — but the label is noisy and the result unstable.

The animal→human gap is a harmonisation problem — not a data-volume one.

Two rat datasets for the same molecules agree only moderately; a human-cell-line assay panel doesn't predict clinical DILI; a rat transcriptome doesn't rescue it. The lever that matters is careful alignment of responses across systems — which is exactly what a rat→human translation layer is for, and what this pipeline is built to drop it into.

06

The next step — a rat→human translation layer

The project didn't just fail to close the gap — it localised it to one addressable step, and shipped the socket to plug the fix into.

Every experiment converged on one diagnosis: the ceiling is comparability across biological systems, not data volume — we measured it at r ≈ 0.44 even for same-species, same-organ, same-molecule rat signatures. The animal→human gap is the same harmonisation problem, one system out. So the highest-leverage next move is a learned rat→human alignment, not more animal data.

Tier 1
Linear alignment
weeks · public data

Learn a linear rat→human map from an anchor set of compounds measured in both species (Open TG-GATEs human hepatocytes, LINCS L1000), over 1:1 orthologs. CORAL / optimal transport.

Tier 2
Contrastive encoder
a GPU-month

Project rat and human signatures into a shared latent where the same compound's responses are neighbours and a species discriminator can't separate them. Where r ≈ 0.44 could actually be pushed.

Tier 3
Pathway translation
the ambitious version

Align at Reactome / MSigDB pathway activity, not raw genes — platform-robust, interpretable, and tied to the SR hypothesis: conserved stress pathways translate; species-divergent metabolism may not.

The falsifiable prediction that makes it fundable

If the animal→human gap is truly harmonisation, a translation layer should lift the human-DILI expression arm from its current chance-level 0.52 toward structure's 0.70 — and help SR mechanisms more than NR, mirroring the in-rat result. If it doesn't move 0.52, the gap is deeper than harmonisation — itself a publishable negative.

The embed() interface is already swappable (a RatToHumanEmbedder stub with the identical contract) — the model drops in with zero change to the CV harness or fusion. "Funded" buys anchor-set curation and encoder compute, not another animal study.

07

Honest limitations

Stated plainly, because the checks that surface them are the point.
Small N is the binding constraint.

177 compounds (256 pooled); sparse assays like NR-PPARγ have 12 actives. Richer features, an L1 head, GBM and a multitask MLP all failed to beat the regularized linear model at this N.

Baseline below SOTA.

ECFP+logistic (stronger than frozen ChemBERT and counts+physchem here) still sits under published DILI models (0.75–0.83); a fine-tuned transformer is the open follow-up.

Tox21 is a prior, not truth.

Human in-vitro assays are a mechanism prior — we predict them, not the rat's own histopathology.

Imbalanced, noisy clinical labels.

DILIrank overlap is ~82% positive; the withdrawal label mixes reasons and has only 35 positives.