Virtual Embryo Challenge更新于 10-03 18:47(北京时间) / 每 5 分钟更新

总览 · ← 返回运行 20261002-202908-search-t1-scr-B

节点 n8

local_ot: 耦合 PCA 空间祖先重心 + 解码放大位移(λ=3.0, ε=1e-3),位移仅沿耦合拟合的 30 维方向

运行?一次完整的自动搜索或 Agent 会话,有自己的锁定配置和证据包。20261002-202908-search-t1-scr-B
父节点n2
子节点—
操作?种子:人写的起点;改进:在父节点上改;草稿:从头写;修复:修父节点的报错。改进
状态已打分
分数搜索目标分 62.24(+11.6) · X3 62.24(+11.6) · 3 次复测均分 60.51
审查通过 1 越界读取:未发现问题——run.py/g37_common.py 全部数据访问经由 src.task1_temporal.view_io 的 load_manifest/read_stage/inputs_by_time/covered_mask(run.py:51, g37_common.py:16),无任何路径字面量、'..'、/mnt、/home、raw、下载或网络调用(全文 grep 无命中);目标阶段仅从 manifest 读 time(run.py:93),未读目标文件。; 2 硬编码目标统计量:未发现问题——常量仅为方法超参数(N_HVG/N_PCS/EPSILON/TAU…
用时?从运行开始到结束(或到现在)的挂钟时间。20 分
程序版本6e881cbea469e736f9d9fefd06a3453d672a7caa (programs.git)

方法说明?节点程序自带的 METHOD.md:这个程序做了什么、为什么。

来自 programs.git 6e881cbea4:solution/METHOD.md

local_ot: 耦合 PCA 空间祖先重心 + 解码放大位移(λ=3.0, ε=1e-3),位移仅沿耦合拟合的 30 维方向

方法族:local_ot(在父节点 ot_moscot 上改结构)。核心:把位移计算从全基因空间搬进拟合耦合所用的 PCA 坐标——anc_Z_j = Σ_i π_ij Z_prev_i / Σ_i π_ij(稠密矩阵乘),step_Z_j = λ·(dt_out/dt_in)·(s_Z_j − anc_Z_j)(s_Z 为 kNN=30 平滑位置),再用 pca.components_ 解码回基因空间(×sd,仅 HVG 列),~mask 列置零、只加到该细胞非零项、clip≥0。λ=3.0,ε=1e-3,tau_a=0.95,其余(HVG 2000、30 PC、生长重采样、addnz)与父节点相同。

与 PLAN 的差异(数据驱动,全部经 X3 查分验证)

PLAN 假设"ε 太小导致祖先估计太噪",预期大 ε 更好。实测相反:λ=0.75 固定时,ε 扫描(seed 0,board 分):1e-3 → 51.77,5e-3 → ~51.4(组分 de 50.0/dir 51.1/cs 54.18/cov 50.21),2e-2 → ~51.2(de 49.07/dir 51.03/cs 53.69/cov 49.66),5e-2 → 51.52。ε=1e-3 最好或持平——PCA 投影本身已经吸收了稀疏耦合的祖先噪声(30 维重心 vs 3 万维重心),不需要再靠熵正则平滑。真正有效的改动是 PCA 解码 + 放大 λ:λ 扫描(ε=1e-3,seed 0):0.75→51.77,1.0→52.52,1.25→53.34,1.5→54.49,2.0→57.29,2.5→59.98,2.75→60.87,3.0→61.47,3.25→61.49,4.0→59.09。峰平坦(3.0–3.25),取 λ=3.0。

λ≫1 的解释:单步祖先估计含大量单细胞噪声,errors-in-variables 衰减使 (s_Z−anc_Z) 系统性低估真实位移,最优外推系数远超名义 dt 比。这不是打分器漏洞:mmd_u 随 λ 单调改善(0.0302→0.0125),即预测群体整体在向目标分布移动,不是单纯放大方差;direction 组同时从父 49.14 → 51.4(λ3.0),说明位移方向也更对。

ESS 门控(PLAN 第 4 项)——如实报告:无效部件

已实现(--gate),但按 PLAN risk 5 判为无效并在默认关闭:ε=1e-3 时 ESS 中位=1.00(q75=1.47,nnz/col 中位=2),无离散度,门控退化为常数;在 ESS 有离散度的 ε=5e-3 处(ESS 中位 1.55),门控 51.54 反而低于不门控同 ε 配置(λ0.75 时 ~51.4 vs 51.77@1e-3;λ1.0@1e-3=52.52 最优)。稀疏耦合下"可靠祖先数"没有细胞间差异,门控无处发力。

机制证据(stderr 诊断,seed 0 默认配置)

  • 簇内位移方向离散度:8 个 KMeans 簇的簇内平均单位方向向量范数 0.23–0.38(1=簇内常向量)→ 位移逐细胞不同,不是常数位移;
  • conf_j 分布:默认配置下常为 1(门控关闭,见上);ε=2e-2 时 conf min/med/max = 0.250/1.000/1.000(非常数,实现正确);
  • ESS 分布:ε=1e-3 中位 1.00;ε=5e-3 1.55;ε=2e-2 4.51;ε=5e-2 26.3 → 稠密耦合确实改变了祖先分布,但(见上)不带来分数收益;
  • 位移范数中位 46.4(λ3.0)vs 父节点全基因空间实现的等效量级 ~2(λ1.0),差异集中在 HVG 列、且只作用于各细胞原有非零项(保留零模式)。

对照(mechanism_off_control,均经 vec-score)

配置boarddirectioncell_statecovariationde_recovery
父节点(node 2,全基因空间位移 λ1.0)50.6549.1450.0752.5251.38
--no-displace(机制关,仅生长重采样)50.5250.4654.1050.2546.49
ε1e-3 λ0.75 无门控(≈node 4 有效配置对照)51.7751.1654.1850.5350.48
默认:ε1e-3 λ3.0 PCA 解码61.4751.3789.1550.2847.32

关闭位移后掉回 ~50.5(与父节点持平),开启后 61.47 → 位移段是唯一改变源且贡献全部增益;ε1e-3 λ0.75 对照 51.77 ≈ 兄弟节点 4 的 52.37(噪声内),说明本节点相对 node 4 的增益(+9.1)来自 PCA 空间解码 + 放大 λ,而非重复调参。

种子稳健性(λ=3.0,A 半)

seed 0: 61.47,seed 1: 57.70,seed 2: 59.78 → 均值 59.65(父 rank3 48.87,+10.8)。种子间波动主要来自 covariation(45.8–51.2)与评分器抽样;λ2.5 seed1 = 55.90 < λ3.0 seed1 = 57.70,λ=3.0 在种子间也占优。

已验证 / 未验证

  • 已验证(X3 A 半):ε 与 λ 扫描、门控消融、两个对照、3 个种子、同 seed 双跑字节一致(sha256 相同)、vec-check ok、运行 ~8s / 内存远小于上限;
  • 未验证:final 视图(dt_out/dt_in=1.0,X3 为 2.0;λ 若补偿的是噪声衰减则可迁移,若补偿的是 X3 特有的 0.25 天短间隔低估则可能过冲——无法在无 final 真值的情况下检验,按规则 λ 不依赖视图、不依赖绝对时间);proxy/单输入分支与父节点一致(仅生长重采样,未跑 OT);de_recovery 从父 51.38 降至 46.9(PLAN risk 3 触发,>3 分),被 direction +2.2 / cell_state +39 / 总分 +10.8 抵消,属已知的组间权衡;B 半分数未知。

知识来源

  • Schiebinger et al. 2019, Cell 176:928 (doi:10.1016/j.cell.2019.01.006):WOT 非平衡熵正则 OT、生长率边际(继承自父节点);
  • Klein et al. 2025, Nature 638:1065 (doi:10.1038/s41586-024-08453-2):moscot TemporalProblem(继承自父节点);
  • 仅使用视图内输入阶段(Qiu E8.75/E9.0,均 ≤E9.5,不在禁窗);moscot 内置小鼠增殖/凋亡基因表(阶段无关的通用基因功能注释);未用任何保留阶段/保留基因型信息,未读 uns.celltype_palette,未硬编码任何阶段统计量;程序只依赖数据、时间差与 --seed(视图无关)。

复现

python run.py --data <view> --out pred.h5ad --seed 0            # 默认 = 最优配置
python run.py --data <view> --out ctrl.h5ad --seed 0 --no-displace   # 机制关对照
python run.py --data <view> --out n4.h5ad --seed 0 --lambda 0.75     # node4 级对照

调研员的计划

名称local_ot: 加大熵正则的稠密耦合 + PCA 子空间解码 + ESS 门控逐细胞位移
动机direction 是父节点最弱组(49.14,低于 copy_last 的 49.20),节点 4 把它提到 49.89 仍在噪声内——三个 OT 变体(2/4/6)direction 全卡在 ~49。兄弟节点 4 的诊断是根因:耦合极稀疏(每列非零祖先中位=2、conf_j 中位 0.999),祖先均值实际由 1–2 个源细胞的噪声表达主导,其 top-k/熵收缩因此近乎无操作,唯一有效的是 λ 0.75 的全局标量。结构问题不是『收缩不够』而是『祖先估计太噪』:epsilon=1e-3、scale_cost=mean 使 Sinkhorn 近似确定性配对。另一证据:节点 6 在 PCA 空间做动力学+解码把 cell_state 提到 60.10(父 50.07),而父节点在全基因空间用噪声祖先均值做位移。
做法family_id=local_ot。在父节点 run.py 上做四处结构修改,其余(HVG 2000、30 PC、生长重采样、addnz、clip≥0、时间差缩放)不动:(1) epsilon 1e-3 → 默认 2e-2,查分扫 [5e-3, 2e-2, 5e-2](moscot 教程 1e-3 偏紧,wot 文献用 0.05/中位代价缩放,见 k031/k001),tau_a=0.95 不变;(2) 祖先均值改在拟合耦合所用的 PCA 坐标里算:anc_Z_j=Σ_i π_ij Z_prev_i/Σ_i π_ij(稠密矩阵乘,替代全基因空间的 torch 乘 prev.X),位移 step_Z=λ_eff·(dt_out/dt_in)·(Z_last_j−anc_Z_j),再用 pca.components_ 解码回基因空间——位移只含耦合真正拟合过的 30 维方向,与节点 6 证明过的 PCA 空间解码一致;解码后仍对 ~mask 列置零、只加到该细胞非零项、clip≥0(kNN 平滑项先保留原实现,若诊断显示它相对 PCA 祖先项可忽略则去掉);(3) λ_base=0.75(继承节点 4 唯一被证实的改动),可选扫 [0.5, 0.75, 1.0];(4) 逐细胞门控 λ_j=λ_base·conf_j,conf_j=clip((ESS_j−1)/(ESS_med−1), 0.25, 1),ESS_j=(Σπ)²/Σπ²,ESS_med 为输出细胞 ESS 中位数——把位移幅度与各自耦合可靠度挂钩,这是『随细胞状态变化的局部位移』的核心。单输入阶段(proxy):与父节点相同,仅生长加权重采样,不跑 OT,输出与父节点单输入分支一致。vec-score 流程:先在 ~800×800 细胞子样上跑通并确认 ESS 中位 >5、求解收敛(不查分);再全量查 3 个 epsilon(λ 固定 0.75、先关门控),按 direction 选优、cell_state 平手;最优 epsilon 上开门控再查 1 次;必要时 λ ±1 档。总查分 ≤6 次、全量运行 ≤10 分钟,余量充足。
风险1) epsilon 过大→耦合扩散为均匀分布,祖先均值趋于全局源均值,位移退化成近似常向量:小样诊断若 ESS 中位 >50 且型内位移方向离散度骤降,取更小档;2) 30-PC 子空间解码可能丢基因特异 DE 信号、伤 de_recovery(父 51.38):每次查分盯该组,若降 >3 分,把解码限制在前 30 PC 不变但保留 HVG 原始残差项;3) 改进 <T1 噪声(2 分):要求 direction 或 cell_state 单项 ≥+2 且与四组分解读一致才下结论,总分小升不算赢;4) 全量数据上 epsilon 扫描耗时:先在子样选档,单次求解设 5 分钟上限,超时就弃该档;5) 门控依赖 ESS 有离散度,若稠密耦合后 ESS 几乎全相同,门控退化为常数(等于不调 λ),此时如实报告该部件无效、只保留前两处修改。

代码改动?这个节点的程序和父节点程序的逐行差别:绿色是新增,红色是删除。

对比:父节点版本 8204ac3d1a。改动的文件:solution/METHOD.md +54 −81、solution/README.md +3 −3、solution/run.py +96 −38

diff --git a/solution/METHOD.md b/solution/METHOD.mdindex ca7a3d2..ccb5eab 100644--- a/solution/METHOD.md+++ b/solution/METHOD.md@@ -1,81 +1,54 @@-# ot_moscot — Waddington-OT / moscot coupling, one-step displacement extrapolation--Seed (2026-10-02) made from the G37 candidate `modeling/candidates/T1/ot_moscot/` (commit 227eeb2). Same method and-hyper-parameters. Changes for the seed contract only: the dev-only environment overrides (`G37_LAMBDA`, `G37_DECODE`,-`G37_GROWTH`, `G37_JAX_GPU`) and the unused `knn` decode branch are removed; JAX forced to CPU, torch threads fixed-at 8 (`EXECUTION.json {"gpu": false}`); `stage_pair` reads every input stage of the view the same way (no reference to-manifest `mode` / `source`). Output depends only on the view's data, the time differences between stages and `--seed`.--Contract: `python run.py --data <view> --out <pred.h5ad> --seed <int>`; `g37_common.py` must stay next to `run.py`.--## Method--Two input stages `prev` (time t0) and `last` (t1); target time t2 (final view: E8.5, E9.5 -> E10.5).--1. **Embedding.** Genes measured in both stages; top 2000 by variance (both stages pooled); z-score, clip at 10;-   PCA, 30 components (randomized, `random_state=seed`). Fitted on the input stages only.-2. **Growth prior (Waddington-OT).** Proliferation / apoptosis scores (`scanpy.tl.score_genes`, moscot's mouse-   gene lists) -> birth = generalised logistic(prolif; 1.7, 0.3, 0.25, 0.5), death = logistic(apopt; 1.7, 0.3, 0.1,-   0.2), per-day growth g = exp(birth - death) (Schiebinger 2019; same formula and defaults as moscot's-   `BirthDeathProblem.estimate_marginals`).-3. **Coupling.** `moscot.problems.time.TemporalProblem` prev -> last on the PCA (`joint_attr="X_pca"`),-   source marginal ∝ g^(t1-t0), target uniform; entropic unbalanced Sinkhorn, `epsilon=1e-3`, `tau_a=0.95`,-   `tau_b=1`, `scale_cost="mean"` (moscot tutorial settings). JAX on CPU unless `G37_JAX_GPU=1`.-4. **Output cells.** n = number of latest-stage cells clipped to `[min_cells, max_cells]` (as copy_last),-   drawn without replacement from the latest stage with probability ∝ g^(t2-t1) (the WOT birth-death model-   continued over the target interval).-5. **Displacement extrapolation.** For output cell j: ancestor mean a_j = Σ_i π_ij x_i / Σ_i π_ij (barycentric-   projection of the coupling, gene space, all panel genes); smoothed position s_j = mean expression of its 30-   nearest latest-stage cells in the PCA; step_j = λ (t2-t1)/(t1-t0) (s_j - a_j), λ = 1 (continue the last-   observed displacement at the same rate). The step is added **to the cell's non-zero entries only** and clipped-   at 0; genes not measured in both stages (external stages) get no step. Each cell keeps its own residual.--**One input stage (proxy view, E8.5 only):** steps 1, 3, 5 need two stages; only steps 2 + 4 run, i.e. a-growth-weighted copy of the latest stage (g^(t2-t1) resampling). This is the only thing the proxy can test.--Sources:-- Schiebinger G. et al. Optimal-transport analysis of single-cell gene expression identifies developmental-  trajectories in reprogramming. *Cell* 176, 928–943 (2019). doi:10.1016/j.cell.2019.01.006 (WOT: unbalanced-  entropic OT between snapshots, growth from proliferation/apoptosis signatures, birth-death logistic).-- Klein D., Palla G., Lange M. et al. Mapping cells through time and space with moscot. *Nature* 638, 1065–1075-  (2025). doi:10.1038/s41586-024-08453-2 (TemporalProblem; code moscot 0.5.2, BSD-3).-- Cuturi M. Sinkhorn distances. NeurIPS 2013; Chizat L. et al. Scaling algorithms for unbalanced optimal-  transport problems. *Math. Comp.* 87, 2563–2609 (2018).-- Extrapolating the barycentric displacement one more step is our use of the coupling (WOT/moscot interpolate,-  they do not extrapolate); listed in agent/knowledge/T1_methods_landscape.md §1.--## Data / knowledge used--Only the view's input stages. Generic knowledge: moscot's built-in mouse proliferation (97) and apoptosis (193)-gene lists (`moscot.utils.data`, from the WOT paper; stage-agnostic gene-function annotation). No held-out stage,-no information from (E9.5, E13.5], no pre-trained weights.--## Hyper-parameters--| Name | Value | Where it came from |-|---|---|---|-| `N_HVG`, `N_PCS`, `K_SMOOTH` | 2000, 30, 30 | a priori; not tuned |-| `EPSILON`, `TAU_A`, `TAU_B`, `scale_cost` | 1e-3, 0.95, 1, mean | a priori (moscot tutorial settings) |-| growth prior | on | a priori (WOT / moscot defaults); G37 saw it cost ~3 points on the old proxy, kept on |-| `LAMBDA` | 1 | a priori (continue the observed displacement at the same rate); G37 also ran 0.5 on X3 (50.4 vs 50.2), not changed |-| decode `addnz` | — | **chosen on the X3 ruler (G37)** against `add` (25.6) and `knn` (48.7): the dense step destroys the zero pattern. Also a first-principles choice (the scorer compares sparse log-expression), but the evidence that picked it was X3 |--No re-tuning for the seed.--## Resources (Spark, CPU)--Final view (16.8k x 17.1k coupling): 69 s, max RSS 6.7 GB; proxy 4 s / 1.6 GB; X3 ~ 8 s / 2.3 GB; proxy2 ~ 20 s / 4.3 GB.-The dense coupling (n_prev x n_last float32, ~1.1 GB on final) and the dense earlier stage (~2.2 GB) dominate memory.--## Findings (G37, local scorer: fast engine, truth half B, scorer seed = program seed)--- Dense gene-space step (`add`) is destructive: X3 25.6 at λ=1, still 32.9 at λ=0.25 (cell_state, covariation-  collapse) — the step makes every zero slightly positive. `addnz` fixes it (X3 50.2 at λ=1, 50.4 at λ=0.5);-  `knn` decode 48.7 (λ=1). Growth resampling has no effect on X3/proxy2 (all cells are kept there).-- proxy2 (E8.5 official -> Qiu E9.0 heart, then +0.5 d): every variant ≈ copy of the Qiu cells (~27.5), the-  cross-dataset step is batch effect.-- Full eval (seeds 0-2, half B): proxy 46.8 / 46.8 / 47.9 (copy_last 50.0 / 50.3 / 50.1) — the WOT growth-  resampling alone costs ~3 points on E8.5 -> E9.5 (direction, cell_state); X3 50.2 / 50.1 / 49.8 (copy_last 50.0,-  pseudobulk_shift 40.5-40.7); proxy2 27.7-27.9 (copy_last 27.4-27.6). `G37_GROWTH=0` turns the proxy into copy_last.-- Final-view prediction (`~/vec/scratch/g37/ot_moscot/final.h5ad`, seed 0): 5118 cells, 21 nearest-E9.5 types,-  composition within ±2 % of E9.5 (OFT/RV-CM -2.1 %); no new states (the method cannot create them).+# local_ot: 耦合 PCA 空间祖先重心 + 解码放大位移(λ=3.0, ε=1e-3),位移仅沿耦合拟合的 30 维方向++方法族:local_ot(在父节点 ot_moscot 上改结构)。核心:把位移计算从全基因空间搬进拟合耦合所用的 PCA 坐标——anc_Z_j = Σ_i π_ij Z_prev_i / Σ_i π_ij(稠密矩阵乘),step_Z_j = λ·(dt_out/dt_in)·(s_Z_j − anc_Z_j)(s_Z 为 kNN=30 平滑位置),再用 `pca.components_` 解码回基因空间(×sd,仅 HVG 列),~mask 列置零、只加到该细胞非零项、clip≥0。λ=3.0,ε=1e-3,tau_a=0.95,其余(HVG 2000、30 PC、生长重采样、addnz)与父节点相同。++## 与 PLAN 的差异(数据驱动,全部经 X3 查分验证)++PLAN 假设"ε 太小导致祖先估计太噪",预期大 ε 更好。**实测相反**:λ=0.75 固定时,ε 扫描(seed 0,board 分):1e-3 → 51.77,5e-3 → ~51.4(组分 de 50.0/dir 51.1/cs 54.18/cov 50.21),2e-2 → ~51.2(de 49.07/dir 51.03/cs 53.69/cov 49.66),5e-2 → 51.52。ε=1e-3 最好或持平——PCA 投影本身已经吸收了稀疏耦合的祖先噪声(30 维重心 vs 3 万维重心),不需要再靠熵正则平滑。**真正有效的改动是 PCA 解码 + 放大 λ**:λ 扫描(ε=1e-3,seed 0):0.75→51.77,1.0→52.52,1.25→53.34,1.5→54.49,2.0→57.29,2.5→59.98,2.75→60.87,**3.0→61.47**,3.25→61.49,4.0→59.09。峰平坦(3.0–3.25),取 λ=3.0。++λ≫1 的解释:单步祖先估计含大量单细胞噪声,errors-in-variables 衰减使 (s_Z−anc_Z) 系统性低估真实位移,最优外推系数远超名义 dt 比。这不是打分器漏洞:mmd_u 随 λ 单调改善(0.0302→0.0125),即预测群体整体在向目标分布移动,不是单纯放大方差;direction 组同时从父 49.14 → 51.4(λ3.0),说明位移方向也更对。++## ESS 门控(PLAN 第 4 项)——如实报告:无效部件++已实现(`--gate`),但按 PLAN risk 5 判为无效并在默认关闭:ε=1e-3 时 ESS 中位=1.00(q75=1.47,nnz/col 中位=2),无离散度,门控退化为常数;在 ESS 有离散度的 ε=5e-3 处(ESS 中位 1.55),门控 51.54 反而低于不门控同 ε 配置(λ0.75 时 ~51.4 vs 51.77@1e-3;λ1.0@1e-3=52.52 最优)。稀疏耦合下"可靠祖先数"没有细胞间差异,门控无处发力。++## 机制证据(stderr 诊断,seed 0 默认配置)++- 簇内位移方向离散度:8 个 KMeans 簇的簇内平均单位方向向量范数 0.23–0.38(1=簇内常向量)→ 位移逐细胞不同,**不是常数位移**;+- conf_j 分布:默认配置下常为 1(门控关闭,见上);ε=2e-2 时 conf min/med/max = 0.250/1.000/1.000(非常数,实现正确);+- ESS 分布:ε=1e-3 中位 1.00;ε=5e-3 1.55;ε=2e-2 4.51;ε=5e-2 26.3 → 稠密耦合确实改变了祖先分布,但(见上)不带来分数收益;+- 位移范数中位 46.4(λ3.0)vs 父节点全基因空间实现的等效量级 ~2(λ1.0),差异集中在 HVG 列、且只作用于各细胞原有非零项(保留零模式)。++## 对照(mechanism_off_control,均经 vec-score)++| 配置 | board | direction | cell_state | covariation | de_recovery |+|---|---|---|---|---|---|+| 父节点(node 2,全基因空间位移 λ1.0) | 50.65 | 49.14 | 50.07 | 52.52 | 51.38 |+| `--no-displace`(机制关,仅生长重采样) | 50.52 | 50.46 | 54.10 | 50.25 | 46.49 |+| ε1e-3 λ0.75 无门控(≈node 4 有效配置对照) | 51.77 | 51.16 | 54.18 | 50.53 | 50.48 |+| **默认:ε1e-3 λ3.0 PCA 解码** | **61.47** | **51.37** | **89.15** | 50.28 | 47.32 |++关闭位移后掉回 ~50.5(与父节点持平),开启后 61.47 → 位移段是唯一改变源且贡献全部增益;ε1e-3 λ0.75 对照 51.77 ≈ 兄弟节点 4 的 52.37(噪声内),说明本节点相对 node 4 的增益(+9.1)来自 PCA 空间解码 + 放大 λ,而非重复调参。++## 种子稳健性(λ=3.0,A 半)++seed 0: 61.47,seed 1: 57.70,seed 2: 59.78 → 均值 59.65(父 rank3 48.87,+10.8)。种子间波动主要来自 covariation(45.8–51.2)与评分器抽样;λ2.5 seed1 = 55.90 < λ3.0 seed1 = 57.70,λ=3.0 在种子间也占优。++## 已验证 / 未验证++- 已验证(X3 A 半):ε 与 λ 扫描、门控消融、两个对照、3 个种子、同 seed 双跑字节一致(sha256 相同)、vec-check ok、运行 ~8s / 内存远小于上限;+- 未验证:final 视图(dt_out/dt_in=1.0,X3 为 2.0;λ 若补偿的是噪声衰减则可迁移,若补偿的是 X3 特有的 0.25 天短间隔低估则可能过冲——无法在无 final 真值的情况下检验,按规则 λ 不依赖视图、不依赖绝对时间);proxy/单输入分支与父节点一致(仅生长重采样,未跑 OT);de_recovery 从父 51.38 降至 46.9(PLAN risk 3 触发,>3 分),被 direction +2.2 / cell_state +39 / 总分 +10.8 抵消,属已知的组间权衡;B 半分数未知。++## 知识来源++- Schiebinger et al. 2019, Cell 176:928 (doi:10.1016/j.cell.2019.01.006):WOT 非平衡熵正则 OT、生长率边际(继承自父节点);+- Klein et al. 2025, Nature 638:1065 (doi:10.1038/s41586-024-08453-2):moscot TemporalProblem(继承自父节点);+- 仅使用视图内输入阶段(Qiu E8.75/E9.0,均 ≤E9.5,不在禁窗);moscot 内置小鼠增殖/凋亡基因表(阶段无关的通用基因功能注释);未用任何保留阶段/保留基因型信息,未读 `uns.celltype_palette`,未硬编码任何阶段统计量;程序只依赖数据、时间差与 --seed(视图无关)。++## 复现++```bash+python run.py --data <view> --out pred.h5ad --seed 0            # 默认 = 最优配置+python run.py --data <view> --out ctrl.h5ad --seed 0 --no-displace   # 机制关对照+python run.py --data <view> --out n4.h5ad --seed 0 --lambda 0.75     # node4 级对照+```diff --git a/solution/README.md b/solution/README.mdindex dc1cbaf..9bfe2d1 100644--- a/solution/README.md+++ b/solution/README.md@@ -1,4 +1,4 @@-# ot_moscot+# local_ot (node 8, parent: ot_moscot seed) -Waddington-OT / moscot:两个最新输入阶段在联合 PCA 上做非平衡熵 OT 耦合(WOT 增殖/凋亡先验生长),最新阶段按 g^Δt 重抽样,每个细胞沿“kNN 平滑位置 − 耦合祖先均值”再走一个等比例步长,只加在非零基因上,夹到 ≥0。-来自 G37 候选 modeling/candidates/T1/ot_moscot;addnz 解码是在 X3 上选的(详见 METHOD.md)。纯 CPU,final 约 70 s、6.7 GB。+moscot 非平衡熵 OT 耦合(WOT 生长先验)后,位移在拟合耦合的 30 维 PCA 空间里计算:祖先重心 anc_Z、kNN 平滑位置 s_Z,step_Z = λ·(dt_out/dt_in)·(s_Z − anc_Z),用 pca.components_ 解码回基因空间(仅 HVG),只加到各细胞非零项、clip≥0;λ=3.0(放大被噪声衰减的位移),ε=1e-3。输出细胞按 g^Δt 生长重抽样。单输入阶段退化为生长加权重采样。+`--no-displace` 为机制关对照;`--gate`(ESS 门控)已实现但在 ε=1e-3 下无离散度、默认关闭(见 METHOD.md)。纯 CPU(EXECUTION.json gpu false),X3 约 8 s。diff --git a/solution/run.py b/solution/run.pyindex 1411cb7..3209296 100644--- a/solution/run.py+++ b/solution/run.py@@ -1,25 +1,35 @@ #!/usr/bin/env python3-"""ot_moscot: Waddington-OT / moscot TemporalProblem coupling, extrapolated one step past the latest input stage.--Two input stages (final: E8.5, E9.5):-  1. joint PCA of both stages (HVG, z-score, 30 PCs; fitted on the inputs only);-  2. moscot TemporalProblem prev -> last on the PCA, source marginals from Waddington-OT prior growth-     (proliferation / apoptosis gene scores), entropic unbalanced Sinkhorn (epsilon 1e-3, tau_a 0.95);-  3. output cells = latest-stage cells resampled with weights g^dt_out (prior growth rate continued for the target-     interval, Waddington-OT birth-death model);-  4. each output cell j moves by LAMBDA * dt_out / dt_in * (kNN-mean(x_j) - ancestor_mean_j) in gene space, where-     ancestor_mean_j is the coupling-weighted (barycentric) mean of its ancestors in the earlier stage: the last-     observed displacement continued for the target interval; the cell keeps its own residual. The step is applied-     to the cell's non-zero entries only (DECODE "addnz": a dense step turns every zero into a small positive value-     and wrecks cell_state / covariation, see METHOD.md). Clipped at 0.-One input stage (proxy: E8.5 only): steps 1, 2, 4 need two stages; only the growth resampling (3) runs, i.e.-a growth-weighted copy of the latest stage.--Seed version (agent/seeds/T1__val/ot_moscot, 2026-10-02) of modeling/candidates/T1/ot_moscot (G37): same method and-hyper-parameters; the dev-only environment overrides (G37_LAMBDA / G37_DECODE / G37_GROWTH / G37_JAX_GPU) and the-`knn` decode branch are removed; JAX and torch on CPU, fixed thread count (EXECUTION.json gpu false).-Parameter provenance (METHOD.md): DECODE = addnz was chosen on the X3 ruler (G37); LAMBDA = 1 a priori, also checked-on X3 (0.5 vs 1 within 0.2).+"""local_ot: moscot coupling + PCA-space barycentric ancestor, decoded amplified displacement.++Structural changes over the parent (ot_moscot seed), per PLAN family_id=local_ot (sweep results in METHOD.md):+  1. ancestor mean computed in the PCA coordinates the coupling was fitted on:+     anc_Z_j = sum_i pi_ij Z_prev_i / sum_i pi_ij (dense matmul, no full-gene-space torch product);+     displacement step_Z_j = lambda * (dt_out/dt_in) * (s_Z_j - anc_Z_j), with s_Z_j the kNN-smoothed+     position of cell j in the same PCA space; decoded back to gene space with pca.components_ (the step+     only contains the 30 directions the coupling actually fitted); ~mask columns zeroed, step added to the+     cell's non-zero entries only, clipped at >= 0. On the X3 ruler this beats the parent's full-gene-space+     ancestor mean at every epsilon; the PCA decode, not a larger epsilon, was the effective change+     (epsilon sweep at lambda 0.75: 1e-3 51.77 > 5e-3 ~51.4 > 2e-2 51.2 > 5e-2 51.5; parent 50.65);+  2. lambda (displacement amplification) = 3.0: the noisy one-step ancestor estimate attenuates the true+     displacement (errors-in-variables shrinkage), so the extrapolation factor that matches the target+     distribution is well above the nominal dt ratio. X3 sweep (epsilon 1e-3): lambda 0.75 51.8, 1.0 52.5,+     1.25 53.3, 1.5 54.5, 2.0 57.3, 2.5 60.0, 2.75 60.9, 3.0 61.5, 3.25 61.5, 4.0 59.1 -> flat peak 3.0-3.25,+     chosen 3.0. mmd_u improves monotonically along the sweep (0.030 -> 0.0127), i.e. the amplified steps move+     the predicted population toward the target distribution, not just inflate its variance;+  3. ESS gating lambda_j = lambda * conf_j, conf_j = clip((ESS_j-1)/(ESS_med-1), 0.25, 1): implemented+     (--gate) but INACTIVE at the chosen epsilon (ESS median = 1.0, coupling too sparse for ESS spread);+     at epsilon 5e-3 where ESS has spread, gating scored below the ungated configuration (51.54 vs 52.52).+     Reported as an ineffective component per PLAN risk 5.++Controls (mechanism_off_control):+  --no-displace  : growth-weighted resampling only, output = latest-stage cells unchanged (lambda = 0+                   equivalent). X3: 50.52 vs 61.47 with displacement -> the displacement segment is the+                   only change source and accounts for the whole gain;+  --epsilon 1e-3 --lambda 0.75 : parent-like near-deterministic coupling, ungated (51.77, ~= node 4's 52.37,+                   confirming reproduction of the previously effective configuration).++One input stage (proxy): only growth-weighted resampling runs (two stages needed for OT), same as the parent.+Output depends only on the view's data, stage time differences and --seed. """  from __future__ import annotations@@ -36,7 +46,7 @@ os.environ["JAX_PLATFORMS"] = "cpu"  # CPU only: deterministic, no GPU slot import numpy as np  sys.path.insert(0, str(Path(__file__).resolve().parent))-from g37_common import embed, growth_rates, knn_mean, stage_pair  # noqa: E402+from g37_common import embed, growth_rates, stage_pair  # noqa: E402  from src.task1_temporal.view_io import load_manifest, panel_genes, target_n_cells, write_prediction  # noqa: E402 @@ -46,8 +56,8 @@ EPSILON = 1e-3 TAU_A = 0.95 TAU_B = 1.0 K_SMOOTH = 30-LAMBDA = 1.0     # 1 = continue the observed displacement at full rate-GROWTH = True    # resample output cells by g^dt_out (WOT birth-death model)+LAMBDA_BASE = 3.0+GROWTH = True N_THREADS = 8  @@ -56,11 +66,25 @@ def weighted_rows(w: np.ndarray, n: int, rng: np.random.Generator) -> np.ndarray     return np.sort(rng.choice(len(w), size=n, replace=n > len(w), p=p))  +def knn_mean_z(Z: np.ndarray, rows: np.ndarray, k: int) -> np.ndarray:+    """kNN-smoothed PCA coordinates of the selected cells (in Z space, cell itself included)."""+    from sklearn.neighbors import NearestNeighbors++    nn = NearestNeighbors(n_neighbors=k).fit(Z)+    idx = nn.kneighbors(Z[rows], return_distance=False)+    return Z[idx].mean(axis=1).astype(np.float32)++ def main() -> None:     parser = argparse.ArgumentParser()     parser.add_argument("--data", required=True)     parser.add_argument("--out", required=True)     parser.add_argument("--seed", type=int, default=0)+    parser.add_argument("--epsilon", type=float, default=EPSILON)+    parser.add_argument("--lambda", dest="lam", type=float, default=LAMBDA_BASE)+    parser.add_argument("--gate", action="store_true",+                        help="ESS gating (inactive at the default epsilon: ESS median = 1; kept for ablation)")+    parser.add_argument("--no-displace", action="store_true")     args = parser.parse_args()      manifest = load_manifest(args.data)@@ -78,10 +102,9 @@ def main() -> None:      import anndata as ad     import pandas as pd-    import torch     from moscot.problems.time import TemporalProblem -    (Zp, Zl), _ = embed([prev.X, last.X], mask, N_HVG, N_PCS, args.seed)+    (Zp, Zl), info = embed([prev.X, last.X], mask, N_HVG, N_PCS, args.seed)     g_prev, g_last = growth_rates([prev, last], genes, mask, args.seed)      obs = pd.DataFrame({"time": np.r_[np.zeros(prev.n_obs), np.ones(last.n_obs)],@@ -93,25 +116,60 @@ def main() -> None:     tp = TemporalProblem(small)     # source marginals = WOT prior growth over the input interval (normalised by moscot); target uniform     tp = tp.prepare(time_key="time", joint_attr="X_pca", a="growth")-    tp = tp.solve(epsilon=EPSILON, tau_a=TAU_A, tau_b=TAU_B, scale_cost="mean")+    tp = tp.solve(epsilon=args.epsilon, tau_a=TAU_A, tau_b=TAU_B, scale_cost="mean")     sol = tp[(0.0, 1.0)].solution     print(f"ot: converged={getattr(sol, 'converged', None)} cost={getattr(sol, 'cost', None)}", file=sys.stderr)-    P = np.asarray(sol.transport_matrix, dtype=np.float32)  # (n_prev, n_last)+    P = np.asarray(sol.transport_matrix, dtype=np.float64)  # (n_prev, n_last)      rows = weighted_rows(g_last ** dt_out if GROWTH else np.ones(last.n_obs), n, rng)-    print(f"diag: growth last min/median/max {g_last.min():.3f}/{np.median(g_last):.3f}/{g_last.max():.3f}", file=sys.stderr)+    print(f"diag: growth last min/median/max {g_last.min():.3f}/{np.median(g_last):.3f}/{g_last.max():.3f}",+          file=sys.stderr)++    if args.no_displace:+        write_prediction(last.X[rows], genes, args.out, seed=args.seed)+        return+     Pc = P[:, rows]     del P-    Pc /= np.maximum(Pc.sum(axis=0, keepdims=True), 1e-30)-    factor = LAMBDA * dt_out / dt_in-    torch.set_num_threads(N_THREADS)-    Xp = torch.from_numpy(prev.X.toarray())-    anc = (torch.from_numpy(Pc).T @ Xp).numpy()  # barycentric ancestor mean, (n, n_genes)-    del Xp, Pc-    smooth = knn_mean(Zl, last.X, rows, K_SMOOTH)-    step = (smooth - anc) * factor-    del smooth, anc+    colsum = Pc.sum(axis=0)+    ess = colsum ** 2 / np.maximum((Pc ** 2).sum(axis=0), 1e-300)+    ess_med = float(np.median(ess))+    if not args.gate or ess_med <= 1.0 + 1e-9:+        conf = np.ones(len(rows))+    else:+        conf = np.clip((ess - 1.0) / (ess_med - 1.0), 0.25, 1.0)+    print(f"diag: ESS q25/med/q75 {np.quantile(ess, 0.25):.2f}/{ess_med:.2f}/{np.quantile(ess, 0.75):.2f} "+          f"nnz/col med {np.median((Pc > 1e-12).sum(axis=0)):.0f}", file=sys.stderr)+    print(f"diag: conf min/med/max {conf.min():.3f}/{np.median(conf):.3f}/{conf.max():.3f}", file=sys.stderr)++    Pc /= np.maximum(colsum, 1e-300)+    anc_Z = Pc.T @ Zp.astype(np.float64)          # (n, n_pcs) barycentric ancestor mean in PCA space+    smooth_Z = knn_mean_z(Zl, rows, K_SMOOTH)+    factor = dt_out / dt_in+    step_Z = (smooth_Z.astype(np.float64) - anc_Z) * (factor * args.lam * conf[:, None])+    # decode to gene space (hvg columns only; hvg subset of mask by construction)+    hvg, sd, comps = info["hvg"], info["sd"].astype(np.float64), info["components"].astype(np.float64)+    step = np.zeros((len(rows), len(genes)), dtype=np.float32)+    step[:, hvg] = ((step_Z @ comps) * sd).astype(np.float32)+    del step_Z, anc_Z, Pc     step[:, ~mask] = 0.0++    # diagnostics: within-cluster displacement dispersion (mechanism evidence)+    from sklearn.cluster import KMeans+    lab = KMeans(8, n_init=4, random_state=args.seed).fit_predict(smooth_Z)+    dirs = []+    for c in range(8):+        m = lab == c+        if m.sum() >= 5:+            V = step[m]+            nrm = np.linalg.norm(V, axis=1, keepdims=True)+            U = V / np.maximum(nrm, 1e-12)+            mu = U.mean(axis=0)+            dirs.append(float(np.linalg.norm(mu)))+    print(f"diag: cluster mean-unit-dir norm (1=constant within cluster): "+          f"{np.round(dirs, 3).tolist()}", file=sys.stderr)+    print(f"diag: step norm med {np.median(np.linalg.norm(step, axis=1)):.3f}", file=sys.stderr)+     X = last.X[rows].toarray()     step *= X > 0  # "addnz": move only measured (non-zero) entries, keeps each cell's zero pattern     X += step

调研来源?调研员查到并用到的知识条目和文献检索结果(只列标题和编号)。

用到的知识库条目

编号标题出处
k031Offline OT toolkit in the sandbox: moscot TemporalProblem, wot OTModel, POT, geomloss10.1038/s41586-024-08453-2 (moscot); 10.1016/j.cell.2019.01.006 (Waddington-OT)
k002moscot.time: scalable temporal OT with growth rates and low-rank solvers10.1038/s41586-024-08453-2
k001Waddington-OT: unbalanced entropic OT between snapshot time points10.1016/j.cell.2019.01.006

计划里引用的来源

分析结果?分析员写的 ANALYSIS.json:改了什么、各组分数怎么变、假设是否成立、经验和下一步建议。

改了什么在父节点 ot_moscot 上把位移计算搬进耦合所用的 30 维 PCA 空间(anc_Z=Pc.T@Zp,kNN 平滑 s_Z,step_Z=λ·(dt_out/dt_in)·(s_Z−anc_Z)),再用 pca.components_×sd 解码回 HVG 基因空间、~mask 置零、只加非零项、clip≥0;λ 由 1.0 提到 3.0(ε 仍为 1e-3),并加了 --no-displace / --gate / --epsilon / --lambda 开关与 ESS、簇内方向离散度诊断(diff.patch:303-340)。
各组分数的变化cell_state:变好,+40.88(50.07→90.95),远超 T1 噪声 2 分,是本节点榜分 +11.59(50.65→62.24)的唯一来源
covariation:变坏,-2.91(52.52→49.61),略超噪声
de_recovery:变坏,-2.26(51.38→49.12),略超噪声,与 PLAN risk 2/3(子空间解码丢基因特异 DE 信号)一致
direction:噪声内,+1.88(49.14→51.02),虽为 PLAN 主攻组,但按 T1 约 2 分噪声不能判定有效
family_idlocal_ot
假设是否成立否
经验
  1. 在 PCA 子空间里算祖先重心时,加大熵正则无收益:ε=1e-3/5e-3/2e-2/5e-2 在 λ=0.75 下分别 51.77/~51.4/~51.2/51.52,30 维重心本身已吸收稀疏耦合(nnz/col 中位=2)的祖先噪声,不要再靠 ε 平滑耦合。
  2. ESS 门控只有在 ESS 有细胞间离散度时才可能起作用:ε=1e-3 时 ESS 中位=1.00、门控退化为常数;在 ESS 中位=1.55 的 ε=5e-3 处开门控反而 51.54 < 52.52(不门控),稀疏耦合下'可靠祖先数'不是有效的逐细胞权重。
  3. 位移沿耦合拟合过的 PCA 方向解码后,可以承受 λ≫1 的放大:λ 0.75→3.0 使 X3 从 51.77 升到 61.47、板上 cell_state 50.07→90.95,且 mmd_u 单调下降(0.030→0.0127),说明是群体整体靠近目标分布而非方差膨胀;峰在 3.0–3.25 平坦、4.0 回落到 59.09。
  4. λ=3.0 的代价集中在 de_recovery/covariation(板上 -2.26 / -2.91):HVG+30PC 解码丢基因特异信号,用子空间位移换 cell_state 时必须同时盯这两组,别只看总分。
  5. 位移类改动必须带 --no-displace 对照才能归因:关闭位移得 50.52(≈父 50.65),说明全部增益来自位移段;再加 ε1e-3/λ0.75=51.77 ≈ 兄弟节点 4 的 52.37 对照,排除了'只是又调了一次 λ'的解释。
  6. 簇内平均单位方向向量范数 0.23–0.38(1=簇内常向量)可作为'不是每型常数位移'的低成本证据,值得在后续位移类节点沿用。
  7. Engineer 自报的组分(cell_state 89.15、de_recovery 47.32、board 61.47)与变化量表(90.95、49.12、62.24)不一致,属不同评分跑/种子;结论一律以变化量表为准。
mechanism_active是
下一步建议
  1. 针对 de_recovery/covariation:在现有 HVG+PCA 解码位移之外,叠加一个小权重的基因空间残差项(如 step += w·(父节点全基因空间祖先位移),w 扫 0.1/0.2/0.3,λ 固定 3.0),要求 cell_state 掉幅 ≤2 分、de_recovery 回到 ≥51 才保留。
  2. 针对 direction(本节点 +1.88 在噪声内):把全局 λ 换成逐细胞放大 λ_j=λ_base·f(局部信噪比),f 用 s_Z 的 kNN 半径或 anc_Z 残差范数归一化,而不是用已被证明无效的 ESS;先在 X3 上以 direction 单项 ≥+2 为通过门槛。
  3. 针对总分与迁移性:λ=3.0 是在 dt_out/dt_in=2.0 的 X3 上选的,final 视图比值为 1.0;用 λ_eff=c·(dt_out/dt_in) 与 λ_eff=c(常数)两种解耦形式在另一把尺子上对拉,并在 λ∈{2.75,3.0,3.25} 上跑 seed 0/1/2(本节点种子间 57.70–61.47,波动主要来自 covariation)确认档位。

对话摘要?每个角色和大模型对话的统计:轮数、工具调用、用时、token 数和最后的回答摘录;原始记录只给路径。

只给统计和最后回答的摘录;完整对话请到原始记录位置里列出的文件看。

分析员

角色?调研员写计划、工程师改代码、分析员解读分数、审查员检查作弊。分析员 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数?大模型一共回复了几轮(每轮可以调用多个工具)。9
工具调用?大模型调用读文件、执行命令等工具的次数,按工具名统计。共 8 次:bash 6、read 1、write 1
用时1 分
token 数?输入 / 输出(含思考)的 token 数,来自接口返回的用量。输入 22,018 · 输出 1,919 · 思考 2,197
任务(第一行)分析节点 n8 的打分结果,写 ANALYSIS.json
最后的回答(摘录)
ANALYSIS.json written
原始记录位置?完整对话记录在 Spark 上的文件路径;看板不复制原始内容。/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-B/nodes/8/analyst.jsonl 25 KB
/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-B/nodes/8/analyst.stderr

工程师

角色工程师 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数29
工具调用共 41 次:bash 32、edit 4、write 3、read 2
用时15 分
token 数输入 61,548 · 输出 14,102 · 思考 9,848
任务(第一行)按计划修改程序:local_ot: 加大熵正则的稠密耦合 + PCA 子空间解码 + ESS 门控逐细胞位移
最后的回答(摘录)
Final state verified. Summary:

**做了什么**:按 PLAN 在父节点(ot_moscot)上实现 local_ot 三处结构改动——耦合 PCA 空间祖先重心 + `pca.components_` 解码位移、ε 扫描、ESS 门控。实测与 PLAN 假设相反:大 ε 无收益(λ0.75 时 ε1e-3=51.77 ≥ 2e-2/5e-2),**有效的是 PCA 解码 + 放大 λ**(噪声衰减补偿,mmd_u 单调改善证明非方差膨胀):λ 扫描 0.75→51.8 … 3.0→**61.5**、3.25→61.5、4.0→59.1,取 λ=3.0、ε=1e-3。ESS 门控在 ε=1e-3 下无离散度,按 PLAN risk 5 如实报告为无效部件(`--gate` 保留、默认关)。

**查分**(X3 A 半,用了 18/20):默认配置 seed 0/1/2 = 61.47 / 57.70 / 59.78,均值 **59.65**(父 rank3 48.87,+10.8;direction 49.14→51.4,cell_state 50.1→89.2,de_recovery 51.4→46.9 为已知权衡)。对照:`--no-displace`=50.52(位移段贡献全部增益);ε1e-3/λ0.75=51.77≈node 4 的 52.37(增益非重复调参)。同 seed 双跑 sha256 一致,vec-check ok,全量 ~8s。

**下一步最值得试**:λ 峰值处做逐细胞自适应放大(按位移估计的局部信噪比而非全局标量);以及验证 λ=3 在 dt_out/dt_in=1.0(final 视图)是否过冲——可将 λ 与 dt 比解耦(λ_eff = c·(1+dt_in/dt_out) 类形式)后用 X4/X5 类尺子检验迁移性。
原始记录位置/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-B/nodes/8/engineer.jsonl 166 KB
/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-B/nodes/8/engineer.stderr

调研员

角色调研员 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数1
工具调用共 0 次:—
用时3 分
token 数输入 13,334 · 输出 1,646 · 思考 5,063
任务(第一行)为节点 n8(改进,父节点 n2)写改进计划 PLAN.json
最后的回答(摘录)
(Z_last_j−anc_Z_j),再用 pca.components_ 解码回基因空间——位移只含耦合真正拟合过的 30 维方向,与节点 6 证明过的 PCA 空间解码一致;解码后仍对 ~mask 列置零、只加到该细胞非零项、clip≥0(kNN 平滑项先保留原实现,若诊断显示它相对 PCA 祖先项可忽略则去掉);(3) λ_base=0.75(继承节点 4 唯一被证实的改动),可选扫 [0.5, 0.75, 1.0];(4) 逐细胞门控 λ_j=λ_base·conf_j,conf_j=clip((ESS_j−1)/(ESS_med−1), 0.25, 1),ESS_j=(Σπ)²/Σπ²,ESS_med 为输出细胞 ESS 中位数——把位移幅度与各自耦合可靠度挂钩,这是『随细胞状态变化的局部位移』的核心。单输入阶段(proxy):与父节点相同,仅生长加权重采样,不跑 OT,输出与父节点单输入分支一致。vec-score 流程:先在 ~800×800 细胞子样上跑通并确认 ESS 中位 >5、求解收敛(不查分);再全量查 3 个 epsilon(λ 固定 0.75、先关门控),按 direction 选优、cell_state 平手;最优 epsilon 上开门控再查 1 次;必要时 λ ±1 档。总查分 ≤6 次、全量运行 ≤10 分钟,余量充足。",
 "expected_groups": ["direction", "cell_state"],
 "risks": "1) epsilon 过大→耦合扩散为均匀分布,祖先均值趋于全局源均值,位移退化成近似常向量:小样诊断若 ESS 中位 >50 且型内位移方向离散度骤降,取更小档;2) 30-PC 子空间解码可能丢基因特异 DE 信号、伤 de_recovery(父 51.38):每次查分盯该组,若降 >3 分,把解码限制在前 30 PC 不变但保留 HVG 原始残差项;3) 改进 <T1 噪声(2 分):要求 direction 或 cell_state 单项 ≥+2 且与四组分解读一致才下结论,总分小升不算赢;4) 全量数据上 epsilon 扫描耗时:先在子样选档,单次求解设 5 分钟上限,超时就弃该档;5) 门控依赖 ESS 有离散度,若稠密耦合后 ESS 几乎全相同,门控退化为常数(等于不调 λ),此时如实报告该部件无效、只保留前两处修改。",
 "family_id": "local_ot",
 "mechanism": "较大熵正则的非平衡 Sinkhorn 给出每个细胞更平滑的祖先分布,在拟合耦合的 PCA 空间里取祖先重心并解码回基因空间作为位移;位移幅度按各细胞耦合的有效祖先数(ESS)门控——祖先分布越可靠,外推步长越大。",
 "vs_constant_shift": "位移方向与幅度由每个细胞自己的耦合祖先分布决定:不同细胞即使同型,祖先不同则 step 不同,且门控因子 conf_j 逐细胞变化;常数位移对同型所有细胞是同一向量。方案要求报告型内位移向量离散度来证明这一点。",
 "mechanism_evidence": "Engineer 打印并检查:a) ESS 分布(中位与四分位)必须显著大于父节点的 ~2 且要有离散度,否则稠密耦合未生效;b) conf_j 分布非常数;c) 若干 KMeans 簇内的位移向量方差/方向离散度——必须不是每簇一个常向量;d) 与父节点输出的逐细胞差异集中在哪些基因/细胞;e) 四组分逐项报告(direction 与 cell_state 为主,covariation、de_recovery 防退化),不只看总分。",
 "mechanism_off_control": "同一程序 --no-displace:跳过位移段,只做生长加权重采样并原样输出最新阶段细胞,预期输出与父节点 λ=0 等价(差分为零,说明位移段是唯一改变源)。第二对照 --epsilon 1e-3 --no-gate(λ 0.75)复现节点 4 的有效配置:本方案相对它的增益即归因于稠密耦合+PCA 解码+ESS 门控而非又调了一次 λ。若关闭后输出与打开完全相同,判机制未运行。",
 "sources": ["10.1016/j.cell.2019.01.006 — Waddington-OT:熵正则非平衡 OT 连接相邻快照,代价按中位缩放、正则强度决定耦合平滑度(支持提高 epsilon 的方向)", "10.1038/s41586-024-08453-2 — moscot:TemporalProblem、教程参数(ε=1e-3 量级、tau_a 0.95)与低秩/祖先概率输出(支持耦合求解与祖先重心的用法)"]}
```
原始记录位置/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-B/nodes/8/researcher.jsonl 6 KB
/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-B/nodes/8/researcher.stderr

审查员

角色审查员 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数8
工具调用共 11 次:bash 8、read 2、write 1
用时1 分
token 数输入 23,873 · 输出 1,513 · 思考 3,091
任务(第一行)审查节点 n8 的程序是否越界读取、写死目标、钻评分器漏洞
最后的回答(摘录)
REVIEW.json written
原始记录位置/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-B/nodes/8/reviewer.jsonl 100 KB
/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-B/nodes/8/reviewer.stderr