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

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

节点 n16

按PLAN在节点13上加逐细胞kNN速度修正λ·v_i(同型stage1近邻、型内零均值、亲本回退);λ正负双向均单调降分且direction不动(PLAN风险2成立),中止并提交λ=0,输出与节点13逐元素一致。

运行?一次完整的自动搜索或 Agent 会话,有自己的锁定配置和证据包。20261002-202908-search-t1-scr-D
父节点n13
子节点n20
操作?种子:人写的起点;改进:在父节点上改;草稿:从头写;修复:修父节点的报错。改进
状态已打分
分数搜索目标分 60.56(+0.0) · X3 60.56(+0.0)
审查未审查
用时?从运行开始到结束(或到现在)的挂钟时间。16 分
程序版本d2266fa16d8d1528a54ae199072a9ffc16b73201 (programs.git)

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

来自 programs.git d2266fa16d:solution/METHOD.md

按PLAN在节点13上加逐细胞kNN速度修正λ·v_i(同型stage1近邻、型内零均值、亲本回退);λ正负双向均单调降分且direction不动(PLAN风险2成立),中止并提交λ=0,输出与节点13逐元素一致。

实际实现的方法族(family: other,PLAN 指定机制)

完整保留节点 13 管线:copy_last 抽样(rng 流不变)、per-type EB 位移 δ_c(含 SYNONYM_PARENTS 改名回退)、时间缩放 α·r(α=1.5,只用相对时间差)、top-8000 HVG / top-25 PC 基 V / β=1 低秩投影、η=-3 逐细胞局部扩张、只作用非零元、max(0,·)。单输入视图严格退化 copy_last(代码路径未动)。

新增(PLAN 机制):

  1. --vel-lambda λ(默认 0,环境变量 VEC_VEL_LAMBDA):stage2 细胞 i(型 c)在 25 维 PC 空间对同型 stage1 细胞建 cKDTree,取 k_vel=10 近邻,v_i = z_i − mean(z_neighbors);v_i 在型内零均值(保留 δ_c 型级位移不变)。
  2. 改名/分出型回退:同型 stage1 细胞 <5 时改用 SYNONYM_PARENTS 亲本(V-CM←LV/RV-CM,Endocardium/BEC←Endothelium)——与 δ_c 用的是同一张通用谱系映射表(官方 T1 词汇改名知识,非保留阶段测量);仍 <5 则跳过该型(v_i=0)。每型 stage1/stage2 细胞数上限 3000(确定性等距抽样,不耗 rng)。
  3. --vel-pc0 m:把 v_i 的前 m 个 PC 分量置零(PLAN 的 PC 6–25 限制变体)。
  4. 逐细胞 HVG 位移 = β·V(η·g_i + λ·v_i);λ=0 时 Vmat 整段旁路,走节点 13 的原始算术路径,输出逐元素一致(实测 (A!=B).nnz==0)。

机制关闭对照(mechanism_off_control)

λ=0(默认):与节点 13 在同一视图同一 seed 下预测逐元素一致(nnz diff = 0),X3 A 半 seed0 = 58.8703(= 节点 13 记录的 58.87),四组分完全相同(cs 82.85 / cov 44.16 / de 50.96 / dir 49.78)。对照成立。

机制生效证据(λ>0 时确实改变了细胞)

  • λ=1(含亲本回退):mean‖v_i‖=8.70,98.9% 细胞 v_i≠0(跳过型只剩 pSHF/ST/NCC-derived 等 <5 亲本细胞的小型),输出与 λ=0 相差 1,172,204 个非零元——非微扰。
  • λ=1(无回退版):mean‖v_i‖=6.65,76.1% 细胞非零(Endocardium 305、V-CM 189 等大群因 stage1 无同型细胞被跳过)。

查分记录(X3 A 半,seed 0,共 14 次查询,剩余 6)

配置总分cell_statecovariationde_recoverydirection
λ=0(=节点13)58.8782.8544.1650.9649.78
λ=0.5(跳过版)58.5882.7643.4950.4849.74
λ=1/2/3/5(跳过版)57.82 / 54.80 / 51.62 / 44.90单调降单调降降49.7→48.9
λ=−0.5 / −1(跳过版)58.38 / 57.3780.77 / 76.8944.84 / 45.5850.9649.76 / 49.80
λ=0.5/1/2/3(亲本回退版)58.12 / 56.48 / 52.06 / 47.46单调降单调降降≤49.78
λ=1/2(PC 6–25 限制)58.11 / 55.9881.18 / 75.3743.45 / 42.8650.48 / 49.5349.80 / 49.66

结论(PLAN 风险 2 应验,中止):direction 在所有 λ(正、负、亲本回退、PC 子集)下都停在 49.4–49.8 噪声地板(PLAN 判据 ≥53 从未接近);|λ| 增大只单调稀释 cell_state 与 covariation。stage1→stage2 的型内 kNN 速度方向对 stage2→目标的 direction 没有可用信号——X3 两输入只差 0.25 天,kNN 速度主要反映采样噪声而非轨迹方向。按 PLAN 步骤 5/风险 2 的预设中止条件,提交 λ=0。

验证过 / 没验证

  • 验证过:λ=0 与节点13逐元素一致;λ>0 输出确定性(同 seed 复跑一致)、通过 vec-check;seed 1 默认参数跑通并过 vec-check;耗时 ~12s、内存不变(cKDTree 开销 <1s)。
  • 没验证:final/proxy 视图(λ=0 与节点13同码路径,行为由其继承);λ 与 η 的二维联扫(λ 单维已单调有害,PLAN 风险 4 的 η=-2 联扫未做);vel_k、cap 的敏感性(机制方向性失败,调参无意义)。
  • 知识来源:SYNONYM_PARENTS 沿用节点 5/13(官方 T1 词汇的改名/拆分,通用谱系知识);其余全部由视图数据现场计算,无硬编码阶段统计量。

调研员的计划

名称Per-cell kNN velocity directional correction on node 13 local expansion
动机Node 13 direction=50.12 is essentially random (weakest group), de_recovery=52.34 also stagnant. ANALYSIS confirms 'direction偏弱源于共享位移方向单一'. The η·g_i local expansion restores within-type spread (cell_state 64→87) but pushes cells away from local density centers without encoding temporal progression direction. All cells of a type still share the same base displacement direction w_c=V^T(Δ_c), so the direction score stays at chance. Node 9's magnitude modulation (γ=10) and node 10's OT zero-mean correction both failed to move direction (49.78, 51.05 respectively). A per-cell directional signal grounded in the actual stage1→stage2 transition is missing.
做法On top of node 13's full pipeline (copy_last + EB δ_c + PC projection β=1 + η=-3 local expansion), add a per-cell velocity directional correction:

1. Reuse existing V (top-25 PCs) and centering μ. Compute stage1 PC coordinates Z1=(X1[hvg]−μ)V for all stage1 cells (no new SVD, ~0.5s).
2. For each stage2 cell i of type c, find k_vel=10 nearest neighbors among stage1 cells of the SAME type c in 25-dim PC space (Euclidean, brute-force cKDTree; types have ≥10 cells per EB filter, cap 3000 cells). Compute raw velocity v_i = z_i − mean(z_neighbors_stage1).
3. Zero-mean v_i within each type: v_i ← v_i − mean_{j∈type c}(v_j). This preserves the type-level displacement δ_c exactly and adds only per-cell directional variation.
4. Per-cell HVG displacement becomes V(w_c + η·g_i + λ·v_i). λ=0 recovers node 13 element-wise.
5. Scan λ ∈ {0, 0.5, 1.0, 2.0, 3.0, 5.0} on X3 A-half seed 0. If best λ>0 shows direction ≥53 and total ≥60, confirm with seed 1. If direction improves but covariation drops >2 pts below 44.54, try restricting λ·v_i to PCs 6–25 (skip top-5 PCs that dominate covariation).
6. Single-input-stage fallback: len(entries)<2 → exact copy_last (unchanged code path).
7. vec-score aft…
风险1) kNN velocity in PC space may be noisy for small types (<20 cells); Engineer should check per-type neighbor count and skip types with <5 stage1 neighbors (fall back to w_c+η·g_i only). 2) Stage1→stage2 velocity may not extrapolate to stage2→E10.5 if trajectories curve; if λ>0 doesn't help direction, the linear extrapolation assumption fails — abort and report. 3) Adding another per-cell term may further hurt covariation (already 44.54, down from 48.20); monitor covariation at each λ, if it drops below 42 stop and try the PC-subset restriction. 4) λ and η interact: the expansion direction g_i and velocity direction v_i may partially cancel or reinforce; if λ scan is flat, try fixing η=-2 instead of -3 to give λ more room. 5) Engineer should verify λ=0 output is element-wise identical to node 13 ((A!=B).nnz==0) before scoring any λ>0.

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

对比:父节点版本 3c38738ce2。改动的文件:solution/METHOD.md +25 −35、solution/run.py +73 −3

diff --git a/solution/METHOD.md b/solution/METHOD.mdindex 2f7c473..fa7ac2e 100644--- a/solution/METHOD.md+++ b/solution/METHOD.md@@ -1,49 +1,39 @@-在节点5低秩投影之上,把每型单一常位移改为逐细胞局部切向位移:每个输出细胞沿其 stage2 kNN(k=15) 在 PC(k=25) 子空间内的平均偏移方向反向推开(η=-3.0),恢复型内细胞间离散度。+按PLAN在节点13上加逐细胞kNN速度修正λ·v_i(同型stage1近邻、型内零均值、亲本回退);λ正负双向均单调降分且direction不动(PLAN风险2成立),中止并提交λ=0,输出与节点13逐元素一致。 -## 方法(family: other,PLAN 指定的局部切向位移机制)+## 实际实现的方法族(family: other,PLAN 指定机制) -完整保留节点 5 管线:copy_last 抽样(rng 流不变)、per-type EB 收缩位移 δ_c、时间缩放 α·r(α=1.5,只用相对时间差)、top-8000 HVG / ≤3000 细胞 / 中心化 svds k=25 的 PC 基 V、Δ_final=(1−β)Δ+βV(VᵀΔ)(β=1.0)、只作用非零元、max(0,·)。单输入视图严格退化 copy_last(代码路径未动)。+完整保留节点 13 管线:copy_last 抽样(rng 流不变)、per-type EB 位移 δ_c(含 SYNONYM_PARENTS 改名回退)、时间缩放 α·r(α=1.5,只用相对时间差)、top-8000 HVG / top-25 PC 基 V / β=1 低秩投影、η=-3 逐细胞局部扩张、只作用非零元、max(0,·)。单输入视图严格退化 copy_last(代码路径未动)。 -本节点新增(PLAN 机制,逐细胞位移):--1. 复用同一 V 与 rng 流,把 stage2 全部细胞投影到 PC 坐标 Z2=(X2[hvg]−μ)V(无新 SVD)。-2. 每个 stage2 细胞在 PC 空间找 k=15 近邻(排除自身,欧氏距离,全 stage2 池,可跨型),g_i = mean_kNN(z_j) − z_i。-3. 输出细胞 i(型 c)的位移在 HVG 上为 V(w_c + η·g_i),w_c=Vᵀ(Δ_c[hvg]),即 PLAN 的 Δ_i=V(Vᵀ(δ_c+η·u_i)) 经 (1−β)/β 混合(β=1,非 HVG 位移为 0)。η=0 时局部项关闭。-4. 其余施加方式与节点 5 完全相同。--**提交参数 η=-3.0(负值)**:PLAN 预设 η∈[0,1](局部项与密度中心同向);实测正 η 单调变差(+0.25/0.5/1.0 → 总分 55.6/55.0/53.5 量级,cell_state 从 61.8 掉到 54.8),负 η(把细胞推离其局部密度中心、沿局部切向向外扩张)单调变好,η=-3 处平台(-2→57.95,-3→58.87,-3.5→58.64,-4→57.87)。机制仍是逐细胞局部切向位移(方向由 kNN 局部几何决定、逐细胞不同),只是有效符号是外向扩张:copy_last+共享位移+max(0,·) 压缩了型内细胞间离散度,负 η 把它补回来。+新增(PLAN 机制):+1. `--vel-lambda λ`(默认 0,环境变量 VEC_VEL_LAMBDA):stage2 细胞 i(型 c)在 25 维 PC 空间对**同型 stage1 细胞**建 cKDTree,取 k_vel=10 近邻,v_i = z_i − mean(z_neighbors);v_i 在型内零均值(保留 δ_c 型级位移不变)。+2. 改名/分出型回退:同型 stage1 细胞 <5 时改用 SYNONYM_PARENTS 亲本(V-CM←LV/RV-CM,Endocardium/BEC←Endothelium)——与 δ_c 用的是同一张通用谱系映射表(官方 T1 词汇改名知识,非保留阶段测量);仍 <5 则跳过该型(v_i=0)。每型 stage1/stage2 细胞数上限 3000(确定性等距抽样,不耗 rng)。+3. `--vel-pc0 m`:把 v_i 的前 m 个 PC 分量置零(PLAN 的 PC 6–25 限制变体)。+4. 逐细胞 HVG 位移 = β·V(η·g_i + λ·v_i);λ=0 时 Vmat 整段旁路,走节点 13 的原始算术路径,输出**逐元素一致**(实测 (A!=B).nnz==0)。  ## 机制关闭对照(mechanism_off_control) -η=0(--local-eta 0)时局部项整段旁路,输出与节点 5 程序在同一视图同一 seed 下的预测**逐元素一致**((A!=B).nnz==0,实测),且抽样 rng 流不受影响。+λ=0(默认):与节点 13 在同一视图同一 seed 下预测逐元素一致(nnz diff = 0),X3 A 半 seed0 = 58.8703(= 节点 13 记录的 58.87),四组分完全相同(cs 82.85 / cov 44.16 / de 50.96 / dir 49.78)。对照成立。 -## 机制生效证据(PLAN mechanism_evidence)+## 机制生效证据(λ>0 时确实改变了细胞) -1. **型内位移方向离散度**:η=0 时同型所有细胞位移方向余弦相似度=1(常位移);η=-3 时局部项 g_i 的型内两两余弦均值 ≈0.00–0.06(IFT-CM 0.006、V-CM 0.062、Endocardium 0.002、Unknown 0.002)→ 方向真正逐细胞化。-2. **被改变的细胞与幅度**:全部 652 个输出细胞都被加了局部项;‖η·V g_i‖ 均值 ≈20(η=-3),为对应型投影位移范数(8.3–65.4)的 30%–240%,非微扰。-3. **四组分随 η 的变化**(seed0,A 半):η=0:cs 61.76/cov 47.65/de 50.96/dir 50.72(=节点5);η=-1:cs 70.41/cov 46.38/de 51.46/dir 50.39(55.86);η=-2:cs 78.46/cov 45.21/de 51.46/dir 50.03(57.95);η=-3:cs 82.85/cov 44.16/de 50.96/dir 49.78(58.87);η=-4:cs 81.59/cov 43.22(57.87)。cell_state 大幅单调回升(与节点 9 的 83.82 相当),de_recovery 在 -1/-2 处 +0.5,direction 与 covariation 缓慢下降(PLAN 风险 1 成立:外向扩张抬高 variogram,协变结构被稀释);总分在 η=-3 达到峰值 58.87。-4. η=0 对照与节点 5 逐元素一致(见上)。+- λ=1(含亲本回退):mean‖v_i‖=8.70,98.9% 细胞 v_i≠0(跳过型只剩 pSHF/ST/NCC-derived 等 <5 亲本细胞的小型),输出与 λ=0 相差 1,172,204 个非零元——非微扰。+- λ=1(无回退版):mean‖v_i‖=6.65,76.1% 细胞非零(Endocardium 305、V-CM 189 等大群因 stage1 无同型细胞被跳过)。 -## 查分记录(X3 A 半,共 10 次查询)+## 查分记录(X3 A 半,seed 0,共 14 次查询,剩余 6) -| 配置 | seed0 | seed1 |-|---|---|---|-| η=+0.25 / +0.5 / +1.0 | 55.6* / 55.0* / 53.5*(按组分明细,正 η 单调差) | - |-| η=-0.5 / -1.0 | - / 55.86 | - |-| η=-1.5 / -2.0 | 56.98 / 57.95 | - |-| **η=-3.0, k=15(提交)** | **58.87** | **58.74** |-| η=-3.5 / η=-4.0 | 58.64 / 57.87 | - |-| η=-3, proj-k=40 / local-k=25 | 57.70 / 58.62 | - |+| 配置 | 总分 | cell_state | covariation | de_recovery | direction |+|---|---|---|---|---|---|+| λ=0(=节点13) | **58.87** | 82.85 | 44.16 | 50.96 | 49.78 |+| λ=0.5(跳过版) | 58.58 | 82.76 | 43.49 | 50.48 | 49.74 |+| λ=1/2/3/5(跳过版) | 57.82 / 54.80 / 51.62 / 44.90 | 单调降 | 单调降 | 降 | 49.7→48.9 |+| λ=−0.5 / −1(跳过版) | 58.38 / 57.37 | 80.77 / 76.89 | 44.84 / 45.58 | 50.96 | 49.76 / 49.80 |+| λ=0.5/1/2/3(亲本回退版) | 58.12 / 56.48 / 52.06 / 47.46 | 单调降 | 单调降 | 降 | ≤49.78 |+| λ=1/2(PC 6–25 限制) | 58.11 / 55.98 | 81.18 / 75.37 | 43.45 / 42.86 | 50.48 / 49.53 | 49.80 / 49.66 | -(*正 η 的总分未单独记录,组分明细见上;正 η 全部低于 η=0 对照。)双 seed 均值 58.81 vs 父节点 53.94(同 A 半口径)→ **+4.9,远超 2 分噪声线**。+**结论(PLAN 风险 2 应验,中止)**:direction 在所有 λ(正、负、亲本回退、PC 子集)下都停在 49.4–49.8 噪声地板(PLAN 判据 ≥53 从未接近);|λ| 增大只单调稀释 cell_state 与 covariation。stage1→stage2 的型内 kNN 速度方向对 stage2→目标的 direction 没有可用信号——X3 两输入只差 0.25 天,kNN 速度主要反映采样噪声而非轨迹方向。按 PLAN 步骤 5/风险 2 的预设中止条件,提交 λ=0。  ## 验证过 / 没验证 -- 验证:X3 vec-check ok;默认参数输出与已查分的 η=-3 seed0 预测逐元素一致;η=0 == 节点5 输出逐元素一致;单 seed 运行 ~13s / 内存 <1.5GB(限制 28GB / 30min);纯 CPU(EXECUTION.json gpu:false 不变);kNN 无 rng、svds 用固定 v0 → 对 seed 确定。-- 视图无关:只用相对时间差与视图内数据;PC 基与抽样用独立 rng 流 default_rng([seed, 0x5EED]);无路径/字段顺序/绝对时间依赖。-- 没验证:final 视图(r=1,位移减半,η 最优点可能漂移;η 作用在未乘 scale 的 g_i 上,故 final 上局部项相对更强,可能需要 |η| 减小);proxy/proxy2(本节点分数只由 X3 决定);B 半真值。-- 未试(时间不够):η<0 局部扩张与节点 9 的位移轴幅度调制(γ=10)组合;两者都把 cell_state 推到 ~83,机制不同(局部几何扩张 vs 沿位移轴拉伸),可能互补也可能冗余。--## 知识来源--全部沿用节点 5:标签改名词表(方法卡 §标签)、EB 收缩公式(标准经验贝叶斯)、PCA/kNN 只用视图内两个输入阶段的表达数据;无外部数据、无 prior/、无禁窗信息、无硬编码统计量。+- 验证过:λ=0 与节点13逐元素一致;λ>0 输出确定性(同 seed 复跑一致)、通过 vec-check;seed 1 默认参数跑通并过 vec-check;耗时 ~12s、内存不变(cKDTree 开销 <1s)。+- 没验证:final/proxy 视图(λ=0 与节点13同码路径,行为由其继承);λ 与 η 的二维联扫(λ 单维已单调有害,PLAN 风险 4 的 η=-2 联扫未做);vel_k、cap 的敏感性(机制方向性失败,调参无意义)。+- 知识来源:SYNONYM_PARENTS 沿用节点 5/13(官方 T1 词汇的改名/拆分,通用谱系知识);其余全部由视图数据现场计算,无硬编码阶段统计量。diff --git a/solution/run.py b/solution/run.pyindex 3ee234b..af08d79 100644--- a/solution/run.py+++ b/solution/run.py@@ -14,6 +14,14 @@ eta < 0 pushes each cell away from its local density centre along the local tangential direction, restoring within-type cell-to-cell spread; eta = 0 disables the local term and reproduces the parent element-wise. +This node additionally implements (behind --vel-lambda, default 0) a per-cell+kNN velocity correction: v_i = z_i - mean of the k_vel nearest stage-1 cells+of the same type (SYNONYM_PARENTS fallback for renamed types), zero-meaned+within each type, entering the displacement as V(eta*g_i + lambda*v_i).+Scored on X3 (A half): lambda != 0 monotonically lowers the total and never+moves `direction` above the noise floor (see METHOD.md), so the submitted+default lambda = 0 reproduces node 13 element-wise (mechanism-off control).+ View independence: V and all offsets come from the view's own input matrices; only relative time differences are used. Single input stage -> exact copy_last. """@@ -116,6 +124,12 @@ def main() -> None:                         default=float(os.environ.get("VEC_LOCAL_ETA", "-3.0")))     parser.add_argument("--local-k", type=int,                         default=int(os.environ.get("VEC_LOCAL_K", "15")))+    parser.add_argument("--vel-lambda", type=float,+                        default=float(os.environ.get("VEC_VEL_LAMBDA", "0.0")))+    parser.add_argument("--vel-k", type=int,+                        default=int(os.environ.get("VEC_VEL_K", "10")))+    parser.add_argument("--vel-pc0", type=int,+                        default=int(os.environ.get("VEC_VEL_PC0", "0")))     parser.add_argument("--no-time-scale", action="store_true",                         default=os.environ.get("VEC_NO_TIME_SCALE", "") == "1")     args = parser.parse_args()@@ -181,6 +195,7 @@ def main() -> None:         # keeps the sample_rows draw above identical to the parent)         hvg = V = mu = None         Z2 = G = None+        Vmat = None         if use_proj:             rng_proj = np.random.default_rng(np.array([args.seed, 0x5EED], dtype=np.int64))             hvg, mu, V = covariation_basis(prev.X.tocsr(), last.X.tocsr(),@@ -189,16 +204,63 @@ def main() -> None:             # per-cell local tangential offsets (mechanism of this node):             # PC coordinates of every stage-2 cell; for each output cell,             # g_i = mean over its kNN (excluding itself) of (z_j - z_i).-            if args.local_eta != 0.0:+            if args.local_eta != 0.0 or args.vel_lambda != 0.0:                 Xl = last.X.tocsr()                 Z2 = (np.asarray(Xl[:, hvg].todense(), dtype=np.float64) - mu) @ V                 n2 = Z2.shape[0]+            if args.local_eta != 0.0:                 zz = np.einsum("ij,ij->i", Z2, Z2)                 D2 = np.maximum(zz[:, None] + zz[None, :] - 2.0 * (Z2 @ Z2.T), 0.0)                 D2[np.arange(n2), np.arange(n2)] = np.inf                 kk = int(min(args.local_k, n2 - 1))                 nbr = np.argpartition(D2, kk - 1, axis=1)[:, :kk]                 G = Z2[nbr].mean(axis=1) - Z2  # (n2, kk_dim)+            # per-cell velocity directional correction (mechanism of this node):+            # for each stage-2 cell i of type c, v_i = z_i - mean of its+            # k_vel nearest stage-1 cells OF THE SAME TYPE in PC space; then+            # zero-mean v within each type (type-level delta_c preserved).+            if args.vel_lambda != 0.0:+                from scipy.spatial import cKDTree+                Xp = prev.X.tocsr()+                Z1 = (np.asarray(Xp[:, hvg].todense(), dtype=np.float64) - mu) @ V+                Vmat = np.zeros_like(Z2)+                queried = []+                cap = int(args.proj_cells)+                for t in np.unique(lab2):+                    m2 = np.flatnonzero(lab2 == t)+                    m1 = np.flatnonzero(lab1 == t)+                    if m1.size < 5:+                        # renamed/split types: fall back to stage-1 parent types+                        # (same general-lineage SYNONYM_PARENTS used for delta)+                        par = np.zeros(lab1.shape[0], dtype=bool)+                        for p in SYNONYM_PARENTS.get(str(t), ()):+                            par |= lab1 == p+                        if par.sum() >= 5:+                            m1 = np.flatnonzero(par)+                    if m1.size < 5 or m2.size == 0:+                        print("vel skip %s (n1=%d n2=%d)" % (str(t), m1.size, m2.size),+                              file=sys.stderr)+                        continue+                    if m1.size > cap:  # deterministic even-spaced subsample+                        m1 = m1[np.linspace(0, m1.size - 1, cap).astype(int)]+                    if m2.size > cap:+                        m2 = m2[np.linspace(0, m2.size - 1, cap).astype(int)]+                    tree = cKDTree(Z1[m1])+                    kv = int(min(args.vel_k, m1.size))+                    _, nidx = tree.query(Z2[m2], k=kv)+                    if kv == 1:+                        nidx = nidx[:, None]+                    Vmat[m2] = Z2[m2] - Z1[m1][nidx].mean(axis=1)+                    queried.append(m2)+                if queried:+                    for m2 in queried:+                        sub = Vmat[m2]+                        Vmat[m2] = sub - sub.mean(axis=0, keepdims=True)+                if args.vel_pc0 > 0:+                    Vmat[:, :args.vel_pc0] = 0.0+                nv = np.linalg.norm(Vmat, axis=1)+                print("vel: mean||v||=%.4f  frac>0: %.3f"+                      % (float(nv.mean()), float((nv > 0).mean())), file=sys.stderr)          beta = float(args.proj_beta)         diag = []@@ -220,8 +282,16 @@ def main() -> None:             d = d.astype(np.float32)             tmask = np.flatnonzero(labs == t)             Loc = None-            if G is not None:-                loc = args.local_eta * beta * (G[rows[tmask]] @ V.T)  # (m, n_hvg)+            if G is not None or Vmat is not None:+                if Vmat is None:+                    # exact node-13 arithmetic path (element-wise identical)+                    loc = args.local_eta * beta * (G[rows[tmask]] @ V.T)+                else:+                    per = np.zeros((len(tmask), V.shape[1]), dtype=np.float64)+                    if G is not None:+                        per += args.local_eta * G[rows[tmask]]+                    per += args.vel_lambda * Vmat[rows[tmask]]+                    loc = beta * (per @ V.T)  # (m, n_hvg)                 Loc = np.zeros((len(tmask), d.shape[0]), dtype=np.float32)                 Loc[:, hvg] = loc                 nm = np.linalg.norm(loc, axis=1)

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

用到的知识库条目

编号标题出处
k041Within-stage pseudotime and graph toolkit offline: scanpy DPT/PAGA/Leiden, Palantir, CellRank 210.1186/s13059-019-1663-x (PAGA); 10.1038/s41587-019-0068-4 (Palantir); 10.1038/s41592-024-02303-9 (CellRank 2)
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)
k007Interval staging and held-out-window filtering of external datanotes/official/来件/virtualembryo.ai/rules.md

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

改了什么在节点 13 管线上新增 --vel-lambda 逐细胞 kNN 速度修正(同型 stage1 近邻 k=10、型内零均值、SYNONYM_PARENTS 回退、PC 6-25 子集开关),扫 λ∈{±0.5,1,2,3,5} 及变体后全部降分且 direction 不动,按预设中止条件提交 λ=0,输出与节点 13 逐元素一致((A!=B).nnz==0,X3 A半 seed0=58.87 相同)。
各组分数的变化cell_state:噪声内 +0.00(86.79,与父节点一致)
covariation:噪声内 +0.00(44.54,与父节点一致)
de_recovery:噪声内 +0.00(52.34,与父节点逐元素一致)
direction:噪声内 +0.00(50.12,与父节点一致;λ>0 时该组也停在 49.4-49.8 噪声地板,从未达到 PLAN 判据 ≥53)
family_idother
假设是否成立否
经验
  1. 当两个输入阶段时间间隔极短(X3 仅差 0.25 天)时,用 stage1→stage2 的同型 kNN 速度估计轨迹方向,得到的 v_i 主要是采样噪声而非真实轨迹方向,加进位移(任何 λ 正负、亲本回退、PC 子集限制)都不动 direction 组且单调稀释 cell_state/covariation。
  2. direction 组(~50)已对四种逐细胞方向扰动全部不敏感(节点 9 幅度调制 γ、节点 10 OT 零均值修正、节点 13 η 局部扩张、节点 16 λ kNN 速度),应放弃'在位移上加逐细胞方向项'这一整族,转向其他组。
  3. 机制关闭对照(λ=0 旁路 + 逐元素一致性验证 (A!=B).nnz==0)使失败节点能以零分数损失安全提交父节点输出,这个'默认关闭 + 预设中止条件'的模式值得保留。
  4. Engineer 报告中'正式分应≈父 61.27'与变化量表实际 60.56 不符,但差异在 T1 噪声(~2 分)内且方向为略低;以变化量表为准,本节点相对父节点无任何分数变化。
mechanism_active否
下一步建议
  1. 针对 covariation 组(44.54,从节点 5 的 48.20 一路下滑):对 η·g_i 局部项做型内范数归一或按型缩放(使 ‖η·g_i‖ 与 ‖w_c‖ 的比例在各型间一致),目标 covariation 拉回 ≥47 同时保住 cell_state 86.8,预期净收益 +1~2(针对 covariation 组)。
  2. 针对 de_recovery 组(52.34 长期停滞):调整 EB 收缩强度或 δ_c 的时间缩放 α(当前 1.5),扫 α∈{1.2, 1.5, 2.0, 2.5},观察 de_recovery 是否随之变化,不再叠加逐细胞项。
  3. 若仍想动 direction:改用不依赖两输入阶段间速度信号的方法(如基于目标阶段伪时间/分支结构的先验方向),避免再用 stage1→stage2 kNN 差分作为方向来源。

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

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

分析员

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

工程师

角色工程师 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数28
工具调用共 32 次:bash 20、edit 10、read 1、write 1
用时13 分
token 数输入 51,275 · 输出 9,242 · 思考 7,530
任务(第一行)按计划修改程序:Per-cell kNN velocity directional correction on node 13 local expansion
最后的回答(摘录)
**做了什么**:按 PLAN 在节点 13 上实现逐细胞 kNN 速度方向修正(λ·v_i,同型 stage1 近邻 k=10、型内零均值、SYNONYM_PARENTS 亲本回退、PC 6–25 子集开关),λ=0 严格旁路并与节点 13 逐元素一致((A!=B).nnz==0)。

**查分结果**(X3 A 半 seed0,14/20 次):λ=0 = 58.87(对照成立);λ∈{±0.5,1,2,3,5}、亲本回退版、PC 子集版全部单调降分(58.6→44.9),direction 在所有配置下停在 49.4–49.8 噪声地板,从未接近 PLAN 判据 ≥53。PLAN 风险 2 应验(两输入仅差 0.25 天,kNN 速度主要是采样噪声),按预设条件中止,提交 λ=0(正式分应≈父 61.27)。vec-check 通过,seed 0/1 均确定,耗时 ~12s。

**下一步最值得试**:direction 组(~50)对逐细胞方向扰动完全不敏感,四组里唯一没被任何节点撬动过;建议放弃"在位移上加逐细胞方向项"这一整族(节点 9/10/13/16 均未动 direction),转向 de_recovery/covariation:如对 η·g_i 局部项做型内范数归一(父节点 ANALYSIS 建议 2),目标把 covariation 拉回 ≥47 同时保住 cell_state 86.8,预期净收益 +1~2。
原始记录位置/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/16/engineer.jsonl 137 KB
/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/16/engineer.stderr

调研员

角色调研员 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数1
工具调用共 0 次:—
用时2 分
token 数输入 15,766 · 输出 1,382 · 思考 4,509
任务(第一行)为节点 n16(改进,父节点 n13)写改进计划 PLAN.json
最后的回答(摘录)
r should verify λ=0 output is element-wise identical to node 13 ((A!=B).nnz==0) before scoring any λ>0.",
  "family_id": "other",
  "mechanism": "Per-cell directional correction from local stage1→stage2 kNN velocity in PC space: each output cell's displacement gains a zero-mean (within-type) component λ·v_i pointing along the direction that cell's local neighborhood actually moved between the two input stages, breaking the shared-direction degeneracy of δ_c.",
  "vs_constant_shift": "Constant per-type displacement gives every cell of a type the same vector δ_c. This mechanism adds a per-cell directional component v_i that varies from cell to cell based on each cell's local stage1→stage2 correspondence in PC space. The direction of v_i is different for each cell (not just a scaled copy of δ_c), and it is zero-mean within each type so it does not shift the type centroid. The η·g_i expansion term restores spread magnitude; λ·v_i provides spread direction.",
  "mechanism_evidence": "1) Per-type cosine similarity of displacement directions: at λ=0 all cells of a type share direction (cosine=1); at λ>0 the pairwise cosine within types should drop substantially (analogous to node 13's η evidence: 1.0→0.00–0.06). 2) Direction group score must rise above 52 (noise floor ~50+2); if direction stays ≤52 the velocity signal is not reaching the score. 3) Report per-group deltas for all four components at each λ. 4) Verify v_i is non-degenerate: mean ‖v_i‖ across cells, fraction of cells with ‖v_i‖>0.1·‖w_c‖. 5) λ=0 control must be element-wise identical to node 13.",
  "mechanism_off_control": "Set --vel-lambda 0 (CLI arg, default 0): the v_i computation is skipped entirely (or multiplied by zero), and the displacement reduces to V(w_c + η·g_i), which is node 13. Output must be element-wise identical to node 13 on the same view and seed ((A!=B).nnz==0). Expected difference at λ>0: direction group rises, cell_state stays within ±2, covariation may drop 1–3 pts.",
  "sources": []
}
原始记录位置/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/16/researcher.jsonl 6 KB
/home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/16/researcher.stderr