File size: 55,110 Bytes
535fc66
 
 
 
 
 
 
 
 
 
 
 
 
8e82dba
535fc66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e82dba
535fc66
 
 
8e82dba
535fc66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dedf737
535fc66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dedf737
535fc66
 
70d7a46
dedf737
70d7a46
 
 
 
 
 
535fc66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dedf737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535fc66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dedf737
535fc66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dedf737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e82dba
dedf737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8e82dba
dedf737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f87a628
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7462f1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
% Methods — LNPBench: physics-informed formulation learning on LNPDB
% Draft for *Engineering* (special issue: Intelligent Drug Delivery Systems)
% All numbers are generated by `scripts/report.py` from `results/*.csv`.

# Methods

## 1. Problem statement and evaluation protocols

### 1.1 Data

We use the public **Lipid Nanoparticle Database (LNPDB, Nat. Commun. 2026)**.
After canonicalisation of SMILES strings and removal of formulations without a
quantitative delivery readout, **18,858 formulations** remain, built from
**12,228 unique ionisable lipids** drawn from **40 study sources**. Each record
provides (i) the ionisable lipid, (ii) the identity and molar ratio of the
helper lipid, cholesterol and PEG-lipid, (iii) the remaining formulation
variables (e.g. molar ratios, N/P ratio, payload), and (iv) one delivery
readout (transfection, luciferase expression or protein replacement) measured
under that study's own assay.

Every formulation is described by three disjoint feature families:

* a **chemistry block** computed from the ionisable lipid (Sections 2.1–2.3),
* **composition variables** (five formulation ratios),
* an optional **experimental-context block** (109 dimensions; assay, apparatus,
  readout protocol and laboratory metadata), which is *not* used by the final
  models and is retained only to quantify its effect (Section 7).

### 1.2 Target normalisation

Each study reports its readout on its own scale (relative luminescence,
ng/mL protein, % replacement). We therefore use the **per-study standardised
readout** shipped with LNPDB,

$$
\tilde y_i = \frac{y_i - \operatorname{mean}(y_{s(i)})}{\operatorname{sd}(y_{s(i)})},
$$

where $s(i)$ is the study of formulation $i$ and the moments are computed over
that study only. Because every metric used here is computed *within* a single
held-out study, per-study standardisation cannot leak information across
studies and does not affect any rank-based metric.

### 1.3 Splits

We use three protocols, all reconstructed exactly from the published split
files by multiset matching on `(SMILES, value)`.

**(a) External generalisation (primary).** Four studies are held out
*entirely*: `LM_2019` (1,128 formulations), `BL_2023` (773), `SL_2020` (91) and
`ZC_2023` (131). For each held-out study the model is trained on the remaining
17,730–17,867 formulations using the five published 80/20 folds, early-stopped
on the 20 % validation split, and evaluated once on the held-out study. This
gives $4 \times 5 = 20$ tasks. The held-out study contributes **no label and no
gradient** at any point.

**(b) Amine-disjoint 70/15/15.** The LNPDB split in which ionisable lipids are
assigned so that no amine head-group appears in more than one of train /
validation / test. All 40 study sources are present in every split, so this protocol
measures *in-distribution* performance on unseen chemistry.

**(c) Study-stratified 5-fold cross-validation.** Five folds over the entire
database, stratified by study, so that every fold contains all 40 study sources.

**(d) k-shot adaptation (Section 6).** Same as (a), except that after training a specified number $n$ of
formulations is drawn **at random from the held-out
study**, their labels are added to the training set, and the model is scored on
the remaining held-out formulations. Throughout this paper, (a)–(c) are the
*strict* protocols; (d) is reported separately and is never mixed with them.

### 1.4 Metrics

Let $\hat y$ be the prediction and $y$ the measured standardised readout on a
held-out set of size $n$.

* **Spearman rank correlation** $\rho$ — the primary metric, because the
  downstream decision is a *ranking* of candidate formulations.
* Pearson $r$, coefficient of determination $R^2$, MAE, RMSE.
* **Enrichment factor at the top 10 % / 20 %**,
  $\mathrm{EF}@q = \dfrac{|\{\text{top } q n\} \cap \{\text{true top } q n\}| / (qn)}{q}$.
* **NDCG@10** with relevance $2^{y_{\text{rank}}} - 1$.

### 1.5 Statistics

Every model is evaluated on the same 20 external tasks, so all comparisons are
**paired**. We report the mean per-task difference $\Delta$ and a two-sided
**Wilcoxon signed-rank test** over the 20 paired task-wise Spearman values.
Neural models are run with three seeds; per-task predictions are first averaged
after rank-normalisation (Section 5), so a multi-seed model is not penalised for
seed variance. Tabular models are deterministic given their hyperparameters and
use a single run.

---

## 2. Feature construction

### 2.1 Ionisable-lipid descriptors

For every unique ionisable lipid we compute **217 RDKit descriptors**
(`il_desc`): molecular weight, Crippen logP/MR, TPSA, HBD/HBA counts, rotatable
bonds, ring counts, fraction of sp³ carbons, formal charge at pH 7.4, the
number of basic nitrogens, per-element counts, and a set of topological
indices. All descriptors are computed on the neutral parent SMILES; the
protonated form enters only through the conformer descriptor of Section 2.2.
Values are clipped to $[-10^6, 10^6]$ and NaNs are set to zero.

### 2.2 Conformer critical-packing-parameter surrogate (cCPP)

LNPDB defines the critical packing parameter from an all-atom MD bilayer,

$$
\mathrm{CPP}_V=\frac{V}{a_0 l_c},\qquad
V=\tfrac13\pi l_c\left(r_h^2+r_hr_t+r_t^2\right),\qquad
a_0=\pi r_h^2 ,
$$

with $r_h$ the head-group radius, $r_t$ the radius of the terminal tail atoms
and $l_c$ the head–tail centre-of-mass distance. A single bilayer costs
4.1–4.7 GPU-days, which is why MD-based CPP exists for only 54 systems.
We therefore evaluate **the same geometric construction on a single
conformer**, which costs milliseconds:

1. Embed the molecule with **ETKDGv3**, optimise with **MMFF94**, heavy atoms
   only. The random seed is a deterministic hash (`zlib.crc32`) of the SMILES,
   so the descriptor is bit-reproducible.
2. A single conformer must be produced within a **1.5 s** wall-clock guard;
   otherwise the lipid falls back to 2-D descriptors and is flagged.
3. Assign regions: amine nitrogens (degree ≤ 3, not amide/sulfonamide) seed the
   head; if LNPDB's parsed head SMILES is a substructure of the lipid (94 % of
   cases) its atoms are added to the seed set. Head = atoms within a bond
   radius of a seed; tail = complement; $r_t$ uses the distal fraction of tail
   atoms.
4. The same construction is repeated on the **protonated** form (the state
   relevant at endosomal pH), giving $\mathrm{CPP}_V^{\text{prot}}$ and the
   shift $\Delta\mathrm{CPP}_V$.

Together with asphericity, principal moments of inertia, inertial shape factor,
logP, TPSA and four size descriptors this yields a **16-dimensional**
`cpp` vector per lipid.

**Validity.** The surrogate reproduces the *absolute* neutral-state
$\mathrm{CPP}_V$ of the single system with shipped MD values (1.583 vs 1.542) but
**not** the pH-induced shift (the protonated value is lower for only 48.3 % of
11,648 lipids, i.e. chance) and it does **not** reproduce the MD-derived
positive CPP–transfection association ($r=-0.285$, $p=0.10$, $N=34$ versus
$+0.53$ to $+0.72$ reported for MD). We therefore treat cCPP strictly as an
input descriptor, not as a physical measurement, and we report the ablation that
removes it (Section 7.3).

### 2.3 Hierarchical decomposition of the formulation

A formulation is a *set* of molecular components, not a single molecule. LNPDB
parses each ionisable lipid into up to six structural slots:

$$
\mathcal{S}=\{\text{head},\ \text{linker},\ \text{tail}_1,\dots,\text{tail}_4\},
$$

and each formulation additionally contains a helper lipid, cholesterol and a
PEG-lipid, whose identities and molar ratios are recorded. We therefore
represent a formulation as an ordered set of **ten nodes**

$$
\mathcal{N}=\{\text{head},\text{linker},\text{tail}_1,\dots,\text{tail}_4,
\underbrace{\text{IL}}_{\text{whole lipid}},
\text{HL},\text{Chol},\text{PEG}\},
$$

where the IL node is the intact ionisable lipid, and the three helper nodes are
the ones actually used in that formulation (masked out when absent).

Each of the six lipid fragments and the three helper-lipid types is described by
**16 physical descriptors** (`frag_*.npz`): Crippen logP, formal charge, HBD,
HBA, the fragment-level cCPP analogue, elemental composition fractions,
fraction of sp³ carbon, ring count, rotatable bonds and molecular weight. The
whole-lipid node additionally carries the 16-dimensional `cpp` vector and the
graph embedding of Section 3.1.

### 2.4 Identity-free feature policy

Two feature families are strong **study-identity shortcuts** on this benchmark
and are therefore excluded from every deployed model:

* **Morgan fingerprints of fragments** — a near-unique code for the ionisable
  lipid. In the set encoder they raise validation Spearman while collapsing
  external Spearman from 0.368 to 0.189 (Section 7.2), because they let the
  network memorise *lipid → effect* within the training studies.
* **The 109-dimensional experimental context** — encodes assay, laboratory and
  readout protocol. It is retained only for the diagnostic of Section 7.1 and
  is **not** an input to PhysSet-LNP or PhysChem-Tree.

Composition variables (helper identities and molar ratios) are a weaker but real
shortcut, since each library screens its own fixed grid. We keep them but add
**component dropout** during training (Section 3.7).

### 2.5 The chemistry block

The tabular models operate on the concatenation

$$
\boldsymbol{\phi}(i)=
\big[\underbrace{\mathbf{d}_{\text{IL}}^{(217)}}_{\text{RDKit}},
\underbrace{\mathbf{c}_{\text{IL}}^{(16)}}_{\text{cCPP}},
\underbrace{\mathbf{r}^{(5)}}_{\text{ratios}},
\underbrace{\mathbf{p}_{\text{frag}}^{(6\times16)}}_{\text{hierarchical}},
\underbrace{\mathbf{p}_{\text{helper}}^{(3\times16)}}_{\text{HL/Chol/PEG}},
\underbrace{\mathbf{p}_{\text{IL}}^{(16)}}_{\text{whole lipid}}\big]
\in\mathbb{R}^{398},
$$

with no fingerprint and no context. Missing fragments contribute zeros; NaNs are
set to zero and values are clipped to $\pm10^6$. This block is used unchanged by
every tabular model in the paper.---

## 3. PhysSet-LNP: a physics-biased hierarchical set encoder

PhysSet-LNP maps a formulation to a scalar delivery score through four
stages: a graph stream on the intact ionisable lipid, a descriptor stream, a
ten-node formulation set processed by physically biased attention, and a
prediction trunk.

### 3.1 Graph stream

The ionisable lipid is featurised as a molecular graph with **43-dimensional
atom features** (element, degree, formal charge, hybridisation, aromaticity,
number of hydrogens, ring membership, ...) and **12-dimensional bond features**
(bond type, conjugation, ring membership, stereo). A **GINE** encoder with
three layers and hidden width $d=192$ produces atom embeddings; mean pooling
over atoms gives $\mathbf{g}_{\text{IL}}\in\mathbb{R}^{192}$.

Formally, for layer $l$,

$$
\mathbf{h}_i^{(l+1)}=\mathrm{LN}\!\left(\mathbf{h}_i^{(l)}+
\mathrm{MLP}\!\left((1+\epsilon)\mathbf{h}_i^{(l)}
+\sum_{j\to i}\left(\mathbf{h}_j^{(l)}+\mathbf{W}_e\mathbf{e}_{ji}\right)\right)\right),
$$

with $\epsilon$ a learned scalar and pre-norm residuals.

### 3.2 Descriptor stream

The 217 RDKit descriptors pass through a two-layer MLP with width 128 and SiLU
activations, giving $\mathbf{d}_{\text{IL}}\in\mathbb{R}^{128}$.

### 3.3 Node embeddings

For each of the ten nodes $j$,

$$
\mathbf{x}_j=\mathrm{MLP}_{\text{phys}}(\mathbf{p}_j)
+\mathrm{MLP}_{\text{ratio}}\big([w_j,\ \mathbb{1}_{\text{IL}}]\big)
+\mathbf{e}_{\text{type}(j)},
$$

where $\mathbf{p}_j\in\mathbb{R}^{16}$ are the node's physical descriptors,
$w_j$ its molar ratio (zero for structural sub-units) and
$\mathbf{e}_{\text{type}}$ a learned embedding over the ten node types. The
whole-lipid node receives the graph embedding,

$$
\mathbf{x}_{\text{IL}}\leftarrow\mathbf{x}_{\text{IL}}
+\mathbf{W}_g\,\mathbf{g}_{\text{IL}},
$$

so that message passing on the intact molecule reaches the set. **No node is
identified by a fingerprint** (Section 2.4). Absent components are masked out of
the attention.

### 3.4 Physically biased set attention

Standard set attention is permutation-equivariant but physics-blind: it must
learn from data that a charged head and a lipophilic tail interact differently
from two identical tails. We inject this as an additive per-head bias computed
from the node descriptors,

$$
\mathbf{b}_{jk}=\Big[-\lvert \ell_j-\ell_k\rvert,\ -q_jq_k,\ h_j^{\text{D}}h_k^{\text{A}}+h_j^{\text{A}}h_k^{\text{D}},\ -\lvert c_j-c_k\rvert,\ \sqrt{w_jw_k}\Big]\in\mathbb{R}^{5},
$$

where $\ell$ is logP, $q$ formal charge, $h^{\text{D}}/h^{\text{A}}$ H-bond
donor/acceptor counts, $c$ the node cCPP and $w$ the molar ratio. The bias enters
each head through a small MLP:

$$
\mathbf{A}^{(h)}=\operatorname{softmax}\!\left(
\frac{\mathbf{Q}^{(h)}\mathbf{K}^{(h)\top}}{\sqrt{d_h}}
+\mathrm{MLP}_h(\mathbf{b})\right),\qquad
\mathbf{b}_{jk}\in\mathbb{R}^{5}\mapsto\mathbb{R}^{H}.
$$

Three such blocks ($H=6$ heads, $d_h=32$) with pre-norm residuals and a
four-times-wide GELU feed-forward follow. A **pooling-by-multi-head-attention**
(PMA) layer with a single learned seed vector then collapses the set to
$\mathbf{z}_{\text{set}}\in\mathbb{R}^{192}$.

### 3.5 Condition path

The 109-dimensional context is used only by the diagnostic models. When used, it
enters **additively**: a linear projection is added to the pooled vector,
$\mathbf{z}_{\text{form}}=\mathrm{LN}(\mathbf{z}_{\text{set}}+\mathbf{W}_c\mathbf{c})$.
A multiplicative cross-attention variant (context as query over the node set) was
tested and rejected: it raises validation Spearman and lowers external Spearman,
i.e. it is the same shortcut as fingerprint nodes (Section 7.1). The deployed
model uses **no context at all**.

### 3.6 Heads and losses

The formulation vector is

$$
\mathbf{z}=\mathrm{Trunk}\big([\mathbf{z}_{\text{form}};\mathbf{g}_{\text{IL}};\mathbf{d}_{\text{IL}}]\big)\in\mathbb{R}^{256},
$$

with $\mathrm{Trunk}=\mathrm{Linear}(448\to256)+\mathrm{LN}+\mathrm{SiLU}+\mathrm{Dropout}(0.1)$.
Two heads read it out:

* **regression head** $\hat y=\mathrm{MLP}_{256\to64\to1}(\mathbf{z})$;
* **physics head** $\hat{\mathbf{p}}=\mathrm{MLP}_{416\to96\to3}$, predicting
  $(\mathrm{CPP}_V^{\text{prot}},\ \Delta\mathrm{CPP}_V,\ \text{bilayer stability})$.

The training objective is

$$
\mathcal{L}=\underbrace{\mathrm{SmoothL1}(\hat y,y)}_{\text{regression}}
+\lambda_r\underbrace{\mathbb{E}_{(i,j)\in\mathcal{P}}\ \mathrm{softplus}\!\big(-\gamma(\hat y_i-\hat y_j)\big)}_{\text{within-study ranking}}
+\lambda_p\underbrace{\Big[\lVert\hat{\mathbf{p}}_{1:2}-\mathbf{p}^{\star}_{1:2}\rVert_1+\mathrm{BCE}(\hat p_3,s)\Big]}_{\text{physics auxiliary}},
$$

with $\mathcal{P}=\{(i,j): s(i)=s(j),\ y_i>y_j+10^{-4}\}$ the set of pairs from
the same study, $\lambda_r=0.5$, $\gamma=2.0$. The ranking term is computed
*within study only*, which matters because global rank comparisons across
studies would be meaningless after per-study standardisation. The physics
auxiliary is supervised by the 54 MD-derived bilayer-stability labels and the
cCPP vectors; $\lambda_p=0.2$.

Both auxiliary terms turn out to be **neutral** on external Spearman
(0.356 and 0.352 versus 0.368 for the full model, Section 7.3) and are reported
as such.

### 3.7 Training

AdamW, learning rate $3\times10^{-4}$, weight decay $10^{-5}$, batch size 256,
**30 epochs**, three warm-up epochs followed by cosine decay, gradient clipping
at 5.0, early stopping on **validation Spearman** with patience 15. The epoch
budget is deliberately short: on this database a long schedule reliably drives
validation Spearman up and external Spearman down (the identity-shortcut
signature), and 30 epochs was the plateau of the external metric. Component
dropout is set to zero in the deployed model.

---

## 4. PhysChem-Tree

PhysChem-Tree is the strongest strict-protocol model and, deliberately, the
simplest: **a random forest on the 398-dimensional identity-free chemistry
block** (Section 2.5).

Hyperparameters: 400 trees, `min_samples_leaf = 2`, bootstrap sampling,
$\sqrt{398}$ features considered per split, $n_{\text{jobs}}$ parallel. No
feature scaling is needed; NaNs are imputed with zero before fitting. A small
sweep over `min_samples_leaf` $\in\{1,2,5\}$ and 400/800 trees on fold 0 of the
four held-out studies suggested `min_samples_leaf = 1` (0.371 vs 0.356), but on
the full 20-task matrix the two settings are indistinguishable (0.375 vs 0.376);
we therefore keep the more regularised default rather than the seemingly better
fold-0 value.

The model has three roles in the paper:

1. it isolates **how much of the gap is representation versus model class** —
   swapping only the feature block moves the random forest from 0.357 to 0.376;
2. it is the **best single model**, so every neural claim is measured against a
   strong, cheap tabular baseline rather than against a strawman;
3. it is a **member of the ensemble** and the base learner of the adaptation
   layer (Section 6).

---

## 5. LNPBench-Stack

Neural and tree models fail on different studies: PhysSet-LNP is best on the
two large held-out studies (SL_2020 0.750, ZC_2023 0.430) and worst on the two
small ones (LM_2019 0.142, BL_2023 0.103), while PhysChem-Tree is the opposite.
We therefore combine them.

For a model $m$ and a task, let $r_m(i)\in[0,1]$ be the **rank-normalised**
prediction of formulation $i$,

$$
r_m(i)=\frac{\operatorname{rank}_i(\hat y_m)-1}{n-1}-\frac12 .
$$

The stack is the equal-weight average

$$
R(i)=\frac1{|\mathcal{M}|}\sum_{m\in\mathcal{M}} r_m(i),\qquad
\mathcal{M}=\{\text{PhysChem-Tree},\ \text{PhysSet-LNP},\ \text{RF},\ \text{ET}\},
$$

and the reported Spearman is computed on $R$. **No weight is fitted on any
evaluation data**, so the stack has no more freedom than a single model and
cannot overfit the held-out studies. Rank normalisation is essential: it makes
the average insensitive to the fact that trees predict standardised units while
the network regresses the same target with a different calibration.

Leave-one-out attribution over the four members changes the mean Spearman by at
most $\pm 0.012$, and every 4- to 6-member combination tested lies between 0.38
and 0.41 — the result is a property of cross-family diversity, not of a
particular member list.

**Member selection without selection bias.** Adding a fifth member by hand and
reporting the resulting score would be optimistic, because the member would be
chosen on the same 20 tasks it is scored on. The protocol used here is
*leave-one-study-out*: a greedy forward selection is run on the tasks of three
held-out studies and the selected member set is scored on the fourth, rotated
over all four. Under this protocol the four-member stack scores 0.392 and the
selected five-member stack 0.399 (+0.007). In-sample the same selection reaches
0.406, and the member it adds in three of the four rotations is LiON — the
directional message-passing baseline. The ontology block of Section 10, by
contrast, adds +0.0001 in-sample, i.e. nothing. The stack reported in the paper
is therefore kept at four members, and the leave-one-study-out probe is reported
as the honest ceiling of member tuning (Section 9.2 of the report).

---

## 6. LNPAdapt: calibration on a deployment pilot batch

The strict protocol is deliberately pessimistic: in practice a laboratory that
adopts the model will first run a **pilot batch** of its own formulations. We
therefore define an adaptation layer with a single hyperparameter, the pilot
size $n$.

**Procedure.** Given a held-out study of $N$ formulations,

1. draw $n$ formulations uniformly at random without replacement
   ($n \le N/2$; for very small studies we cap at $N/2$ and floor at 10),
2. add them, with their measured readouts, to the source training set,
3. refit **exactly the same estimator with exactly the same hyperparameters**
   on the augmented set,
4. score the remaining $N-n$ formulations.

Nothing else changes — no new architecture, no new loss, no feature from the
held-out study other than its labels. Three independent draws are used per task
and the mean is reported; the spread across draws is reported as the standard
deviation.

**Why refitting rather than fine-tuning.** We tested two alternatives on the
same pilot batches: (i) adding the 0-shot ensemble prediction as one extra
input feature and (ii) a linear recalibration
$\tilde y=a\,\hat y_{0\text{-shot}}+b$ fitted on the pilot batch. Neither beat
simply refitting the forest on the full chemistry block, and the linear
recalibration was substantially worse at larger $n$. The simple procedure is
therefore kept, and both alternatives are reported as negative results.

**Interpretation.** The adaptation setting uses labels from the held-out study,
so it answers a *different* question from Sections 1.3(a)–(c): not "does the
model transfer?" but "how many experiments does a new laboratory need before
the model is useful?". Every adapted number in this paper is reported in its own
table, and never compared with a 0-shot number or with the published literature.

---

## 7. Diagnosing study-identity leakage

Because validation and test are drawn from different studies, the gap between
them is itself an observable. We use three controlled interventions, each
changing exactly one thing.

### 7.1 Context ablation

The 109-dimensional context vector is either (i) appended to the chemistry
features of a tabular model, (ii) appended additively in PhysSet-LNP, or
(iii) used as a query in multiplicative cross-attention over the node set.
Variants (i) and (iii) raise validation Spearman and leave external Spearman
flat or lower; variant (iii) is the worst, moving PhysSet-LNP's external
Spearman by $-0.10$ relative to additive conditioning. The deployed models use
none of them.

### 7.2 Identity-shortcut ladder

A minimal set encoder is grown one ingredient at a time, keeping data, splits
and the training loop fixed:

| step | encoder |
|---|---|
| 1 | flat chemistry vector, no set |
| 2 | + ten-node formulation set |
| 3 | + physically biased attention |
| 4 | + within-study ranking loss |

plus the decisive swap: **physical node descriptors → Morgan fingerprints of
each fragment**, with everything else identical. This last intervention is the
largest single effect in the study: external Spearman collapses from 0.368 to
0.189 while validation Spearman *rises*, i.e. the model has learned to
recognise the study rather than the chemistry.

### 7.3 Model ablations

Removing (i) the ranking loss, (ii) the physics bias, (iii) cCPP from the
descriptor block, and (iv) the protonation-state (dual) graph stream. All are
reported with the same single-run configuration as their reference, because the
ablations are single runs (fold 0, seed 0) and comparing them with a seed-averaged
reference would confound the ablation with seed variance.

### 7.4 Sampler ablation

Mini-batches are drawn uniformly over the training pool, which is dominated by
a few large studies. A **study-balanced sampler** (each source study contributes
with equal probability) was implemented and tested to see whether the small-study
deficit is a sampling artefact. It is not: the mean external Spearman falls from
0.345 to 0.304 and BL_2023 becomes negative. This is reported as a negative
result.

---

## 8. Baselines

All baselines are re-implemented in this repository, trained on identical
features, splits and evaluation code, and given the same epoch budget and early
stopping rule. No published weights are used, and none of the baselines is
pre-trained on the held-out study.

* **LiON** — directed message passing (D-MPNN) over the ionisable-lipid graph,
  depth 3, hidden 300, with the context and composition appended before the
  regression head.
* **AGILE** — GIN structure encoder + RDKit-descriptor MLP + context encoder,
  concatenated before the head.
* **Morgan FP + MLP** — 2,048-bit Morgan fingerprint (radius 2) with the context,
  two hidden layers of 512/256.
* **XGBoost / Random forest / Extra trees** — the 398-dimensional chemistry block
  (Section 2.5) plus ratios and context for the baseline variants, i.e. the same
  inputs the published comparison would use.
* **Mean predictor** — reference for $R^2$ and MAE.

**Note on the published numbers.** The LiON entry in Nat. Commun. 2026 Fig. 3b
is pre-trained on the whole LNPDB corpus; our re-implementation trains from
scratch on each task's training split, so the published ZC_2023 value of 0.52 is
not reachable here. Conversely, the published AGILE entry was trained on only
~1.2k formulations (16× less than LiON), which is why it is negative on
SL_2020; retrained on the full pool under an identical budget, AGILE reaches
0.721 there. The comparison in this paper is therefore between *architectures
under an identical budget*, not against published weights, and we state that
explicitly wherever the published values are shown for context.

---

## 9. Implementation and reproducibility

| Item | Value |
|---|---|
| Hardware | one NVIDIA A800-SXM4-80GB; 128 CPU cores |
| Neural compute | 10.5 GPU-hours for the full 20-task matrix (all models, all seeds) |
| Tabular compute | ~40 CPU-minutes for 60 fits |
| Reporting | < 1 CPU-minute to rebuild every table and figure from stored predictions |

**Determinism.** All featurisation is deterministic; the conformer search is
seeded from a CRC32 hash of the SMILES, so `cache/` fully determines the inputs
and is byte-reproducible across machines. Neural runs fix
`random`, `numpy`, `torch` and CUDA seeds and use deterministic cuDNN kernels.
Tabular fits fix `random_state`.

**Resumability.** `scripts/run_benchmark.py --resume` skips tasks already
present in the output CSV; `scripts/fewshot.py` checkpoints its CSV after every
fit. A killed run can therefore be restarted with the identical command.

**Prediction-level reproducibility.** Every run saves
`results/predictions/{model}__{task}__s{seed}.npz` with fields
`idx, y, pred`. All ensembles, all paired tests and all figures are computed
from these files, so the entire results section can be rebuilt without a GPU.
The scripts are:

```bash
python scripts/run_benchmark.py --models ... --protocols external   # raw runs
python scripts/fewshot.py      --ks 0 0.02 0.05 0.10 0.20 --seeds 0 1
python scripts/ensemble.py     --pred-dirs results/predictions
python scripts/report.py       --results results      # -> results/REPORT.md
python scripts/make_figures.py --results results      # -> figures/
python scripts/validate_ccpp.py                       # -> results/ccpp_validation.json
```

---

## 10. Ontology, schema and global representations

The chemistry block of Section 2.5 describes every lipid as one flat vector of
whole-molecule descriptors. Two further hypotheses were tested at full scale
because they are the natural objections to that design: that a *role-aware*
description (which functional group sits in which slot of the lipid
architecture) carries information a flat vector cannot, and that a *global*
representation fitted on the whole chemical space of the database transfers
better than per-molecule features. Both were implemented, both were run over
all 20 external tasks, and neither improves the state of the art. The section
documents what was built and why it does not work, because the failure is
informative: it is the same study-identity mechanism as Section 7, reached from
the feature side instead of the model side.

### 10.1 Slot ontologies

A formulation follows a grammar,

$$
\text{IL} := \text{head} \oplus \text{linker} \oplus \text{tail}_1 \oplus \dots \oplus \text{tail}_k,
\qquad
\text{LNP} := \text{IL} + \text{helper} + \text{cholesterol} + \text{PEG}.
$$

The 217 RDKit descriptors of Section 2.1 are computed on the intact molecule, so
an ester in the linker and an ester at the end of a tail contribute the same
`fr_ester` count. A slot ontology instead describes each slot separately, using
a fixed SMARTS table (19 functional groups, 8 nitrogen ring environments) plus
ring and chain statistics. All patterns are counted with
`GetSubstructMatches(uniquify=True)` and are deterministic.

* **Head** — composition of the amine population: dominant amine type
  (primary / secondary / tertiary / quaternary / aromatic / none), the five
  type fractions, a multi-amine indicator, the ring environment (piperidine,
  piperazine, morpholine, pyrrolidine, azepane, imidazole, pyridine), twelve
  functional-group counts, and two density terms (ionisable atoms and hydroxyls
  per heavy atom). This replaces an earlier single-label taxonomy whose
  priority chain collapsed 79 % of the database into one "poly-amine" class.
* **Linker** — presence and multiplicity of the degradable chemistries
  (ester, diester, amide, carbonate, carbamate, ether, disulfide), ketone and
  alkene counts, ring content, and scaled group counts.
* **Tail 1–4** — topology class (saturated / mono-unsaturated / poly-unsaturated
  / branched / ring-containing / heteroatom-bearing) plus the number of double
  bonds, heteroatoms, rings, terminal carbons, branch points, the longest carbon
  path and the carbon count.
* **Helper, cholesterol, PEG** — lipid class (phosphatidylcholine,
  phosphatidylethanolamine, phosphatidic acid, cationic, neutral dialkyl,
  sterol, PEG-lipid), phosphate and quaternary-nitrogen counts, ring count, and
  the number of ethylene-oxide repeats (PEG chain length).
* **Whole ionisable lipid** — the functional-group, ring and chain-statistics
  vector, used both as a node attribute and as the source of the ratios below.

Together these form 226 features. They are pure structure: no fingerprint, no
lipid identifier, no study label.

### 10.2 Cross-slot ratios

An ontology also makes it possible to write down *dimensionless* quantities
that no single-molecule descriptor vector contains, and that a chemist reasons
with directly:

$$
\frac{n_{\text{ionisable}}}{\text{tail carbons}},\quad
\frac{n_{\text{ester}}}{\text{tail carbons}},\quad
\frac{n_{\text{OH}}}{n_{\text{head N}}+1},\quad
\frac{\text{TPSA}}{|\log P|+1},\quad
n_{\text{ion}}\cdot w_{\text{Chol}},\quad
\text{EO}_{\text{PEG}}\cdot w_{\text{PEG}},\quad
n_{\text{ion}}\cdot[\text{helper has phosphate}],\ \dots
$$

Twenty such ratios are computed, covering charge density along the hydrophobic
axis, degradability density, hydrophilic–lipophilic balance, PEG surface
coverage, and charge complementarity between the ionisable lipid and the helper
lipid.

### 10.3 Global chemical archetypes: a label-free codebook

The second hypothesis is that a formulation is better described by its position
in the chemical space of the whole database than by its own descriptors. The
global block is built in three steps, none of which uses a target value:

1. standardise the chemistry matrix of all 18 858 rows and reduce it to 48
   principal components;
2. fit $k$-means with $K=64$ archetypes on those components;
3. describe each row by its soft membership

$$
p_k \;\propto\; \exp\!\left(-\frac{d_k^2 - d_{(1)}^2}{2\sigma^2}\right),
\qquad
\sigma^2 = \operatorname{median}_{i}\min_k d_{ik}^2 ,
$$

   where $d_k$ is the distance to archetype $k$ and $d_{(1)}$ the distance to the
   nearest one, and append the membership entropy, the margin
   $(d_{(2)}-d_{(1)})/d_{(2)}$ and the eight nearest-centre distances.

The resulting 75-dimensional block is *smooth* in chemistry — two similar lipids
receive similar coordinates — which is exactly the property a fingerprint lacks.
It is fitted on all rows, so it is transductive; it never sees a label, and the
held-out study contributes only unlabelled structures.

### 10.4 Manifold geometry of the descriptor space

The classical alternative is a spectral embedding of the $k$-nearest-neighbour
graph. A symmetric cosine $k$NN graph ($k=50$) is built on the 48-component
representation, the symmetric normalised operator
$M = D^{-1/2} W D^{-1/2}$ is formed, and its leading singular triplets are
computed with a randomised SVD (ARPACK does not converge here: the graph is
almost disconnected and the top of the spectrum is degenerate).

The diagnostic is the result. The leading singular values are
$0.9957, 0.9945, 0.9939, \dots$, i.e. a plateau within $10^{-3}$ of unity. A
randomised walk on this graph mixes almost immediately, so there is no
low-dimensional manifold to recover: the LNPDB descriptor space is a
high-dimensional blob, not a curved sheet. The 24 spectral coordinates are
therefore retained only as a negative control.

### 10.5 Schema-LNP: typed attention over the formulation graph

The ontology is also useful at the model level. PhysSet-LNP (Section 3) treats
the ten formulation nodes as an unordered set and lets attention discover the
relations. Schema-LNP instead *declares* them:

* every node receives an additional ontology embedding, projected from the
  48-dimensional padded slot vector into the model width;
* attention is restricted to a typed adjacency $E$,

$$
E_{ij} = 1 \iff
\begin{cases}
i = j, & \text{(self)}\\
\{i,j\} = \{\text{head}, \text{linker}\}, & \text{(covalent)}\\
\{i,j\} = \{\text{linker}, \text{tail}_k\}, & \text{(covalent)}\\
i = \text{IL},\ j \in \{\text{head},\dots,\text{tail}_4\}, & \text{(part–whole)}\\
\,i = \text{IL},\ j \in \{\text{helper}, \text{Chol}, \text{PEG}\}, & \text{(non-covalent)}\\
i,j \in \{\text{helper}, \text{Chol}, \text{PEG}\}, & \text{(co-assembly)}
\end{cases}
$$

  implemented as an additive $-\infty$ mask on the attention logits, with rows
  whose partners are all absent contributing zero attention rather than NaN;
* optionally, the global archetype coordinate is projected and added to the
  pooled formulation vector.

Everything else — the GINE graph stream, the descriptor stream, the condition
path, the losses, the optimiser and the 30-epoch budget — is identical to
PhysSet-LNP, so the comparison isolates the schema.

### 10.6 A study-identifiability audit of candidate blocks

If feature blocks fail because they encode the study rather than the chemistry,
a cheap screening test should detect it. For every candidate block we train a
random forest to predict the study of origin from the features alone (three
stratified folds, balanced accuracy over 40 study sources; chance is 0.025).

The audit **saturates** and therefore cannot rank the blocks:

| block | dim | balanced accuracy |
|---|---|---|
| context only | 109 | 0.956 |
| chemistry block (reference) | 398 | 0.950 |
| +ontology | 621 | 0.951 |
| +codebook | 473 | 0.947 |
| codebook only | 75 | 0.933 |
| spectral only | 24 | 0.934 |
| ontology only — cross-slot ratios | 20 | 0.952 |
| ontology only — whole-lipid | 32 | 0.863 |
| ontology only — slots | 171 | 0.652 |

Every block identifies the study of origin with ≥ 93 % balanced accuracy,
because the 40 study sources screened chemically disjoint lipid libraries. The
useful conclusion is negative and worth stating: *at this level of resolution
study-identifiability is a property of the database, not of the feature block*,
so shortcut risk cannot be screened cheaply — it has to be measured by the
external-transfer experiment itself, which is what Sections 4 and 7 do.

### 10.7 Results

All numbers are full runs: 4 held-out studies × 5 published folds = 20 external
tasks, seed 0, the identical estimator (random forest, 400 trees,
`min_samples_leaf = 2`) and the identical splits as PhysChem-Tree. Only the
feature block changes.

| model | LM_2019 | BL_2023 | SL_2020 | ZC_2023 | mean | Δ | p |
|---|---|---|---|---|---|---|---|
| PhysChem-Tree (reference, 398-d) | 0.209 | 0.174 | 0.683 | 0.439 | **0.376** | — | — |
| + ontology, first taxonomy (223-d) | 0.239 | 0.161 | 0.652 | 0.418 | **0.368** | −0.008 | 0.28 |
| + ontology, revised taxonomy (226-d) | 0.238 | 0.161 | 0.653 | 0.402 | **0.364** | −0.013 | 0.15 |
| + global codebook (75-d) | 0.203 | 0.121 | 0.632 | 0.298 | **0.314** | −0.063 | <0.0001 |
| + ontology + codebook | 0.217 | 0.086 | 0.622 | 0.246 | **0.293** | −0.083 | 0.0002 |

Two ontology variants are reported. The first is the priority-chain taxonomy
described in Section 10.1 before revision; the second replaces it with the amine
composition encoding. The revision was made because the first collapsed 79 % of
the database into a single head class, and it does not change the conclusion:
both variants land 0.008–0.013 below the reference, and both are best on
LM_2019 and worst on SL_2020.

The ontology is a wash: it is the best model on LM_2019 (+0.031, the study on
which every other model collapses) and the worst on SL_2020 (−0.031, the study
on which every other model is saturated). The global codebook is not a wash; it
is harmful by 0.063, and the harm is concentrated in exactly the same place —
ZC_2023 falls from 0.439 to 0.298 and the nine tasks that improve are all in
LM_2019. A representation fitted on the union of the studies encodes the
*composition* of the database, and the composition of the database is the
study.

At the model level the same holds. Schema-LNP, run at full scale (20 tasks,
seed 0), reaches **0.353** against **0.360** for PhysSet-LNP under the identical
budget (LM_2019 0.136 vs 0.123, BL_2023 0.077 vs 0.117, SL_2020 0.757 vs 0.738,
ZC_2023 0.444 vs 0.460). Typed adjacency and ontology attributes do not add
transferable signal.

### 10.8 What the null results imply

* **Role information is real but not transferable here.** The ontology changes
  *which* study a model is good at, not how good it is on average. That pattern
  is what a feature that encodes the study's chemical palette looks like: it
  sharpens the model inside the region of chemistry the training studies cover
  and does nothing outside it.
* **Global representations inherit the composition of their fitting set.** A
  codebook, unlike a fingerprint, is not an identity code for a molecule — but
  it is an identity code for a *region* of the database, and in LNPDB regions
  correspond to studies. This is a sharper version of the Section 7 finding: the
  shortcut does not require an explicit identifier.
* **The descriptor space has no exploitable manifold.** The degenerate spectrum
  of Section 10.4 says manifold learning cannot help here, independently of the
  study structure.
* **The ontology does have one use.** Because it is the strongest model on
  LM_2019, it is a candidate ensemble member; Section 5 reports what happens
  when it is added to the stack. The answer (no measurable gain, +0.0001) is
  consistent with everything above.

---

## 11. External supervision from an independent corpus

Everything in Sections 1-10 uses information that exists *inside* LNPDB. The
natural next hypothesis is that an external corpus of **absolute** physical
measurements -- quantities that are not defined relative to a study -- could
supply chemistry that transfers to a new study. We tested this with LNP Atlas
and the answer is negative in a specific, informative way.

### 11.1 The corpus

LNP Atlas (Zenodo 17243732; version 202509) contains 1,092 formulations from 62
papers with measured particle size, polydispersity index, zeta potential and
encapsulation efficiency. After dropping unparsable structures, 934
formulations and 269 unique ionisable lipids remain, with target coverage of
668 (size), 541 (PDI), 182 (zeta) and 408 (EE).

It is genuinely external: matching canonical SMILES against LNPDB finds **19
shared ionisable lipids**, and matching DOIs finds **3 shared papers**. No
activity label is ever read from Atlas, so nothing is leaked.

`scripts/build_atlas.py` writes a FeatureStore-compatible cache in
`cache/atlas/` (same file layout as the LNPDB cache, plus `aux_targets.npz`),
which is why every model and every batching routine works unchanged.

### 11.2 Two ways to use it

**Pretraining.** Train the encoder to regress the four standardised properties
on the Atlas formulations, then fine-tune on LNPDB activity. Two granularities
were implemented:

* formulation-level (`scripts/pretrain_atlas.py`): the full set encoder sees
  the whole-molecule node plus the three helper nodes; Atlas has no
  head/linker/tail decomposition, so the fragment slots are empty.
* lipid-level (`scripts/pretrain_lipid.py`): the four measurements are averaged
  per ionisable lipid and only the GINE graph encoder and the descriptor MLP
  are trained (269 lipids). This avoids the structural mismatch entirely.

Both were also run with the graph encoder frozen after pretraining, which
removes the component that can memorise study identity.

**Features.** Train the lipid-level predictor on Atlas, apply it to all 12,228
LNPDB lipids, and append the four predictions to the 398-d chemistry block
(`scripts/atlas_feature_probe.py`). This separates "the external labels carry
information" from "pretrained weights transfer".

### 11.3 Results

| experiment | setting | tasks | spearman | delta | p |
|---|---|---|---|---|---|
| PhysSet-LNP (reference) | 4-task screen | 4 | 0.3686 | – | – |
| formulation-level pretraining | 4-task screen | 4 | 0.3540 | −0.0146 | – |
| formulation-level, lr 1e-4 | 4-task screen | 4 | 0.3221 | −0.0464 | – |
| formulation-level, GINE frozen | 4-task screen | 4 | 0.3286 | −0.0400 | – |
| lipid-level pretraining | 4-task screen | 4 | 0.3159 | −0.0526 | – |
| lipid-level, GINE frozen | 4-task screen | 4 | 0.3104 | −0.0581 | – |
| lipid-level, shuffled labels (control) | 4-task screen | 4 | 0.3476 | −0.0210 | – |
| PhysSet-LNP (reference) | 20 tasks, seed 0 | 20 | 0.3597 | – | – |
| formulation-level pretraining | 20 tasks, seed 0 | 20 | **0.3603** | +0.0006 | 0.87 |
| PhysChem-Tree chemistry block (reference) | 20 tasks, seed 0 | 20 | 0.3761 | – | – |
| + Atlas four predicted properties (402-d) | 20 tasks, seed 0 | 20 | 0.3709 | −0.0052 | 0.19 |

The four-task screen is the interesting methodological point: it says the method
is harmful, and at lipid level the real labels score *below* the shuffled-label
control (0.316 vs 0.348). The full 20-task run then shows the effect is
**exactly neutral** (+0.0006, p = 0.87, 8/20 tasks improved). A four-task screen
is not enough to rank two models whose difference is this small -- which is the
same lesson as Section 7, reached from a different direction.

The neutrality is an average of two opposite effects:

| study | PhysSet-LNP | + external pretraining | delta |
|---|---|---|---|
| LM_2019 | 0.123 | 0.143 | +0.020 |
| BL_2023 | 0.117 | 0.133 | +0.016 |
| ZC_2023 | 0.460 | 0.481 | +0.021 |
| SL_2020 | 0.738 | 0.685 | −0.053 |

External supervision buys robustness on the three harder studies and gives up
ceiling on the saturated one, netting to zero. The pattern is identical to the
ontology block (Section 10.1), which suggests a common mechanism: any extra
constraint regularises the model towards the hard part of the space and away
from the easy part.

### 11.4 Why absolute physical properties do not help

1. **They are composition-driven.** Size and PDI are dominated by PEG content,
   mixing method and aqueous buffer; EE by the N/P ratio. A model trained on
   them learns formulation engineering, which the LNPDB training studies
   already cover.
2. **They are not causal upstream of transfection.** Particle size is a quality
   control, not a determinant of endosomal escape; formulations with acceptable
   size routinely fail to transfect. The causal parents are the lipid's
   apparent pKa and its membrane-fusion / endosomal-escape behaviour.
3. **The corpus is small.** 934 formulations against 18,858 is not enough prior
   to override the target-study shift, but is enough to pull the encoder into a
   slightly misaligned region -- which is why the screen looked worse than the
   full run.

**What this rules out, and what it does not.** The result rules out
size/PDI/zeta/EE as useful auxiliary supervision for out-of-study activity
prediction. It does **not** rule out external supervision in general: the
labels that share a causal parent with transfection -- measured pKa, membrane
fusion or endosomal-escape efficiency, organ selectivity -- were not available
in machine-readable form and were therefore not tested. Collecting them is the
highest-value next step, and it is a curation task, not a modelling one.

## 12. Discrete formulation-mode decoders: two published designs that do not transfer

PhysSet-LNP is a single regressor over a pooled formulation representation. A
natural objection is that one linear head cannot express *regime-dependent*
structure -- the same head must serve a helper-lipid screen dominated by
cholesterol competition and a PEG screen dominated by surface coating. Two
recent methods make exactly this argument in other domains and replace the
single head with a small bank of discrete latent states plus a residual
decoder. We implemented both faithfully and evaluated them under the same
protocol. This section documents the designs, the numbers, and the measured
reason they fail here.

### 12.1 What each source contributes

| | LaRIN | CoDiffGRN |
|---|---|---|
| domain | drug--drug interaction / relation prediction | gene-regulatory network inference |
| discrete state | VQ codebook, cosine assignment, EMA update | categorical token, D3PM uniform diffusion |
| posterior used downstream | tempered softmax of cosine similarity | reverse diffusion chain from the marginal |
| residual decoder | $s = s_{\text{base}} + \log\sum_r \pi_r e^{\alpha\Delta_r}$ | edge logits $[-s,s]$ added residually to the noisy input |
| training | $\mathcal{L}_{\text{BCE}} + \lambda_{\text{VQ}}\mathcal{L}_{\text{VQ}}$ | edge BCE + $\lambda\,\|\hat X_0 - X\|^2$ |
| data-scarcity device | -- | TF-ALL sub-graph sampling (TASS) |

Both reduce to the same skeleton, which we implement once:

$$
\hat y = s_{\text{base}}(h) + \alpha\cdot m\Big(\{\pi_k, \Delta_k(h, c_k)\}_{k=1}^{K}\Big),
\qquad
\Delta_k = f_{\text{res}}\big(h \,\|\, \mathrm{sg}(c_k)\big),
$$

with $s_{\text{base}}$ the ordinary PhysSet-LNP head, $c_k$ prototype $k$, and
the mixing functional $m$ either LaRIN's log-sum-exp
$m=\log\sum_k\pi_k e^{\alpha\Delta_k}$ or the plain expectation
$m=\sum_k\pi_k\Delta_k$. The two methods differ *only* in how $\pi$ is produced,
which is the axis the comparison isolates.

### 12.2 PhysMode-LNP (LaRIN)

The mode representation is $u = g(h)\in\mathbb{R}^{64}$, assigned to one of
$K=16$ prototypes by cosine similarity with temperature $\tau=0.2$:

$$
\pi_{k} = \frac{\exp(\cos(u, c_k)/\tau)}{\sum_{j}\exp(\cos(u, c_j)/\tau)},
\qquad
\mathcal{L}_{\text{VQ}} = \underbrace{\|u - \mathrm{sg}(c_{k^*})\|^2}_{\text{commitment}}
+ \lambda_{\text{bal}}\, D_{\mathrm{KL}}(\bar\pi \,\|\, \tfrac{1}{K}\mathbf 1)
+ \lambda_{\text{orth}}\, \|C C^\top - I\|^2 ,
$$

$k^* = \arg\max_k \cos(u,c_k)$. The prototypes themselves are **not** trained by
gradient descent: they follow the encoder by exponential moving averages
($\text{decay}=0.99$) over the formulations assigned to them, with
Laplace-smoothed renormalisation and unit-norm projection. The pull term
$\mathrm{sg}(u)\to c_{k^*}$ is therefore the EMA objective and carries no
gradient, exactly as in the reference implementation. Weights:
$\lambda_{\text{bal}}=0.02$, $\lambda_{\text{orth}}=0.005$, commitment weight
$0.02$, $\alpha$ initialised at unity.

The decoder's base term is trained only through the decomposition (no separate
base loss), so the nested control -- mode branch disabled -- is *exactly*
PhysSet-LNP with an unused parameter set.

### 12.3 DiffMode-LNP (CoDiffGRN)

The mode token is a categorical state $x_t\in\{0,1\}^{16}$ corrupted by the
D3PM uniform transition matrix $Q_t = a_t I + (1-a_t)\mathbf 1 m^\top$ with
$m=\mathbf 1/K$ and a cosine schedule $\bar\alpha_t$ over $T=30$ steps. A
denoiser conditioned on the chemistry embedding $h$, the noisy one-hot state and
a sinusoidal timestep embedding predicts $\tilde p_\theta(x_0\mid x_t)$:

$$
p_\theta(x_0\mid x_t) = \mathrm{softmax}\big(f_{\text{den}}([h \| x_t \| \mathrm{emb}(t)])\big),
\qquad
q(x_{t-1}\mid x_t,\tilde x_0) \propto \big(a_t x_t + \tfrac{1-a_t}{K}\big)\odot\big(\bar\alpha_{t-1}\tilde x_0 + \tfrac{1-\bar\alpha_{t-1}}{K}\big).
$$

Training samples $t\sim\mathcal U\{1,T\}$ per formulation and adds
$\lambda_{\text{mode}}\,\mathrm{CE}(\tilde p_\theta, x_0)$ with
$\lambda_{\text{mode}}=0.2$; inference starts at $x_T = m$ and runs the
mean-field reverse chain to obtain $\pi$. The token itself is obtained the way
CoDiffGRN obtains its discretised cell states -- by clustering the *label-free*
input profile. Here that is the 217-dim descriptor vector, the 16-dim cCPP
vector and the 5 molar-composition ratios, $z$-scored and clustered with
$k$-means ($K=16$, $k$-means++ seeding, 30 Lloyd iterations) **on the training
rows only**, so no held-out formulation participates.

Two CoDiffGRN devices have no counterpart here and are recorded rather than
imitated: (i) teacher forcing of the node component is vacuous because the
"node component" of a formulation is its observed chemistry, which is always
given; (ii) TASS exists because a GRN dataset is a *single* graph, whereas the
18,858 formulations are i.i.d. samples. We nevertheless implemented a TASS
analogue (random node-subset supervision, `tass_p`) as an option.

### 12.4 A chemistry-only mode space

Both implementations were first run with the mode branch reading the full
representation $h$, which contains the 109-dim experiment context. That version
consistently lost on the two smallest external studies. The context vector is
what a mode can use to become a *study* identifier, the failure already
documented for fingerprint nodes and helper-lipid identity (Section 7). The
final configuration -- `mode_space="chem"` -- therefore restricts both the mode
assignment and the residual experts to the chemistry streams
($g_{\text{il}}^{\text{dual}}\|d_{\text{il}}$, 512 dims) while the base scorer
keeps the full representation. This is the version reported below.

### 12.5 Results

**Screening protocol.** Four fold-0 external tasks, 30 epochs, batch 256, seed 0,
identical to the tuned PhysSet-LNP reference (0.3685 on these four tasks; 0.3597
on all 20). `Base-Only` is the nested control.

| Configuration | 4-task mean (seed 0) | Δ vs PhysSet-LNP | Δ vs Base-Only |
|---|---|---|---|
| PhysSet-LNP (tuned reference) | 0.3685 | -- | -- |
| Base-Only (nested control) | 0.3929 | +0.024 | -- |
| PhysMode, linear mixing | 0.3612 | −0.007 | −0.032 |
| PhysMode, hard assignment | 0.3597 | −0.009 | −0.033 |
| **PhysMode-LNP** (chem modes) | 0.3536 | −0.015 | −0.039 |
| PhysMode r2 (full modes) | 0.3503 | −0.018 | −0.043 |
| **DiffMode-LNP** (chem modes) | 0.3504 | −0.018 | −0.042 |
| PhysMode r1 | 0.3460 | −0.022 | −0.047 |
| DiffMode r2 | 0.3459 | −0.022 | −0.047 |
| DiffMode r1 | 0.3391 | −0.029 | −0.054 |
| PhysMode, no codebook (free prototypes) | 0.3382 | −0.030 | −0.055 |
| PhysMode, K=32 | 0.3376 | −0.031 | −0.056 |
| PhysMode, K=8 | 0.3336 | −0.035 | −0.060 |
| PhysMode, residual only | 0.3171 | −0.051 | −0.076 |

**The screen cannot resolve this.** `Base-Only` and `PhysSet-LNP` are the same
architecture and differ by +0.024 at seed 0 and by +0.001 when averaged over
their available seeds; the run-to-run spread of the four-task fold-0 estimate is
therefore ≈0.025. No row above is significantly different from the baseline
(Wilcoxon $p\ge0.12$ throughout), and the ranking of the rows moves when the
second seed is included (`physmode_chem_hard` 0.3597 at seed 0, 0.3276 over two
seeds). We therefore do not draw conclusions from the screen; we use it only to
choose which variant to confirm.

**Full 20-task confirmation.** DiffMode-LNP, the variant with the best
seed-averaged screen score and the strongest mechanism-motivated posterior, was
run on all 20 external tasks:

| | PhysSet-LNP | DiffMode-LNP | Δ |
|---|---|---|---|
| all 20 tasks | 0.3597 | 0.3362 | **−0.0236** (sd 0.075, Wilcoxon $p=0.23$) |
| LM_2019 (5 folds) | 0.1234 | 0.1714 | +0.048 |
| BL_2023 (5 folds) | 0.1170 | 0.0971 | −0.020 |
| SL_2020 (5 folds) | 0.7383 | 0.6841 | −0.054 |
| ZC_2023 (5 folds) | 0.4602 | 0.3921 | −0.068 |

The point estimate is negative, the effect is not significant, and it is not
uniform: the gain is confined to LM_2019, the largest study, while the two
smallest studies lose. That is the signature of additional capacity rather than
additional transferable structure.

### 12.6 Why the decoder adds nothing

We trained each variant on LM_2019 fold 0 and decomposed the held-out
prediction into $s_{\text{base}}$ and the residual $\hat y - s_{\text{base}}$.

| | PhysMode-LNP | DiffMode-LNP |
|---|---|---|
| Spearman($\hat y$, label) | 0.253 | 0.187 |
| Spearman($s_{\text{base}}$, label) | 0.153 | 0.144 |
| Spearman(residual, label) | 0.216 | 0.081 |
| residual variance share | 0.196 | 0.187 |
| corr(residual, $s_{\text{base}}$) | +0.37 | −0.05 |
| posterior entropy / max | 2.39 / 2.77 | **0.98 / 2.77** |
| live codes (>1%) | 14 / 16 | **3 / 16** |
| top code share | 0.20 | **0.44** |

1. **The LaRIN machinery works exactly as designed, and it is not the problem.**
   The codebook does not collapse (14 of 16 codes live, top share 0.20), and the
   modes are chemically meaningful: mean protonated cCPP across the six populated
   modes spans 1.36--2.68, i.e. the modes separate loose from tightly packed
   conformers rather than studies. The residual carries genuine ranking signal
   (ρ = 0.216 against the label, higher than the base alone). PhysMode-LNP is a
   *working* mixture-of-experts; it simply does not beat a single well-regularised
   head on a transfer task, because the signal it captures is already inside
   $h$.
2. **The CoDiffGRN posterior collapses.** The reverse chain maps every
   formulation onto 3 of the 16 modes with a top share of 0.44. A 16-way
   codebook that is effectively 3-way cannot act as a mixture, and its residual
   is correspondingly uninformative (ρ = 0.081, correlation with the base
   −0.05). The cause is structural rather than a tuning issue: with a uniform
   marginal and a denoiser trained to be confident, the deterministic mean-field
   reverse chain concentrates on the modes that dominate the training
   distribution (the k-means clusters range from 72 to 3,304 formulations).
3. **Removing the machinery does not recover the baseline either.** The
   "no codebook" row (free prototypes, no commitment or balance terms) scores
   *below* the full VQ model, and "residual only" is the worst configuration
   tested. The loss is therefore not caused by the VQ regularisers; it is the
   extra conditional capacity itself.

**Decision.** Neither design is adopted. The paper's method remains PhysSet-LNP,
and the two implementations stay in the released code (`physmode*`, `diffmode*`
in `registry.py`, `src/lnpbench/models/physmode.py`) with the exact
configurations above, so the negative result is reproducible rather than
asserted.

## 13. Limitations