总览 · ← 返回运行 20261003-004922-search-t2-heart-interp-g24-D
节点 n25
实现T2HI-01型级重心表达漂移(X+=lam·(t−f)(mu_hi−mu_lo),坐标不动);表达组+3.0被cell_state对冲,净+0.68<1.0止损,按PLAN以lam=0关闭态提交(与父22逐位一致)。
| 运行?一次完整的自动搜索或 Agent 会话,有自己的锁定配置和证据包。 | 20261003-004922-search-t2-heart-interp-g24-D |
|---|---|
| 父节点 | n22 |
| 子节点 | — |
| 操作?种子:人写的起点;改进:在父节点上改;草稿:从头写;修复:修父节点的报错。 | 改进 |
| 状态 | 已打分 |
| 分数 | 搜索目标分 61.41(+0.0) · proxy 61.41(+0.0) · 3 次复测均分 61.33 |
| 审查 | 通过 检查1(越界读取):未发现问题——所有数据读取都经 --data 视图(run.py:536/550-551 read_stage);唯一的外部读取 run.py:345 只用 manifest['external'] 里的相对路径且被 --qiu-var 0.0(run.py:78)默认关闭;无绝对路径、..、/mnt、/home、网络下载。; 检查2(硬编码目标统计量):未发现问题——run.py:67-83 的常量全是算法超参(k、strength、max_frac、lam 等),无细胞类型比例、表达值或基因列表常量;漂移量 mu_lo/mu_hi/mu_mix 全部在 run.py:… |
| 用时?从运行开始到结束(或到现在)的挂钟时间。 | 21 分 |
| 程序版本 | d9e448b1772553199fc53d10992c640d5532dce2 (programs.git) |
方法说明?节点程序自带的 METHOD.md:这个程序做了什么、为什么。
来自 programs.git d9e448b177:solution/METHOD.md
实现T2HI-01型级重心表达漂移(X+=lam·(t−f)(mu_hi−mu_lo),坐标不动);表达组+3.0被cell_state对冲,净+0.68<1.0止损,按PLAN以lam=0关闭态提交(与父22逐位一致)。
方法族 / 实现
family_id = T2HI-01(type-level barycentric expression drift),实现于 run.py::_type_drift(CLI --drift-lam / --drift-min-cells / --gene-damp):
- 父管线不变:mix(align=procrustes, scale_damp=1)+ 型内 kNN 坐标平滑(k=20, strength=1.5, max_frac=0.45, k_adaptive);T2HI-04 表达平滑、T2HI-08 方差增强、径向门控保持关闭。
- 机制:mix 复现抽样后已知每个细胞来自哪个括号阶段(from_a 掩码)。对每个类型:mu_lo/mu_hi = 该型来自低/高阶段细胞的均值,mu_mix = 该型全部混合细胞均值,mu_t = (1−t)·mu_lo + t·mu_hi(t 为 manifest 相对几何时间分数,视图无关)。delta_type = mu_t − mu_mix = (t − f_type)·(mu_hi − mu_lo),其中 f_type 是该型实际的高阶段占比——mix 按各阶段自身组成分层抽样,组成随时间变化的型 f_type ≠ t,故 delta 非零(实测 mean|f−t| = 0.267)。X[i] += lam·delta_type[label_i],clip 到 ≥0。型级常数位移:保型内协方差,坐标逐位不动。
- PLAN 风险条款生效:每型每侧 <5 细胞则 delta=0(--drift-min-cells 5)。单输入退路:无括号分支不触发漂移,delta 恒 0(mu_lo=mu_hi),行为与父一致。
- 与常数位移的区别:delta 逐型不同(各型自己的阶段均值差 × 自己的组成偏差),且依赖混合比例 t 与实际 f_type,非全局固定向量。
机制生效证据(免费诊断 + 查分四组分指纹,seed 0)
- lam=1.0 诊断:5/5 个跨阶段共有类型全部漂移(50 型中 45 个只存在于单侧、按规则 delta=0);3553/17616 细胞(20.2%)表达改变;mean‖delta‖=4.71(500 基因),mean|delta|/gene_SD = 0.0725(略低于 PLAN 预期区间 [0.1,1.0] 下沿,因心脏 E8.25↔E9.5 只有 5 个共有类型);坐标与 lam=0 逐位相同(np.array_equal=True)。
- 四组分指纹符合 PLAN 预期:expression_change 63.83→64.92(lam1)→66.84(lam3)(+3.0,23 个节点以来首次撼动 63.9 平台,A 半);shape_scale 逐位不变 52.68(表达-only);local_spatial +1.7(neighborhood_mmd 依赖表达,随漂移改善);cell_state −2.1(mmd_u/variogram 恶化)。expression_change 确实响应型级重心漂移 → PLAN 假设 4 未被证伪。
对照结果(mechanism_off_control,vec-score A 半,seed 0,共 5 次查分)
关闭态 --drift-lam 0(=默认):漂移代码块不执行(if args.drift_lam != 0.0 门控),need_labels 逻辑与父一致,输出与父节点 22(=17/19/20 同一输出)管线逐位一致(构造保证 + 双跑确定性验证 np.array_equal=True),A 半分沿用父记录 61.033(65.93/63.83/61.70/52.68),未重复耗额度。
| lam | board A半 | Δboard | expression_change | cell_state | local_spatial | shape_scale |
|---|---|---|---|---|---|---|
| 0(对照,提交态) | 61.033 | – | 63.83 | 65.93 | 61.70 | 52.68 |
| 0.5 | 61.119 | +0.09 | 64.46 | 65.27 | 62.06 | 52.68 |
| 1.0 | 61.232 | +0.20 | 64.92 | 64.90 | 62.42 | 52.68 |
| 2.0 | 61.444 | +0.41 | 65.69 | 64.35 | 63.05 | 52.68 |
| 3.0 | 61.709 | +0.68 | 66.84 | 63.88 | 63.44 | 52.68 |
| 4.0 | 61.596 | +0.57 | 66.81 | 63.35 | 63.54 | 52.68 |
交换比:expression_change 增益在 lam≈3 饱和(66.8),cell_state 侵蚀线性持续(约 −0.5/lam·2),净增益峰值 +0.68 < +1.0(T2 噪声止损阈值)→ 按 PLAN 止损条款提交 lam=0 关闭态。gene-damp 未启用(mean|delta|/SD=0.07,1 SD 截断几乎不生效)。
结论与教训
- T2HI-01 机制真实生效且是首个移动 expression_change 的 mix 系干预(63.9 平台 23 节点未动),但它移动的方式(把共有类型重心推向时间中点)与 cell_state(分布 MMD)直接对冲:混合物的 f_type 组成重心比时间中点重心更接近参考 E8.75 分布。表达/状态两组在此方向上近乎零和。
- 只有 5 个跨阶段共有类型限制了漂移覆盖面(20% 细胞);真实括号(E8.25↔E8.75,31 个共有类型)上该机制覆盖面会大得多,行为可能与代理不同——这是代理无法验证的部分,关闭态提交对 final 同样安全(delta 在单侧类型上恒 0)。
- 下一步最值得试:(a) cell_state 友好的表达干预——只漂移 DE 方向上参考轨迹需要的分量(如用 prior/ 通路注释限制 delta 到时间响应基因),而非全基因组重心校正;(b) local_spatial 对表达漂移正响应(+1.7)值得单独利用:固定表达分布形状、只改空间-表达耦合的干预。
验证与未验证
- 已验证:默认输出确定性(双跑逐位一致)、vec-check 通过、n=17616 ∈ [1000,17616]、漂移只改表达不改坐标、四组分指纹与 PLAN 预期一致、lam 网格 5 点 + 对照沿用。
- 未验证:gene-damp 开关的查分(预期无效,未耗额度);漂移在真实括号(31 共有类型)上的行为;B 半分数。
- 生物学知识来源:仅通用机制知识——log1p 均值的线性插值 = 混合物重心(数学恒等式);未使用任何保留阶段/基因型信息。
调研员的计划
| 名称 | type-level barycentric expression drift on mix (expression_change) |
|---|---|
| 动机 | expression_change has been frozen at 63.90 across all 22 scored nodes — zero variance, no intervention has ever touched it. Parent 22's ANALYSIS explicitly recommends pivoting to expression. Nodes 6/13 showed type×gene trend shifts CAN move expression_change to 68.68 (+4.78) but crashed cell_state (53.57) by applying per-cell shifts that broke intra-type structure. Node 12 (mix + per-cell slope) was falsified because additive per-cell corrections disrupted the mix's expression geometry. The gap: no one has tried a type-level mean drift that preserves intra-type covariance while moving each type's expression centroid toward its time-interpolated target. |
| 做法 | 1) In run.py, after mix() produces X (n_cells × n_genes) with type labels, compute for each type: mu_lo = mean expression of that type's cells drawn from the low stage, mu_hi = mean from the high stage, mu_mix = mean of all that type's mixed cells. 2) Target centroid mu_t = (1-t)mu_lo + tmu_hi where t is the geometric time fraction from the manifest. 3) Drift delta_type = mu_t - mu_mix. Apply X_new[i] = X[i] + lam * delta_type[label_i] for all cells of that type. 4) lam grid: {0 (control), 0.25, 0.5, 0.75, 1.0}. lam=0 is bit-identical to parent. 5) Optional per-gene damping: for genes where |delta_type[g]| > 1.0 SD of that gene across all cells, scale delta by 1/|delta| to prevent outlier genes from dominating; flag --gene-damp on/off. 6) Single-input fallback: if only one stage is available, mu_lo = mu_hi = mu_mix, delta = 0, no-op. 7) Diagnostics before scoring: log per-type ||delta||, fraction of types with nonzero delta, max |delta|/gene_SD. Run free diagnostics first (no vec-score), confirm delta is nonzero and directionally sensible, then score lam grid (≤6 queries). Stop-loss: if best lam < control + 1.0 (T2 noise), submit lam=0. |
| 风险 | 1) Drift may hurt cell_state if type centroids shift cells across decision boundaries — mitigate with lam ≤ 0.5 first, monitor cell_state on first scored config. 2) Types with few cells at one stage have noisy mu estimates — require ≥5 cells per type per stage, else delta=0 for that type. 3) If mu_lo ≈ mu_hi for most types (little temporal change), drift is near-zero and the mechanism is a no-op — free diagnostics catch this before spending queries. 4) expression_change metric may not reward centroid shifts if it measures per-cell deltas rather than type means — in that case the first scored config reveals it immediately (≤2 queries wasted). |
代码改动?这个节点的程序和父节点程序的逐行差别:绿色是新增,红色是删除。
对比:父节点版本 efe458fdf3。改动的文件:solution/METHOD.md +28 −42、solution/run.py +96 −2
diff --git a/solution/METHOD.md b/solution/METHOD.mdindex 764248c..44951cf 100644--- a/solution/METHOD.md+++ b/solution/METHOD.md@@ -1,56 +1,42 @@-实现 T2HI-04 型内 kNN 平滑的径向门控(外周细胞位移衰减、内部全强度收缩);机制生效(半径保留 0.946→0.99、shape_scale +1.45)但 local_spatial 损失 2–3 倍于形状增益,9 配置最优仅 +0.06,按 PLAN 止损以 gate_frac=inf 关闭态提交(与父 17/19/20 逐位一致)。+实现T2HI-01型级重心表达漂移(X+=lam·(t−f)(mu_hi−mu_lo),坐标不动);表达组+3.0被cell_state对冲,净+0.68<1.0止损,按PLAN以lam=0关闭态提交(与父22逐位一致)。 ## 方法族 / 实现 -family_id = **T2HI-04**(径向门控的型内 kNN 坐标平滑),实现于 `run.py::_knn_smooth`(新增 `gate_frac` / `gate_power` 参数,CLI `--gate-frac` / `--gate-power`):+family_id = **T2HI-01**(type-level barycentric expression drift),实现于 `run.py::_type_drift`(CLI `--drift-lam` / `--drift-min-cells` / `--gene-damp`): -1. 父管线不变:mix(align=procrustes, scale_damp=1)+ 型内 kNN 坐标平滑(k=20, strength=1.5, max_frac=0.45, k_adaptive);T2HI-04 表达平滑(alpha=0)与 T2HI-08 方差增强(beta=0)保持关闭。-2. 门控机制:对每个类型,R_type=median(||x_i−μ_type||),w_i=clip(1−(d_i/(gate_frac·R_type))^gate_power, 0, 1),位移 delta_i=strength·w_i·(c_i−x_i),再走原有 max_frac 逐维截断。外周细胞(定义型空间边界)位移被衰减,内部细胞全强度收缩。-3. 单输入阶段退路:门控只作用于坐标平滑步,不依赖输入阶段数;单阶段分支无平滑、门控不触发,行为与父一致。-4. 视图无关:门控只依赖坐标与标签的几何,无绝对时间、无路径/视图判断。+1. 父管线不变:mix(align=procrustes, scale_damp=1)+ 型内 kNN 坐标平滑(k=20, strength=1.5, max_frac=0.45, k_adaptive);T2HI-04 表达平滑、T2HI-08 方差增强、径向门控保持关闭。+2. 机制:mix 复现抽样后已知每个细胞来自哪个括号阶段(from_a 掩码)。对每个类型:mu_lo/mu_hi = 该型来自低/高阶段细胞的均值,mu_mix = 该型全部混合细胞均值,mu_t = (1−t)·mu_lo + t·mu_hi(t 为 manifest 相对几何时间分数,视图无关)。delta_type = mu_t − mu_mix = (t − f_type)·(mu_hi − mu_lo),其中 f_type 是该型实际的高阶段占比——mix 按各阶段自身组成分层抽样,组成随时间变化的型 f_type ≠ t,故 delta 非零(实测 mean|f−t| = 0.267)。X[i] += lam·delta_type[label_i],clip 到 ≥0。型级常数位移:保型内协方差,坐标逐位不动。+3. PLAN 风险条款生效:每型每侧 <5 细胞则 delta=0(--drift-min-cells 5)。单输入退路:无括号分支不触发漂移,delta 恒 0(mu_lo=mu_hi),行为与父一致。+4. 与常数位移的区别:delta 逐型不同(各型自己的阶段均值差 × 自己的组成偏差),且依赖混合比例 t 与实际 f_type,非全局固定向量。 -## 机制生效证据(seed 0,全部 17616 细胞参与平滑,0 跳过)+## 机制生效证据(免费诊断 + 查分四组分指纹,seed 0) -| 配置 | radius_retention | mean w | w=0 比例 | corr(disp, d/R) | mean disp/SD |-|---|---:|---:|---:|---:|---:|-| 关闭对照(gate=inf) | 0.9457 | 1 | 0 | – | 0.176 |-| gf=1.5, gp=1 | 0.9910 | 0.33 | 8.5% | −0.43 | 0.064 |-| gf=2.0, gp=2 | 0.9694 | 0.71 | 2.3% | −0.14 | 0.132 |+- lam=1.0 诊断:5/5 个跨阶段共有类型全部漂移(50 型中 45 个只存在于单侧、按规则 delta=0);3553/17616 细胞(20.2%)表达改变;mean‖delta‖=4.71(500 基因),mean|delta|/gene_SD = 0.0725(略低于 PLAN 预期区间 [0.1,1.0] 下沿,因心脏 E8.25↔E9.5 只有 5 个共有类型);坐标与 lam=0 逐位相同(np.array_equal=True)。+- 四组分指纹符合 PLAN 预期:expression_change 63.83→64.92(lam1)→66.84(lam3)(+3.0,**23 个节点以来首次撼动 63.9 平台**,A 半);shape_scale 逐位不变 52.68(表达-only);local_spatial +1.7(neighborhood_mmd 依赖表达,随漂移改善);cell_state −2.1(mmd_u/variogram 恶化)。expression_change 确实响应型级重心漂移 → PLAN 假设 4 未被证伪。 -- 每型 RMS 半径保留从对照 0.946 升到 0.969–0.991(PLAN 预期 ≥0.95 达成);-- 位移幅度与归一化径向距离负相关(r=−0.14…−0.43,功率 1 时更强;未全部达 r<−0.5,因 max_frac 截断与 kNN 位移本身的空间结构稀释了相关);-- 与常数位移可区分:型心近似不动(位移指向 kNN 邻域质心、幅度按径向位置调制),改变的是型内空间分布的形状/延展,非整体位置。-- 四组分指纹符合 PLAN 预期:坐标-only 改动 → cell_state / expression_change 逐位不变(65.93 / 63.83),shape_scale 上升、local_spatial 下降(见下表)。+## 对照结果(mechanism_off_control,vec-score A 半,seed 0,共 5 次查分) -## 对照结果(mechanism_off_control,vec-score A 半,seed 0,共 8 次查分)+关闭态 `--drift-lam 0`(=默认):漂移代码块不执行(`if args.drift_lam != 0.0` 门控),need_labels 逻辑与父一致,输出与父节点 22(=17/19/20 同一输出)管线逐位一致(构造保证 + 双跑确定性验证 np.array_equal=True),A 半分沿用父记录 61.033(65.93/63.83/61.70/52.68),未重复耗额度。 -关闭态 `--gate-frac inf`(=默认)输出与父节点 17/19/20 管线 **X 与 spatial_3D 均 np.array_equal=True**(本节点直接验证),A 半分沿用父记录 61.033(65.93/63.83/61.70/52.68),未重复耗额度。+| lam | board A半 | Δboard | expression_change | cell_state | local_spatial | shape_scale |+|---|---:|---:|---:|---:|---:|---:|+| 0(对照,提交态) | 61.033 | – | 63.83 | 65.93 | 61.70 | 52.68 |+| 0.5 | 61.119 | +0.09 | 64.46 | 65.27 | 62.06 | 52.68 |+| 1.0 | 61.232 | +0.20 | 64.92 | 64.90 | 62.42 | 52.68 |+| 2.0 | 61.444 | +0.41 | 65.69 | 64.35 | 63.05 | 52.68 |+| 3.0 | 61.709 | +0.68 | 66.84 | 63.88 | 63.44 | 52.68 |+| 4.0 | 61.596 | +0.57 | 66.81 | 63.35 | 63.54 | 52.68 | -| 配置 (gate_frac, gate_power, max_frac[, strength]) | board | Δboard | shape_scale | local_spatial |-|---|---:|---:|---:|---:|-| 关闭对照(=父) | 61.033 | – | 52.68 | 61.70 |-| 2.0, 2, 0.45 | **61.093** | **+0.06** | 54.13 (+1.45) | 60.49 (−1.21) |-| 2.0, 1, 0.45 (s=2.5, mf=0.65) | 60.946 | −0.09 | 53.21 | 60.82 |-| 2.0, 1, 0.65 | 60.605 | −0.43 | 53.85 | 58.82 |-| 2.0, 1, 0.45 | 60.602 | −0.43 | 53.89 | 58.76 |-| 1.5, 1, 0.45 (s=3.0, mf=0.65) | 60.645 | −0.39 | 53.50 | 59.33 |-| 1.5, 2, 0.45 | 60.500 | −0.53 | 53.41 | 58.84 |-| 1.5, 1, 0.65 | 60.214 | −0.82 | 53.99 | 57.12 |-| 1.5, 1, 0.45 | 60.211 | −0.82 | 53.98 | 57.11 |+交换比:expression_change 增益在 lam≈3 饱和(66.8),cell_state 侵蚀线性持续(约 −0.5/lam·2),净增益峰值 +0.68 < +1.0(T2 噪声止损阈值)→ 按 PLAN 止损条款提交 lam=0 关闭态。gene-damp 未启用(mean|delta|/SD=0.07,1 SD 截断几乎不生效)。 -**机制检验结论:方向证实、净增益证伪。** 门控确实解除 shape_scale 对平滑强度的约束(+0.7…+1.45,单调于门控强度),PLAN 风险 1 成真:外周细胞恰是 local_spatial(neighborhood_mmd)最依赖的细胞,其位移衰减造成的损失是形状增益的 2–3 倍(局部/形状交换比 ≈ −2.5:1)。补偿性提高 strength/max_frac 只同时侵蚀两者(半径保留下降),无一配置净超 +0.1。最优 +0.06 << +1 止损阈值 → **按 PLAN 止损条款以 gate_frac=inf 关闭态提交**。+## 结论与教训 -与节点 21(r/SD 归一化的边界权重,61.35 B 半)合起来:两种归一化、三种门控形状(线性/平方/梯形)都给出同一交换比,径向门控家族在本 board 已到顶——kNN 平滑的收益主体来自对外周噪声细胞的收缩本身,"保边界、缩内部"不成立。+- T2HI-01 机制真实生效且是**首个移动 expression_change 的 mix 系干预**(63.9 平台 23 节点未动),但它移动的方式(把共有类型重心推向时间中点)与 cell_state(分布 MMD)直接对冲:混合物的 f_type 组成重心比时间中点重心更接近参考 E8.75 分布。表达/状态两组在此方向上近乎零和。+- 只有 5 个跨阶段共有类型限制了漂移覆盖面(20% 细胞);真实括号(E8.25↔E8.75,31 个共有类型)上该机制覆盖面会大得多,行为可能与代理不同——这是代理无法验证的部分,关闭态提交对 final 同样安全(delta 在单侧类型上恒 0)。+- 下一步最值得试:(a) cell_state 友好的表达干预——只漂移 DE 方向上参考轨迹需要的分量(如用 prior/ 通路注释限制 delta 到时间响应基因),而非全基因组重心校正;(b) local_spatial 对表达漂移正响应(+1.7)值得单独利用:固定表达分布形状、只改空间-表达耦合的干预。 -## 提交内容+## 验证与未验证 -默认参数即关闭态,输出与父节点 17/19/20 逐位一致(零损失保底)。`vec-check` 通过(status ok);seed 0/1 各自确定(重复运行 np.array_equal 验证);`EXECUTION.json` 为 `{"gpu": false}`;无 ARTIFACTS。--## 生物学知识来源--无新增外部生物学知识;门控是纯几何机制(到型质心的径向距离),只使用视图内数据。--## 未验证--- gate_frac ∈ (2.0, ∞) 的更弱门控细网格(gf=2.5/3.0, gp=2):趋势外推净增益在 +0.06 附近封顶且随门控→0 收敛到对照,止损后不再耗额度。-- 非径向的门控坐标(如按 kNN 位移方向与径向的夹角门控)与 B 半/final 视图(关闭态与父逐位一致,迁移性等同父节点 17)。+- 已验证:默认输出确定性(双跑逐位一致)、vec-check 通过、n=17616 ∈ [1000,17616]、漂移只改表达不改坐标、四组分指纹与 PLAN 预期一致、lam 网格 5 点 + 对照沿用。+- 未验证:gene-damp 开关的查分(预期无效,未耗额度);漂移在真实括号(31 共有类型)上的行为;B 半分数。+- 生物学知识来源:仅通用机制知识——log1p 均值的线性插值 = 混合物重心(数学恒等式);未使用任何保留阶段/基因型信息。diff --git a/solution/run.py b/solution/run.pyindex 01fa9f8..73b78fd 100644--- a/solution/run.py+++ b/solution/run.py@@ -39,6 +39,13 @@ Optional ``--pca-norm on`` applies a deterministic PCA canonicalisation of the output frame (subtract centroid -> rotate onto PCA axes -> force det=+1 -> orient each axis by third moment) after smoothing, to remove chirality noise. +Optional family T2HI-01 ``--drift-lam``: type-level barycentric expression+drift (per-type centroid pulled from the realised mix fraction f_type to the+temporal midpoint t; expression only, coordinates untouched). Tested on the+proxy A-half: expression_change +3.0 at lam=3 but cell_state -2.1, net +0.68+< +1.0 stop-loss; therefore OFF (lam=0, control) by default, bit-identical to+the parent pipeline. See METHOD.md.+ All times used are relative (from the manifest); behaviour is invariant to a uniform time shift of the view. """@@ -71,6 +78,82 @@ K_ADAPTIVE = True # k_eff = min(k, max(3, m-1)): smooth small types instead of QIU_VAR = 0.0 # family T2HI-08: per-type variance expansion exponent beta; 0 = off (control, bit-identical to parent node 19/17) GATE_FRAC = float("inf") # family T2HI-04-gate: radial peripheral gating radius x per-type median distance to type centroid; inf = off (control, bit-identical to parent) GATE_POWER = 1.0+DRIFT_LAM = 0.0 # family T2HI-01: type-level barycentric expression drift strength; 0 = off (control, bit-identical to parent node 22)+DRIFT_MIN_CELLS = 5 # require >= this many cells per type per stage, else delta=0 for that type+GENE_DAMP = False # cap |delta_g| at 1.0 SD of gene g across all cells+++def _type_drift(expr: np.ndarray, labels: np.ndarray, from_a: np.ndarray, t: float, lam: float,+ min_cells: int = 5, gene_damp: bool = False):+ """Family T2HI-01: type-level barycentric expression drift.++ For each cell type: mu_lo = mean of that type's cells drawn from the low+ stage, mu_hi = mean from the high stage, mu_mix = mean of all that type's+ mixed cells. Target centroid mu_t = (1-t)*mu_lo + t*mu_hi (the type's own+ temporal midpoint; mix's realised per-type stage fraction f can differ from+ the global t because each stage is stratified by its own type composition).+ delta_type = mu_t - mu_mix = (t - f) * (mu_hi - mu_lo). Shift every cell of+ the type by lam * delta_type: a type-level, covariance-preserving drift in+ expression space only (coordinates untouched). Types with < min_cells cells+ on either stage side get delta = 0. With gene_damp, |delta_g| is capped at+ 1.0 SD of gene g across all cells. Returns (new_expr, evidence dict).+ """+ X = np.asarray(expr, dtype=np.float64)+ labels = np.asarray(labels).astype(str)+ from_a = np.asarray(from_a, dtype=bool)+ n, G = X.shape+ Xn = X.copy()+ gene_sd = X.std(axis=0)+ norms = []+ rel_sd = []+ n_types_drifted = 0+ n_types_skipped = 0+ n_cells_drifted = 0+ f_deviations = []+ for lab in np.unique(labels):+ idx = np.flatnonzero(labels == lab)+ lo = idx[from_a[idx]]+ hi = idx[~from_a[idx]]+ if lo.size < min_cells or hi.size < min_cells:+ n_types_skipped += 1+ continue+ mu_lo = X[lo].mean(axis=0)+ mu_hi = X[hi].mean(axis=0)+ mu_mix = X[idx].mean(axis=0)+ mu_t = (1.0 - t) * mu_lo + t * mu_hi+ delta = mu_t - mu_mix+ f = hi.size / max(idx.size, 1)+ f_deviations.append(f - t)+ if gene_damp:+ ad = np.abs(delta)+ cap = np.maximum(gene_sd, 1e-12)+ delta = np.where(ad > cap, np.sign(delta) * cap, delta)+ nd = float(np.linalg.norm(delta))+ if nd <= 0.0:+ n_types_skipped += 1+ continue+ norms.append(nd)+ with np.errstate(divide="ignore", invalid="ignore"):+ rs = np.abs(delta) / np.where(gene_sd > 0, gene_sd, np.nan)+ rel_sd.append(float(np.nanmean(np.where(np.isfinite(rs), rs, 0.0))))+ Xn[idx] = np.clip(X[idx] + lam * delta[None, :], 0.0, None)+ n_types_drifted += 1+ n_cells_drifted += idx.size+ ev = {+ "drift_lam": lam,+ "drift_n_types_drifted": int(n_types_drifted),+ "drift_n_types_skipped": int(n_types_skipped),+ "drift_n_cells": int(n_cells_drifted),+ "drift_mean_norm": float(np.mean(norms)) if norms else 0.0,+ "drift_max_norm": float(np.max(norms)) if norms else 0.0,+ "drift_mean_rel_sd": float(np.mean(rel_sd)) if rel_sd else 0.0,+ "drift_mean_abs_f_minus_t": float(np.mean(np.abs(f_deviations))) if f_deviations else 0.0,+ }+ d = np.abs(Xn - X).sum(axis=1)+ base = np.abs(X).sum(axis=1)+ ev["drift_frac_cells_changed_gt1pct"] = float(np.mean(d > 0.01 * np.maximum(base, 1e-12))) if n else 0.0+ ev["drift_mean_abs_change"] = float(np.abs(Xn - X).mean())+ return Xn.astype(np.float32), ev def _knn_smooth(coords: np.ndarray, labels: np.ndarray, k: int, strength: float, max_frac: float, adaptive: bool = False,@@ -441,6 +524,9 @@ def main() -> None: parser.add_argument("--var-source", choices=("auto", "diag", "ext"), default="auto") parser.add_argument("--gate-frac", type=float, default=GATE_FRAC) parser.add_argument("--gate-power", type=float, default=GATE_POWER)+ parser.add_argument("--drift-lam", type=float, default=DRIFT_LAM)+ parser.add_argument("--drift-min-cells", type=int, default=DRIFT_MIN_CELLS)+ parser.add_argument("--gene-damp", choices=("on", "off"), default=("on" if GENE_DAMP else "off")) args = parser.parse_args() manifest = load_manifest(args.data)@@ -467,7 +553,7 @@ def main() -> None: expr, coords, info = interpolate(stage_a, stage_b, t, params) ev = {}- need_labels = args.strength != 0.0 or args.expr_alpha != 0.0 or args.qiu_var != 0.0+ need_labels = args.strength != 0.0 or args.expr_alpha != 0.0 or args.qiu_var != 0.0 or args.drift_lam != 0.0 labels = None if need_labels: n = int(info["n"])@@ -501,13 +587,21 @@ def main() -> None: expr, ev4 = _var_expand(expr, labels, args.qiu_var, args.data, manifest, genes, source=args.var_source) ev.update(ev4) + if args.drift_lam != 0.0:+ from_a = np.zeros(int(info["n"]), dtype=bool)+ from_a[: int(info["n_from_a"])] = True+ expr, ev5 = _type_drift(expr, labels, from_a, float(t), args.drift_lam,+ min_cells=args.drift_min_cells, gene_damp=(args.gene_damp == "on"))+ ev.update(ev5)+ keep = {k: info.get(k) for k in ("t", "n", "rms_a", "rms_b", "out_rms", "n_shared_types", "z_dot", "z_flipped", "align", "n_from_a", "n_from_b")} print(json.dumps({"bracket": [a["stage"], b["stage"]], **keep, "strength": args.strength, "k": args.k, "pca_norm": args.pca_norm, "rescale_damp": args.rescale_damp, "aniso": args.aniso, "aniso_damp": args.aniso_damp, "k_adaptive": args.k_adaptive, "expr_alpha": args.expr_alpha, "k_expr": args.k_expr, "qiu_var": args.qiu_var, "var_source": args.var_source,- "gate_frac": args.gate_frac, "gate_power": args.gate_power, **ev}, default=float), file=sys.stderr)+ "gate_frac": args.gate_frac, "gate_power": args.gate_power,+ "drift_lam": args.drift_lam, "gene_damp": args.gene_damp, **ev}, default=float), file=sys.stderr) write_t2(args.out, expr, coords, genes, seed=args.seed)
调研来源?调研员查到并用到的知识条目和文献检索结果(只列标题和编号)。
用到的知识库条目
| 编号 | 标题 | 出处 |
|---|---|---|
| k007 | Interval staging and held-out-window filtering of external data | notes/official/来件/virtualembryo.ai/rules.md |
| k026 | Canonicalise predicted 3D coordinates before submission | notes/pitfalls/04_scorer_invariance.md |
| k003 | Fused Gromov-Wasserstein mapping for spatial snapshots | 10.1038/s41586-024-08453-2 |
分析结果?分析员写的 ANALYSIS.json:改了什么、各组分数怎么变、假设是否成立、经验和下一步建议。
| 改了什么 | 在父22管线上新增 T2HI-01 型级重心表达漂移 _type_drift(--drift-lam,delta=(t-f_type)(mu_hi-mu_lo),只改表达、坐标逐位不动,每型每侧<5细胞则delta=0);A半探索 lam=0.5~4 后净增益峰值 +0.68 < 1.0 止损阈值,按 PLAN 以 lam=0 关闭态提交,输出与父22逐位一致,榜分四组分全部 +0.00。 |
|---|---|
| 各组分数的变化 | cell_state:提交态 +0.00(66.70);探索态 lam=3 时 65.93→63.88(-2.1,等量对冲表达增益) expression_change:提交态 +0.00(63.90,与父逐位一致);探索态 lam=3 时 63.83→66.84(+3.0,超噪声,23节点以来首次撼动63.9平台) local_spatial:提交态 +0.00(62.34);探索态 lam=3 时 61.70→63.44(+1.7,neighborhood_mmd 依赖表达) shape_scale:提交态 +0.00(52.70);探索态逐位不变(表达-only 干预,符合预期指纹) |
| family_id | T2HI-01 |
| 假设是否成立 | 否 |
| 经验 |
|
| mechanism_active | 是 |
| 下一步建议 |
|
对话摘要?每个角色和大模型对话的统计:轮数、工具调用、用时、token 数和最后的回答摘录;原始记录只给路径。
只给统计和最后回答的摘录;完整对话请到原始记录位置里列出的文件看。
分析员
| 角色?调研员写计划、工程师改代码、分析员解读分数、审查员检查作弊。 | 分析员 alibaba-token-plan-cn/qwen3.8-max |
|---|---|
| 调用次数 | 1 次 |
| 轮数?大模型一共回复了几轮(每轮可以调用多个工具)。 | 3 |
| 工具调用?大模型调用读文件、执行命令等工具的次数,按工具名统计。 | 共 2 次:bash 1、write 1 |
| 用时 | 不到 1 分 |
| token 数?输入 / 输出(含思考)的 token 数,来自接口返回的用量。 | 输入 13,236 · 输出 1,011 · 思考 895 |
| 任务(第一行) | 分析节点 n25 的打分结果,写 ANALYSIS.json |
| 最后的回答(摘录) | ANALYSIS.json written |
| 原始记录位置?完整对话记录在 Spark 上的文件路径;看板不复制原始内容。 | /home/spark-longxinyang/vec/runs/formal/20261003-004922-search-t2-heart-interp-g24-D/nodes/25/analyst.jsonl 8 KB /home/spark-longxinyang/vec/runs/formal/20261003-004922-search-t2-heart-interp-g24-D/nodes/25/analyst.stderr |
工程师
| 角色 | 工程师 alibaba-token-plan-cn/qwen3.8-max |
|---|---|
| 调用次数 | 1 次 |
| 轮数 | 28 |
| 工具调用 | 共 33 次:bash 18、edit 12、read 2、write 1 |
| 用时 | 17 分 |
| token 数 | 输入 64,394 · 输出 10,640 · 思考 11,924 |
| 任务(第一行) | 按计划修改程序:type-level barycentric expression drift on mix (expression_change) |
| 最后的回答(摘录) | 完成。总结: **做了什么**:按 PLAN 在父 22 管线上实现 T2HI-01 型级重心表达漂移(`_type_drift`,`--drift-lam` 默认 0=关闭态):mix 复现 from_a 掩码后,对每个跨阶段共有类型计算 delta=(t−f_type)(mu_hi−mu_lo),X+=lam·delta,坐标逐位不动,每型每侧 <5 细胞则 delta=0,单输入天然 no-op。 **查分结果**(A 半,5 次查分):机制真实生效——mean|f−t|=0.267,5/5 共有型漂移、20% 细胞改变;expression_change 23 节点以来首次突破 63.9 平台(63.83→66.84 @lam=3),local_spatial +1.7,但 cell_state −2.1 等量对冲,shape_scale 不变。净增益 lam=0.5/1/2/3/4 → +0.09/+0.20/+0.41/+0.68/+0.57,峰值 +0.68 < +1.0 止损阈值,按 PLAN 以 lam=0 关闭态提交(与父 22 逐位一致,双跑确定性 + vec-check 已验证,预期榜分 61.41)。 **下一步最值得试**:(a) 只把漂移限制在时间响应基因子集(用 prior/ 通路注释),保留 expression_change 增益、避开 cell_state 的全分布 MMD 对冲;(b) local_spatial 对表达漂移的正响应(+1.7)可单独利用——固定分布形状、只改空间-表达耦合。真实括号有 31 个共有类型(代理仅 5),该机制在 final 上覆盖面大得多,代理结论外推需谨慎。 |
| 原始记录位置 | /home/spark-longxinyang/vec/runs/formal/20261003-004922-search-t2-heart-interp-g24-D/nodes/25/engineer.jsonl 200 KB /home/spark-longxinyang/vec/runs/formal/20261003-004922-search-t2-heart-interp-g24-D/nodes/25/engineer.stderr |
调研员
| 角色 | 调研员 alibaba-token-plan-cn/qwen3.8-max |
|---|---|
| 调用次数 | 1 次 |
| 轮数 | 1 |
| 工具调用 | 共 0 次:— |
| 用时 | 3 分 |
| token 数 | 输入 13,193 · 输出 1,464 · 思考 8,192 |
| 任务(第一行) | 为节点 n25(改进,父节点 n22)写改进计划 PLAN.json |
| 最后的回答(摘录) | mitigate with lam ≤ 0.5 first, monitor cell_state on first scored config. 2) Types with few cells at one stage have noisy mu estimates — require ≥5 cells per type per stage, else delta=0 for that type. 3) If mu_lo ≈ mu_hi for most types (little temporal change), drift is near-zero and the mechanism is a no-op — free diagnostics catch this before spending queries. 4) expression_change metric may not reward centroid shifts if it measures per-cell deltas rather than type means — in that case the first scored config reveals it immediately (≤2 queries wasted).", "family_id": "T2HI-01", "mechanism": "For each cell type, compute the time-interpolated target expression centroid from both input stages' type means, then shift all mixed cells of that type by lam × (target_centroid − mixed_centroid). Type-level, covariance-preserving drift in expression space only.", "vs_constant_shift": "Constant shift applies one global vector to all cells. This drift is type-specific (each type gets its own delta from its own stage means), expression-space-only (coordinates untouched), and composition-aware (delta depends on the mix proportion t and the actual mixed centroid, not a fixed offset). It changes intra-type mean without changing intra-type covariance structure.", "mechanism_evidence": "Free diagnostics: per-type ||delta_type|| > 0 for ≥80% of types; mean |delta|/gene_SD in [0.1, 1.0]; expression matrix L2 distance to target stage decrease (computed offline). After scoring: expression_change moves ≥1 point while cell_state and local_spatial stay within ±0.5 of parent (expression-only change should not touch spatial groups). If expression_change doesn't move, the metric doesn't respond to centroid drift and the mechanism is falsified.", "mechanism_off_control": "--drift-lam 0 (default) produces output bit-identical to parent node 22 (verified by np.array_equal on X and spatial_3D). Expected difference: zero. Any nonzero difference at lam=0 indicates a bug.", "sources": []} ``` |
| 原始记录位置 | /home/spark-longxinyang/vec/runs/formal/20261003-004922-search-t2-heart-interp-g24-D/nodes/25/researcher.jsonl 7 KB /home/spark-longxinyang/vec/runs/formal/20261003-004922-search-t2-heart-interp-g24-D/nodes/25/researcher.stderr |
审查员
| 角色 | 审查员 alibaba-token-plan-cn/qwen3.8-max |
|---|---|
| 调用次数 | 1 次 |
| 轮数 | 6 |
| 工具调用 | 共 10 次:read 7、bash 2、write 1 |
| 用时 | 1 分 |
| token 数 | 输入 24,484 · 输出 1,445 · 思考 2,301 |
| 任务(第一行) | 审查节点 n25 的程序是否越界读取、写死目标、钻评分器漏洞 |
| 最后的回答(摘录) | REVIEW.json written |
| 原始记录位置 | /home/spark-longxinyang/vec/runs/formal/20261003-004922-search-t2-heart-interp-g24-D/nodes/25/reviewer.jsonl 129 KB /home/spark-longxinyang/vec/runs/formal/20261003-004922-search-t2-heart-interp-g24-D/nodes/25/reviewer.stderr |