You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68-5Lines changed: 68 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,7 @@
2
2
3
3
Foundation-model evaluation harness for patient-derived tumor organoid (PDTO) drug-response prediction. Realizing the benefits of foundation models requires careful evaluations that map the boundaries of generalization.
4
4
5
-
The harness produces a registry-backed report comparing three models against three out-of-distribution split strategies on two PDTO datasets, with negative/positive controls, bootstrap confidence intervals, and a pretraining-leakage exposure profile per result.
6
-
7
-
See [docs/fm-pdo-evaluator-plan.md](docs/fm-pdo-evaluator-plan.md) for the 3-week plan.
5
+
The harness trains a fixed downstream head on cell-line drug screens (GDSC2) and tests it, frozen, on sarcoma organoids (Soragni 2024), comparing foundation-model embeddings (Stack) against simple expression baselines under negative and positive controls. It is the companion code for *Prospective Evaluation of Foundation Model Performance in Precision Medicine* (greenelab/fm-pm-eval-manuscript).
8
6
9
7
## Quickstart
10
8
@@ -19,11 +17,76 @@ uv sync --extra dev
19
17
uv run pytest
20
18
```
21
19
20
+
## Evaluation design
21
+
22
+
A model is scored as a **representation** (PCA/NMF of expression, or a Stack embedding) fed to a swappable **head** (linear ridge or RBF kernel ridge). The head is trained on GDSC2 cell lines and frozen, then asked to predict held-out Soragni organoids. Negative (within-drug permutation) and positive (planted interaction) controls bracket every result. See [docs/models.md](docs/models.md) for each model and [docs/adapter_contract.md](docs/adapter_contract.md) for the encoder interface.
23
+
24
+
```mermaid
25
+
flowchart LR
26
+
G[GDSC2 sarcoma<br/>cell lines] --> R
27
+
S[Soragni PDTOs<br/>organoids] --> R
28
+
subgraph R[Representation]
29
+
E[log1p CPM<br/>expression PCA/NMF]
30
+
K[Stack-Large<br/>embedding]
31
+
end
32
+
R --> H
33
+
subgraph H[Head]
34
+
L[linear ridge<br/>SimpleProbe]
35
+
N[RBF kernel ridge<br/>KernelProbe]
36
+
B[bilinear<br/>z, g, z⊗g]
37
+
end
38
+
H --> T[train on GDSC2,<br/>predict frozen on Soragni]
39
+
T --> M[metrics:<br/>interaction rho,<br/>within-drug rho,<br/>regret@k]

56
+

57
+
58
+
Regenerate with `uv run python scripts/plot_data.py`.
59
+
60
+
## Results
26
61
62
+
**A Stack-Large embedding gives no advantage over PCA of expression for sarcoma drug response.** In-distribution (within GDSC2 sarcoma), the embedding signal beyond the drug mean is, if anything, weaker than expression PCA (interaction rho: expression 0.224 > Stack 0.199 > subtype 0.138). Out of distribution (GDSC2 → Soragni, frozen), the transcriptome models collapse toward the drug-mean prior, and the predictive signal lives in the functional organoid screens rather than the transcriptome. Positive controls confirm each apparatus has full power when signal is planted in its own representation, so the null is biological, not a dead pipeline.
63
+
64
+
### Head-invariance
65
+
66
+
The headline comparison rides on a *linear* head, so the obvious objection is that a foundation-model embedding might only pay off under a *nonlinear* head. Running the same frozen GDSC2 → Soragni transfer through linear ridge, RBF kernel ridge, and the bilinear model shows the result holds across head families — the nonlinear head does **not** rescue Stack:
67
+
68
+
| head | representation | interaction rho | p |
69
+
|---|---|--:|--:|
70
+
| linear | expression PCA | +0.130 | 0.105 |
71
+
| linear | expression NMF | +0.184 | 0.035 |
72
+
| linear | Stack | +0.130 | 0.085 |
73
+
| kernel | expression PCA |**+0.225**| 0.005 |
74
+
| kernel | Stack | +0.076 | 0.225 |
75
+
| bilinear | 16 shared drugs | −0.019 | 0.420 |
76
+
77
+
Under the linear head expression and Stack tie; under the kernel head **expression rises to 0.225 while Stack stays at 0.076** — the nonlinear capacity benefits expression, not the embedding. Stack ≤ expression is head-invariant.
0 commit comments