总览 · ← 返回运行 20261002-202908-search-t1-scr-D
节点 n24
按PLAN(family lowrank_shape)对型级位移做PC空间方差加权收缩 f_m=s_m²/(s_m²+λ·s_1²),tilde=V@(f·w_c);实测λ>0单调降总分(cov↑但cs↓占主导),提交默认λ=0逐元素还原父节点20。
| 运行?一次完整的自动搜索或 Agent 会话,有自己的锁定配置和证据包。 | 20261002-202908-search-t1-scr-D |
|---|---|
| 父节点 | n20 |
| 子节点 | — |
| 操作?种子:人写的起点;改进:在父节点上改;草稿:从头写;修复:修父节点的报错。 | 改进 |
| 状态 | 已打分 |
| 分数 | 搜索目标分 61.01(+0.0) · X3 61.01(+0.0) |
| 审查 | 未审查 |
| 用时?从运行开始到结束(或到现在)的挂钟时间。 | 22 分 |
| 程序版本 | 947917d426660ecbb867ce7fb3f607522091150a (programs.git) |
方法说明?节点程序自带的 METHOD.md:这个程序做了什么、为什么。
来自 programs.git 947917d426:solution/METHOD.md
按PLAN(family lowrank_shape)对型级位移做PC空间方差加权收缩 f_m=s_m²/(s_m²+λ·s_1²),tilde=V@(f·w_c);实测λ>0单调降总分(cov↑但cs↓占主导),提交默认λ=0逐元素还原父节点20。
实际实现的方法族(family: lowrank_shape,PLAN 指定机制)
在节点 20 完整管线之上加入 PLAN 指定的 PC 空间方差加权的型级位移收缩:
covariation_basis()现在额外返回svds的奇异值s(原先被丢弃:_,_,Vt→_,s,Vt),与V同序(降序)。- 新增
--pc-shrink(λ_reg,默认 0)。当 λ>0:对每个型的 PC 位移w_c = V^T·(scale·δ_c[hvg]),按分量收缩f_m = s_m²/(s_m² + λ_reg·s_1²),w̃_c[m]=f_m·w_c[m],再重构tilde = V @ w̃_c(替换原来的V@(V^T@dv))。λ_reg 无量纲(相对顶 PC 方差)。 - 局部扩张项
η·s_c·V·ĝ_i(节点 20 机制)不变。 - 其余全部沿用节点 20:copy_last 抽样(rng 流不变)、per-type EB 位移 δ_c(含 SYNONYM_PARENTS 改名回退)、时间缩放 α·r(α=1.5,仅用相对时间差)、top-8000 HVG / top-25 PC 基 V / β=1 低秩投影、kNN(k=15) 局部项、typed η=-9、只作用非零元、max(0,·)。单输入视图严格退化 copy_last(该代码路径未动)。
机制关闭对照(mechanism_off_control,成立)
--pc-shrink 0(默认):shrink_f=None,tilde=V@(V^T@dv),与父节点 20 在同一视图同 seed 下预测逐元素一致(X3 A 半 seed0,(A!=B).nnz == 0,双向验证)。这是同一程序里的单开关改动。
机制生效证据(λ>0 时)
- 打印的 f_m(λ=0.1,X3 seed0):
[0.909 0.842 0.743 0.727 0.705 0.587 0.517 0.476 0.436 0.430 0.362 0.334 0.322 0.307 0.292 0.280 0.265 0.260 0.256 0.247 0.242 0.239 0.237 0.234 0.225]——单调递减,顶 PC≈0.91、底部 PC≈0.23。非平坦谱,机制有杠杆(PLAN 风险 1 不成立)。 - 改变的输出元素数 vs 父节点:λ=0.05→1,185,736;λ=1.0→1,190,093(远超 PLAN 的 >100k 阈值,非微扰)。
查分记录(X3 A 半,seed0;用 13/20 次)
| 配置 | 总分 | cell_state | covariation | de_recovery | direction |
|---|---|---|---|---|---|
| 父 λ=0(=提交默认) | 59.60 | 85.31 | 44.62 | 50.48 | 49.87 |
| pc-shrink λ=0.05 | 58.64 | 82.51 | 45.60 | 49.53 | 49.55 |
| pc-shrink λ=0.1 | 57.46 | 78.87 | 45.93 | 49.07 | 49.39 |
| pc-shrink λ=0.25 | 55.04 | 71.30 | 46.48 | 48.18 | 49.22 |
| pc-shrink λ=0.5 | 53.29 | 65.27 | 46.84 | 48.18 | 49.18 |
| pc-shrink λ=1.0 | 52.03 | 60.97 | 47.02 | 48.18 | 49.14 |
| λ=0 + proj-norm(保范数) | 56.88 | 77.78 | 42.88 | 50.00 | 49.89 |
| λ=0.5 + proj-norm | 56.93 | 78.13 | 43.99 | 49.07 | 49.69 |
| λ=1.0 + proj-norm | 56.82 | 77.63 | 44.23 | 49.07 | 49.67 |
| α 扫描(λ=0)α=1.0/1.25/1.75/2.0 | 58.03/59.28/58.99/57.86 | 79.4/83.9/84.1/80.7 | 45.8/45.2/43.9/43.3 | 50.5/50.5/50.0/50.0 | ~49.8 |
结论与判断(如实报告 null)
- pc-shrink 机制对总分是净负:λ↑ 单调提升 covariation(44.62→47.02,+2.4,PLAN 目标组确实改善),但同时单调坍塌 cell_state(85.31→60.97,−24)与 de_recovery(50.48→48.18)。board 对 λ 在 λ→0 处导数即为负,λ∈{0.05,0.1,0.25,0.5,1.0} 全部低于父节点,无一净正区间。
- 机理:收缩低方差 PC 分量等价于减小型级位移幅度,把预测沿 full-displacement↔copy_last 轴往 copy_last 推(node1 copy_last 的 cov=48.44 最高、cs=49.68 最低)。这与节点 21(PC-band 限制局部扩张)观察到的 cov:cs 单调权衡是同一结构代价,交换率极不利(本例约 cov +2.4 换 cs −24)。PLAN 关于「只削噪声 PC、保主导协变轴即可提 cov 而不损 cs」的假设未被数据支持:低方差 PC 分量对 cs 的贡献远大于其对 cov 的破坏。
- proj-norm 保范数补救失败:λ=0+proj-norm 本身就把 board 从 59.60 降到 56.88(cs−7.5、cov−1.7),保范数重标定反而过冲;叠加收缩后 board 稳定在 ~56.9,仍远低于父。
- α 扫描(父 ANALYSIS 建议 #3,正交维度):α=1.5 已是峰值(1.0/1.25/1.5/1.75/2.0 = 58.03/59.28/59.60/58.99/57.86),α 同样呈 cs↔cov 单调权衡,无净正改进。父 α=1.5 保持最优。
- 按父节点教训 #4「判据不可满足时应回退到父配置而非提交权衡点」:PLAN 成功判据(cov≥46 且维持总分)不可满足(cov≥46 需 λ≥0.25,此时总分 −4.6),故提交默认 λ=0,逐元素还原节点 20。本节点贡献是明确记录 pc-shrink / proj-norm / α 三个维度在 X3 上均为净负或中性,为后续节点排除该方向。
验证过 / 没验证
- 验证过:λ=0(默认)与父节点逐元素一致(diff nnz=0,双向);机制生效证据(f_m 谱、改变元素数);λ∈{0.05,0.1,0.25,0.5,1.0}×seed0 + proj-norm 三配置 + α 四点,共 13 次 X3 A 半查分一致指向父配置最优;默认输出通过 vec-check;单输入阶段代码路径未动(严格 copy_last);输出对 seed 确定。
- 没验证:final/proxy 视图实跑(同一代码路径,行为由数据现场计算决定;E8.5→E9.5→E10.5 间隔更大,r、s_c、奇异值谱会不同,pc-shrink 的净负结论在 final 上未直接复核);B 半分数;pc-shrink 的 3-seed 配对(因 seed0 已单调净负、无净正区间,未耗额度做多种子)。
- 知识来源:SYNONYM_PARENTS 沿用节点 5/13/20(官方 T1 词汇改名/拆分,通用谱系知识);奇异值、PC 基、f_m、位移、组分全部由视图输入现场计算,无硬编码阶段统计量、无绝对时间分支(r 只用时间差)。
调研员的计划
| 名称 | PC-space variance-weighted displacement shrinkage for covariation |
|---|---|
| 动机 | covariation is the weakest group (44.89 vs cell_state 88.84, direction 50.15). Cov dropped from 48.20 (node 5, no local expansion) to 44.54 (node 13, local expansion added) and has been stuck at 44-45 since. Parent ANALYSIS explicitly says to stop tuning expansion amplitude and try structural EB/shrinkage changes. Node 21 showed PC-band restriction fails (m>0 all decrease total, 1:7 cov:cs exchange rate). Gene-space EB shrinkage treats genes independently, ignoring correlations; shrinking the type displacement in PC space by variance-explained weight would preserve dominant covariance axes while suppressing noisy low-variance components that distort gene-gene correlations. |
| 做法 | 1) In covariation_basis(), capture singular values s from svds (currently discarded: _, _, Vt = svds(...) → s, _, Vt = svds(...)). Return them alongside V.2) After computing w_c = V^T · (scale · δ_c[hvg]) for each type, apply PC-component-wise shrinkage: f_m = σ_m² / (σ_m² + λ_reg · σ_1²), where σ_m is the m-th singular value and σ_1 the largest. w̃_c[m] = f_m · w_c[m]. λ_reg is scale-free (relative to top PC variance). 3) Use w̃_c for the type-level displacement in HVG space: δ_c[hvg] += V @ w̃_c (replacing V @ w_c). The local expansion term η·s_c·V·ĝ_i is unchanged. 4) Scan λ_reg ∈ {0, 0.05, 0.1, 0.25, 0.5, 1.0} on X3 A-half seed 0. λ_reg=0 must reproduce parent element-wise (control). Expect 6 queries. 5) With best λ_reg, do a secondary α scan: α ∈ {1.0, 1.25, 1.75, 2.0} (α=1.5 already known from parent). 4 queries. 6) 3-seed paired validation of best config vs parent (seed 0/1/2, paired diff per group). 4 queries. 7) Total: ~14 queries. Implementation ~10 min (small code change: capture s, compute f_m, apply). Runtime unchanged (~5s). 8) Single-input stage: code path untouched, exact copy_last. 9) vec-score quick screen: run λ_reg=0 first to verify element-wise match with… |
| 风险 | 1) Singular value spectrum may be too flat (all f_m ≈ 1 even at large λ_reg), making the shrinkage ineffective. Engineer should print f_m values for λ_reg=0.1; if all f_m > 0.95, the mechanism has no leverage and should be aborted early (after 2 queries). 2) Suppressing low-variance PC displacement could hurt de_recovery if DE genes load on those components. Monitor de_recovery in the scan; if it drops > 1 point, consider excluding DE-related PCs from shrinkage. 3) The cov gain may be < 2 points (noise). Use 3-seed paired diff to confirm direction consistency. 4) α scan is secondary; if λ_reg scan shows no cov improvement, skip α scan and report null result. |
代码改动?这个节点的程序和父节点程序的逐行差别:绿色是新增,红色是删除。
对比:父节点版本 21ca33e097。改动的文件:solution/METHOD.md +34 −32、solution/run.py +48 −13
diff --git a/solution/METHOD.md b/solution/METHOD.mdindex 6625fae..4115bcc 100644--- a/solution/METHOD.md+++ b/solution/METHOD.md@@ -1,46 +1,48 @@-按PLAN把节点13的逐细胞局部扩张 η·g_i 改为范数归一+按型增益:ĝ_i=g_i/‖g_i‖,s_c=clip(‖w_c‖/med_c(‖g‖),0.5,5),位移=η·s_c·V ĝ_i;扫 η/裁剪/spow 后提交 typed η=-9(3 seed 配对验证,均值 +0.27,cov 三个 seed 一致 +0.4~0.5)。--eta-norm global --local-eta -3 逐元素还原父节点。+按PLAN(family lowrank_shape)对型级位移做PC空间方差加权收缩 f_m=s_m²/(s_m²+λ·s_1²),tilde=V@(f·w_c);实测λ>0单调降总分(cov↑但cs↓占主导),提交默认λ=0逐元素还原父节点20。 -## 实际实现的方法族(family: other,PLAN 指定机制)+## 实际实现的方法族(family: lowrank_shape,PLAN 指定机制) -完整保留节点 13/16 管线:copy_last 抽样(rng 流不变)、per-type EB 位移 δ_c(含 SYNONYM_PARENTS 改名回退)、时间缩放 α·r(α=1.5,只用相对时间差)、top-8000 HVG / top-25 PC 基 V / β=1 低秩投影、kNN(k=15) 局部项 g_i、只作用非零元、max(0,·)、--vel-lambda(默认 0,旁路)。单输入视图严格退化 copy_last(代码路径未动)。+在节点 20 完整管线之上加入 PLAN 指定的 **PC 空间方差加权的型级位移收缩**: -新增(PLAN 机制,--eta-norm typed,默认):-1. 逐细胞归一:ĝ_i = g_i / max(‖g_i‖, 1e-6)(单位方向)。-2. 按型增益:med_c = median(‖g_j‖, j∈型c 的 stage2 全体细胞);s_c = clip(‖w_c‖ / max(med_c, 0.1), --eta-smin 0.5, --eta-smax 5.0) ** --eta-spow(默认 spow=1 即 PLAN 原式;spow 是探索时加的阻尼开关)。w_c = V^T·(scale·δ_c)[hvg]。-3. 局部位移 = η·s_c·β·(ĝ_i @ V^T),加在 δ_c 位移之上、只作用非零元(同父节点算术位置)。-4. 默认 --local-eta 从 -3 改为 **-9**(归一后幅度变小,需补偿;见扫描表)。+1. `covariation_basis()` 现在额外返回 `svds` 的奇异值 `s`(原先被丢弃:`_,_,Vt` → `_,s,Vt`),与 `V` 同序(降序)。+2. 新增 `--pc-shrink`(λ_reg,默认 **0**)。当 λ>0:对每个型的 PC 位移 `w_c = V^T·(scale·δ_c[hvg])`,按分量收缩 `f_m = s_m²/(s_m² + λ_reg·s_1²)`,`w̃_c[m]=f_m·w_c[m]`,再重构 `tilde = V @ w̃_c`(替换原来的 `V@(V^T@dv)`)。λ_reg 无量纲(相对顶 PC 方差)。+3. 局部扩张项 `η·s_c·V·ĝ_i`(节点 20 机制)不变。+4. 其余全部沿用节点 20:copy_last 抽样(rng 流不变)、per-type EB 位移 δ_c(含 SYNONYM_PARENTS 改名回退)、时间缩放 α·r(α=1.5,仅用相对时间差)、top-8000 HVG / top-25 PC 基 V / β=1 低秩投影、kNN(k=15) 局部项、typed η=-9、只作用非零元、max(0,·)。单输入视图严格退化 copy_last(该代码路径未动)。 -## 机制关闭对照(mechanism_off_control)+## 机制关闭对照(mechanism_off_control,成立) -`--eta-norm global --local-eta -3`:与父节点(节点16 默认 = 节点13 逐元素)在同一视图同 seed 下预测逐元素一致((A!=B).nnz == 0,双向验证),X3 A 半 seed0 = 58.87(= 节点 13/16 记录值)。对照成立。+`--pc-shrink 0`(默认):`shrink_f=None`,`tilde=V@(V^T@dv)`,与父节点 20 在同一视图同 seed 下预测**逐元素一致**(X3 A 半 seed0,`(A!=B).nnz == 0`,双向验证)。这是同一程序里的单开关改动。 -## 机制生效证据+## 机制生效证据(λ>0 时) -- typed η=-3 seed0:输出与父节点相差 1,186,330 个非零元——非微扰。-- 每型 s_c(X3, seed0):Endocardium 1.28、Unknown 1.26、OFT/RV-CM 1.54、aSHF 1.85、IFT-CM 2.15、BEC 2.45、V-CM 4.02、SV-CM 4.22、AVC-CM 4.76、NCC-derived 4.85、ST 4.82、pSHF 5.00(触 clip)。spread 1.26→5.00,非平凡。-- 归一后每细胞 ‖ĝ‖=1(各型一致),归一前 mean‖g‖≈6.6~13.5 随型/密度变化——型内扩张幅度已均匀化、型间与 ‖w_c‖ 成比例。+- 打印的 f_m(λ=0.1,X3 seed0):`[0.909 0.842 0.743 0.727 0.705 0.587 0.517 0.476 0.436 0.430 0.362 0.334 0.322 0.307 0.292 0.280 0.265 0.260 0.256 0.247 0.242 0.239 0.237 0.234 0.225]`——单调递减,顶 PC≈0.91、底部 PC≈0.23。**非平坦谱,机制有杠杆**(PLAN 风险 1 不成立)。+- 改变的输出元素数 vs 父节点:λ=0.05→1,185,736;λ=1.0→1,190,093(远超 PLAN 的 >100k 阈值,非微扰)。 -## 查分记录(X3 A 半,seed 0 除注明外;用 12/20 次)+## 查分记录(X3 A 半,seed0;用 13/20 次) | 配置 | 总分 | cell_state | covariation | de_recovery | direction | |---|---|---|---|---|---|-| global η=-3(=父,seed0/1/2) | 58.87 / 58.74 / 61.06 | 82.85/82.65/87.09 | 44.16/43.76/47.89 | 50.96/49.53/50.48 | 49.78/51.25/50.94 |-| **typed η=-9(提交,seed0/1/2)** | **59.60 / 58.88 / 61.02** | 85.31/83.19/86.81 | 44.62/44.11/48.41 | 50.48/49.07/50.00 | 49.87/51.32/51.16 |-| typed η=-1/-2/-3 | 54.36/55.19/56.05 | 64.6/67.7/70.9 | 47.26/46.89/46.53 | 51.46 | ~50.5 |-| typed η=-6/-8/-10/-11 | 58.49/59.33/**59.66**/59.39 | 80.0/84.2/85.8/85.6 | 45.5/44.9/44.3/44.1 | 51.5/50.5/50.5/50.0 | ~49.8 |-| typed η=-9 smax=3 / smin=2 | 59.01/59.26 | 83.2/85.0 | 44.8/44.1 | 50.5/50.0 | ~49.9 |-| typed spow=0.5 η=-9/-14;spow=0 η=-21 | 58.21/59.10/58.87 | 78.7/84.2/82.8 | 45.4/44.4/44.2 | 51.96/50.0/50.96 | ~50 |--3-seed 配对差(typed η=-9 − global η=-3):总分 +0.73/+0.13/−0.04(均值 +0.27);cell_state +2.46/+0.54/−0.28;covariation **+0.46/+0.35/+0.52(三 seed 一致为正)**;de_recovery −0.48×3(一致为负);direction ≈0。--## 结论与判断--- PLAN 提交判据(cov≥46 且 cs≥85)在 η 维度上不可同时满足:|η| 增大单调 cs↑ cov↓ de↓,是幅度权衡曲线;cov≥46 的配置(|η|≤3)cs 只有 64~71。PLAN 风险 1 部分应验(cov 的大幅损失确是扩张幅度的结构代价),风险 2 未应验(cs 未跌破 85,反而升)。-- 选 η=-9(而非 seed0 最高的 η=-10,59.66):η=-9 有 3-seed 配对验证(从未比父差 >0.05,两次为正),cov 目标组一致改善,避免对 seed0 A 半过拟合。总增益 +0.27 均值 < 噪声 2 分,如实记录:这是"cov/cs 一致小幅改善、de 一致小幅损失"的近中性改动,正式分(B 半)不保证为正。-- de_recovery 的一致 −0.48 是主要残留损失,来源应是强扩张稀释了 δ_c 的 DE 信号(η=-6 时 de 尚有 51.46)。+| **父 λ=0(=提交默认)** | **59.60** | 85.31 | 44.62 | 50.48 | 49.87 |+| pc-shrink λ=0.05 | 58.64 | 82.51 | 45.60 | 49.53 | 49.55 |+| pc-shrink λ=0.1 | 57.46 | 78.87 | 45.93 | 49.07 | 49.39 |+| pc-shrink λ=0.25 | 55.04 | 71.30 | 46.48 | 48.18 | 49.22 |+| pc-shrink λ=0.5 | 53.29 | 65.27 | 46.84 | 48.18 | 49.18 |+| pc-shrink λ=1.0 | 52.03 | 60.97 | 47.02 | 48.18 | 49.14 |+| λ=0 + proj-norm(保范数) | 56.88 | 77.78 | 42.88 | 50.00 | 49.89 |+| λ=0.5 + proj-norm | 56.93 | 78.13 | 43.99 | 49.07 | 49.69 |+| λ=1.0 + proj-norm | 56.82 | 77.63 | 44.23 | 49.07 | 49.67 |+| α 扫描(λ=0)α=1.0/1.25/1.75/2.0 | 58.03/59.28/58.99/57.86 | 79.4/83.9/84.1/80.7 | 45.8/45.2/43.9/43.3 | 50.5/50.5/50.0/50.0 | ~49.8 |++## 结论与判断(如实报告 null)++- **pc-shrink 机制对总分是净负**:λ↑ 单调提升 covariation(44.62→47.02,+2.4,PLAN 目标组确实改善),但同时单调**坍塌** cell_state(85.31→60.97,−24)与 de_recovery(50.48→48.18)。board 对 λ 在 λ→0 处导数即为负,λ∈{0.05,0.1,0.25,0.5,1.0} 全部低于父节点,无一净正区间。+- 机理:收缩低方差 PC 分量等价于**减小型级位移幅度**,把预测沿 full-displacement↔copy_last 轴往 copy_last 推(node1 copy_last 的 cov=48.44 最高、cs=49.68 最低)。这与节点 21(PC-band 限制局部扩张)观察到的 cov:cs 单调权衡是同一结构代价,交换率极不利(本例约 cov +2.4 换 cs −24)。PLAN 关于「只削噪声 PC、保主导协变轴即可提 cov 而不损 cs」的假设**未被数据支持**:低方差 PC 分量对 cs 的贡献远大于其对 cov 的破坏。+- **proj-norm 保范数补救失败**:λ=0+proj-norm 本身就把 board 从 59.60 降到 56.88(cs−7.5、cov−1.7),保范数重标定反而过冲;叠加收缩后 board 稳定在 ~56.9,仍远低于父。+- **α 扫描(父 ANALYSIS 建议 #3,正交维度)**:α=1.5 已是峰值(1.0/1.25/**1.5**/1.75/2.0 = 58.03/59.28/**59.60**/58.99/57.86),α 同样呈 cs↔cov 单调权衡,无净正改进。父 α=1.5 保持最优。+- 按父节点教训 #4「判据不可满足时应回退到父配置而非提交权衡点」:PLAN 成功判据(cov≥46 且维持总分)不可满足(cov≥46 需 λ≥0.25,此时总分 −4.6),故**提交默认 λ=0,逐元素还原节点 20**。本节点贡献是明确记录 pc-shrink / proj-norm / α 三个维度在 X3 上均为净负或中性,为后续节点排除该方向。 ## 验证过 / 没验证 -- 验证过:global+η=-3 与父逐元素一致;默认(typed η=-9)seed 0/1/2 输出确定、通过 vec-check;默认输出与 --local-eta -9 显式运行逐元素一致;耗时 ~5-11s、内存不变;单输入阶段代码路径未动(严格 copy_last)。-- 没验证:final/proxy 视图实跑(同一代码路径,行为由数据现场计算决定;E8.5→E9.5→E10.5 间隔更大,r 与 s_c 数值会不同);B 半分数;de 损失的修复方案(如局部项对 top-|δ_c| 基因降权)未及尝试。-- 知识来源:SYNONYM_PARENTS 沿用节点 5/13(官方 T1 词汇改名/拆分,通用谱系知识);其余全部由视图数据现场计算,无硬编码阶段统计量、无绝对时间分支(r 只用时间差)。+- 验证过:λ=0(默认)与父节点逐元素一致(diff nnz=0,双向);机制生效证据(f_m 谱、改变元素数);λ∈{0.05,0.1,0.25,0.5,1.0}×seed0 + proj-norm 三配置 + α 四点,共 13 次 X3 A 半查分一致指向父配置最优;默认输出通过 vec-check;单输入阶段代码路径未动(严格 copy_last);输出对 seed 确定。+- 没验证:final/proxy 视图实跑(同一代码路径,行为由数据现场计算决定;E8.5→E9.5→E10.5 间隔更大,r、s_c、奇异值谱会不同,pc-shrink 的净负结论在 final 上未直接复核);B 半分数;pc-shrink 的 3-seed 配对(因 seed0 已单调净负、无净正区间,未耗额度做多种子)。+- 知识来源:SYNONYM_PARENTS 沿用节点 5/13/20(官方 T1 词汇改名/拆分,通用谱系知识);奇异值、PC 基、f_m、位移、组分全部由视图输入现场计算,无硬编码阶段统计量、无绝对时间分支(r 只用时间差)。diff --git a/solution/run.py b/solution/run.pyindex f844124..276b4aa 100644--- a/solution/run.py+++ b/solution/run.py@@ -11,17 +11,33 @@ per-cell local expansion term computed from g_i = mean_{j in kNN(i)} (z_j - z_i) the mean PC-space offset of the cell's k=15 nearest neighbours in the stage-2 pool (z = V^T x_hvg, centered). -This node (PLAN: per-type norm-normalized expansion): with --eta-norm typed-(default), g_i is replaced by s_c * ghat_i where ghat_i = g_i / ||g_i|| (unit-direction) and s_c = clip(||w_c|| / median_c(||g||), smin, smax) ** spow, with+Node 20 (per-type norm-normalized expansion): with --eta-norm typed (default),+g_i is replaced by s_c * ghat_i where ghat_i = g_i / ||g_i|| (unit direction)+and s_c = clip(||w_c|| / median_c(||g||), smin, smax) ** spow, with w_c = V^T Delta_c[hvg] the type-level PC displacement. Default eta = -9,-spow = 1, clip [0.5, 5]. Mechanism-off control: `--eta-norm global---local-eta -3` reproduces node 13/16 element-wise (verified (A!=B).nnz == 0).-An extra exponent flag --eta-spow (0 = pure unit-norm, 0.5 = sqrt-damped-per-type gain) was explored; spow=1, eta=-9 was the best 3-seed paired config.+spow = 1, clip [0.5, 5]. -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.+Node 24 (this node, PLAN family lowrank_shape): adds --pc-shrink lambda_reg,+a PC-component variance-weighted shrinkage of the type-level displacement.+covariation_basis now also returns the singular values s; each type's PC+displacement w_c = V^T (scale*delta_c[hvg]) is shrunk component-wise by+f_m = s_m^2 / (s_m^2 + lambda_reg * s_1^2) before reconstruction+tilde = V @ (f * w_c). This reorients the displacement toward the dominant+covariance PCs and suppresses noise-dominated low-variance PCs. lambda_reg is+scale-free (relative to the top-PC variance). DEFAULT lambda_reg = 0 (all+f_m = 1), which reproduces node 20 element-wise -- verified (A!=B).nnz == 0 on+X3 A-half seed 0. Empirically the shrinkage is a NET NEGATIVE on X3: it raises+covariation (44.6 -> 47.0 at lambda=1.0) but collapses cell_state (85.3 -> 61.0)+via displacement-magnitude reduction, monotonically lowering the board score+for every lambda>0 (see METHOD.md). Kept as a single-flag mechanism-off control;+submission default lambda_reg=0 == parent node 20.++Mechanism-off control for node 20 too: `--eta-norm global --local-eta -3`+reproduces node 13/16 element-wise (verified (A!=B).nnz == 0).++View independence: V, singular values and all offsets come from the view's own+input matrices; only relative time differences are used. Single input stage ->+exact copy_last (this code path is untouched). """ from __future__ import annotations@@ -96,9 +112,10 @@ def covariation_basis(Xa: sparse.csr_matrix, Xb: sparse.csr_matrix, D -= mu kk = int(min(k, min(D.shape) - 1)) v0 = rng.standard_normal(min(D.shape))- _, _, Vt = svds(D, k=kk, v0=v0)+ _, s, Vt = svds(D, k=kk, v0=v0) V = np.ascontiguousarray(Vt[::-1].T) # (g, kk), descending singular values- return hvg, mu.ravel(), V+ s = np.ascontiguousarray(s[::-1]) # descending singular values+ return hvg, mu.ravel(), V, s def main() -> None:@@ -136,6 +153,11 @@ def main() -> None: parser.add_argument("--eta-spow", type=float, default=float(os.environ.get("VEC_ETA_SPOW", "1.0")), help="exponent on s_c (0 = pure unit-norm, 1 = PLAN)")+ parser.add_argument("--pc-shrink", type=float,+ default=float(os.environ.get("VEC_PC_SHRINK", "0.0")),+ help="lambda_reg: PC-component shrinkage f_m = s_m^2 / "+ "(s_m^2 + lambda_reg * s_1^2) applied to the "+ "type-level displacement in PC space (0 = off)") parser.add_argument("--vel-lambda", type=float, default=float(os.environ.get("VEC_VEL_LAMBDA", "0.0"))) parser.add_argument("--vel-k", type=int,@@ -206,13 +228,23 @@ def main() -> None: # low-rank covariation basis from the two input stages (own rng stream, # keeps the sample_rows draw above identical to the parent) hvg = V = mu = None+ svals = None+ shrink_f = 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(),+ hvg, mu, V, svals = covariation_basis(prev.X.tocsr(), last.X.tocsr(), args.proj_k, args.proj_hvg, args.proj_cells, rng_proj)+ # PC-component shrinkage factors f_m = s_m^2/(s_m^2 + lam*s_1^2)+ if args.pc_shrink and float(svals[0]) > 0:+ sq = svals.astype(np.float64) ** 2+ shrink_f = sq / (sq + float(args.pc_shrink) * sq[0])+ print("pc-shrink lam=%.3g f_m=%s"+ % (args.pc_shrink,+ np.array2string(shrink_f, precision=3, max_line_width=200)),+ file=sys.stderr) # 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).@@ -283,7 +315,10 @@ def main() -> None: d = scale * delta_for(str(t)) if use_proj: dv = d[hvg]- tilde = V @ (V.T @ dv)+ wc = V.T @ dv+ if shrink_f is not None:+ wc = wc * shrink_f+ tilde = V @ wc nd, nt = float(np.linalg.norm(dv)), float(np.linalg.norm(tilde)) if args.proj_norm and nt > 0: tilde *= nd / nt
调研来源?调研员查到并用到的知识条目和文献检索结果(只列标题和编号)。
用到的知识库条目
| 编号 | 标题 | 出处 |
|---|---|---|
| k041 | Within-stage pseudotime and graph toolkit offline: scanpy DPT/PAGA/Leiden, Palantir, CellRank 2 | 10.1186/s13059-019-1663-x (PAGA); 10.1038/s41587-019-0068-4 (Palantir); 10.1038/s41592-024-02303-9 (CellRank 2) |
| k031 | Offline OT toolkit in the sandbox: moscot TemporalProblem, wot OTModel, POT, geomloss | 10.1038/s41586-024-08453-2 (moscot); 10.1016/j.cell.2019.01.006 (Waddington-OT) |
| k007 | Interval staging and held-out-window filtering of external data | notes/official/来件/virtualembryo.ai/rules.md |
分析结果?分析员写的 ANALYSIS.json:改了什么、各组分数怎么变、假设是否成立、经验和下一步建议。
| 改了什么 | 在节点20管线上新增 --pc-shrink:型级位移 w_c 在 PC 空间按 f_m=s_m^2/(s_m^2+λ·s_1^2) 分量收缩后重构。扫描 λ∈{0.05..1.0}、proj-norm、α∈{1.0..2.0} 后全部净负或中性,最终提交默认 λ=0,输出逐元素还原父节点20(榜分四组全部 +0.00),耗时 5.3→9.1s。 |
|---|---|
| 各组分数的变化 | cell_state:不变 +0.00(88.84,提交=父节点) covariation:不变 +0.00(44.89,提交=父节点);但 X3 seed0 内部扫描显示 λ>0 时 cov 44.62→47.02 而 cell_state 85.31→60.97,board 单调下降 de_recovery:不变 +0.00(51.38,提交=父节点) direction:不变 +0.00(50.15,提交=父节点) |
| family_id | lowrank_shape |
| 假设是否成立 | 否 |
| 经验 |
|
| mechanism_active | 否 |
| 下一步建议 |
|
对话摘要?每个角色和大模型对话的统计:轮数、工具调用、用时、token 数和最后的回答摘录;原始记录只给路径。
只给统计和最后回答的摘录;完整对话请到原始记录位置里列出的文件看。
分析员
| 角色?调研员写计划、工程师改代码、分析员解读分数、审查员检查作弊。 | 分析员 alibaba-token-plan-cn/qwen3.8-max |
|---|---|
| 调用次数 | 1 次 |
| 轮数?大模型一共回复了几轮(每轮可以调用多个工具)。 | 4 |
| 工具调用?大模型调用读文件、执行命令等工具的次数,按工具名统计。 | 共 3 次:bash 1、write 1、edit 1 |
| 用时 | 不到 1 分 |
| token 数?输入 / 输出(含思考)的 token 数,来自接口返回的用量。 | 输入 12,950 · 输出 1,075 · 思考 977 |
| 任务(第一行) | 分析节点 n24 的打分结果,写 ANALYSIS.json |
| 最后的回答(摘录) | ANALYSIS.json written |
| 原始记录位置?完整对话记录在 Spark 上的文件路径;看板不复制原始内容。 | /home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/24/analyst.jsonl 9 KB /home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/24/analyst.stderr |
工程师
| 角色 | 工程师 alibaba-token-plan-cn/qwen3.8-max |
|---|---|
| 调用次数 | 1 次 |
| 轮数 | 31 |
| 工具调用 | 共 34 次:bash 24、edit 7、read 2、write 1 |
| 用时 | 18 分 |
| token 数 | 输入 64,422 · 输出 10,086 · 思考 12,618 |
| 任务(第一行) | 按计划修改程序:PC-space variance-weighted displacement shrinkage for covariation |
| 最后的回答(摘录) | Done. Summary of this node (24, improve on node 20): **做了什么**:按 PLAN(family `lowrank_shape`)实现 PC 空间方差加权的型级位移收缩——`covariation_basis` 捕获奇异值 `s`,每型位移 `w_c=V^T·(scale·δ_c[hvg])` 按分量 `f_m=s_m²/(s_m²+λ·s_1²)` 收缩后重构 `tilde=V@(f·w_c)`,加 `--pc-shrink`(默认 0)。机制关闭对照成立:λ=0 与父节点 20 逐元素一致(diff nnz=0,双向验证,通过 vec-check)。 **查分结果(X3 A 半 seed0,用 13/20)**: - 机制生效但**净负**:λ↑ 单调提 covariation(44.62→47.02,+2.4,PLAN 目标组确实改善)但坍塌 cell_state(85.3→61.0),board 对所有 λ>0 单调下降(58.64/57.46/55.04/53.29/52.03),无净正区间。 - proj-norm 保范数补救失败(~56.9,仍低于父 59.60)。 - α 扫描(父建议 #3,正交维度):α=1.5 已是峰值(1.0/1.25/**1.5**/1.75/2.0 = 58.03/59.28/**59.60**/58.99/57.86)。 **结论**:收缩低方差 PC 等价于减小位移幅度,沿 full-displacement↔copy_last 轴后退,与节点 21 同一 cov:cs 单调权衡(交换率极不利)。按父教训 #4,**提交默认 λ=0,逐元素还原节点 20**,如实记录 pc-shrink/proj-norm/α 三维度均净负或中性。 **下一步最值得试**:所有"减小型级/局部位移幅度"的操作都在同一权衡曲线上净负——应停止在该轴调参。真正有希望的是**不减小总位移、只改变扩张方向协变结构**的手段:如把局部扩张 ĝ_i 的目标从"型内 kNN 切向"改为"匹配目标阶段可推断的协变方向"(但目标阶段不可用,需从窗外 E14+ 或 prior 通路推晚期协变先验),或对 δ_c 做**基因级**而非 PC 级的结构重排以在保 cs 的同时提 cov。 |
| 原始记录位置 | /home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/24/engineer.jsonl 160 KB /home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/24/engineer.stderr |
调研员
| 角色 | 调研员 alibaba-token-plan-cn/qwen3.8-max |
|---|---|
| 调用次数 | 1 次 |
| 轮数 | 1 |
| 工具调用 | 共 0 次:— |
| 用时 | 2 分 |
| token 数 | 输入 17,322 · 输出 1,216 · 思考 5,841 |
| 任务(第一行) | 为节点 n24(改进,父节点 n20)写改进计划 PLAN.json |
| 最后的回答(摘录) | rage and should be aborted early (after 2 queries). 2) Suppressing low-variance PC displacement could hurt de_recovery if DE genes load on those components. Monitor de_recovery in the scan; if it drops > 1 point, consider excluding DE-related PCs from shrinkage. 3) The cov gain may be < 2 points (noise). Use 3-seed paired diff to confirm direction consistency. 4) α scan is secondary; if λ_reg scan shows no cov improvement, skip α scan and report null result.", "family_id": "lowrank_shape", "mechanism": "Shrink the per-type displacement vector in PC space by variance-explained weight: low-variance PCs (noise-dominated) get their displacement component attenuated, high-variance PCs (covariance-carrying) are preserved. This regularizes the displacement direction to align with the data's dominant covariance structure.", "vs_constant_shift": "Not a constant shift: the shrinkage factor f_m varies by PC component based on the data's own singular value spectrum, and it modulates the *direction* of an existing per-type displacement in a structured, variance-dependent way. A constant shift would add the same vector to all cells of a type; here the type displacement's PC decomposition is selectively attenuated.", "mechanism_evidence": "1) Print f_m for each PC at the chosen λ_reg: expect a monotone decreasing sequence (top PCs f_m ≈ 1, bottom PCs f_m < 0.5). If all f_m ≈ 1, mechanism is inactive. 2) Count elements changed vs parent: expect > 100k nonzero differences (non-trivial perturbation). 3) Report per-group deltas (cov, cs, de, direction) separately. 4) Compare the PC-space displacement norm ||w̃_c|| vs ||w_c|| per type: expect reduction concentrated in types whose displacement loads on low-variance PCs.", "mechanism_off_control": "Set λ_reg = 0 (or --pc-shrink 0): all f_m = 1, w̃_c = w_c, output must be element-wise identical to parent node 20. Verify (A!=B).nnz == 0 on X3 A-half seed 0. This is a single flag change in the same program.", "sources": [] } ``` |
| 原始记录位置 | /home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/24/researcher.jsonl 5 KB /home/spark-longxinyang/vec/runs/formal/20261002-202908-search-t1-scr-D/nodes/24/researcher.stderr |