LNPBench: code, caches, results and figures
Browse filesFiles changed (28)
- METHODS.md+201-20
- PROGRESS.md+4-1
- README.md+15-3
- code/METHODS.md+201-20
- code/PROGRESS.md+4-1
- code/README.md+15-1
- code/scripts/mode_ablate.shAdded+21
- code/scripts/mode_analyze.pyAdded+84
- code/scripts/mode_diagnose.pyAdded+101
- code/scripts/mode_results.pyAdded+133
- code/scripts/report.py+46-1
- code/scripts/upload_hf.py+15-3
- code/src/lnpbench/models/backbone.py+8-1
- code/src/lnpbench/models/physmode.pyAdded+532
- code/src/lnpbench/registry.py+39
- manuscript/PAPER_TODO.md+2
- manuscript/PAPER_zh.md+90-7
- results/REPORT.md+26-1
- results/abl_physmode_chem_k32.csvAdded+9
- results/abl_physmode_chem_k8.csvAdded+5
- results/abl_physmode_chem_lin.csvAdded+9
- results/abl_physmode_chem_novq.csvAdded+5
- results/abl_physmode_chem_resonly.csvAdded+9
- results/diag_diffmode_chem.npzAdded+3
- results/diag_physmode_chem.npzAdded+3
- results/full20_diffmode_chem.csvAdded+21
- results/mode_decoders.csvAdded+105
- results/mode_decoders_summary.csvAdded+15
921 unmodified lines922923924925926927928929930931932933934935936937938939940941942943944925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125921 unmodified linesin machine-readable form and were therefore not tested. Collecting them is thehighest-value next step, and it is a curation task, not a modelling one.
## 12. Limitations
1. **The strict-protocol state of the art needs an ensemble.** No single model exceeds 0.376; the 0.392 figure is an equal-weight stack, and its gain over our best single model is +0.016 at $p = 0.053$ — not significant. We prefer to state this rather than to claim a decisive architectural victory.2. **The adaptation results use target-study labels** and are not comparable with 0-shot numbers or with the published literature.3. **The cCPP surrogate is a descriptor, not a measurement.** It reproduces the absolute neutral-state value but not the pH shift, and it is not functionally validated against MD.4. **The physics terms are neutral.** Neither the physics-biased attention nor the MD auxiliary head improves external Spearman; the feature block that does improve it is a plain descriptor block. We report this because it constrains the interpretation: the value of the physical priors here is as *inductive bias against identity shortcuts*, not as extra accuracy.5. **Four held-out studies is a small sample.** All paired tests use 20 tasks, but those tasks come from four studies, so the effective sample size for study-level generalisation is four. Confidence intervals that treat tasks as independent would be over-confident.## 12. Discrete formulation-mode decoders: two published designs that do not transfer
PhysSet-LNP is a single regressor over a pooled formulation representation. Anatural objection is that one linear head cannot express *regime-dependent*structure -- the same head must serve a helper-lipid screen dominated bycholesterol competition and a PEG screen dominated by surface coating. Tworecent methods make exactly this argument in other domains and replace thesingle head with a small bank of discrete latent states plus a residualdecoder. We implemented both faithfully and evaluated them under the sameprotocol. This section documents the designs, the numbers, and the measuredreason 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$, andthe 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 bygradient descent: they follow the encoder by exponential moving averages($\text{decay}=0.99$) over the formulations assigned to them, withLaplace-smoothed renormalisation and unit-norm projection. The pull term$\mathrm{sg}(u)\to c_{k^*}$ is therefore the EMA objective and carries nogradient, 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 separatebase 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 theD3PM 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. Adenoiser conditioned on the chemistry embedding $h$, the noisy one-hot state anda 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),\qquadq(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 themean-field reverse chain to obtain $\pi$. The token itself is obtained the wayCoDiffGRN obtains its discretised cell states -- by clustering the *label-free*input profile. Here that is the 217-dim descriptor vector, the 16-dim cCPPvector and the 5 molar-composition ratios, $z$-scored and clustered with$k$-means ($K=16$, $k$-means++ seeding, 30 Lloyd iterations) **on the trainingrows only**, so no held-out formulation participates.
Two CoDiffGRN devices have no counterpart here and are recorded rather thanimitated: (i) teacher forcing of the node component is vacuous because the"node component" of a formulation is its observed chemistry, which is alwaysgiven; (ii) TASS exists because a GRN dataset is a *single* graph, whereas the18,858 formulations are i.i.d. samples. We nevertheless implemented a TASSanalogue (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 fullrepresentation $h$, which contains the 109-dim experiment context. That versionconsistently lost on the two smallest external studies. The context vector iswhat a mode can use to become a *study* identifier, the failure alreadydocumented for fingerprint nodes and helper-lipid identity (Section 7). Thefinal configuration -- `mode_space="chem"` -- therefore restricts both the modeassignment and the residual experts to the chemistry streams($g_{\text{il}}^{\text{dual}}\|d_{\text{il}}$, 512 dims) while the base scorerkeeps 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.3597on 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 samearchitecture and differ by +0.024 at seed 0 and by +0.001 when averaged overtheir available seeds; the run-to-run spread of the four-task fold-0 estimate istherefore ≈0.025. No row above is significantly different from the baseline(Wilcoxon $p\ge0.12$ throughout), and the ranking of the rows moves when thesecond seed is included (`physmode_chem_hard` 0.3597 at seed 0, 0.3276 over twoseeds). We therefore do not draw conclusions from the screen; we use it only tochoose which variant to confirm.
**Full 20-task confirmation.** DiffMode-LNP, the variant with the bestseed-averaged screen score and the strongest mechanism-motivated posterior, wasrun 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 notuniform: the gain is confined to LM_2019, the largest study, while the twosmallest studies lose. That is the signature of additional capacity rather thanadditional transferable structure.
### 12.6 Why the decoder adds nothing
We trained each variant on LM_2019 fold 0 and decomposed the held-outprediction 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 exactconfigurations above, so the negative result is reproducible rather thanasserted.
## 13. Limitations59 unmodified lines60616263646566676825 unmodified lines949596949759 unmodified lines| **外部监督:LNP Atlas 预训练**(934 条配方 / 269 脂质 / 62 文献,实测粒径·PDI·zeta·EE) | 4 任务筛选 0.354(参照 0.369);**全量 20 任务 0.3603 对 0.3597(Δ=+0.0006,p=0.87)** | **全量中性**。性能再分配:LM +0.020、BL +0.016、ZC +0.021、SL −0.053 || **外部监督:脂质级预训练 / 冻结 GINE / lr 1e-4** | 4 任务 0.316 / 0.329 / 0.322;**打乱标签对照 0.348** | 筛选阶段连对照都不如,但全量推翻了筛选结论——4 任务不足以排序 || **外部监督:作为特征**(Atlas 属性预测拼进 398 维化学块) | 20 任务 0.371 对 0.376(Δ=−0.005,p=0.19),6/20 提升 | 同样无增益:粒径/PDI 是配方质量指标,不是转染的因果上游 || **离散配方模式解码器 · LaRIN 式**(VQ 码本 K=16、余弦指派、EMA 原型、承诺/均衡/正交正则 + 基座-残差解码) | 4 任务筛选 3 轮共 6 配置:0.318–0.360(嵌套对照 0.351、参照 0.352);无一项显著 | **未超过基线**。筛选的重复性约 ±0.025,无法分辨该量级效应 || **离散配方模式解码器 · CoDiffGRN 式**(D3PM 均匀转移矩阵、余弦调度、T=30 均值场反向链 + 残差专家) | 4 任务 0.324–0.350;**全量 20 任务 0.3362 对 0.3597(Δ=−0.024,p=0.23)** | **未超过基线**。增益只在最大研究 LM_2019(+0.048),两个最小研究下降(SL −0.054、ZC −0.068) || **模式后验健康度诊断**(把留出预测分解为基座 + 残差) | PhysMode:16 码字 14 活跃、残差对标签 ρ=0.216(基座 0.153)、模式间 cCPP 跨 1.36–2.68;DiffMode:**后验仅 3/16 活跃、最大占比 0.44**、残差 ρ=0.081 | LaRIN 机制**工作正常但无迁移增益**;CoDiffGRN 的扩散后验**坍缩**,容量从未被使用 |
## 3.1 本轮唯一正增益:集成成员构成
25 unmodified lines
---
_最后更新:2026-11-24 18:20 CST__最后更新:2026-11-24 21:05 CST_84 unmodified lines8586878889888990919212 unmodified lines10510610710810810911011111211311411511611711811912012112212384 unmodified lines
## What did not work (reported in full)
Three feature-side ideas were implemented and run over all 20 external tasks.**None improves the state of the art**, and the report says so:Three feature-side ideas and one decoder family were implemented and run atfull scale. **None improves the state of the art**, and the report says so:
| Feature block added to PhysChem-Tree | mean | delta ||---|---|---|12 unmodified lines 0.360 for PhysSet-LNP at the same budget.* A study-identifiability audit saturates: *every* block, including the reference (0.950), predicts the study of origin at >= 0.93 balanced accuracy, because the 42 publications screened chemically disjoint lipid libraries. because the 40 study sources screened chemically disjoint lipid libraries.* **Discrete formulation-mode decoders** - the single output head was replaced by a discrete latent mode codebook plus a base/residual decoder, implemented twice: LaRIN's vector-quantised codebook (cosine assignment, EMA prototypes, commitment/balance/orthogonality, K = 16) and CoDiffGRN's categorical diffusion posterior (D3PM uniform transitions, cosine schedule, 30-step mean-field reverse chain). Eight configurations, three screening rounds and a full 20-task confirmation: **none beats the tuned PhysSet-LNP** (best screen row -0.007, all p >= 0.12; the confirmed variant scores 0.3362 vs 0.3597, delta -0.024, p = 0.23). The LaRIN codebook works as designed (14/16 codes live, modes separate loose from tightly packed conformers, residual rho = 0.22 against the label) but adds nothing transferable; the CoDiffGRN posterior collapses to 3 of 16 modes, so its capacity is never used.
The one positive by-product is about ensemble composition, not features: addingLiON to the stack gives 0.406 in-sample and 0.399 under a leave-one-study-out921 unmodified lines922923924925926927928929930931932933934935936937938939940941942943944925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125921 unmodified linesin machine-readable form and were therefore not tested. Collecting them is thehighest-value next step, and it is a curation task, not a modelling one.
## 12. Limitations
1. **The strict-protocol state of the art needs an ensemble.** No single model exceeds 0.376; the 0.392 figure is an equal-weight stack, and its gain over our best single model is +0.016 at $p = 0.053$ — not significant. We prefer to state this rather than to claim a decisive architectural victory.2. **The adaptation results use target-study labels** and are not comparable with 0-shot numbers or with the published literature.3. **The cCPP surrogate is a descriptor, not a measurement.** It reproduces the absolute neutral-state value but not the pH shift, and it is not functionally validated against MD.4. **The physics terms are neutral.** Neither the physics-biased attention nor the MD auxiliary head improves external Spearman; the feature block that does improve it is a plain descriptor block. We report this because it constrains the interpretation: the value of the physical priors here is as *inductive bias against identity shortcuts*, not as extra accuracy.5. **Four held-out studies is a small sample.** All paired tests use 20 tasks, but those tasks come from four studies, so the effective sample size for study-level generalisation is four. Confidence intervals that treat tasks as independent would be over-confident.## 12. Discrete formulation-mode decoders: two published designs that do not transfer
PhysSet-LNP is a single regressor over a pooled formulation representation. Anatural objection is that one linear head cannot express *regime-dependent*structure -- the same head must serve a helper-lipid screen dominated bycholesterol competition and a PEG screen dominated by surface coating. Tworecent methods make exactly this argument in other domains and replace thesingle head with a small bank of discrete latent states plus a residualdecoder. We implemented both faithfully and evaluated them under the sameprotocol. This section documents the designs, the numbers, and the measuredreason 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$, andthe 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 bygradient descent: they follow the encoder by exponential moving averages($\text{decay}=0.99$) over the formulations assigned to them, withLaplace-smoothed renormalisation and unit-norm projection. The pull term$\mathrm{sg}(u)\to c_{k^*}$ is therefore the EMA objective and carries nogradient, 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 separatebase 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 theD3PM 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. Adenoiser conditioned on the chemistry embedding $h$, the noisy one-hot state anda 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),\qquadq(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 themean-field reverse chain to obtain $\pi$. The token itself is obtained the wayCoDiffGRN obtains its discretised cell states -- by clustering the *label-free*input profile. Here that is the 217-dim descriptor vector, the 16-dim cCPPvector and the 5 molar-composition ratios, $z$-scored and clustered with$k$-means ($K=16$, $k$-means++ seeding, 30 Lloyd iterations) **on the trainingrows only**, so no held-out formulation participates.
Two CoDiffGRN devices have no counterpart here and are recorded rather thanimitated: (i) teacher forcing of the node component is vacuous because the"node component" of a formulation is its observed chemistry, which is alwaysgiven; (ii) TASS exists because a GRN dataset is a *single* graph, whereas the18,858 formulations are i.i.d. samples. We nevertheless implemented a TASSanalogue (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 fullrepresentation $h$, which contains the 109-dim experiment context. That versionconsistently lost on the two smallest external studies. The context vector iswhat a mode can use to become a *study* identifier, the failure alreadydocumented for fingerprint nodes and helper-lipid identity (Section 7). Thefinal configuration -- `mode_space="chem"` -- therefore restricts both the modeassignment and the residual experts to the chemistry streams($g_{\text{il}}^{\text{dual}}\|d_{\text{il}}$, 512 dims) while the base scorerkeeps 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.3597on 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 samearchitecture and differ by +0.024 at seed 0 and by +0.001 when averaged overtheir available seeds; the run-to-run spread of the four-task fold-0 estimate istherefore ≈0.025. No row above is significantly different from the baseline(Wilcoxon $p\ge0.12$ throughout), and the ranking of the rows moves when thesecond seed is included (`physmode_chem_hard` 0.3597 at seed 0, 0.3276 over twoseeds). We therefore do not draw conclusions from the screen; we use it only tochoose which variant to confirm.
**Full 20-task confirmation.** DiffMode-LNP, the variant with the bestseed-averaged screen score and the strongest mechanism-motivated posterior, wasrun 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 notuniform: the gain is confined to LM_2019, the largest study, while the twosmallest studies lose. That is the signature of additional capacity rather thanadditional transferable structure.
### 12.6 Why the decoder adds nothing
We trained each variant on LM_2019 fold 0 and decomposed the held-outprediction 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 exactconfigurations above, so the negative result is reproducible rather thanasserted.
## 13. Limitations59 unmodified lines60616263646566676825 unmodified lines949596949759 unmodified lines| **外部监督:LNP Atlas 预训练**(934 条配方 / 269 脂质 / 62 文献,实测粒径·PDI·zeta·EE) | 4 任务筛选 0.354(参照 0.369);**全量 20 任务 0.3603 对 0.3597(Δ=+0.0006,p=0.87)** | **全量中性**。性能再分配:LM +0.020、BL +0.016、ZC +0.021、SL −0.053 || **外部监督:脂质级预训练 / 冻结 GINE / lr 1e-4** | 4 任务 0.316 / 0.329 / 0.322;**打乱标签对照 0.348** | 筛选阶段连对照都不如,但全量推翻了筛选结论——4 任务不足以排序 || **外部监督:作为特征**(Atlas 属性预测拼进 398 维化学块) | 20 任务 0.371 对 0.376(Δ=−0.005,p=0.19),6/20 提升 | 同样无增益:粒径/PDI 是配方质量指标,不是转染的因果上游 || **离散配方模式解码器 · LaRIN 式**(VQ 码本 K=16、余弦指派、EMA 原型、承诺/均衡/正交正则 + 基座-残差解码) | 4 任务筛选 3 轮共 6 配置:0.318–0.360(嵌套对照 0.351、参照 0.352);无一项显著 | **未超过基线**。筛选的重复性约 ±0.025,无法分辨该量级效应 || **离散配方模式解码器 · CoDiffGRN 式**(D3PM 均匀转移矩阵、余弦调度、T=30 均值场反向链 + 残差专家) | 4 任务 0.324–0.350;**全量 20 任务 0.3362 对 0.3597(Δ=−0.024,p=0.23)** | **未超过基线**。增益只在最大研究 LM_2019(+0.048),两个最小研究下降(SL −0.054、ZC −0.068) || **模式后验健康度诊断**(把留出预测分解为基座 + 残差) | PhysMode:16 码字 14 活跃、残差对标签 ρ=0.216(基座 0.153)、模式间 cCPP 跨 1.36–2.68;DiffMode:**后验仅 3/16 活跃、最大占比 0.44**、残差 ρ=0.081 | LaRIN 机制**工作正常但无迁移增益**;CoDiffGRN 的扩散后验**坍缩**,容量从未被使用 |
## 3.1 本轮唯一正增益:集成成员构成
25 unmodified lines
---
_最后更新:2026-11-24 18:20 CST__最后更新:2026-11-24 21:05 CST_232 unmodified lines23323423523623623723823934 unmodified lines274275276277278279280281282283284285286287288289290291292293232 unmodified lines0.368). We report that honestly rather than claiming the physical prior is whatmakes the model work.
### 2.5 Negative results: ontology, schema, global representations and external supervision### 2.5 Negative results: ontology, schema, global representations, external supervision and mode decoders
Three feature-side ideas were implemented and run at full scale. **None of themimproves the state of the art, and the report says so in full** (`results/REPORT.md`34 unmodified lines a feature block alone reaches ≥0.93 balanced accuracy for *every* block, including the reference (0.950). The audit saturates: at block level the shortcut is a property of the database, not of the features.* **Discrete formulation-mode decoders** — the single output head was replaced by a "discrete latent mode codebook + base/residual decoder", implemented twice: LaRIN's vector-quantised codebook (cosine assignment, EMA prototypes, commitment/balance/orthogonality terms, $K=16$) and CoDiffGRN's categorical diffusion posterior (D3PM uniform transition matrix, cosine schedule, 30-step mean-field reverse chain). Eight configurations, three screening rounds, and a full 20-task confirmation: **no configuration beats the tuned PhysSet-LNP** (best screen row −0.007, all $p\ge0.12$; the confirmed variant scores 0.3362 vs 0.3597, $\Delta=-0.024$, $p=0.23$). The measured reasons are different for the two designs: the LaRIN codebook works as intended (14/16 codes live, modes separate loose from tightly packed conformers, residual $\rho=0.22$ against the label) but adds no transferable signal; the CoDiffGRN posterior **collapses to 3 of 16 modes**, so its codebook capacity is never used. See `METHODS.md` §12, `results/mode_decoders_summary.csv` (`scripts/mode_results.py`).
The one positive by-product is about ensemble *composition*, not features:adding LiON to the stack gives 0.406 in-sample and 0.399 under a123456789101112131415161718192021#!/bin/bash# Ablation ladder for the discrete-mode decoders (LaRIN-style ladder for# PhysMode-LNP, CoDiffGRN-style ladder for DiffMode-LNP).# Usage: ./mode_ablate.sh physmode | ./mode_ablate.sh diffmodeexport PATH=/root/miniconda3/bin:$PATHcd /root/autodl-tmp/lnpbenchexport PYTHONPATH=src OMP_NUM_THREADS=2
FAM=$1if [ "$FAM" = "physmode" ]; then MODELS="physmode_base physmode_novq physmode_hard physmode_lin physmode_resonly physmode_k8 physmode_k32"else MODELS="diffmode_base diffmode_hard diffmode_lin diffmode_tass"fi
for M in $MODELS; do CUDA_VISIBLE_DEVICES=0 python scripts/run_benchmark.py --models $M \ --protocols external --folds 0 --device cuda --epochs 30 --batch-size 256 \ --seeds 0 --tag $M --out results/abl_${M}.csv > logs/abl_${M}.log 2>&1doneecho ABL_DONE_$FAM123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384"""Compare mode-decoder variants against the PhysSet-LNP baseline.
Paired, per-task comparison: every model in ``--files`` is aligned on(task, seed) and differenced against the reference so that the largefold-to-fold variance of the external studies cancels out.
PYTHONPATH=src python scripts/mode_analyze.py --ref physset_phys \ --files results/screen_physset_phys.csv results/screen_physmode.csv ..."""
from __future__ import annotations
import argparsefrom itertools import combinations
import numpy as npimport pandas as pdfrom scipy import stats
def paired(a: pd.DataFrame, b: pd.DataFrame, ref: str, other: str) -> dict: m = a.merge(b, on=["task", "seed"], suffixes=("_r", "_o")) if not len(m): return {} d = m["spearman_o"] - m["spearman_r"] out = { "ref": ref, "model": other, "n": len(m), "mean_ref": m["spearman_r"].mean(), "mean_model": m["spearman_o"].mean(), "delta": d.mean(), "sd": d.std(ddof=1) if len(d) > 1 else float("nan"), } if len(m) >= 6 and np.any(d != 0): out["p_wilcoxon"] = stats.wilcoxon(d).pvalue out["p_ttest"] = stats.ttest_rel(m["spearman_o"], m["spearman_r"]).pvalue else: out["p_wilcoxon"] = float("nan") out["p_ttest"] = float("nan") return out
def main(): ap = argparse.ArgumentParser() ap.add_argument("--files", nargs="+", required=True) ap.add_argument("--ref", default="physset_phys") ap.add_argument("--out", default=None) args = ap.parse_args()
frames = {} for f in args.files: d = pd.read_csv(f) d = d[d["task"].astype(str).str.contains("fold")] for m, g in d.groupby("model"): frames.setdefault(m, []).append(g) frames = {m: pd.concat(g, ignore_index=True) for m, g in frames.items()}
print("== per-model mean Spearman (all tasks/seeds) ==") for m, g in frames.items(): per = g.groupby("task")["spearman"].mean() print(f"{m:18s} mean={g.spearman.mean():.4f} sd_tasks={per.std(ddof=1):.4f} " f"n={len(g)} val={g.val_spearman.mean():.4f}") print(" " + " ".join(f"{k.split('_fold')[0]}{k[-1]}:{v:.3f}" for k, v in per.items()))
ref = frames.get(args.ref) if ref is None: raise SystemExit(f"reference {args.ref} missing") print("\n== paired deltas vs", args.ref, "==") rows = [] for m, g in frames.items(): if m == args.ref: continue r = paired(ref, g, args.ref, m) if r: rows.append(r) print(f"{m:18s} d={r['delta']:+.4f} (sd {r['sd']:.4f}) " f"{r['mean_ref']:.4f}->{r['mean_model']:.4f} " f"p_wilcoxon={r['p_wilcoxon']:.3g} p_t={r['p_ttest']:.3g}") if rows: df = pd.DataFrame(rows) if args.out: df.to_csv(args.out, index=False) print("wrote", args.out)
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101"""Mechanistic diagnostic for the discrete-mode decoders.
Trains one variant on one external task, then decomposes the held-outprediction into its base and residual parts:
* Spearman of ``s_base`` alone, of ``y_hat``, and of the residual ``y_hat - s_base`` against the label. A residual that carries signal should rank the target better than chance; a residual that only adds variance shows |rho| ~ 0.* The share of the prediction variance that the residual contributes.* Posterior usage: entropy of the mean posterior, the number of live codes and the top code's share, i.e. whether the codebook collapsed.
PYTHONPATH=src python scripts/mode_diagnose.py --model physmode \ --study LM_2019 --fold 0 --seed 0"""
from __future__ import annotations
import argparse
import numpy as npimport torchfrom scipy import stats
from lnpbench import data, metrics, pathsfrom lnpbench.registry import build_modelfrom lnpbench.store import FeatureStorefrom lnpbench.trainer import TrainConfig, build_batch
def main(): ap = argparse.ArgumentParser() ap.add_argument("--model", default="physmode") ap.add_argument("--study", default="LM_2019") ap.add_argument("--fold", type=int, default=0) ap.add_argument("--seed", type=int, default=0) ap.add_argument("--epochs", type=int, default=30) ap.add_argument("--batch-size", type=int, default=256) ap.add_argument("--out", default=None) args = ap.parse_args()
store = FeatureStore() tasks = data.load_tasks(paths.CACHE_DIR / "tasks.pkl") task = next(t for t in tasks if t.name == f"{args.study}_fold{args.fold}") model = build_model(args.model) cfg = TrainConfig(epochs=args.epochs, batch_size=args.batch_size, seed=args.seed, device="cuda", verbose=True) info = model.fit(store, task.train_idx, task.val_idx, cfg) mod = model.module.eval()
parts = {"y_hat": [], "s_base": []} pis = [] for start in range(0, len(task.test_idx), 1024): chunk = task.test_idx[start:start + 1024] batch = build_batch(store, chunk, model.need(), model.device, model.norm) with torch.no_grad(): out = mod(batch) parts["y_hat"].append(out["y_hat"].cpu().numpy()) parts["s_base"].append(out["s_base"].cpu().numpy()) if out.get("pi") is not None: pis.append(out["pi"].cpu().numpy()) y = store.y[task.test_idx] pred = {k: np.concatenate(v) for k, v in parts.items()} res = pred["y_hat"] - pred["s_base"]
rows = [("y_hat", metrics.spearman(y, pred["y_hat"])), ("s_base", metrics.spearman(y, pred["s_base"])), ("residual", metrics.spearman(y, res)), ("|residual| vs |label resid|", metrics.spearman(np.abs(res), np.abs(y - pred["s_base"])))] print(f"\n== {args.model} / {task.name} / seed {args.seed} ==") for k, v in rows: print(f" spearman({k:24s}) = {v:+.4f}") var_share = float(np.var(res) / max(np.var(pred["y_hat"]), 1e-12)) print(f" residual variance share = {var_share:.3f}") print(f" corr(residual, s_base) = {float(np.corrcoef(res, pred['s_base'])[0, 1]):+.3f}")
if pis: pi = np.concatenate(pis) pi = pi / pi.sum(1, keepdims=True) pbar = pi.mean(0) ent = float(-(pbar * np.log(pbar + 1e-9)).sum()) live = int((pbar > 0.01).sum()) print(f" posterior: entropy={ent:.3f} (max {np.log(len(pbar)):.3f}), " f"live codes={live}/{len(pbar)}, top share={pbar.max():.3f}") print(" usage: " + " ".join(f"{v:.2f}" for v in pbar)) # does the dominant mode line up with anything chemical? hard = pi.argmax(1) il = store.il_id[task.test_idx] cpp = store.il_cpp[il] for j, name in enumerate(["CPP_prot", "CPP_neut", "dCPP", "stab"]): per = [cpp[hard == k, j].mean() for k in range(len(pbar)) if (hard == k).sum() >= 10] if len(per) > 2: print(f" {name:9s} across modes: " + " ".join(f"{v:+.2f}" for v in per))
if args.out: np.savez(args.out, y=y, **pred, **({"pi": np.concatenate(pis)} if pis else {})) print("wrote", args.out)
if __name__ == "__main__": main()123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133"""Consolidate every discrete-mode-decoder run into one table.
The screen uses the four fold-0 external tasks (LM_2019, BL_2023, SL_2020,ZC_2023), 30 epochs, batch 256 — the same protocol as the tuned PhysSet-LNPreference in ``results_gpu/full_physset_phys.csv`` (seed 0 mean 0.3597 over all20 tasks). ``physmode_base`` is the nested control: the identical module withthe mode branch switched off, so any difference is attributable to the decoder.
PYTHONPATH=src python scripts/mode_results.py"""
from __future__ import annotations
import globfrom pathlib import Path
import numpy as npimport pandas as pdfrom scipy import stats
FILES = ( ["results/screen_physset_phys.csv", "results/screen2_physmode_base.csv"] + sorted(glob.glob("results/screen_*.csv")) + sorted(glob.glob("results/screen2_*.csv")) + sorted(glob.glob("results/screen3_*.csv")) + sorted(glob.glob("results/abl_physmode_chem_*.csv")))
# human-readable labels for the write-up# the r1 and r2 screens ran under the same registry name, so the configuration# is recovered from the file that produced the rowRENAME = { "screen_physmode.csv": "physmode_r1", "screen_diffmode.csv": "diffmode_r1", "screen_physset_phys.csv": "physset_phys", "screen2_physmode.csv": "physmode", "screen2_diffmode.csv": "diffmode", "screen2_physmode_base.csv": "physmode_base", "screen3_physmode_chem.csv": "physmode_chem", "screen3_diffmode_chem.csv": "diffmode_chem", "screen3_physmode_chem_hard.csv": "physmode_chem_hard",}
LABELS = { "physset_phys": "PhysSet-LNP (tuned reference)", "physmode_base": "Base-Only (nested control)", "physmode": "PhysMode r2 (lam_base=0, alpha=1)", "physmode_r1": "PhysMode r1 (alpha=0.1, lam_base>0)", "physmode_chem": "PhysMode-LNP (chemistry-only modes)", "physmode_chem_hard": "PhysMode, hard assignment", "physmode_chem_novq": "PhysMode, no codebook (free prototypes)", "physmode_chem_k8": "PhysMode, K=8", "physmode_chem_k32": "PhysMode, K=32", "physmode_chem_resonly": "PhysMode, residual only", "physmode_chem_lin": "PhysMode, linear mixing", "diffmode": "DiffMode r2", "diffmode_r1": "DiffMode r1", "diffmode_chem": "DiffMode-LNP (chemistry-only modes)",}
ORDER = ["physset_phys", "physmode_base", "physmode_r1", "physmode", "physmode_chem", "physmode_chem_hard", "physmode_chem_novq", "physmode_chem_k8", "physmode_chem_k32", "physmode_chem_resonly", "physmode_chem_lin", "diffmode_r1", "diffmode", "diffmode_chem"]
def main(): frames = [] for f in FILES: if not Path(f).exists(): continue d = pd.read_csv(f) d = d[d["task"].astype(str).str.contains("_fold")] if not len(d): continue d["source"] = Path(f).name if Path(f).name in RENAME: d["model"] = RENAME[Path(f).name] frames.append(d) d = pd.concat(frames, ignore_index=True) d = d.drop_duplicates(subset=["model", "task", "seed"], keep="last") d.to_csv("results/mode_decoders.csv", index=False) print("wrote results/mode_decoders.csv", d.shape)
ref = pd.read_csv("results_gpu/full_physset_phys.csv") ref_s0 = ref[ref.seed == 0].set_index("task")["spearman"]
rows = [] for m, g in d.groupby("model"): s0 = g[g.seed == 0] r = { "model": m, "label": LABELS.get(m, m), "n_runs": len(g), "n_tasks": s0.task.nunique(), "seeds": ",".join(str(v) for v in sorted(g.seed.unique())), "mean_all": g.spearman.mean(), "mean_seed0": s0.spearman.mean(), "val_seed0": s0.val_spearman.mean(), "runtime_s": g.runtime_s.mean(), } # paired against the tuned PhysSet-LNP reference on the same four tasks j = s0.set_index("task")["spearman"].reindex(ref_s0.index.reindex(s0.task.unique())[0]) pair = pd.concat([j, ref_s0.reindex(j.index)], axis=1).dropna() if len(pair) >= 4: delta = pair.iloc[:, 0] - pair.iloc[:, 1] r["delta_vs_physset"] = delta.mean() r["p_vs_physset"] = (stats.wilcoxon(delta).pvalue if np.any(delta != 0) else np.nan) if m == "physset_phys": r["delta_vs_physset"] = 0.0 r["p_vs_physset"] = float("nan") rows.append(r) out = pd.DataFrame(rows) out["order"] = out.model.map({k: i for i, k in enumerate(ORDER)}).fillna(99) out = out.sort_values("order").drop(columns="order") out.to_csv("results/mode_decoders_summary.csv", index=False)
pd.set_option("display.width", 220) print(out[["model", "label", "n_tasks", "seeds", "mean_seed0", "delta_vs_physset", "p_vs_physset", "val_seed0", "runtime_s"]].round(4).to_string(index=False))
# the full 20-task confirmation f20 = pd.read_csv("results/full20_diffmode_chem.csv") f20 = f20.merge(ref_s0.rename("ref"), left_on="task", right_index=True, how="inner") f20["delta"] = f20.spearman - f20.ref print("\n20-task confirmation (DiffMode-LNP vs tuned PhysSet-LNP, seed 0):") print(f" mean {f20.spearman.mean():.4f} vs {f20.ref.mean():.4f} " f"delta {f20.delta.mean():+.4f} (sd {f20.delta.std(ddof=1):.4f}) " f"wilcoxon p={stats.wilcoxon(f20.delta).pvalue:.3g} n={len(f20)}") print(f20.groupby("study") .agg(n=("delta", "size"), base=("ref", "mean"), mode=("spearman", "mean"), delta=("delta", "mean")).round(4).to_string())
if __name__ == "__main__": main()581 unmodified lines582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629585630631632633581 unmodified lines "causal upstream variables of transfection.\n") )
# ---------------------------------------------------------------- mode decoders md = _read("mode_decoders_summary.csv") if md is not None and len(md): base = md.loc[md["model"] == "physmode_base", "mean_seed0"] base_v = float(base.iloc[0]) if len(base) else float("nan") L.append("## 11. Discrete formulation-mode decoders (LaRIN / CoDiffGRN)\n") L.append( ("PhysSet-LNP's single output head was replaced by a discrete latent mode " "codebook plus a base/residual decoder, implemented twice: LaRIN's vector-" "quantised codebook (cosine assignment, EMA prototypes, commitment / balance / " "orthogonality terms, K = 16) and CoDiffGRN's categorical diffusion posterior " "(D3PM uniform transition matrix, cosine schedule, 30-step mean-field reverse " "chain). The nested control (mode branch disabled) is the identical module. " "Screening protocol: four fold-0 external tasks, 30 epochs, batch 256, seed 0.\n") ) L.append("| configuration | 4-task mean (seed 0) | d vs PhysSet-LNP | d vs nested control | p |") L.append("|---|---|---|---|---|") for _, r in md.iterrows(): dn = r["mean_seed0"] - base_v L.append(f"| {r['label']} | {r['mean_seed0']:.4f} | {r['delta_vs_physset']:+.4f} | " f"{dn:+.4f} | " + ("--" if pd.isna(r["p_vs_physset"]) else f"{r['p_vs_physset']:.2f}") + " |") L.append("") f20 = _read("full20_diffmode_chem.csv") if f20 is not None and len(f20): L.append( (f"Confirmed at full scale: DiffMode-LNP reaches **{f20['spearman'].mean():.4f}** " "over all 20 external tasks against 0.3597 for the tuned PhysSet-LNP " "(delta -0.024, Wilcoxon p = 0.23). The gain is confined to LM_2019 " "(+0.048) while SL_2020 (-0.054) and ZC_2023 (-0.068) lose - additional " "capacity, not additional transferable structure.\n") ) L.append( ("The screen cannot resolve this: the nested control and the tuned reference are " "the same architecture and differ by +0.024 at seed 0 and +0.001 over two seeds, " "so the run-to-run spread of a four-task fold-0 estimate is about +/-0.025 and no " "row above is significant (p >= 0.12). The decomposition diagnostic " "(`scripts/mode_diagnose.py`) shows why the two designs fail differently: the " "LaRIN codebook works as intended (14 of 16 codes live, top share 0.20, modes " "separate loose from tightly packed conformers, residual rho = 0.216 against the " "label versus 0.153 for the base alone) but adds nothing transferable; the " "CoDiffGRN posterior collapses to 3 of 16 modes with a top share of 0.44, so its " "codebook capacity is never used. Neither design is adopted.\n") )
L.append("## 11. Caveats\n") L.append("## 12. Caveats\n") L.append( ("* **LiON and AGILE are trained from scratch** on the training split of each " "task. Nat. Commun. 2026 pretrains LiON on the whole LNPDB corpus, so the published 0.52 "98 unmodified lines9910010110210310210310410510612 unmodified lines11912012112212212312412512612712812913013113213313413513613798 unmodified lines
## What did not work (reported in full)
Three feature-side ideas were implemented and run over all 20 external tasks.**None improves the state of the art**, and the report says so:Three feature-side ideas and one decoder family were implemented and run atfull scale. **None improves the state of the art**, and the report says so:
| Feature block added to PhysChem-Tree | mean | delta ||---|---|---|12 unmodified lines 0.360 for PhysSet-LNP at the same budget.* A study-identifiability audit saturates: *every* block, including the reference (0.950), predicts the study of origin at >= 0.93 balanced accuracy, because the 42 publications screened chemically disjoint lipid libraries. because the 40 study sources screened chemically disjoint lipid libraries.* **Discrete formulation-mode decoders** - the single output head was replaced by a discrete latent mode codebook plus a base/residual decoder, implemented twice: LaRIN's vector-quantised codebook (cosine assignment, EMA prototypes, commitment/balance/orthogonality, K = 16) and CoDiffGRN's categorical diffusion posterior (D3PM uniform transitions, cosine schedule, 30-step mean-field reverse chain). Eight configurations, three screening rounds and a full 20-task confirmation: **none beats the tuned PhysSet-LNP** (best screen row -0.007, all p >= 0.12; the confirmed variant scores 0.3362 vs 0.3597, delta -0.024, p = 0.23). The LaRIN codebook works as designed (14/16 codes live, modes separate loose from tightly packed conformers, residual rho = 0.22 against the label) but adds nothing transferable; the CoDiffGRN posterior collapses to 3 of 16 modes, so its capacity is never used.
The one positive by-product is about ensemble composition, not features: addingLiON to the stack gives 0.406 in-sample and 0.399 under a leave-one-study-out165 unmodified lines16616716816916917017117230 unmodified lines203204205206207208209210211212213214215165 unmodified lines self.fuse = nn.LayerNorm(d_model)
# ------------------------------------------------------------------ def encode(self, batch: dict) -> dict: def encode(self, batch: dict, node_drop_p: float = 0.0) -> dict: n = assemble_nodes(batch) B = n["fp"].shape[0]
30 unmodified lines x = x + il_slot * self.il_graph_proj(g_il).unsqueeze(1)
mask = n["mask"] if node_drop_p > 0 and self.training: # CoDiffGRN TASS analogue: supervise random node subsets so the set # encoder cannot rely on any single component slot. The whole-lipid # node (6) always stays, since it carries the chemistry stream. drop = torch.rand(B, N_NODES, device=mask.device) < node_drop_p drop[:, 6] = False mask = mask | drop if not self.use_helpers: mask = mask.clone() mask[:, 7:] = True123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532"""Method F - PhysMode-LNP (LaRIN-style) and Method G - DiffMode-LNP (CoDiffGRN-style).
Both methods keep the leak-free chemistry encoder of PhysSet-LNP but replace thesingle regressor with a two-part *base + residual-expert* decoder
y_hat = s_base(h) + alpha * log sum_k pi_k exp(Delta_k(h, c_k))
in which a small set of K discrete "formulation modes" carries a residualcorrection on top of a base scorer. The two implementations differ only in howthe mode posterior ``pi`` is obtained, which is exactly the axis on which thetwo source papers differ.
PhysMode-LNP (LaRIN, Sec. 3.2-3.3) A VQ codebook assigns each formulation to K prototypes with a cosine metric and temperature tau. The codebook is updated by exponential moving averages over assigned formulations; the encoder is trained through the soft posterior and through a commitment term. Usage balancing (KL to the uniform prior) and codebook orthogonality keep the prototypes apart. The residual is marginalised over the soft posterior, i.e. LaRIN's "residual latent-relation odds" decoder with the relation index replaced by the formulation-mode index.
DiffMode-LNP (CoDiffGRN, Sec. 4.1-4.3) The mode token is treated as a categorical state and corrupted with a D3PM uniform transition matrix on a cosine schedule, Q_t = a_t I + (1-a_t) 1 m^T. A denoiser conditioned on the chemistry embedding, the noisy one-hot state and a sinusoidal timestep embedding predicts x_0; inference starts from the marginal m and runs the closed-form reverse chain. The resulting x_0 posterior becomes ``pi``. CoDiffGRN's teacher forcing corresponds to always conditioning on the observed chemistry (there is no hidden node component to force), and its node-level auxiliary MSE corresponds to the physics auxiliary head. The optional ``tass_p`` switch adds CoDiffGRN's TF-ALL sub-graph sampling as node-subset training.
Both modules share everything else with PhysSet-LNP: the dual protonation-stategraph encoder, the 10-node physically biased set attention, the smooth-L1 +within-study ranking objective, the MD physics auxiliary, and the k-shotcalibration protocol. Any improvement therefore isolates the mode decoder."""
from __future__ import annotations
import mathfrom typing import Sequence
import numpy as npimport torchimport torch.nn as nnimport torch.nn.functional as F
from ..store import FeatureStorefrom ..trainer import NeuralModel, TrainConfigfrom .backbone import _BackboneLoss, FormulationEncoder
# ---------------------------------------------------------------------------# LaRIN Sec. 3.2 - discrete latent mode codebook# ---------------------------------------------------------------------------
class LatentModeCodebook(nn.Module): """VQ codebook over formulation-mode representations.
Assignment is cosine (LaRIN uses ``argmax_k cos(z, c_k)``); the posterior used by the decoder is the tempered softmax of the same cosine scores. The code vectors are *not* optimised by gradient descent: they follow the encoder by exponential moving averages, which is what makes the assignment stable enough to be read as a discrete mode. """
def __init__(self, dim: int, n_codes: int = 16, tau: float = 0.2, beta: float = 0.25, decay: float = 0.99, eps: float = 1e-5): super().__init__() self.dim, self.K, self.tau, self.beta = dim, n_codes, tau, beta self.decay, self.eps = decay, eps w = F.normalize(torch.randn(n_codes, dim), dim=-1) self.weight = nn.Parameter(w, requires_grad=False) self.register_buffer("ema_count", torch.zeros(n_codes)) self.register_buffer("ema_weight", w.clone())
# -- assignment ------------------------------------------------------ def posterior(self, u: torch.Tensor): cos = F.normalize(u, dim=-1) @ F.normalize(self.weight, dim=-1).t() return F.softmax(cos / self.tau, dim=-1), cos
# -- EMA bookkeeping ------------------------------------------------- @torch.no_grad() def ema_update(self, u: torch.Tensor, idx: torch.Tensor) -> None: onehot = F.one_hot(idx, self.K).float() n = onehot.sum(0) self.ema_count.mul_(self.decay).add_(n, alpha=1.0 - self.decay) dw = onehot.t() @ u.detach() self.ema_weight.mul_(self.decay).add_(dw, alpha=1.0 - self.decay) # Laplace-smoothed normalisation, as in the VQ-VAE / SwAV implementations cnt = self.ema_count.sum() weight = (self.ema_weight + self.eps) / (self.ema_count + self.eps).unsqueeze(-1) weight = weight * (cnt / (cnt + self.K * self.eps)) self.weight.data.copy_(F.normalize(weight, dim=-1))
# -- losses ---------------------------------------------------------- def losses(self, u: torch.Tensor, pi: torch.Tensor, idx: torch.Tensor) -> dict: c = self.weight[idx] # LaRIN L_com: pull the code vector onto the encoder output. With an EMA # codebook this is already handled by ``ema_update``; it is computed for # monitoring only and carries no gradient. code = (u.detach() - c).pow(2).mean() # commitment: keep the encoder output close to its assigned prototype commit = (u - c.detach()).pow(2).mean() # usage balancing: KL(mean posterior || uniform) pbar = pi.mean(0) bal = (pbar * torch.log(pbar * self.K + 1e-9)).sum() # L_orth: prototypes should not collapse onto a low-dimensional subspace cn = F.normalize(self.weight, dim=-1) gram = cn @ cn.t() orth = (gram - torch.eye(self.K, device=gram.device)).pow(2).mean() return {"code": code, "commit": commit, "bal": bal, "orth": orth}
# ---------------------------------------------------------------------------# Residual latent-mode decoder (shared by both methods)# ---------------------------------------------------------------------------
class ResidualModeDecoder(nn.Module): """``s_base(h) + alpha * mix_k pi_k Delta(h, c_k)``."""
def __init__(self, in_dim: int, code_dim: int, n_codes: int, hidden: int = 128, dropout: float = 0.1, alpha_init: float = 0.1, mix: str = "logsumexp"): super().__init__() self.base = nn.Sequential( nn.Linear(in_dim, 64), nn.SiLU(), nn.Dropout(dropout), nn.Linear(64, 1) ) self.expert = nn.Sequential( nn.Linear(in_dim + code_dim, hidden), nn.SiLU(), nn.Dropout(dropout), nn.Linear(hidden, 1), ) self.alpha = nn.Parameter(torch.tensor(float(alpha_init))) self.mix = mix
def forward(self, h: torch.Tensor, pi: torch.Tensor, codes: torch.Tensor, hard: bool = False, use_residual: bool = True, residual_only: bool = False, h_expert: torch.Tensor | None = None): s_base = self.base(h).squeeze(-1) if not use_residual: return s_base, s_base, None B, K = pi.shape he = h if h_expert is None else h_expert delta = self.expert( torch.cat([he.unsqueeze(1).expand(B, K, -1), codes.unsqueeze(0).expand(B, K, -1)], -1) ).squeeze(-1) if hard: oh = F.one_hot(pi.argmax(-1), K).to(delta.dtype) mixed = (oh * delta).sum(-1) elif self.mix == "logsumexp": # LaRIN's marginalisation log sum_r pi_r exp(alpha Delta_r); the sum is # exactly zero when every expert agrees with the base (Delta = 0) mixed = torch.logsumexp(torch.log(pi + 1e-9) + self.alpha * delta, dim=-1) else: mixed = self.alpha * (pi * delta).sum(-1) if residual_only: y = mixed else: y = s_base + mixed return y, s_base, delta
def _sinusoid(t: torch.Tensor, dim: int) -> torch.Tensor: half = max(1, dim // 2) freqs = torch.exp( -math.log(10000.0) * torch.arange(half, device=t.device, dtype=torch.float32) / half ) args = t.float().unsqueeze(-1) * freqs.unsqueeze(0) return torch.cat([torch.sin(args), torch.cos(args)], dim=-1)
# ---------------------------------------------------------------------------# CoDiffGRN Sec. 4.1-4.2 - D3PM uniform discrete diffusion on the mode token# ---------------------------------------------------------------------------
class DiscreteModeDiffusion(nn.Module): """Forward corruption and closed-form reverse chain for one categorical token."""
def __init__(self, n_codes: int, n_steps: int = 30): super().__init__() self.K, self.T = n_codes, n_steps t = torch.arange(n_steps + 1, dtype=torch.float64) abar = torch.cos(((t / n_steps) + 0.008) / 1.008 * math.pi / 2.0) ** 2 abar = (abar / abar[0]).clamp(1e-3, 1.0 - 1e-3) abar[0] = 1.0 self.register_buffer("abar", abar.to(torch.float32))
def q_sample(self, x0: torch.Tensor, t: torch.Tensor) -> torch.Tensor: a = self.abar[t].unsqueeze(-1) p = a * x0 + (1.0 - a) / self.K idx = torch.multinomial(p, 1).squeeze(-1) return F.one_hot(idx, self.K).to(x0.dtype)
def posterior(self, x0_probs: torch.Tensor, xt: torch.Tensor, t: torch.Tensor) -> torch.Tensor: """q(x_{t-1} | x_t, x_0) with the uniform transition matrix.""" a = (self.abar[t] / self.abar[t - 1]).clamp(0.0, 1.0).unsqueeze(-1) x0_prev = self.abar[t - 1].unsqueeze(-1) * x0_probs + (1.0 - self.abar[t - 1]).unsqueeze(-1) / self.K post = (a * xt + (1.0 - a) / self.K * xt.sum(-1, keepdim=True)) * x0_prev return post / post.sum(-1, keepdim=True).clamp_min(1e-12)
@torch.no_grad() def reverse(self, denoiser: nn.Module, h: torch.Tensor) -> torch.Tensor: """Mean-field reverse chain from the marginal; returns the x_0 posterior.""" B = h.shape[0] xt = torch.full((B, self.K), 1.0 / self.K, device=h.device, dtype=h.dtype) for step in range(self.T, 0, -1): t = torch.full((B,), step, device=h.device, dtype=torch.long) x0 = torch.softmax(denoiser(h, xt, t), dim=-1) xt = self.posterior(x0, xt, t) return xt
class ModeDenoiser(nn.Module): """Conditional graph-free denoiser: (chemistry, noisy state, timestep) -> x_0 logits."""
def __init__(self, in_dim: int, n_codes: int, hidden: int = 192, t_dim: int = 32, dropout: float = 0.1): super().__init__() self.t_dim = t_dim self.t_proj = nn.Sequential(nn.Linear(t_dim, hidden), nn.SiLU(), nn.Linear(hidden, hidden)) self.inp = nn.Linear(in_dim + n_codes + t_dim, hidden) self.body = nn.Sequential( nn.SiLU(), nn.Dropout(dropout), nn.Linear(hidden, hidden), nn.SiLU(), ) self.out = nn.Linear(hidden, n_codes)
def forward(self, h: torch.Tensor, xt: torch.Tensor, t: torch.Tensor) -> torch.Tensor: te = _sinusoid(t, self.t_dim) x = torch.cat([h, xt, te], dim=-1) return self.out(self.body(self.inp(x)) + self.t_proj(te))
# ---------------------------------------------------------------------------# Shared trunk# ---------------------------------------------------------------------------
class _ModeTrunk(nn.Module, _BackboneLoss): def __init__(self, fp_dim: int, ctx_dim: int, desc_dim: int, d_model: int = 192, n_heads: int = 6, n_layers: int = 3, dropout: float = 0.1, lam_rank: float = 0.5, lam_phys: float = 0.2, rank_gamma: float = 2.0, dual_state: bool = True, use_md_aux: bool = True, cond_mode: str = "concat", node_mode: str = "phys", mode_space: str = "full", **kw): super().__init__() self.enc = FormulationEncoder( fp_dim=fp_dim, ctx_dim=ctx_dim, desc_dim=desc_dim, d_model=d_model, n_heads=n_heads, n_layers=n_layers, dropout=dropout, dual_state=dual_state, cond_mode=cond_mode, node_mode=node_mode, ) self.lam_rank, self.lam_phys, self.rank_gamma = lam_rank, lam_phys, rank_gamma self.use_md_aux, self.dual_state = use_md_aux, dual_state out = self.enc.out_dim self.trunk = nn.Sequential( nn.Linear(out, 256), nn.LayerNorm(256), nn.SiLU(), nn.Dropout(dropout), ) self.phys_head = nn.Sequential(nn.Linear(out, 96), nn.SiLU(), nn.Linear(96, 3)) # "chem": the mode space and the residual experts see chemistry only, # i.e. the message-passed dual-state graph embedding and the # descriptor vector, never the experiment context. The base # scorer keeps the full representation. This stops a mode from # degenerating into a study identifier, which is the failure mode # documented for fingerprint nodes and helper-lipid identity. self.mode_space = mode_space if mode_space == "chem": chem_dim = d_model * (2 if dual_state else 1) + 128 self.chem_trunk = nn.Sequential( nn.Linear(chem_dim, 256), nn.LayerNorm(256), nn.SiLU(), nn.Dropout(dropout) ) else: self.chem_trunk = None
def encode(self, batch, node_drop_p: float = 0.0): e = self.enc.encode(batch, node_drop_p=node_drop_p) feats = torch.cat([e["z_form"], e["g_il_dual"], e["d_il"]], dim=-1) h = self.trunk(feats) h_mode = h if self.chem_trunk is not None: h_mode = self.chem_trunk(torch.cat([e["g_il_dual"], e["d_il"]], dim=-1)) return h, feats, h_mode
def _aux_losses(self, batch, feat_vec, total, logs): if self.use_md_aux: target = batch["cpp"][:, [2, 3]] phys = F.l1_loss(self.phys_head(feat_vec)[:, :2], target) stable = torch.sigmoid(self.phys_head(feat_vec)[:, 2]) flag = batch["md_flag"] > 0 if bool(flag.any()): phys = phys + F.binary_cross_entropy( stable[flag].clamp(1e-6, 1 - 1e-6), batch["md_stable"][flag], reduction="mean" ) total = total + self.lam_phys * phys logs["phys"] = float(phys.detach()) return total# ---------------------------------------------------------------------------# Method F - PhysMode-LNP# ---------------------------------------------------------------------------
class PhysModeModule(_ModeTrunk): def __init__(self, fp_dim: int, ctx_dim: int, desc_dim: int, n_codes: int = 16, code_dim: int = 64, tau: float = 0.2, beta: float = 0.25, alpha_init: float = 0.1, mix: str = "logsumexp", lam_vq: float = 0.1, lam_bal: float = 0.05, lam_orth: float = 0.01, lam_base: float = 0.5, use_vq: bool = True, hard_mode: bool = False, use_residual: bool = True, residual_only: bool = False, **kw): super().__init__(fp_dim=fp_dim, ctx_dim=ctx_dim, desc_dim=desc_dim, **kw) self.n_codes, self.code_dim = n_codes, code_dim self.mode_proj = nn.Sequential( nn.Linear(256, 256), nn.SiLU(), nn.Linear(256, code_dim) ) self.use_vq = use_vq if use_vq: self.codebook = LatentModeCodebook(code_dim, n_codes, tau, beta) else: # ablation: freely learned prototypes, no EMA, no commitment self.codes = nn.Parameter(F.normalize(torch.randn(n_codes, code_dim), dim=-1) * 0.5) self.decoder = ResidualModeDecoder(256, code_dim, n_codes, alpha_init=alpha_init, mix=mix) self.lam_vq, self.lam_bal, self.lam_orth, self.lam_base = lam_vq, lam_bal, lam_orth, lam_base self.hard_mode, self.use_residual, self.residual_only = hard_mode, use_residual, residual_only
@property def codes_weight(self): return self.codebook.weight if self.use_vq else F.normalize(self.codes, dim=-1)
def forward(self, batch): h, feat_vec, h_mode = self.encode(batch) if not self.use_residual: # nested Base-Only ablation: the mode machinery is switched off # entirely, so this is PhysSet-LNP with an unused extra parameter set y_hat, s_base, _ = self.decoder( h, torch.zeros(h.shape[0], self.n_codes, device=h.device), self.codes_weight, use_residual=False, ) return {"y_hat": y_hat, "s_base": s_base, "phys": self.phys_head(feat_vec), "z": h, "pi": None, "vq": {}, "feats": feat_vec} u = self.mode_proj(h_mode) if self.use_vq: pi, cos = self.codebook.posterior(u) idx = cos.argmax(-1) if self.training: self.codebook.ema_update(u, idx) vq = self.codebook.losses(u, pi, idx) if self.training else {} else: pi = F.softmax(F.normalize(u, dim=-1) @ self.codes_weight.t() / 0.2, dim=-1) vq = {} y_hat, s_base, delta = self.decoder( h, pi, self.codes_weight, hard=self.hard_mode, h_expert=h_mode, use_residual=self.use_residual, residual_only=self.residual_only, ) return {"y_hat": y_hat, "s_base": s_base, "phys": self.phys_head(feat_vec), "z": h, "pi": pi, "vq": vq, "feats": feat_vec}
def compute_loss(self, batch, out, epoch=0, n_epochs=1): reg = F.smooth_l1_loss(out["y_hat"], batch["y"]) rank = self._rank_loss(out["y_hat"], batch) total = reg + self.lam_rank * rank logs = {"reg": float(reg.detach()), "rank": float(rank.detach())} if self.lam_base > 0: base_reg = F.smooth_l1_loss(out["s_base"], batch["y"]) total = total + self.lam_base * base_reg logs["base"] = float(base_reg.detach()) if self.use_vq and out.get("vq"): v = out["vq"] vq_loss = self.lam_vq * (v["commit"]) + self.lam_bal * v["bal"] + self.lam_orth * v["orth"] total = total + vq_loss logs.update({k: float(val.detach()) for k, val in v.items()}) total = self._aux_losses(batch, out["feats"], total, logs) return total, logs
class PhysModeLNP(NeuralModel): name = "physmode"
def build(self, store: FeatureStore, cfg: TrainConfig) -> nn.Module: return PhysModeModule( fp_dim=store.il_fp.shape[1], ctx_dim=store.ctx_dim, desc_dim=store.il_desc.shape[1], **self.kwargs )
def need(self) -> Sequence[str]: return ("y", "ctx", "ratios", "nodes", "nodes_prot", "helpers", "study_id", "cpp", "md_flag", "graph", "desc")
# ---------------------------------------------------------------------------# Method G - DiffMode-LNP# ---------------------------------------------------------------------------
def _kmeans(x: np.ndarray, k: int, seed: int = 0, iters: int = 30, sub: int = 8192) -> np.ndarray: """Plain Lloyd k-means with k-means++ seeding (label-free discretisation).""" rng = np.random.default_rng(seed) if len(x) > sub: x = x[rng.choice(len(x), sub, replace=False)] x = x.astype(np.float64) # k-means++ initialisation c = [x[rng.integers(len(x))]] d2 = ((x - c[0]) ** 2).sum(1) for _ in range(1, k): p = d2 / max(d2.sum(), 1e-12) c.append(x[rng.choice(len(x), p=p)]) d2 = np.minimum(d2, ((x - c[-1]) ** 2).sum(1)) c = np.stack(c) for _ in range(iters): lab = np.argmin(((x[:, None, :] - c[None]) ** 2).sum(-1), axis=1) for j in range(k): m = lab == j if m.any(): c[j] = x[m].mean(0) return c
class DiffModeModule(_ModeTrunk): def __init__(self, fp_dim: int, ctx_dim: int, desc_dim: int, n_codes: int = 16, code_dim: int = 64, n_steps: int = 30, alpha_init: float = 0.1, mix: str = "logsumexp", lam_mode: float = 0.5, lam_base: float = 0.5, use_residual: bool = True, residual_only: bool = False, hard_mode: bool = False, tass_p: float = 0.0, **kw): super().__init__(fp_dim=fp_dim, ctx_dim=ctx_dim, desc_dim=desc_dim, **kw) self.n_codes = n_codes self.register_buffer("mode_token", torch.full((0,), -1, dtype=torch.long)) self.mode_embed = nn.Embedding(n_codes, code_dim) nn.init.normal_(self.mode_embed.weight, std=0.05) self.diffusion = DiscreteModeDiffusion(n_codes, n_steps) self.denoiser = ModeDenoiser(256, n_codes) self.decoder = ResidualModeDecoder(256, code_dim, n_codes, alpha_init=alpha_init, mix=mix) self.lam_mode, self.lam_base = lam_mode, lam_base self.use_residual, self.residual_only, self.hard_mode = use_residual, residual_only, hard_mode self.tass_p = tass_p
def set_mode_token(self, token: np.ndarray) -> None: self.mode_token = torch.from_numpy(np.asarray(token, dtype=np.int64))
def forward(self, batch): if self.training and self.tass_p > 0: h, feat_vec, h_mode = self.encode(batch, node_drop_p=self.tass_p) else: h, feat_vec, h_mode = self.encode(batch) if not self.use_residual: y_hat, s_base, _ = self.decoder( h, torch.zeros(h.shape[0], self.n_codes, device=h.device), self.mode_embed.weight, use_residual=False, ) return {"y_hat": y_hat, "s_base": s_base, "phys": self.phys_head(feat_vec), "z": h, "pi": None, "feats": feat_vec} mode_logits = None if self.training: tok = self.mode_token.to(h.device)[batch["row"]] x0 = F.one_hot(tok, self.n_codes).to(h.dtype) t = torch.randint(1, self.diffusion.T + 1, (h.shape[0],), device=h.device) xt = self.diffusion.q_sample(x0, t) mode_logits = self.denoiser(h_mode, xt, t) pi = torch.softmax(mode_logits, dim=-1) else: pi = self.diffusion.reverse(self.denoiser, h_mode) y_hat, s_base, delta = self.decoder( h, pi, self.mode_embed.weight, hard=self.hard_mode, h_expert=h_mode, use_residual=self.use_residual, residual_only=self.residual_only, ) out = {"y_hat": y_hat, "s_base": s_base, "phys": self.phys_head(feat_vec), "z": h, "pi": pi, "feats": feat_vec} if mode_logits is not None: out["mode_logits"], out["mode_token"] = mode_logits, tok return out
def compute_loss(self, batch, out, epoch=0, n_epochs=1): reg = F.smooth_l1_loss(out["y_hat"], batch["y"]) rank = self._rank_loss(out["y_hat"], batch) total = reg + self.lam_rank * rank logs = {"reg": float(reg.detach()), "rank": float(rank.detach())} if self.lam_base > 0: base_reg = F.smooth_l1_loss(out["s_base"], batch["y"]) total = total + self.lam_base * base_reg logs["base"] = float(base_reg.detach()) if "mode_logits" in out: ce = F.cross_entropy(out["mode_logits"], out["mode_token"]) total = total + self.lam_mode * ce logs["mode_ce"] = float(ce.detach()) total = self._aux_losses(batch, out["feats"], total, logs) return total, logs
class DiffModeLNP(NeuralModel): name = "diffmode"
def fit(self, store: FeatureStore, train_idx, val_idx, cfg: TrainConfig): # the discretisation must not see held-out formulations, so hand the # training rows to ``build`` through the config cfg.extra = {**cfg.extra, "train_idx": np.asarray(train_idx)} return super().fit(store, train_idx, val_idx, cfg)
def build(self, store: FeatureStore, cfg: TrainConfig) -> nn.Module: kw = dict(self.kwargs) n_codes = kw.get("n_codes", 16) module = DiffModeModule( fp_dim=store.il_fp.shape[1], ctx_dim=store.ctx_dim, desc_dim=store.il_desc.shape[1], **kw ) idx = cfg.extra.get("train_idx") if idx is None: idx = np.arange(len(store.y)) # CoDiffGRN's cell-cluster discretisation, transferred to formulations: # cluster the label-free physicochemical profile (descriptors, conformer # packing, molar composition) into K discrete formulation modes. il = store.il_id[idx] desc = store.il_desc[il].astype(np.float32) cpp = store.il_cpp[il].astype(np.float32) lo, hi = np.percentile(desc, [0.5, 99.5], axis=0) desc = (np.clip(desc, lo, hi) - desc.mean(0)) / (desc.std(0) + 1e-6) cpp = (cpp - cpp.mean(0)) / (cpp.std(0) + 1e-6) comp = store.ratios[idx].astype(np.float32) x = np.concatenate([desc, cpp, comp], axis=1) # subsample rows for the k-means step, then assign every formulation rng = np.random.default_rng(cfg.seed) sel = rng.choice(len(idx), size=min(len(idx), 20000), replace=False) centres = _kmeans(x[sel], n_codes, seed=cfg.seed) d = ((x[:, None, :] - centres[None]) ** 2).sum(-1) token = np.full(len(store.y), 0, dtype=np.int64) token[idx] = np.argmin(d, axis=1) module.set_mode_token(token) sizes = np.bincount(token[idx], minlength=n_codes) print(f"[diffmode] {n_codes} formulation modes, cluster sizes {sizes.tolist()}") return module
def need(self) -> Sequence[str]: return ("y", "ctx", "ratios", "nodes", "nodes_prot", "helpers", "study_id", "cpp", "md_flag", "graph", "desc")19 unmodified lines202122232425269 unmodified lines36373839404142434453 unmodified lines989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713819 unmodified linesfrom .models.backbone import PhyCausalLNP, PhysSetLNPfrom .models.probe import (ProbeFlat, ProbeFlatRank, ProbePhysSet, ProbePhysSetRank, ProbeSet, ProbeSetBias, ProbeSetBiasRank)from .models.physmode import DiffModeLNP, PhysModeLNPfrom .models.seq_backbone import SeqCausalLNPfrom .trainer import TrainConfig
9 unmodified lines return np.full(len(idx), self.mu)
PM_KW = dict(lam_base=0.0, lam_vq=0.02, lam_bal=0.02, lam_orth=0.005, alpha_init=1.0)DM_KW = dict(lam_base=0.0, lam_mode=0.2)
REGISTRY: Dict[str, Callable[[], object]] = { # trivial "mean": lambda: MeanPredictor(),53 unmodified lines pretrained="cache/atlas_pretrain.pt", freeze_gnn=True), "physset_ext_aux": lambda: PhysSetLNP(cond_mode="concat", node_mode="phys", lam_rank=0.5, pretrained="cache/atlas_pretrain.pt", aux_dim=4, lam_aux=0.2), # ---- Method F: PhysMode-LNP (LaRIN-style discrete mode codebook) --------- # r2 configuration: the base scorer is trained only through the residual # decomposition (lam_base=0 leaves the nesting into PhysSet-LNP exact), the # codebook terms are reduced so they regularise rather than compete, and # alpha starts at unity because the base score is a standardised regression # output, not a log-odds. "physmode": lambda: PhysModeLNP(**PM_KW), "physmode_base": lambda: PhysModeLNP(**{**PM_KW, "use_residual": False}), "physmode_hard": lambda: PhysModeLNP(**{**PM_KW, "hard_mode": True}), "physmode_lin": lambda: PhysModeLNP(**{**PM_KW, "mix": "linear"}), "physmode_novq": lambda: PhysModeLNP(**{**PM_KW, "use_vq": False}), "physmode_resonly": lambda: PhysModeLNP(**{**PM_KW, "residual_only": True}), "physmode_k8": lambda: PhysModeLNP(**{**PM_KW, "n_codes": 8}), "physmode_k32": lambda: PhysModeLNP(**{**PM_KW, "n_codes": 32}), "physmode_a01": lambda: PhysModeLNP(**{**PM_KW, "alpha_init": 0.1}), # chemistry-only mode space: the discrete mode and the residual experts never # see the experiment context (see physmode.py, mode_space) "physmode_chem": lambda: PhysModeLNP(**{**PM_KW, "mode_space": "chem"}), "physmode_chem_hard": lambda: PhysModeLNP(**{**PM_KW, "mode_space": "chem", "hard_mode": True}), "physmode_chem_novq": lambda: PhysModeLNP(**{**PM_KW, "mode_space": "chem", "use_vq": False}), "physmode_chem_k8": lambda: PhysModeLNP(**{**PM_KW, "mode_space": "chem", "n_codes": 8}), "physmode_chem_k32": lambda: PhysModeLNP(**{**PM_KW, "mode_space": "chem", "n_codes": 32}), "physmode_chem_resonly": lambda: PhysModeLNP(**{**PM_KW, "mode_space": "chem", "residual_only": True}), "physmode_chem_lin": lambda: PhysModeLNP(**{**PM_KW, "mode_space": "chem", "mix": "linear"}), # preliminary configuration kept for the ablation trail "physmode_r1": lambda: PhysModeLNP(), # ---- Method G: DiffMode-LNP (CoDiffGRN-style discrete diffusion) --------- "diffmode": lambda: DiffModeLNP(**DM_KW), "diffmode_base": lambda: DiffModeLNP(**{**DM_KW, "use_residual": False}), "diffmode_lin": lambda: DiffModeLNP(**{**DM_KW, "mix": "linear"}), "diffmode_hard": lambda: DiffModeLNP(**{**DM_KW, "hard_mode": True}), "diffmode_tass": lambda: DiffModeLNP(**{**DM_KW, "tass_p": 0.3}), "diffmode_chem": lambda: DiffModeLNP(**{**DM_KW, "mode_space": "chem"}), "diffmode_chem_hard": lambda: DiffModeLNP(**{**DM_KW, "mode_space": "chem", "hard_mode": True}), "diffmode_r1": lambda: DiffModeLNP(), # ---- Method E: Schema-LNP ------------------------------------------------- # ontology node attributes + typed (schema) adjacency on top of PhysSet-LNP "schema_lnp": lambda: PhysSetLNP(cond_mode="concat", node_mode="phys", lam_rank=0.5,52 unmodified lines535455565758596052 unmodified lines| D6 | 外部监督数据:pKa / 膜融合 / 器官选择性 | 本轮只拿到 LNP Atlas(粒径/PDI/zeta/EE),已证明无效。真正需要的是**表观 pKa**、**内体逃逸/膜融合效率**、**器官选择性**;目前无机器可读汇总。建议的收集口径:以 40 个研究来源的原始文献 + 综述的补充表为入口,每条记录 `(脂质 SMILES, 测定方法, pKa, 文献 DOI)`,至少 200 条后再评估 || D7 | LNP Atlas 引用 | 正文【待补:引用 33,34】;[33] 需补作者/刊名/年,[34] 为 Zenodo DOI || D8 | 外部监督的三张表 | 表 16–18 已由 `results/external_supervision.csv` 生成,数值可追溯 || D9 | 表 23–25(离散配方模式解码器) | 表 23 由 `results/mode_decoders_summary.csv` 生成(`scripts/mode_results.py`),表 24 由 `results/full20_diffmode_chem.csv` 生成,表 25 由 `scripts/mode_diagnose.py` 输出(`results/diag_*.npz`)。四任务筛选的重复性仅约 ±0.025,正文已明确写出"不据表 23 下结论" || D10 | LaRIN / CoDiffGRN 的方法引用 | 正文 4.12 节目前以名称指代,需补两条参考文献([35] LaRIN、[36] CoDiffGRN),作者/刊名/年份待核 |
---
313 unmodified lines3143153163173173183193193203213223 unmodified lines326327328329329330331332333334351 unmodified lines68668768868768969069169271 unmodified lines7647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468477658488498508512 unmodified lines8548558567748578588598601 unmodified line862863864782865866867868313 unmodified lines18: return {ρ_m}, {ρ_stack}, 逐样本预测```
### 3.8 四项被检验但未被采用的扩展### 3.8 五项被检验但未被采用的扩展
为保证结论完整,我们同时报告四项在本文框架内实现并做全量评估、但**未能提升性能**的扩展。前三项的细节与结果见 4.7 节,第四项见 4.8 节。为保证结论完整,我们同时报告五项在本文框架内实现并做全量评估、但**未能提升性能**的扩展。前三项的细节与结果见 4.7 节,第四项见 4.8 节,第五项见 4.12 节。
**角色化本体特征。** 按槽位为每个片段建立化学分类本体(胺类型组成、连接子可降解化学、尾链拓扑、辅助脂质类别),并构造 20 个跨槽无量纲比值(每尾碳电荷数、酯密度、亲疏水平衡、PEG 表面覆盖、脂质—辅助脂质电荷互补等),共 226 维。
3 unmodified lines
**外部语料预训练与特征化。** 我们把 LNP Atlas 的实测粒径、PDI、zeta 电位与包封率作为绝对量的多任务目标,在两种层级上使用:其一,把 934 条配方作为独立语料预训练共享编码器,再在 LNPDB 活性上微调;其二,把在 Atlas 上训练的脂质级属性预测器应用于 LNPDB 的全部可电离脂质,将四个预测值作为附加特征拼入 398 维化学块。两种用法都不接触任何 LNPDB 活性标签,因此不引入泄漏。
四项扩展的完整实现保留在公开代码中(`src/lnpbench/ontology.py`、`src/lnpbench/global_rep.py`、`src/lnpbench/prepare.py` 之外的 `scripts/build_atlas.py`、`scripts/pretrain_atlas.py`、`scripts/pretrain_lipid.py`、`scripts/atlas_feature_probe.py`,以及 `registry.py` 中的 `schema_lnp*` 与 `physset_ext*` 条目),便于复现与二次开发。**离散配方模式解码器。** 我们把 PhysSet-LNP 的单一输出头替换为"离散隐模式码本 + 基座-残差解码器",并按两份已发表方法各实现一版:LaRIN 式的向量量化码本(余弦指派、指数滑动平均原型、承诺/均衡/正交三项正则,$K=16$、码维 64、$ au=0.2$)与 CoDiffGRN 式的分类扩散后验(D3PM 均匀转移矩阵、余弦调度、$T=30$ 步均值场反向链)。两者共用同一解码式 $\hat y = s_{\text{base}}(h) + \alpha\,m(\{\pi_k,\Delta_k\})$,区别仅在 $\pi$ 的构造方式。
五项扩展的完整实现保留在公开代码中(`src/lnpbench/ontology.py`、`src/lnpbench/global_rep.py`、`src/lnpbench/models/physmode.py`、`scripts/build_atlas.py`、`scripts/pretrain_atlas.py`、`scripts/pretrain_lipid.py`、`scripts/atlas_feature_probe.py`、`scripts/mode_results.py`,以及 `registry.py` 中的 `schema_lnp*`、`physset_ext*`、`physmode*` 与 `diffmode*` 条目),便于复现与二次开发。
## 4. 实验
351 unmodified lines
其三,**规模不足**。934 条配方、269 种脂质的预训练语料,相对 18 858 条、12 228 种脂质的 LNPDB 而言先验强度有限,却足以把编码器推向一个与任务不完全对齐的区域——这解释了为什么筛选阶段出现了明显退化,而全量微调后又被抹平。
**方法论结论。** 问题不在于"是否使用外部数据",而在于外部标签是否与目标量共享**因果上游**。粒径、PDI、zeta 与包封率是配方质量的控制指标,不是转染效率的上游;真正值得收集的是可电离脂质的**表观 pKa**、**膜融合/内体逃逸效率**与**器官选择性**。这三类量在文献中分散于各篇论文的补充材料,目前没有机器可读的公共汇总,本文未能纳入;4.12 节把它列为最优先的后续工作。**方法论结论。** 问题不在于"是否使用外部数据",而在于外部标签是否与目标量共享**因果上游**。粒径、PDI、zeta 与包封率是配方质量的控制指标,不是转染效率的上游;真正值得收集的是可电离脂质的**表观 pKa**、**膜融合/内体逃逸效率**与**器官选择性**。这三类量在文献中分散于各篇论文的补充材料,目前没有机器可读的公共汇总,本文未能纳入;4.13 节把它列为最优先的后续工作。
### 4.9 案例分析:构象 CPP 代理与分子动力学
71 unmodified lines
全部神经模型合计约 **11.1 GPU 小时**(单卡 A800-80GB,其中 4.7 节的 Schema 变体占 0.7 小时)。树模型与全部集成、显著性检验、图表重建合计约 **40 分钟 CPU**。需要强调的是:**从已保存的逐样本预测重建全部表格与图形不需要任何 GPU**,这使得结果审计的成本极低。
### 4.12 离散配方模式解码器:两种已发表设计的迁移检验
**动机。** PhysSet-LNP 用一个线性头对池化表示做回归。一个自然的质疑是:单一线性头无法表达*随体系而变化*的构效关系——同一个头既要服务于以胆固醇竞争为主的辅助脂质筛选,又要服务于以表面修饰为主的 PEG 筛选。近期在药物相互作用预测��LaRIN)与基因调控网络推断(CoDiffGRN)中,两种方法针对同一质疑给出了同一类答案:用一个小的离散隐状态码本替代单一输出头,再以**基座 + 残差**的方式把隐状态的作用加到预测上。我们按原文方法把两者都实现并做了全量评估。
两者可以归约为同一个骨架:
$$\hat y = s_{\text{base}}(h) + \alpha\, 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),$$
其中 $s_{\text{base}}$ 即 PhysSet-LNP 原有的输出头,$c_k$ 为第 $k$ 个原型,$m$ 可取 LaRIN 的对数求和 $\log\sum_k \pi_k e^{\alpha \Delta_k}$ 或线性期望 $\sum_k \pi_k \Delta_k$。两者的区别仅在于 $\pi$ 如何得到,这正是比较所要隔离的变量。
**PhysMode-LNP(LaRIN 式)。** 模式表示 $u=g(h)\in\mathbb R^{64}$,以温度 $\tau=0.2$ 的余弦相似度指派到 $K=16$ 个原型。原型不以梯度更新,而是以指数滑动平均(衰减 0.99)跟踪被指派给它的配方,并做单位范数投影;训练目标只保留承诺项、使用均衡项 $D_{\mathrm{KL}}(\bar\pi\|\mathbf 1/K)$ 与码本正交项。基座项仅通过分解式 $\hat y = s_{\text{base}} + \text{残差}$ 训练,因此**关闭模式分支的嵌套对照与被比较的 PhysSet-LNP 结构完全相同**。
**DiffMode-LNP(CoDiffGRN 式)。** 模式令牌是一个 16 类离散状态,按 D3PM 的均匀转移矩阵 $Q_t = a_t I + (1-a_t)\mathbf 1 m^\top$ 与余弦噪声调度在 $T=30$ 步内被加噪;一个以化学表征、含噪 one-hot 状态与正弦时间步嵌入为条件的去噪器预测 $\tilde p_\theta(x_0\mid x_t)$,推理时从边缘分布 $m$ 出发跑均值场反向链得到 $\pi$。模式令牌本身按 CoDiffGRN 的做法由**无标签的输入剖面**聚类得到(217 维描述子 + 16 维 cCPP + 5 维摩尔配比,$K=16$ 的 $k$-means++,仅在训练行上拟合)。
**化学专用模式空间。** 两个实现最初都让模式分支读取完整表示 $h$(其中含 109 维实验条件)。该版本在两个最小的外部研究上稳定变差——条件向量正是模式退化为"研究标识符"的通道,与 3.3.3 节记录的指纹捷径同源。因此最终配置把模式指派与残差专家都限制在化学流($g_{\text{il}}^{\text{dual}}\|d_{\text{il}}$,512 维)上,基座仍使用完整表示。下文报告的是该配置。
**筛选协议。** 与主实验一致的四个 fold-0 外部任务、30 epoch、batch 256、seed 0。作为参照,调优后的 PhysSet-LNP 在这四个任务上为 0.3685(全 20 任务 0.3597)。
**表 23 离散模式解码器的筛选结果(四任务 fold-0,seed 0)**
| 配置 | 四任务均值 | Δ 对 PhysSet-LNP | Δ 对嵌套对照 ||---|---|---|---|| PhysSet-LNP(调优参照) | 0.3685 | — | — || Base-Only(嵌套对照) | 0.3929 | +0.024 | — || PhysMode,线性混合 | 0.3612 | −0.007 | −0.032 || PhysMode,硬指派 | 0.3597 | −0.009 | −0.033 || **PhysMode-LNP**(化学专用模式) | 0.3536 | −0.015 | −0.039 || PhysMode r2(完整模式空间) | 0.3503 | −0.018 | −0.043 || **DiffMode-LNP**(化学专用模式) | 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,无码本(自由原型) | 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,仅残差 | 0.3171 | −0.051 | −0.076 |
**这一筛选无法分辨所测效应。** 嵌套对照与参照模型结构相同,在 seed 0 上相差 +0.024,在两个可用种子上相差 +0.001;即四任务 fold-0 估计的重复性约为 $\pm0.025$。表 23 中没有任何一行与基线的差异达到显著(Wilcoxon $p\ge0.12$),且加入第二个种子后行的排序会改变(硬指派 0.3597 对两种子均值 0.3276)。我们因此不据表 23 下结论,只用它挑选进入全量确认的变体。
**全量确认。** 选择种子平均后筛选分数最高、且机制最完整的 DiffMode-LNP,在全部 20 个外部任务上重跑(seed 0)。
**表 24 DiffMode-LNP 的全量 20 任务确认**
| 范围 | PhysSet-LNP | DiffMode-LNP | Δ ||---|---|---|---|| 全部 20 任务 | 0.3597 | 0.3362 | **−0.024**(sd 0.075,Wilcoxon $p=0.23$) || LM_2019(5 折) | 0.1234 | 0.1714 | +0.048 || BL_2023(5 折) | 0.1170 | 0.0971 | −0.020 || SL_2020(5 折) | 0.7383 | 0.6841 | −0.054 || ZC_2023(5 折) | 0.4602 | 0.3921 | −0.068 |
点估计为负、效应不显著,且**不均匀**:增益集中在最大的 LM_2019,而两个最小的研究下降。这正是"容量增加而非可迁移结构增加"的特征。
**失效机制。** 我们在 LM_2019 fold 0 上训练各变体,并把留出预测分解为基座项与残差项(表 25)。
**表 25 预测分解与后验健康���(LM_2019 fold 0,seed 0)**
| 指标 | PhysMode-LNP | DiffMode-LNP ||---|---|---|| Spearman($\hat y$, 标签) | 0.253 | 0.187 || Spearman($s_{\text{base}}$, 标签) | 0.153 | 0.144 || Spearman(残差, 标签) | 0.216 | 0.081 || 残差方差占比 | 0.196 | 0.187 || corr(残差, $s_{\text{base}}$) | +0.37 | −0.05 || 后验熵 / 最大值 | 2.39 / 2.77 | **0.98 / 2.77** || 活跃码字数(>1%) | 14 / 16 | **3 / 16** || 最大码字占比 | 0.20 | **0.44** |
三点观察。
第一,**LaRIN 的机制完全按其设计工作,并不是失效原因**。码本没有坍缩(16 个码字中 14 个活跃,最大占比 0.20),且模式在化学上可解释:六个有实际占用的模式上,平均质子化 cCPP 跨度达 1.36–2.68,即模式区分的是构象松散与紧密堆积,而不是研究来源。残差确实携带排序信号(对标签 $\rho=0.216$,高于基座单独使用时的水平)。PhysMode-LNP 是一个*有效*的混合专家模型,它只是没能在一个迁移任务上超过一个正则良好的单一输出头——因为它捕捉的信号已经在 $h$ 里。
第二,**CoDiffGRN 的后验坍缩了**。反向链把全部配方映射到 16 个模式中的 3 个,最大占比 0.44。一个实际只有 3 路的码本无法构成混合专家,其残差相应地几乎不携带信息($\rho=0.081$,与基座相关 −0.05)。原因是结构性的而非调参问题:在均匀边缘分布下,一个被训练得足够自信的去噪器经确定性均值场反向链后必然集中到训练分布的主导模式上($k$-means 簇规模从 72 到 3 304 不等)。
第三,**去掉这些机制也回不到基线**。"无码本"(自由原型、无承诺与均衡项)低于完整 VQ 版本,"仅残差"是所有配置中最差的。因此性能损失并非由 VQ 正则项造成,而来自附条件容量本身。
**结论:两种设计均不采纳。** 本文方法仍为 PhysSet-LNP。两个实现连同上述全部配置保留在公开代码中(`src/lnpbench/models/physmode.py`,`registry.py` 中的 `physmode*` 与 `diffmode*` 条目),使该负结果可复现而非仅作断言。
### 4.12 局限性### 4.13 局限性
* **基线未使用预训练。** LiON 与 AGILE 均按各任务的训练集从零训练。LNPDB 原文的 LiON 在全库上做过预训练,因此其报告在 ZC_2023 上的 0.52 在本协议下不可复现。本文的比较是"同预算下的架构比较",而非"与已发布权重比较"。这是刻意的设计(否则无法隔离架构贡献),但也意味着本文不能声称超过了已发表的绝对数值。* **集成相对最强单模型的优势不显著**($\Delta=+0.016$,$p=0.053$)。本文因此同时报告单模型结果,不把集成作为唯一结论。2 unmodified lines* **只有四个留出研究。** LNPDB 的配方数高度集中于少数研究(最大的两项合计占 22%),四个留出研究的选择受原始发布限制。留出研究之间的难度差异极大(SL_2020 0.683 对 BL_2023 0.174),因此均值对留出研究的构成敏感。* **缺少湿实验验证。** 本文的全部结论都建立在公开数据的重分析之上,未做前瞻性合成与表征。模型输出应被理解为**候选排序**而非可依赖的绝对活性预测(表 4 中全部 $R^2$ 为负这一事实也支持该限定)。* **外部监督只检验了“配方质量”类标签。** 我们能够机器读取的外部语料(LNP Atlas)只提供粒径、PDI、zeta 与包封率,它们不是转染效率的因果上游。真正相关的表观 pKa、膜融合/内体逃逸效率与器官选择性数据目前没有公共的机器可读汇总,因此本文对“外部监督是否有用”的回答是**有条件的**:对配方质量类标签是否定的,对机制类标签尚未检验。* **四项负结果可能是数据特性而非普遍结论。** 角色化本体与全局码本在 LNPDB 上无效,其根本原因是该库的化学空间几乎按研究切分(仅 2.3% 的脂质跨研究出现)。在化学空间更连续的数据集上,这些方法的结论可能不同。* **五项负结果可能是数据特性而非普遍结论。** 角色化本体与全局码本在 LNPDB 上无效,其根本原因是该库的化学空间几乎按研究切分(仅 2.3% 的脂质跨研究出现)。在化学空间更连续的数据集上,这些方法的结论可能不同。离散模式解码器的失效机制不同:其一是额外容量被研究内方差吸收(4.12 节),其二是离散扩散后验在类不平衡的聚类先验下坍缩到少数模式;后者可以通过类均衡的扩散训练或更大的 $T$ 修正,本文未继续尝试。
## 5. 结论
1 unmodified line
围绕这一诊断,本文做了三件事。第一,构建了一个严格的外推基准:四个完整留出的研究 × 原始五折 = 20 个外部任务,全部基线在同一数据、同一划分与同一算力预算下重训。第二,提出了身份无关的分层物理表示,并据此给出一个神经模型(PhysSet-LNP)与一个树模型(PhysChem-Tree);二者误差结构互补,与另外两个成员构成 LNPBench-Stack,在 20 个任务上取得 0.392 的平均 Spearman,显著优于除最强单模型外的全部基线。第三,把外推失败量化为可复现的效应(指纹替换使验证上升、外推由 0.368 跌至 0.189),并据此提出 k 样本校准设定,用约 53 条目标研究标签把均值提升到 0.450。
我们同时如实报告了四项未能带来增益的扩展(角色化本体、全局原型码本、类型化图注意力、外部物理量预训练)与一个饱和的捷径筛查器,并给出了它们的失效机制。其中外部预训练在全量 20 任务上是中性的(0.360 对 0.360),却系统性地把性能从饱和研究(SL_2020 −0.053)转移到困难研究(LM_2019 +0.020、BL_2023 +0.016、ZC_2023 +0.021)。这些负结果与正结果共同指向同一个结论:**在该领域,评估协议的严格性比模型容量更重要**。我们同时如实报告了五项未能带来增益的扩展(角色化本体、全局原型码本、类型化图注意力、外部物理量预训练、离散配方模式解码器)与一个饱和的捷径筛查器,并给出了它们的失效机制。其中离散模式解码器一节的结论尤为明确:LaRIN 式的码本按其设计正常工作(16 个原型中 14 个活跃,模式与构象堆积程度相关),残差项也携带真实的排序信号,但在 20 个外部任务上的点估计仍为负(0.336 对 0.360);CoDiffGRN 式的扩散后验则坍缩到 3 个模式,使码本容量根本未被使用。其中外部预训练在全量 20 任务上是中性的(0.360 对 0.360),却系统性地把性能从饱和研究(SL_2020 −0.053)转移到困难研究(LM_2019 +0.020、BL_2023 +0.016、ZC_2023 +0.021)。这些负结果与正结果共同指向同一个结论:**在该领域,评估协议的严格性比模型容量更重要**。
未来工作有三个方向。其一是**换一类外部监督信号**:本文已经证明粒径/PDI 这类配方质量指标无效,下一步应收集可电离脂质的实测表观 pKa、膜融合或内体逃逸效率与器官选择性数据——它们与转染效率共享因果上游,是唯一可能不依赖"研究内部化学相关性"的信息源;这需要人工从文献补充材料中整理,本文未能完成。其二是把校准从"重拟合"推进到"少样本微调 + 不确定性估计",使模型能够告诉实验者"这条配方我有多不确定"。其三是与实验团队合作做前瞻性验证:用本文的排序器挑选一批候选脂质,合成并实测,检验排序在前 10% 的命中率是否真的高于随机——这是任何计算工作最终都必须面对的检验。
291 unmodified lines292293294295296297298299300301302303304305306307308309310311312313314315316317318319295320321322323291 unmodified lines
The four-task screen suggested a large loss, and the lipid-level variant scored *below* its shuffled-label control - but the full 20-task run shows the effect is **neutral overall** (0.3603 vs 0.3597, p = 0.87). The property signal redistributes performance rather than adding it: +0.016 to +0.021 on the three harder studies and -0.053 on the saturated one. As features the same information is also null (-0.005, p = 0.19). Particle size and PDI are formulation-quality controls, not causal upstream variables of transfection.
## 11. Discrete formulation-mode decoders (LaRIN / CoDiffGRN)
PhysSet-LNP's single output head was replaced by a discrete latent mode codebook plus a base/residual decoder, implemented twice: LaRIN's vector-quantised codebook (cosine assignment, EMA prototypes, commitment / balance / orthogonality terms, K = 16) and CoDiffGRN's categorical diffusion posterior (D3PM uniform transition matrix, cosine schedule, 30-step mean-field reverse chain). The nested control (mode branch disabled) is the identical module. Screening protocol: four fold-0 external tasks, 30 epochs, batch 256, seed 0.
| configuration | 4-task mean (seed 0) | d vs PhysSet-LNP | d vs nested control | p ||---|---|---|---|---|| PhysSet-LNP (tuned reference) | 0.3685 | +0.0000 | -0.0244 | -- || Base-Only (nested control) | 0.3929 | +0.0247 | +0.0000 | 0.38 || PhysMode r1 (alpha=0.1, lam_base>0) | 0.3460 | -0.0223 | -0.0469 | 0.62 || PhysMode r2 (lam_base=0, alpha=1) | 0.3503 | -0.0179 | -0.0426 | 0.88 || PhysMode-LNP (chemistry-only modes) | 0.3536 | -0.0147 | -0.0394 | 1.00 || PhysMode, hard assignment | 0.3597 | -0.0086 | -0.0332 | 1.00 || PhysMode, no codebook (free prototypes) | 0.3382 | -0.0301 | -0.0548 | 0.38 || PhysMode, K=8 | 0.3336 | -0.0346 | -0.0593 | 0.25 || PhysMode, K=32 | 0.3376 | -0.0307 | -0.0554 | 0.25 || PhysMode, residual only | 0.3171 | -0.0512 | -0.0758 | 0.12 || PhysMode, linear mixing | 0.3612 | -0.0070 | -0.0317 | 1.00 || DiffMode r1 | 0.3391 | -0.0291 | -0.0538 | 0.38 || DiffMode r2 | 0.3459 | -0.0223 | -0.0470 | 0.62 || DiffMode-LNP (chemistry-only modes) | 0.3504 | -0.0179 | -0.0425 | 0.88 |
Confirmed at full scale: DiffMode-LNP reaches **0.3362** over all 20 external tasks against 0.3597 for the tuned PhysSet-LNP (delta -0.024, Wilcoxon p = 0.23). The gain is confined to LM_2019 (+0.048) while SL_2020 (-0.054) and ZC_2023 (-0.068) lose - additional capacity, not additional transferable structure.
The screen cannot resolve this: the nested control and the tuned reference are the same architecture and differ by +0.024 at seed 0 and +0.001 over two seeds, so the run-to-run spread of a four-task fold-0 estimate is about +/-0.025 and no row above is significant (p >= 0.12). The decomposition diagnostic (`scripts/mode_diagnose.py`) shows why the two designs fail differently: the LaRIN codebook works as intended (14 of 16 codes live, top share 0.20, modes separate loose from tightly packed conformers, residual rho = 0.216 against the label versus 0.153 for the base alone) but adds nothing transferable; the CoDiffGRN posterior collapses to 3 of 16 modes with a top share of 0.44, so its codebook capacity is never used. Neither design is adopted.
## 11. Caveats## 12. Caveats
* **LiON and AGILE are trained from scratch** on the training split of each task. Nat. Commun. 2026 pretrains LiON on the whole LNPDB corpus, so the published 0.52 on ZC_2023 is not reachable under this protocol; the comparison is between architectures under an identical budget, not against the published weights.* **PhysSet-LNP ties the random forest** (paired Wilcoxon p = 0.96, n = 20). It is the best *neural* model and the best model on the two large held-out studies, but it is not a standalone state of the art on this benchmark.123456789model,protocol,task,study,fold,seed,n_train,n_test,val_spearman,epochs_run,runtime_s,spearman,pearson,r2,mae,rmse,ef10,ef20,ndcg10physmode_chem_k32,physmode_chem_k32,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2683104987460505,30,216.4,0.23412589084480168,0.21519459352628026,-0.04529485004294953,0.7741712500837183,1.022396622182458,1.4134231341530268,1.3029994517973216,0.5788628789573269physmode_chem_k32,physmode_chem_k32,BL_2023_fold0,BL_2023,0,0,14524,773,0.2709986746472474,30,214.2,0.03401689375700708,0.08405110990859202,-0.4239573245215045,0.9353344320966579,1.1932968326169036,1.1733850565019397,0.8043704474505723,0.5978259052634441physmode_chem_k32,physmode_chem_k32,SL_2020_fold0,SL_2020,0,0,15234,91,0.25870545964537,30,226.6,0.7058335200347987,0.6298639213061415,-0.0728560461925647,0.8794616198801732,1.0357876243123247,1.1234567901234567,2.5277777777777777,0.6622378389300523physmode_chem_k32,physmode_chem_k32,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3101142605513087,30,221.4,0.36612464717449633,0.4459190001728573,0.18556842757349257,0.6677519071932513,0.9024586254309266,0.0,1.3565088757396448,0.8632210863947019physmode_chem_k32,physmode_chem_k32,LM_2019_fold0,LM_2019,0,0,14125,1128,0.26828745382648944,30,172.9,0.2340832961124123,0.21507581801503242,-0.04548347562913824,0.7742159383788157,1.0224888647984542,1.4134231341530268,1.3029994517973216,0.5788517573188751physmode_chem_k32,physmode_chem_k32,BL_2023_fold0,BL_2023,0,0,14524,773,0.2709414083555514,30,178.5,0.032619819582392996,0.08275347046114538,-0.4239024535027047,0.9351820325042768,1.1932738410417347,1.0430089391128354,0.8043704474505723,0.5894637076893863physmode_chem_k32,physmode_chem_k32,SL_2020_fold0,SL_2020,0,0,15234,91,0.25861178506663124,30,183.6,0.7066666648651725,0.6306833488194076,-0.07001062747711995,0.8765719896489448,1.0344131592736687,1.1234567901234567,2.5277777777777777,0.6622378389300523physmode_chem_k32,physmode_chem_k32,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.30919175595199994,30,203.3,0.3769742550051179,0.4522246184281014,0.1898455145007154,0.6639923248013467,0.9000858201843697,0.0,1.3565088757396448,0.865555024296361312345model,protocol,task,study,fold,seed,n_train,n_test,val_spearman,epochs_run,runtime_s,spearman,pearson,r2,mae,rmse,ef10,ef20,ndcg10physmode_chem_k8,physmode_chem_k8,LM_2019_fold0,LM_2019,0,0,14125,1128,0.26091941763512333,30,181.0,0.23411889693104296,0.22148486511463353,-0.006540586068245258,0.7658949451782504,1.0032649644854075,1.7667789176912834,1.3692536612107447,0.578710369314605physmode_chem_k8,physmode_chem_k8,BL_2023_fold0,BL_2023,0,0,14524,773,0.2825576572655232,30,180.3,-0.0024660857353815103,0.04026565105025004,-0.4231704326269168,0.9370936337415067,1.1929670736594176,0.9126328217237308,0.5791467221644121,0.5869861535132382physmode_chem_k8,physmode_chem_k8,SL_2020_fold0,SL_2020,0,0,15234,91,0.25374424424063513,30,183.7,0.7266849676233159,0.620976217952645,0.06297237610590589,0.8116813704248641,0.9680018522137069,1.1234567901234567,2.5277777777777777,0.6100712701997876physmode_chem_k8,physmode_chem_k8,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.301940443834164,30,183.5,0.37612525114032336,0.46062618659312954,0.10065700321336257,0.6693391966569515,0.9483369626804118,0.0,1.3565088757396448,0.8399495851802989123456789model,protocol,task,study,fold,seed,n_train,n_test,val_spearman,epochs_run,runtime_s,spearman,pearson,r2,mae,rmse,ef10,ef20,ndcg10physmode_chem_lin,physmode_chem_lin,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2737959137074922,30,214.7,0.26221312242370615,0.22659527302801993,-0.017405247699343818,0.7673567992572885,1.0086650834772959,1.590101025922155,1.3692536612107447,0.5701226395066918physmode_chem_lin,physmode_chem_lin,BL_2023_fold0,BL_2023,0,0,14524,773,0.2740306580579052,30,213.5,0.07337561967802408,0.10597017569653079,-0.5296821604600563,0.9665226823786445,1.2368032046907511,1.4341372912801484,0.9008949011446409,0.593842830242283physmode_chem_lin,physmode_chem_lin,SL_2020_fold0,SL_2020,0,0,15234,91,0.26244257007733734,30,222.2,0.7515463243772077,0.6579004846178973,-0.10031016218678834,0.8905651843441384,1.048956680496998,1.1234567901234567,2.2469135802469133,0.6802453128122745physmode_chem_lin,physmode_chem_lin,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3099926349566475,30,222.7,0.3590018355295964,0.45288388764148346,0.16441675434545044,0.6589699282758791,0.9141024252214105,0.0,1.5502958579881658,0.8494805068897584physmode_chem_lin,physmode_chem_lin,LM_2019_fold0,LM_2019,0,0,14125,1128,0.273585371749509,30,177.2,0.26195504993233354,0.22688491512524986,-0.016877997149861157,0.7673818358567492,1.0084036890428658,1.590101025922155,1.3913383976818856,0.5703112070208362physmode_chem_lin,physmode_chem_lin,BL_2023_fold0,BL_2023,0,0,14524,773,0.27408104341001527,30,175.9,0.07346853207652429,0.10600077681527688,-0.5300443720090369,0.9665852616701328,1.2369496265749356,1.4341372912801484,0.9008949011446409,0.5977771919159384physmode_chem_lin,physmode_chem_lin,SL_2020_fold0,SL_2020,0,0,15234,91,0.26240787841012775,30,184.7,0.7507508156491328,0.6577454145349008,-0.09991156340090557,0.8902914362376207,1.0487666655598686,1.1234567901234567,2.2469135802469133,0.6802453128122745physmode_chem_lin,physmode_chem_lin,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3099716488480306,30,203.2,0.3586820808272712,0.4527749575245513,0.16400110095421716,0.6590688488808752,0.9143297529808231,0.0,1.5502958579881658,0.849480506889758412345model,protocol,task,study,fold,seed,n_train,n_test,val_spearman,epochs_run,runtime_s,spearman,pearson,r2,mae,rmse,ef10,ef20,ndcg10physmode_chem_novq,physmode_chem_novq,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2847100310959689,30,173.2,0.22765227744855976,0.22809061357437646,-0.036093610083212324,0.7711871183180674,1.0178868370619065,1.590101025922155,1.4134231341530268,0.5934475155436558physmode_chem_novq,physmode_chem_novq,BL_2023_fold0,BL_2023,0,0,14524,773,0.26926694338005475,30,179.4,0.04863459104435656,0.0811913604382947,-0.5809669961148107,0.9762641770107356,1.2573651033060356,1.564513408669253,0.8365452653485952,0.6100814450121763physmode_chem_novq,physmode_chem_novq,SL_2020_fold0,SL_2020,0,0,15234,91,0.2568487480732547,30,184.4,0.7349585858894526,0.6254806266603599,-0.17710549929866093,0.9083529529417609,1.0849449071526212,1.1234567901234567,2.2469135802469133,0.6066886982131091physmode_chem_novq,physmode_chem_novq,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.301752823400383,30,178.4,0.34149526557729015,0.4331630802722312,0.1466977391555918,0.6864214361510204,0.9237436110448095,0.0,1.3565088757396448,0.863259582020358123456789model,protocol,task,study,fold,seed,n_train,n_test,val_spearman,epochs_run,runtime_s,spearman,pearson,r2,mae,rmse,ef10,ef20,ndcg10physmode_chem_resonly,physmode_chem_resonly,LM_2019_fold0,LM_2019,0,0,14125,1128,0.23743332896228347,27,191.7,0.19058205691436741,0.2052615542800875,-0.09781310207950922,0.7932129749698559,1.0477657683078536,0.9717284047302059,1.3913383976818856,0.5513486522928258physmode_chem_resonly,physmode_chem_resonly,BL_2023_fold0,BL_2023,0,0,14524,773,0.24201511701542375,30,216.9,0.05157229522227971,0.06783528556394472,-0.45804798598147833,0.9545449307272729,1.2074965806751707,1.564513408669253,1.3513423517169616,0.5958055919258001physmode_chem_resonly,physmode_chem_resonly,SL_2020_fold0,SL_2020,0,0,15234,91,0.25430385962981517,30,227.5,0.7200208719667445,0.5949068516167579,0.2474005179168134,0.7104555951369987,0.867524899676364,1.1234567901234567,1.9660493827160495,0.5901314257306861physmode_chem_resonly,physmode_chem_resonly,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.29343013194486056,29,220.8,0.3110262419521154,0.38001391522965616,-0.03468115944762662,0.7294453990482191,1.0171927826846872,0.0,1.1627218934911243,0.8353620714857822physmode_chem_resonly,physmode_chem_resonly,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2351808498675729,27,156.2,0.1889391947438238,0.20496460220456228,-0.10452745122426332,0.7950460697954146,1.0509650110264457,1.06006735061477,1.3692536612107447,0.5559316213869463physmode_chem_resonly,physmode_chem_resonly,BL_2023_fold0,BL_2023,0,0,14524,773,0.24227322028882825,30,176.0,0.0507654628010279,0.06726929285925334,-0.46175743482407605,0.9555885555466004,1.2090316129866123,1.564513408669253,1.3513423517169616,0.595630500603445physmode_chem_resonly,physmode_chem_resonly,SL_2020_fold0,SL_2020,0,0,15234,91,0.2542632597304264,30,182.9,0.7175496701742623,0.5948951889786989,0.2472123542766933,0.7105813835348401,0.8676333414472809,1.1234567901234567,1.9660493827160495,0.5901314257306861physmode_chem_resonly,physmode_chem_resonly,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.29355739495366195,29,195.8,0.31115442119426984,0.3798654154860678,-0.0354250391566544,0.7296508705911745,1.017558370243786,0.0,1.1627218934911243,0.8437946129933163123version https://git-lfs.github.com/spec/v1oid sha256:b3ff49b5968df510737f6b17d680dbab55b09214524eebfebbd0df802e90e254size 86706123version https://git-lfs.github.com/spec/v1oid sha256:9e2d24dcfa3287eb938a16a1b64abfebecd25f28c0b42c043130d0b4cf473901size 86706123456789101112131415161718192021model,protocol,task,study,fold,seed,n_train,n_test,val_spearman,epochs_run,runtime_s,spearman,pearson,r2,mae,rmse,ef10,ef20,ndcg10diffmode_chem,diffmode_chem,LM_2019_fold0,LM_2019,0,0,14125,1128,0.31421059478893937,30,188.0,0.18742392511922207,0.18490248244539054,-0.0892373446150474,0.7860893896781471,1.0436653427936629,1.6784399718067193,1.2367452423838985,0.5766802341652447diffmode_chem,diffmode_chem,LM_2019_fold1,LM_2019,1,0,14658,1128,0.38955539991082394,30,176.9,0.15723571014190613,0.1759922056069073,-0.07068258399681948,0.7910542933602506,1.0347379315928291,1.590101025922155,1.4355078706241677,0.5554850935013661diffmode_chem,diffmode_chem,LM_2019_fold2,LM_2019,2,0,14503,1128,0.3400921965315191,30,174.8,0.22914407967133882,0.2286961215536851,-0.16956229338861095,0.8119033205838684,1.0814630353152435,1.501762080037591,1.4134231341530268,0.5546524897689122diffmode_chem,diffmode_chem,LM_2019_fold3,LM_2019,3,0,14810,1128,0.16862254872371008,21,131.4,0.11048654281426462,0.0982893183454592,-0.006223375848317669,0.7824445335162006,1.0031068630724573,1.1484062964993342,1.2588299788550394,0.5545490327476419diffmode_chem,diffmode_chem,LM_2019_fold4,LM_2019,4,0,14932,1128,0.4205488643606401,30,137.7,0.1726714157626415,0.1842640904363966,-0.07909843871368594,0.7823676077411775,1.0387966315973902,1.3250841882684627,1.3471689247396035,0.5699423562281103diffmode_chem,diffmode_chem,BL_2023_fold0,BL_2023,0,0,14524,773,0.2984922995584352,30,124.6,0.16352765511664247,0.17988980545233027,-0.34431401937791817,0.9237047909152962,1.1594455680378029,2.086017878225671,1.7052653485952132,0.6315937691747966diffmode_chem,diffmode_chem,BL_2023_fold1,BL_2023,1,0,14731,773,0.3493399855960888,30,123.1,0.02020349989611467,0.029769819358444815,-0.19867848169113667,0.8990139693894061,1.0948417634162415,1.6948895260583574,1.2226430801248698,0.5727171720870179diffmode_chem,diffmode_chem,BL_2023_fold2,BL_2023,2,0,15189,773,0.4148575054871671,30,128.0,0.02248734735166023,0.06418858968308987,-0.5679356494177923,0.9973976847969892,1.2521723748182314,1.564513408669253,1.3191675338189386,0.6022095202954032diffmode_chem,diffmode_chem,BL_2023_fold3,BL_2023,3,0,14825,773,0.36780076940786544,30,121.5,0.12471280441238437,0.18702648919651438,-0.23854411985439405,0.8948869020551597,1.1128989735180623,2.4771462303929837,1.8661394380853278,0.6982943598551752diffmode_chem,diffmode_chem,BL_2023_fold4,BL_2023,4,0,15192,773,0.30633240047681237,30,123.9,0.15457111312648683,0.18575962635632337,-0.3427711442539052,0.9289803816653779,1.1587800266279011,2.737898465171192,2.059188345473465,0.7028527758930931diffmode_chem,diffmode_chem,SL_2020_fold0,SL_2020,0,0,15234,91,0.2839009454578356,30,121.9,0.6967391930807401,0.5868889511856452,-0.06830788584290692,0.891668461467866,1.0335897844470894,1.1234567901234567,1.9660493827160495,0.6289422319355026diffmode_chem,diffmode_chem,SL_2020_fold1,SL_2020,1,0,15298,91,0.2422342755265388,30,122.0,0.6633562345143935,0.6280758272211519,0.338725553691242,0.6756504642685036,0.8131878131699413,2.2469135802469133,2.5277777777777777,0.7111420615094333diffmode_chem,diffmode_chem,SL_2020_fold2,SL_2020,2,0,15311,91,0.4241683868415778,30,129.7,0.6601448007632345,0.6430998166419561,0.29518632814406187,0.6919598060322332,0.8395318000346281,1.1234567901234567,2.808641975308642,0.5859845297804481diffmode_chem,diffmode_chem,SL_2020_fold3,SL_2020,3,0,15423,91,0.3338127952174057,30,205.0,0.7554972491738288,0.7114363594845684,0.398591882900346,0.6568318903036825,0.7755050565322751,2.2469135802469133,2.5277777777777777,0.7111420615094333diffmode_chem,diffmode_chem,SL_2020_fold4,SL_2020,4,0,15910,91,0.4142441763866123,30,236.3,0.6447874504185617,0.593958422729697,0.30367471946303326,0.68886569956993,0.8344610549898014,1.1234567901234567,2.2469135802469133,0.5733930912185594diffmode_chem,diffmode_chem,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.32509881979208494,30,232.3,0.3510024549593566,0.39288526836221327,-0.18091481739920368,0.7928207613357151,1.086699045169395,0.0,1.3565088757396448,0.9129692219762638diffmode_chem,diffmode_chem,ZC_2023_fold1,ZC_2023,1,0,15183,131,0.23464487360979983,30,232.8,0.4816112248349945,0.39445163045083126,-1.7569790301205472,1.398526667183592,1.6604153167166393,3.1005917159763317,2.9068047337278102,0.9458556267828268diffmode_chem,diffmode_chem,ZC_2023_fold2,ZC_2023,2,0,15342,131,0.40881667246608205,30,127.8,0.41570867808334305,0.3362849587064982,-1.6874023396203652,1.355211365029557,1.6393298428448801,3.1005917159763317,2.3254437869822486,0.949631125726013diffmode_chem,diffmode_chem,ZC_2023_fold3,ZC_2023,3,0,15378,131,0.3658474053592278,30,122.3,0.3386505513290174,0.2759899481660234,-1.376384721264119,1.2338055241995185,1.5415526964646653,1.5502958579881658,2.3254437869822486,0.921422434042951diffmode_chem,diffmode_chem,ZC_2023_fold4,ZC_2023,4,0,15877,131,0.37768171105217657,30,119.0,0.373669204245739,0.40090912798023376,-1.6750331841770376,1.3659042247663473,1.6355528662278114,1.5502958579881658,1.7440828402366864,0.9047767110921536123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105model,protocol,task,study,fold,seed,n_train,n_test,val_spearman,epochs_run,runtime_s,spearman,pearson,r2,mae,rmse,ef10,ef20,ndcg10,sourcediffmode_r1,diffmode,LM_2019_fold0,LM_2019,0,0,14125,1128,0.290441620068634,30,188.6,0.1677438126463867,0.2160877712171064,-0.1909468497245432,0.822789261239262,1.091305114599355,2.2968125929986685,1.4355078706241675,0.6068737479353953,screen_diffmode.csvdiffmode_r1,diffmode,LM_2019_fold0,LM_2019,0,1,14125,1128,0.2920721717943555,30,182.2,0.1863912254684067,0.2533761202838675,-0.1733080000068483,0.8208533173204325,1.0831934284246154,1.678439971806719,1.3913383976818856,0.5765727934471258,screen_diffmode.csvdiffmode_r1,diffmode,LM_2019_fold0,LM_2019,0,2,14125,1128,0.2833452682022616,30,182.1,0.1911880641173595,0.2182393895168806,-0.1686071989651549,0.8213901414767382,1.0810213699677986,1.4134231341530268,1.457592607095309,0.5455652325734811,screen_diffmode.csvdiffmode_r1,diffmode,BL_2023_fold0,BL_2023,0,0,14524,773,0.292987623105898,30,184.2,0.1348174238876658,0.1601292900608244,-0.4722708948809515,0.9700604015250448,1.2133717078058768,2.2163939956147747,1.8339646201873048,0.6389637283368933,screen_diffmode.csvdiffmode_r1,diffmode,BL_2023_fold0,BL_2023,0,1,14524,773,0.3200185397577906,30,184.5,0.0862254255195474,0.0775506911229654,-0.4949725781885747,0.9752819241828166,1.2226907150667374,2.086017878225671,1.6730905306971904,0.6148450282063442,screen_diffmode.csvdiffmode_r1,diffmode,BL_2023_fold0,BL_2023,0,2,14524,773,0.2806686762795787,30,185.6,0.0122621783611556,0.0554340583469623,-0.7300494925456986,1.0435611904559017,1.3153134607739172,2.086017878225671,1.3191675338189386,0.6269463303624755,screen_diffmode.csvdiffmode_r1,diffmode,SL_2020_fold0,SL_2020,0,0,15234,91,0.2756442292947208,30,191.0,0.6926845927272319,0.5738680910549664,0.1132631989106842,0.7915188742770844,0.9416670139301556,1.123456790123457,1.9660493827160492,0.6057017136194932,screen_diffmode.csvdiffmode_r1,diffmode,SL_2020_fold0,SL_2020,0,1,15234,91,0.2536800800965781,30,191.3,0.6808759871603697,0.598587924878275,0.2331176289830322,0.7176157853433064,0.8757181852131236,1.123456790123457,1.6851851851851851,0.568823278001556,screen_diffmode.csvdiffmode_r1,diffmode,SL_2020_fold0,SL_2020,0,2,15234,91,0.278174974091878,30,196.6,0.6541599124357808,0.5745168670669537,0.1743644929524758,0.7653959889251453,0.9086448555737016,1.123456790123457,1.6851851851851851,0.5901314257306861,screen_diffmode.csvdiffmode_r1,diffmode,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3151868482828932,30,194.5,0.3612180663974368,0.3977916044120833,-0.0034956209410474,0.7121070335825322,1.0017462845993566,0.0,1.3565088757396448,0.858553191723801,screen_diffmode.csvdiffmode_r1,diffmode,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.3227868129898681,30,261.6,0.3526508455799642,0.416304245793946,-0.3049716395769559,0.8196145958686603,1.1423535515215255,0.0,1.3565088757396448,0.8634564230990107,screen_diffmode.csvdiffmode_r1,diffmode,ZC_2023_fold0,ZC_2023,0,2,15246,131,0.3128125224290059,30,249.8,0.3705212743314682,0.4454302182742381,-0.1768157275681461,0.7595563739367569,1.0848113775906556,0.0,0.9689349112426036,0.8638653720062903,screen_diffmode.csvphysmode_r1,physmode,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2467841242336836,18,110.8,0.2485444188719757,0.2555128753356853,0.0439672472864055,0.7752576718105477,0.9777692751687136,1.4134231341530268,1.214660505912757,0.5997499802125813,screen_physmode.csvphysmode_r1,physmode,LM_2019_fold0,LM_2019,0,1,14125,1128,0.2326097214188172,26,153.5,0.1893774928685759,0.2283193754745124,-0.0047545272934748,0.775553468219226,1.0023744460948698,1.943456809460412,1.457592607095309,0.5908720499101262,screen_physmode.csvphysmode_r1,physmode,LM_2019_fold0,LM_2019,0,2,14125,1128,0.2332191414511322,20,115.6,0.2428566822597579,0.2987593005881257,-0.0055476953383857,0.7745491931823163,1.002770012630608,2.2968125929986685,1.545931552979873,0.6416395672895646,screen_physmode.csvphysmode_r1,physmode,BL_2023_fold0,BL_2023,0,0,14524,773,0.25191246304311,30,177.0,0.0767195575264848,0.1030352158001495,-0.6099515083475957,0.9936702731601595,1.268838648280792,0.7822567043346265,0.5469719042663892,0.5605784397998451,screen_physmode.csvphysmode_r1,physmode,BL_2023_fold0,BL_2023,0,1,14524,773,0.2462937483664688,30,178.0,-0.1393677690027275,-0.0589638733652358,-0.3034841615621384,0.912002381067458,1.14170231113395,1.0430089391128354,0.4826222684703433,0.5744830069705568,screen_physmode.csvphysmode_r1,physmode,BL_2023_fold0,BL_2023,0,2,14524,773,0.2743374875766678,30,178.5,0.0187105173486677,0.0712135145728694,-0.4143267815709439,0.9327234766273764,1.189254719452885,0.7822567043346265,0.4504474505723204,0.5747931086395833,screen_physmode.csvphysmode_r1,physmode,SL_2020_fold0,SL_2020,0,0,15234,91,0.2401297800237474,30,184.1,0.7161465721570581,0.6094324649760355,0.0135835037021103,0.833701306032938,0.993185006073792,1.123456790123457,2.2469135802469133,0.6265050459420874,screen_physmode.csvphysmode_r1,physmode,SL_2020_fold0,SL_2020,0,1,15234,91,0.2345973719367499,30,184.5,0.7443688037280572,0.6447066469931779,-0.2708128251787443,0.9056091407866595,1.1273033192694035,1.123456790123457,1.9660493827160492,0.6057017136194932,screen_physmode.csvphysmode_r1,physmode,SL_2020_fold0,SL_2020,0,2,15234,91,0.2526672288934466,30,185.2,0.7289004355760373,0.6285472376500598,-0.3865102178198916,0.9623958609466042,1.1775016609688451,1.123456790123457,1.9660493827160492,0.6081388996129083,screen_physmode.csvphysmode_r1,physmode,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.2956346050689764,30,186.5,0.3425978679991012,0.3454367773053377,0.0417105602994432,0.735244354048303,0.9789225901820288,0.0,1.3565088757396448,0.8215753100539939,screen_physmode.csvphysmode_r1,physmode,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.2876865063244492,30,185.7,0.3605950960291135,0.3617093817942127,-0.1232988318736847,0.7607106305658817,1.0598579288634544,0.0,1.1627218934911243,0.80466125949473,screen_physmode.csvphysmode_r1,physmode,ZC_2023_fold0,ZC_2023,0,2,15246,131,0.297848630946925,30,232.6,0.2789914907908714,0.3227452792271504,0.0662308724240634,0.7108023636725568,0.9663173006309168,0.0,1.1627218934911243,0.7185561844910624,screen_physmode.csvphysset_phys,physset_phys,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2687695560791401,30,176.6,0.2261803867686573,0.2141332307679285,-0.0353013895510943,0.7771078697724716,1.0174976130338071,1.855117863575848,1.4355078706241675,0.5815719179973243,screen_physset_phys.csvphysset_phys,physset_phys,LM_2019_fold0,LM_2019,0,1,14125,1128,0.2676980421316578,30,173.5,0.2325027050466438,0.1900159723082206,-0.015608086187961,0.7680292726197704,1.0077738283512363,1.2367452423838985,1.2809147153261806,0.5777360443745317,screen_physset_phys.csvphysset_phys,physset_phys,LM_2019_fold0,LM_2019,0,2,14125,1128,0.3095482681146391,30,173.6,0.1262954634049477,0.201261284944186,-0.045975159129928,0.7836307878860882,1.0227292711852125,1.678439971806719,1.47967734356645,0.5685618195003925,screen_physset_phys.csvphysset_phys,physset_phys,BL_2023_fold0,BL_2023,0,0,14524,773,0.272821211681535,30,175.9,0.0788492433494355,0.1243085909682087,-0.3943952554574665,0.9180715173352776,1.1808451471469623,1.303761173891044,0.7400208116545265,0.6019358677884883,screen_physset_phys.csvphysset_phys,physset_phys,BL_2023_fold0,BL_2023,0,1,14524,773,0.2786742564300354,30,176.9,0.1220114122985789,0.1489346996083183,-0.3128246057385873,0.9069191475855464,1.145785587038779,1.4341372912801484,1.1261186264308012,0.6076763739386363,screen_physset_phys.csvphysset_phys,physset_phys,BL_2023_fold0,BL_2023,0,2,14524,773,0.279852358237276,30,175.3,0.0077203731721975,0.0616238787815402,-0.4296547500127354,0.9248474691120996,1.1956817119324108,1.0430089391128354,0.6756711758584808,0.5928412097096678,screen_physset_phys.csvphysset_phys,physset_phys,SL_2020_fold0,SL_2020,0,0,15234,91,0.2748685905632091,30,182.3,0.7365600494488966,0.642770472929568,0.1246484036331219,0.7923374697566032,0.935602245007712,1.123456790123457,2.2469135802469133,0.6218743991312842,screen_physset_phys.csvphysset_phys,physset_phys,SL_2020_fold0,SL_2020,0,1,15234,91,0.2471344200697915,30,184.8,0.7476771463738957,0.6346651249831773,0.0503527921614656,0.811430502478238,0.9744984193531406,2.2469135802469133,2.2469135802469133,0.6833233240167038,screen_physset_phys.csvphysset_phys,physset_phys,SL_2020_fold0,SL_2020,0,2,15234,91,0.2449787084678075,30,171.0,0.7367110158923016,0.6625679855095815,0.064405461168858,0.8124902831329094,0.9672613405302312,1.123456790123457,2.2469135802469133,0.6245726753552082,screen_physset_phys.csvphysset_phys,physset_phys,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.318238616243729,30,182.4,0.4324737479069813,0.4897567823337808,0.1127558090245538,0.6649037347751037,0.9419364039050796,0.0,1.3565088757396448,0.8632685416670854,screen_physset_phys.csvphysset_phys,physset_phys,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.3123234346625412,30,187.2,0.4089772902981861,0.4731024282723195,-0.1473335477100394,0.7705731065446184,1.0711365669967658,0.0,1.7440828402366864,0.896004248923607,screen_physset_phys.csvphysset_phys,physset_phys,ZC_2023_fold0,ZC_2023,0,2,15246,131,0.305742191456743,30,283.0,0.3683656865968274,0.4154595744743412,-0.1611866467533953,0.7677943238433991,1.0775837063403264,0.0,1.3565088757396448,0.8350180844297778,screen_physset_phys.csvdiffmode,diffmode_r2,LM_2019_fold0,LM_2019,0,0,14125,1128,0.282639351757627,30,276.2,0.1570175443455368,0.2190950058281003,-0.1681830055304141,0.8148089772168189,1.0808251518590295,2.2968125929986685,1.4355078706241675,0.6047319795033147,screen2_diffmode.csvdiffmode,diffmode_r2,LM_2019_fold0,LM_2019,0,1,14125,1128,0.2855216141600908,30,211.1,0.1802440936518503,0.2332204739915886,-0.195419689422807,0.824655807633326,1.0933525016488703,1.4134231341530268,1.5238468165087318,0.5537633108529288,screen2_diffmode.csvdiffmode,diffmode_r2,BL_2023_fold0,BL_2023,0,0,14524,773,0.3002378779346425,30,181.1,0.1400451207043729,0.1672689020668901,-0.5051473507702418,0.9736018433472936,1.2268444715351918,2.3467701130038794,1.7052653485952132,0.6515469560284467,screen2_diffmode.csvdiffmode,diffmode_r2,BL_2023_fold0,BL_2023,0,1,14524,773,0.318327120964403,30,183.0,0.1141402570879787,0.1210801682155954,-0.562960205436265,0.9972562629170476,1.250184071348974,2.607522347782088,1.7696149843912592,0.6554020278366156,screen2_diffmode.csvdiffmode,diffmode_r2,SL_2020_fold0,SL_2020,0,0,15234,91,0.2824879690790335,30,194.1,0.6849251181320101,0.582687246223036,0.1254343248514069,0.7845338810603697,0.9351821425139928,1.123456790123457,1.6851851851851851,0.6057017136194932,screen2_diffmode.csvdiffmode,diffmode_r2,SL_2020_fold0,SL_2020,0,1,15234,91,0.2595323863643736,30,194.5,0.6960440458476589,0.5558980727236192,0.2617879025131279,0.6868855892066527,0.8591926835964732,1.123456790123457,1.6851851851851851,0.575791946915841,screen2_diffmode.csvdiffmode,diffmode_r2,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3183691866694787,30,194.3,0.4017001143142326,0.4600530114850143,0.0649601116066381,0.6769811633889001,0.9669746047922976,0.0,1.3565088757396448,0.8730764288511608,screen2_diffmode.csvdiffmode,diffmode_r2,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.3255560555284204,30,161.2,0.3084282189471741,0.3708955071826126,-0.2073373410002459,0.7723779706924244,1.0987890326693,0.0,1.3565088757396448,0.8296203505761917,screen2_diffmode.csvphysmode,physmode_r2,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2562059764195902,30,269.9,0.2120546583348246,0.2250943010247288,0.006986676272465,0.7674208962799689,0.9965005401826332,2.031795755344976,1.3913383976818856,0.6026969657627911,screen2_physmode.csvphysmode,physmode_r2,LM_2019_fold0,LM_2019,0,1,14125,1128,0.2424821609167327,30,204.3,0.1960087347837574,0.175054973003649,-0.0133215199252709,0.7712103378692056,1.0066387250848434,1.501762080037591,1.3029994517973216,0.5663091742821726,screen2_physmode.csvphysmode,physmode_r2,BL_2023_fold0,BL_2023,0,0,14524,773,0.2671220930901215,30,169.5,0.0806782677942093,0.118980205432518,-0.4510708454611363,0.9390028330773348,1.2046040228188886,1.1733850565019397,0.7078459937565036,0.593939282454112,screen2_physmode.csvphysmode,physmode_r2,BL_2023_fold0,BL_2023,0,1,14524,773,0.2507392154060195,30,171.5,-0.1068357439749397,-0.0245749540823536,-0.2626130093430239,0.9013839516388722,1.123660542535506,0.9126328217237308,0.5147970863683663,0.5720682215529829,screen2_physmode.csvphysmode,physmode_r2,SL_2020_fold0,SL_2020,0,0,15234,91,0.2522726740123254,30,182.5,0.751971496860544,0.6722848264045386,-0.0960543034730012,0.8777649387062251,1.0469261000749324,1.123456790123457,2.2469135802469133,0.6265050459420874,screen2_physmode.csvphysmode,physmode_r2,SL_2020_fold0,SL_2020,0,1,15234,91,0.2412973841142647,30,183.6,0.7397800661123158,0.5961323513542008,-0.057005134614066,0.8492315879480524,1.0281075292706343,1.123456790123457,1.6851851851851851,0.6100712701997876,screen2_physmode.csvphysmode,physmode_r2,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3014958592446097,30,182.7,0.3566064317682116,0.376357106317426,0.0872656006435249,0.7133595901648052,0.9553713400170404,0.0,1.3565088757396448,0.8510923133188733,screen2_physmode.csvphysmode,physmode_r2,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.2924898785828297,30,177.2,0.3208187136622768,0.3628520155623636,-0.1581334977113766,0.7637253419304167,1.0761661094528707,0.0,1.1627218934911243,0.7646214680392115,screen2_physmode.csvphysmode_base,physmode_base_r2,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2702196206121905,30,270.5,0.2715681112355866,0.2587519347196434,0.001323959068177,0.7641726148681921,0.999337802649764,1.501762080037591,1.501762080037591,0.5884602240010234,screen2_physmode_base.csvphysmode_base,physmode_base_r2,LM_2019_fold0,LM_2019,0,1,14125,1128,0.2815457851801681,30,204.7,0.2034759270627609,0.1765689366793822,-0.0168383995561043,0.7712920208529548,1.0083840550511447,1.4134231341530268,1.3029994517973216,0.5846752232901281,screen2_physmode_base.csvphysmode_base,physmode_base_r2,BL_2023_fold0,BL_2023,0,0,14524,773,0.2637136787185595,30,147.5,0.1446397730883762,0.1714170764219112,-0.41798550071328,0.9344770658790178,1.1907919662557596,2.086017878225671,1.190468262226847,0.6364365978523792,screen2_physmode_base.csvphysmode_base,physmode_base_r2,BL_2023_fold0,BL_2023,0,1,14524,773,0.264899193939853,30,164.2,-0.0594346448649978,-0.0006701014324952,-0.3593378612011109,0.9234675506411788,1.1659064572817317,1.1733850565019397,0.5147970863683663,0.5786475853522886,screen2_physmode_base.csvphysmode_base,physmode_base_r2,SL_2020_fold0,SL_2020,0,0,15234,91,0.2442602125437196,30,182.4,0.7546413555249144,0.6851873171404362,0.139307695697689,0.7869991960597562,0.9277350211097296,2.2469135802469133,2.2469135802469133,0.6523446746875419,screen2_physmode_base.csvphysmode_base,physmode_base_r2,SL_2020_fold0,SL_2020,0,1,15234,91,0.240307350346363,30,183.7,0.7343969504662381,0.6169916603374309,-0.1009531759332111,0.8771923380074921,1.049263137291892,1.123456790123457,1.9660493827160492,0.6057017136194932,screen2_physmode_base.csvphysmode_base,physmode_base_r2,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3081760972469327,30,182.0,0.4009420751492374,0.4408792114402307,0.1768931233179184,0.6731510003388838,0.9072523766025372,0.0,1.5502958579881658,0.8718742578610837,screen2_physmode_base.csvphysmode_base,physmode_base_r2,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.2935287552464011,30,184.3,0.3577586512990043,0.3744800661986652,-0.0803931515809113,0.7641708385625868,1.0394196213163422,0.0,1.3565088757396448,0.831972311579842,screen2_physmode_base.csvdiffmode_chem,diffmode_chem,LM_2019_fold0,LM_2019,0,0,14125,1128,0.3142204117754098,30,189.2,0.1872893434900325,0.1847252755921994,-0.0893539000656553,0.7861010074896759,1.043721180775573,1.678439971806719,1.2367452423838985,0.5767041044950181,screen3_diffmode_chem.csvdiffmode_chem,diffmode_chem,LM_2019_fold0,LM_2019,0,1,14125,1128,0.3001418319278777,30,184.4,0.2336340719733307,0.2554863707904023,-0.0747693607523496,0.785667036493953,1.0367108390695516,1.7667789176912834,1.47967734356645,0.5886640009325984,screen3_diffmode_chem.csvdiffmode_chem,diffmode_chem,BL_2023_fold0,BL_2023,0,0,14524,773,0.298244613512577,30,187.9,0.165023095578556,0.1813182861266774,-0.3442218245807,0.923910703064264,1.159405809216464,2.086017878225671,1.7374401664932362,0.6372411945118275,screen3_diffmode_chem.csvdiffmode_chem,diffmode_chem,BL_2023_fold0,BL_2023,0,1,14524,773,0.2898178922997037,30,189.7,-0.0327299620624499,0.0235925193526093,-0.3669553131454297,0.93510742617812,1.169168644425939,1.9556417608365664,1.0939438085327784,0.6216144343034881,screen3_diffmode_chem.csvdiffmode_chem,diffmode_chem,SL_2020_fold0,SL_2020,0,0,15234,91,0.2838789714040239,30,197.8,0.6975240416950478,0.586855589943709,-0.0670505212039871,0.8910628862187757,1.0329813541034796,1.123456790123457,1.9660493827160492,0.6289422319355026,screen3_diffmode_chem.csvdiffmode_chem,diffmode_chem,SL_2020_fold0,SL_2020,0,1,15234,91,0.2573974136581348,30,196.3,0.6798743144180982,0.5503603793123423,0.0149248349354113,0.8374143616593146,0.9925095088264396,1.123456790123457,2.2469135802469133,0.5801615034961355,screen3_diffmode_chem.csvdiffmode_chem,diffmode_chem,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3253148486091529,30,196.4,0.3517853026788425,0.3932665235106771,-0.1820667659169581,0.7931885493506912,1.087228937844862,0.0,1.3565088757396448,0.9129692219762638,screen3_diffmode_chem.csvdiffmode_chem,diffmode_chem,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.3135586367289853,30,166.2,0.3690796216649501,0.4175162257858681,-0.1534552388979992,0.7711712720569308,1.073990333444374,0.0,1.5502958579881658,0.9053987357057888,screen3_diffmode_chem.csvphysmode_chem,physmode_chem,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2717659250562976,30,174.9,0.2519183405595599,0.2126524559666706,-0.018737842741497,0.7674252863911193,1.0093254409120218,1.590101025922155,1.3029994517973216,0.5678216221817232,screen3_physmode_chem.csvphysmode_chem,physmode_chem,LM_2019_fold0,LM_2019,0,1,14125,1128,0.2525953302197197,30,178.4,0.2297662119197892,0.1946612169759499,-0.0040910777116793,0.7633470792234744,1.0020434524511863,1.3250841882684627,1.214660505912757,0.5723909955603704,screen3_physmode_chem.csvphysmode_chem,physmode_chem,BL_2023_fold0,BL_2023,0,0,14524,773,0.2732065770116141,30,177.6,0.0724537182724969,0.1045778360487072,-0.5796821450570708,0.9809717105010002,1.2568540694720498,1.4341372912801484,0.933069719042664,0.5971090587743544,screen3_physmode_chem.csvphysmode_chem,physmode_chem,BL_2023_fold0,BL_2023,0,1,14524,773,0.2668994825852527,30,180.6,-0.0679958623833267,0.0073590955051948,-0.3882723283307248,0.9295593807437634,1.178249691019301,1.0430089391128354,0.4504474505723204,0.5812434157179073,screen3_physmode_chem.csvphysmode_chem,physmode_chem,SL_2020_fold0,SL_2020,0,0,15234,91,0.2628920750104602,30,186.5,0.7464546861972772,0.6559728376650281,-0.1372543943529913,0.9021227749494406,1.0664212808393605,1.123456790123457,2.2469135802469133,0.6802453128122745,screen3_physmode_chem.csvphysmode_chem,physmode_chem,SL_2020_fold0,SL_2020,0,1,15234,91,0.2491899027254595,30,186.2,0.6826270769872996,0.5384676589811979,0.0535768294665787,0.8081506571353791,0.972842809577899,1.123456790123457,2.2469135802469133,0.6485775176347771,screen3_physmode_chem.csvphysmode_chem,physmode_chem,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3057808942996451,30,187.6,0.343422063309405,0.4482562591339118,0.1686476015600487,0.6626019384711981,0.9117852798715704,0.0,1.5502958579881658,0.802469676263688,screen3_physmode_chem.csvphysmode_chem,physmode_chem,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.3045151024466699,30,186.7,0.3511099586954831,0.3918428591949291,-0.1044323688016368,0.7647178973007294,1.0509197716023115,0.0,1.3565088757396448,0.8864316325927759,screen3_physmode_chem.csvphysmode_chem_hard,physmode_chem_hard,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2775517811092687,30,181.0,0.2662772301087413,0.2354558127534392,-0.0235938272257947,0.7674546273141764,1.0117281404460956,1.501762080037591,1.4134231341530268,0.5707786078060577,screen3_physmode_chem_hard.csvphysmode_chem_hard,physmode_chem_hard,LM_2019_fold0,LM_2019,0,1,14125,1128,0.2504785711412486,30,178.2,0.222349197732146,0.1869091618831123,-0.0019016564746994,0.7648221851376626,1.00095037806927,1.3250841882684627,1.214660505912757,0.5714834454527261,screen3_physmode_chem_hard.csvphysmode_chem_hard,physmode_chem_hard,BL_2023_fold0,BL_2023,0,0,14524,773,0.2697416359519174,30,171.2,0.0789499028643337,0.1127451823803344,-0.5418608987780504,0.9685462693795852,1.2417169184256274,1.4341372912801484,0.9652445369406868,0.5976885069466265,screen3_physmode_chem_hard.csvphysmode_chem_hard,physmode_chem_hard,BL_2023_fold0,BL_2023,0,1,14524,773,0.2658477541348743,30,182.8,-0.0742816929490921,0.001195939732399,-0.3538885676087757,0.9195362506807814,1.1635671761935922,0.9126328217237308,0.4504474505723204,0.5831562558124326,screen3_physmode_chem_hard.csvphysmode_chem_hard,physmode_chem_hard,SL_2020_fold0,SL_2020,0,0,15234,91,0.261676246718127,30,187.7,0.7483700119607877,0.6628407320951876,-0.0434333041142442,0.8599314543080854,1.021485810862592,1.123456790123457,2.2469135802469133,0.6553459299123532,screen3_physmode_chem_hard.csvphysmode_chem_hard,physmode_chem_hard,SL_2020_fold0,SL_2020,0,1,15234,91,0.2507970332259511,30,187.2,0.6940195341261032,0.5382715367488041,-0.0219869772701462,0.8508984341316825,1.0109336950657797,1.123456790123457,2.2469135802469133,0.6510147036281924,screen3_physmode_chem_hard.csvphysmode_chem_hard,physmode_chem_hard,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3038740261956795,30,188.3,0.345249626823557,0.4438589262155318,0.166981347336127,0.6692190217067495,0.9126985541846184,0.0,1.5502958579881658,0.8620134736135769,screen3_physmode_chem_hard.csvphysmode_chem_hard,physmode_chem_hard,ZC_2023_fold0,ZC_2023,0,1,15246,131,0.3020208159835577,30,184.6,0.339703536641847,0.3911007541779204,-0.0096134206029712,0.7400030583313858,1.004795212148689,0.0,1.3565088757396448,0.8653203205093658,screen3_physmode_chem_hard.csvphysmode_chem_k32,physmode_chem_k32,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2682874538264894,30,172.9,0.2340832961124123,0.2150758180150324,-0.0454834756291382,0.7742159383788157,1.0224888647984542,1.4134231341530268,1.3029994517973216,0.5788517573188751,abl_physmode_chem_k32.csvphysmode_chem_k32,physmode_chem_k32,BL_2023_fold0,BL_2023,0,0,14524,773,0.2709414083555514,30,178.5,0.0326198195823929,0.0827534704611453,-0.4239024535027047,0.9351820325042768,1.1932738410417347,1.0430089391128354,0.8043704474505723,0.5894637076893863,abl_physmode_chem_k32.csvphysmode_chem_k32,physmode_chem_k32,SL_2020_fold0,SL_2020,0,0,15234,91,0.2586117850666312,30,183.6,0.7066666648651725,0.6306833488194076,-0.0700106274771199,0.8765719896489448,1.0344131592736687,1.123456790123457,2.5277777777777777,0.6622378389300523,abl_physmode_chem_k32.csvphysmode_chem_k32,physmode_chem_k32,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3091917559519999,30,203.3,0.3769742550051179,0.4522246184281014,0.1898455145007154,0.6639923248013467,0.9000858201843697,0.0,1.3565088757396448,0.8655550242963613,abl_physmode_chem_k32.csvphysmode_chem_k8,physmode_chem_k8,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2609194176351233,30,181.0,0.2341188969310429,0.2214848651146335,-0.0065405860682452,0.7658949451782504,1.0032649644854077,1.7667789176912834,1.3692536612107449,0.578710369314605,abl_physmode_chem_k8.csvphysmode_chem_k8,physmode_chem_k8,BL_2023_fold0,BL_2023,0,0,14524,773,0.2825576572655232,30,180.3,-0.0024660857353815,0.04026565105025,-0.4231704326269168,0.9370936337415068,1.1929670736594176,0.9126328217237308,0.5791467221644121,0.5869861535132382,abl_physmode_chem_k8.csvphysmode_chem_k8,physmode_chem_k8,SL_2020_fold0,SL_2020,0,0,15234,91,0.2537442442406351,30,183.7,0.7266849676233159,0.620976217952645,0.0629723761059058,0.8116813704248641,0.9680018522137068,1.123456790123457,2.5277777777777777,0.6100712701997876,abl_physmode_chem_k8.csvphysmode_chem_k8,physmode_chem_k8,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.301940443834164,30,183.5,0.3761252511403233,0.4606261865931295,0.1006570032133625,0.6693391966569515,0.9483369626804118,0.0,1.3565088757396448,0.8399495851802989,abl_physmode_chem_k8.csvphysmode_chem_lin,physmode_chem_lin,LM_2019_fold0,LM_2019,0,0,14125,1128,0.273585371749509,30,177.2,0.2619550499323335,0.2268849151252498,-0.0168779971498611,0.7673818358567492,1.0084036890428658,1.590101025922155,1.3913383976818856,0.5703112070208362,abl_physmode_chem_lin.csvphysmode_chem_lin,physmode_chem_lin,BL_2023_fold0,BL_2023,0,0,14524,773,0.2740810434100152,30,175.9,0.0734685320765242,0.1060007768152768,-0.5300443720090369,0.9665852616701328,1.2369496265749356,1.4341372912801484,0.9008949011446408,0.5977771919159384,abl_physmode_chem_lin.csvphysmode_chem_lin,physmode_chem_lin,SL_2020_fold0,SL_2020,0,0,15234,91,0.2624078784101277,30,184.7,0.7507508156491328,0.6577454145349008,-0.0999115634009055,0.8902914362376207,1.0487666655598686,1.123456790123457,2.2469135802469133,0.6802453128122745,abl_physmode_chem_lin.csvphysmode_chem_lin,physmode_chem_lin,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.3099716488480306,30,203.2,0.3586820808272712,0.4527749575245513,0.1640011009542171,0.6590688488808752,0.9143297529808232,0.0,1.5502958579881658,0.8494805068897584,abl_physmode_chem_lin.csvphysmode_chem_novq,physmode_chem_novq,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2847100310959689,30,173.2,0.2276522774485597,0.2280906135743764,-0.0360936100832123,0.7711871183180674,1.0178868370619063,1.590101025922155,1.4134231341530268,0.5934475155436558,abl_physmode_chem_novq.csvphysmode_chem_novq,physmode_chem_novq,BL_2023_fold0,BL_2023,0,0,14524,773,0.2692669433800547,30,179.4,0.0486345910443565,0.0811913604382947,-0.5809669961148107,0.9762641770107356,1.2573651033060356,1.564513408669253,0.8365452653485952,0.6100814450121763,abl_physmode_chem_novq.csvphysmode_chem_novq,physmode_chem_novq,SL_2020_fold0,SL_2020,0,0,15234,91,0.2568487480732547,30,184.4,0.7349585858894526,0.6254806266603599,-0.1771054992986609,0.9083529529417608,1.0849449071526212,1.123456790123457,2.2469135802469133,0.6066886982131091,abl_physmode_chem_novq.csvphysmode_chem_novq,physmode_chem_novq,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.301752823400383,30,178.4,0.3414952655772901,0.4331630802722312,0.1466977391555918,0.6864214361510204,0.9237436110448096,0.0,1.3565088757396448,0.863259582020358,abl_physmode_chem_novq.csvphysmode_chem_resonly,physmode_chem_resonly,LM_2019_fold0,LM_2019,0,0,14125,1128,0.2351808498675729,27,156.2,0.1889391947438238,0.2049646022045622,-0.1045274512242633,0.7950460697954146,1.0509650110264457,1.06006735061477,1.3692536612107449,0.5559316213869463,abl_physmode_chem_resonly.csvphysmode_chem_resonly,physmode_chem_resonly,BL_2023_fold0,BL_2023,0,0,14524,773,0.2422732202888282,30,176.0,0.0507654628010279,0.0672692928592533,-0.461757434824076,0.9555885555466004,1.2090316129866123,1.564513408669253,1.3513423517169616,0.595630500603445,abl_physmode_chem_resonly.csvphysmode_chem_resonly,physmode_chem_resonly,SL_2020_fold0,SL_2020,0,0,15234,91,0.2542632597304264,30,182.9,0.7175496701742623,0.5948951889786989,0.2472123542766933,0.7105813835348401,0.8676333414472809,1.123456790123457,1.9660493827160492,0.5901314257306861,abl_physmode_chem_resonly.csvphysmode_chem_resonly,physmode_chem_resonly,ZC_2023_fold0,ZC_2023,0,0,15246,131,0.2935573949536619,29,195.8,0.3111544211942698,0.3798654154860678,-0.0354250391566544,0.7296508705911745,1.017558370243786,0.0,1.1627218934911243,0.8437946129933163,abl_physmode_chem_resonly.csv123456789101112131415model,label,n_runs,n_tasks,seeds,mean_all,mean_seed0,val_seed0,runtime_s,delta_vs_physset,p_vs_physsetphysset_phys,PhysSet-LNP (tuned reference),12,4,"0,1,2",0.3520270433797958,0.3685158568684927,0.2836744936419033,186.875,0.0,physmode_base,Base-Only (nested control),8,4,"0,1",0.35099852487014005,0.39294782874952866,0.2715924022803506,189.91250000000002,0.024685779232413572,0.375physmode_r1,"PhysMode r1 (alpha=0.1, lam_base>0)",12,4,"0,1,2",0.31737009717941445,0.34600210413865495,0.2586152430923793,172.66666666666666,-0.022259945378460128,0.625physmode,"PhysMode r2 (lam_base=0, alpha=1)",8,4,"0,1",0.31888532816765,0.3503277136894474,0.2692741506916617,192.65,-0.01793433582766771,0.875physmode_chem,PhysMode-LNP (chemistry-only modes),8,4,"0,1",0.3262195241947481,0.35356220208468475,0.27841136784450427,182.3125,-0.014699847432430333,1.0physmode_chem_hard,"PhysMode, hard assignment",8,4,"0,1",0.32757966841355296,0.3597116929393549,0.2782109224937481,182.625,-0.008550356577760161,1.0physmode_chem_novq,"PhysMode, no codebook (free prototypes)",4,4,0,0.3381851799899147,0.3381851799899147,0.27814463648741533,178.85,-0.030076869527200352,0.375physmode_chem_k8,"PhysMode, K=8",4,4,0,0.33361575748982514,0.33361575748982514,0.2747904407438614,182.125,-0.03464629202728993,0.25physmode_chem_k32,"PhysMode, K=32",4,4,0,0.3375860088912739,0.3375860088912739,0.27675810080016794,184.575,-0.030676040625841186,0.25physmode_chem_resonly,"PhysMode, residual only",4,4,0,0.31710218722834593,0.31710218722834593,0.25631868121012236,177.72500000000002,-0.051159862288769134,0.125physmode_chem_lin,"PhysMode, linear mixing",4,4,0,0.36121411962131544,0.36121411962131544,0.28001148560442063,185.25,-0.007047929895799651,1.0diffmode_r1,DiffMode r1,12,4,"0,1,2",0.3242282340527311,0.3391159739146803,0.2935650801880365,199.33333333333334,-0.029146075602434776,0.375diffmode,DiffMode r2,8,4,"0,1",0.3353180641288518,0.34592197437403804,0.29593359636019545,199.4375,-0.022340075143076996,0.625diffmode_chem,DiffMode-LNP (chemistry-only modes),8,4,"0,1",0.331434978679551,0.35040544586061967,0.3054147113252909,188.4875,-0.017856603656495385,0.875METHODS.md+201-20
PROGRESS.md+4-1
README.md+15-3
code/METHODS.md+201-20
code/PROGRESS.md+4-1
code/README.md+15-1
code/scripts/mode_ablate.shAdded+21
code/scripts/mode_analyze.pyAdded+84
code/scripts/mode_diagnose.pyAdded+101
code/scripts/mode_results.pyAdded+133
code/scripts/report.py+46-1
code/scripts/upload_hf.py+15-3
code/src/lnpbench/models/backbone.py+8-1
code/src/lnpbench/models/physmode.pyAdded+532
code/src/lnpbench/registry.py+39
manuscript/PAPER_TODO.md+2
manuscript/PAPER_zh.md+90-7
results/REPORT.md+26-1
results/abl_physmode_chem_k32.csvAdded+9
results/abl_physmode_chem_k8.csvAdded+5
results/abl_physmode_chem_lin.csvAdded+9
results/abl_physmode_chem_novq.csvAdded+5
results/abl_physmode_chem_resonly.csvAdded+9
results/diag_diffmode_chem.npzAdded+3
results/diag_physmode_chem.npzAdded+3
results/full20_diffmode_chem.csvAdded+21
results/mode_decoders.csvAdded+105
results/mode_decoders_summary.csvAdded+15