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

总览 · ← 返回运行 20261003-171955-search-t2-embryo-interp-chain-12h

节点 n39 在终选来历上

DETR_EXT:把 DETR 检出率几何插值扩展到单侧独有类型(37% 输出细胞),以共有类型细胞的逐基因检出漂移作缺失侧代理,OFF-only 置零(s=0.35);PLAN 的 AMPSHRINK 幅度收缩证否(7 配置全劣于父)。

运行?一次完整的自动搜索或 Agent 会话,有自己的锁定配置和证据包。20261003-171955-search-t2-embryo-interp-chain-12h
父节点n37
子节点n41
操作?种子:人写的起点;改进:在父节点上改;草稿:从头写;修复:修父节点的报错。改进
状态已打分
分数搜索目标分 65.08(+1.0) · proxy 65.08(+1.0) · 3 次复测均分 64.69
审查通过 1 越界读取:未发现问题——数据读取仅通过 load_manifest/read_stage(args.data)(run.py:1866-1876)和 view 内 prior/ 路径(load_pathway_sets run.py:589-598、tf_indicator run.py:484,均在 view_manifest 的 prior 清单内);导入的 src.task2_spatial.* 是任务辅助库而非 src/common/evaluation 打分器;无绝对路径、'..'、/mnt、/home、data/raw、downloads,无联网。; 2 硬编码目标统计量:未…
用时?从运行开始到结束(或到现在)的挂钟时间。36 分
程序版本2e54d3d851de87d7b4172c14fcfb7f0d5b202610 (programs.git)

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

来自 programs.git 2e54d3d851:solution/METHOD.md

DETR_EXT:把 DETR 检出率几何插值扩展到单侧独有类型(37% 输出细胞),以共有类型细胞的逐基因检出漂移作缺失侧代理,OFF-only 置零(s=0.35);PLAN 的 AMPSHRINK 幅度收缩证否(7 配置全劣于父)。

  • family_id: T2EI-01
  • parent: node 37 (DETR, 64.05 official / 63.17 A半 seed0)
  • mechanism_off_control: --ablate mechanism(或 T2_DETR_EXT=0)关闭 DETR_EXT,其余管线不变,输出与父节点 37 逐位一致(sha256 已在 seed 0/1/2 上验证)。

PLAN 机制 AMPSHRINK:已实现并证否(7 次查分、3 种解码)

按 PLAN 在 DETR 之后实现:逐共有类型(两侧≥10 细胞)× 软权重激活基因(τ=0.15), m_t = exp((1−t)·ln m_a + t·ln m_b)(m_a/m_b 为括号阶段实测 nnz 均值),m_cur > m_t 时对该型该基因全部 nnz 条目乘 f = (m_t/m_cur)^strength(只缩不放大)。无随机、保稀疏、保序。

信号检查(PLAN 步骤 5 / 风险 1):机制有信号——中位相对 gap 9.8%(>5% 门槛),70% 的型×基因对 m_cur > m_t,平均收缩因子 0.91(在预期 0.85–0.98 内),nnz_delta=0(稀疏模式不变)。但查分全部劣于父节点:

配置board (A半 seed0)variogrammmd_unbhdde_score
父节点 3763.170.0104630.011390.050830.2857
pooled s=0.2563.040.0103530.011300.052700.2857
pooled s=0.562.420.0102760.011850.055560.2500
pooled s=1.061.000.0102070.014630.063500.2500
sided s=0.561.300.0101510.013180.061830.2143
sided s=1.057.880.0100850.020980.079940.2143
gapped(>10%) s=0.562.490.0102810.011770.055270.2500
gapped(>10%) s=1.061.160.0102120.014300.062700.2500

结论(判无效,满足 ≥3 解码/幅度、≥6 次查分):variogram 收益始终 <0.0004(PLAN 自己的阈值),而 mmd_u / neighborhood_mmd / de_score 随 strength 单调恶化——乘性值缩放即便保序、保稀疏,也把细胞推离 真值拟合的 PCA 流形并破坏表达-位置配对;pb_maxshift(0.14–0.82)远超 PLAN 的 <0.02 预期,"伪批量近似 对消"假设不成立。"nnz 幅度冻结在源阶段"这一动机假设本身为假:α=5 位移后幅度已接近目标(gap 中位仅 9.8%,且收缩方向系统性地偏离真值)。与 node 17/19/37 的教训一致:值通道修正一律伤 nbhd/mmd,只有 支持集(零/非零)通道可安全修。AMPSHRINK 代码保留,默认 T2_AMPSHRINK_ON=0。

提交的备选机制 DETR_EXT(针对同一弱项 cell_state/variogram)

诊断:父节点 DETR 只覆盖共有类型(两侧≥10 细胞,10 个),但 mix 输出按全类型分层抽样,37% 的输出 细胞(a 侧 857 + b 侧 985,共 24 个单侧类型)的检出支持集完全未校正,仍冻结在源阶段水平。b 侧细胞 相对合并几何目标在 95% 基因上过检出(0.134 vs 0.045)。

机制:对每个单侧类型的输出细胞,用逐基因全局检出漂移作缺失侧代理: p_t(g) = p_own(g)·(pa_sh(g)/pb_sh(g))^((1−t) 对 b 侧, −t 对 a 侧),其中 pa_sh/pb_sh 只在共有类型 细胞上计算(DETR_EXT_MODE=shared)——去掉类型组成变化对漂移估计的混杂;两侧任一未检出的基因被 门掉(保护单侧类型的身份基因不被清零)。过检出部分按与 DETR 相同的规则 OFF-only 置零: k = round((p_cur−p_t)·n·strength),逐细胞确定性键跨基因共享(模拟深度相关 dropout)。无新随机源 (独立 rng = seed+777002,确定性);不注入任何值。

生物学依据:发育中检出率随时间的乘性(log 线性)漂移与 node 37 已验证的几何插值目标同源;缺失侧用 群体水平漂移近似是"谱系去向/发育事件顺序"级别的通用程序知识,不含任何保留阶段的测量值。所有量均从 view 输入现场计算,无硬编码。

机制证据(seed 0):覆盖 24 个类型、1842/5000 细胞(37%)、445 基因;移除 13,678 个 nnz 条目 (这些细胞 nnz 的 ~17%);逐型检出率相对目标的平均绝对 gap 0.0763 → 0.0552;pb_maxshift=0.299 (与已验证安全的 DETR 0.211 同量级);共享类型细胞的输出不受影响(rng 独立,逐位不变)。

查分记录(A 半 proxy,共 19 次,余 1)

DETR_EXT 剂量响应(seed 0):

配置boardvariogrammmd_unbhdde_scorede_dir
mode=all s=0.364.110.0078480.011060.052480.32140.3724
mode=all s=0.464.130.0072580.011210.054040.32140.3701
mode=all s=0.564.160.0069220.011540.055820.35710.3651
mode=all s=0.7563.450.0063640.012550.062200.35710.3548
mode=all s=1.554.550.0090630.019730.090830.14290.0912
mode=shared s=0.35(提交)64.340.0075130.010940.052320.32140.3786
mode=shared s=0.564.270.0068720.011200.054440.32140.3707
mode=shared s=0.7563.730.0062450.012090.059850.32140.3657

种子确认(mode=shared s=0.35):seed 0/1/2 = 64.34 / 63.89 / 63.97,均值 64.07(父节点 seed 0 = 63.17,官方 rank3 = 63.71)。四组变化(seed 0 vs 父):cell_state 53.17→57.94(variogram raw 0.01046→0.00751,mmd_u 0.01139→0.01094),expression_change 61.64→62.24(de_score 0.286→0.321, de_dir 0.384→0.379),local_spatial 60.12→59.41(nbhd 0.0508→0.0523,代价 −0.7),shape_scale 不变 (坐标逐位未动)。净 +1.17(seed 0)/ +0.9(三种子均值口径)。

选择 shared s=0.35 而非 all s=0.5 的理由:board 更高且 nbhd 伤害减半(0.0523 vs 0.0558)、 de_dir 保留更多;shared 漂移估计去掉组成混杂,更可能迁移到真实括号(两端相邻、共有类型多)。

验证与未验证

  • 已验证:vec-check 通过(seed 0/1/2);--ablate mechanism 输出与父节点 37 逐位一致(sha256, 3 个种子);重跑同 seed 输出逐位一致(确定性);nnz 条目只减不增(OFF-only);单输入回退路径 (b is None 提前返回,DETR_EXT 需 bracket)不受影响;程序只依赖时间差 t,不依赖绝对时间/视图字段。
  • 未验证:真实括号(final 视图)上的效果——真实两端相邻、单侧类型构成不同,漂移代理的偏差未知; B 半分数;s 在 0.35–0.5 之间的更细网格(差异在噪声内,未花额度)。
  • 已知风险:nbhd 小幅受损(−0.7 分)是该机制的系统性代价;若正式评分的 nbhd 地板/天花板更紧, 损失可能放大。s≥0.75 时 nbhd 伤害陡增,不要上调。

知识来源

无外部文献/数据库条目。全部量(检出率、漂移比、目标、细胞数、t)从 view 的 manifest 与输入 h5ad 现场计算;所用生物学假设仅为"表达检出随发育时间近似乘性漂移"(与父节点已验证的几何插值目标同源, 属通用机制知识,不含保留阶段测量值)。

调研员的计划

名称AMPSHRINK:nnz 幅度几何插值收缩(DETR 的幅度通道推广)
动机父节点 37 的 cell_state 组(54.70)仍是最弱组:variogram skill 0.469(地板下,5.86/12.5),mmd_u skill 0.625。DETR 修复了检出率(零/非零)通道的双峰,但 nnz 幅度通道仍冻结在源阶段水平——a 侧细胞保留 E6.75 幅度分布、b 侧保留 E8.0,位移(α·t·Δ)只做均匀平移不改变幅度分布形状。ANALYSIS 明确建议'把几何插值目标推广到 nnz 幅度通道'。occupancy_dice(skill 0.424)虽更弱但历史上所有坐标整形均劣化它,暂不触碰。
做法步骤:
1. 在 DETR 之后新增 AMPSHRINK 模块。对每个共有类型(两侧≥10 细胞)× 每个软权重激活基因(与 DETR 相同的 τ=0.15 激活):
a) 从括号阶段实测数据计算 m_a = mean(nnz values at stage a),m_b = mean(nnz at stage b);
b) 几何目标 m_t = exp((1−t)·ln m_a + t·ln m_b);
c) 当前输出中该型×基因的 nnz 均值 m_cur;
d) 若 m_cur > m_t(过表达):对该型该基因所有 nnz 条目乘收缩因子 f = (m_t / m_cur)^strength;
e) 若 m_cur ≤ m_t:不动(只收缩不放大,ON 方向已证明结构性有毒)。
2. 参数:strength 初值 0.5,网格 [0.25, 0.5, 1.0, 1.5];t 为插值分数(与 DETR 相同)。
3. 实现约束:
- 随机源:无随机性(确定性比例缩放),无需额外 rng;
- 保稀疏:不改变零/非零模式(只做乘法);
- 保序:同一基因内的细胞间相对大小不变(比例缩放),保护空间配对;
- pb 保护:逐型逐基因的收缩在伪批量上近似对消(a 侧略缩、b 侧略缩),de_score/de_direction 预期不动。
4. 单输入回退:无括号时不执行(与 DETR 相同,在 bracket 分支内)。
5. 快速筛选:先跑 strength=0.5,检查 variogram raw 是否下降≥0.0003(当前 0.01016);若不动则检查 m_cur 与 m_t 的实际差距(若差距<5%则机制无信号,直接放弃);若 nbhd raw 上升>0.001 则放弃。
6. 种子确认:最佳 strength 用 seed 0/1/2 确认,要求三种子 variogram raw 一致低于父节点。
7. 诊断输出(机制证据):打印被修正的型×基因数、平均收缩因子、m_cur−m_t 差距分布、pb_maxshift。
风险1) 位移 α=5 已把 nnz 均值推到接近目标(m_cur≈m_t),则无信号可修——Engineer 应先测量 gap 分布,若中位 gap<5% 立即放弃,不浪费查分;2) 比例缩放改变绝对表达水平,可能轻微影响 mmd_u 的核带宽匹配——监控 mmd_u raw 若上升>0.0002 则回退;3) 若收缩幅度太大(strength>1),可能把正常异质性压扁,损害 variogram 的共变信号——以 variogram raw 非单调为停止信号;4) 与 DETR 的交互:DETR 移除了部分条目,剩余条目的均值已变——AMPSHRINK 必须在 DETR 之后计算 m_cur(顺序依赖)。

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

对比:父节点版本 7a44e350fb。改动的文件:solution/METHOD.md +82 −49、solution/README.md +15 −13、solution/run.py +289 −6

diff --git a/solution/METHOD.md b/solution/METHOD.mdindex 3b99f0e..82fe83a 100644--- a/solution/METHOD.md+++ b/solution/METHOD.md@@ -1,60 +1,93 @@-DETR:按共有类型把检出率向几何插值目标 p_a^(1−t)·p_b^t 做 OFF 移除(强度1.5),修复地板下 variogram;PLAN 的 SPATRESID 空间门控坍缩证否(8 配置噪声内)。+DETR_EXT:把 DETR 检出率几何插值扩展到单侧独有类型(37% 输出细胞),以共有类型细胞的逐基因检出漂移作缺失侧代理,OFF-only 置零(s=0.35);PLAN 的 AMPSHRINK 幅度收缩证否(7 配置全劣于父)。 -## 节点 37(improve,父 35,board T2:embryo:val_interp)+- family_id: T2EI-01+- parent: node 37 (DETR, 64.05 official / 63.17 A半 seed0)+- mechanism_off_control: `--ablate mechanism`(或 `T2_DETR_EXT=0`)关闭 DETR_EXT,其余管线不变,输出与父节点 37 逐位一致(sha256 已在 seed 0/1/2 上验证)。 -### 做了什么+## PLAN 机制 AMPSHRINK:已实现并证否(7 次查分、3 种解码) -1. **PLAN 机制 SPATRESID(坐标混居条件化的残余双峰坍缩)——实现、对照通过、证否。**-   - 实现:在最终输出坐标空间(aniso/jitter/RMS 之后)逐共有类型建 15-NN(含自身,与 neighborhood_mmd 同尺度),h_i = 邻域异源占比;只对 h_i ≥ θ 的细胞执行父节点 RESID 坍缩(软权重 w=clip(|s|/0.15,0,1),nnz-only、clip≥0,保合并均值系数改用门控后计数 c_a=γ·n_bg/(n_ag+n_bg)、c_b=γ·n_ag/(n_ag+n_bg))。坐标计算被移到表达坍缩之前(不读 xa/xb、不耗 rng,机制关闭时输出与父节点 sha256 逐位一致,已验证)。-   - 关闭对照(PLAN 两条 off 路径均验证):θ=1.0 输出与父节点默认逐位一致(sha256 79153d…0695 相同)→ 门控无泄漏;--ablate 同样逐位一致。-   - 机制生效证据:混居细胞占比 θ=0.1/0.2/0.3/0.4/0.5 → 20.9%/16.1%/10.3%/8.5%/5.3%(非空转,>PLAN 的 5% 下限);被门控子集恰是残余分离更大的细胞(gated sep_rel 0.72–0.95 vs 全体 0.63),坍缩后 gated sep_rel 0.58–0.82、全体部分下降;未门控细胞表达改动=0(逐位);pb_maxshift ≤0.016(DE 通道受保护,de_score raw 0.2857 全程不动)。-   - 查分(A 半 seed 0,基线 62.36):θ 网格 γ=0.5 → 62.38/62.38/62.37/62.37/62.37;θ=0.2 γ=1.0 → 62.39;θ=0.2 smode=gated γ=0.5/1.0 → 62.38/62.40。**结论:门控把 mmd_u 收益与 nbhd 伤害按被门控比例同比缩小(θ=0.1:mmd −0.00016 / nbhd +0.00023;对比节点 35 无门控:mmd −0.0008 / nbhd +0.0025),交换比改善但总量趋零,净变化 +0.01…+0.04 全部在噪声内。解耦假设不成立。**-2. **备选机制 DETR(检出率几何插值 OFF 校正)——针对同一弱项 cell_state(variogram skill 0.389 地板下)——有效,已提交。**-   - 动机(只用括号数据的事实):nnz-only 位移把每个细胞的零/非零支持集冻结在源阶段,输出逐基因检出率呈 a/b 双峰。实测:pred 总检出率 0.0571;括号线性插值 0.0711、几何插值 exp((1−t)ln p_a + t ln p_b) ≈ 0.053。表达在 log 空间近乘性增长,检出率的时间插值应取几何而非线性——据此 pred 相对几何目标**过检出**,应做移除而非补入。-   - 实现:逐共有类型(两侧 ≥10 细胞)、逐软权重激活基因(w=clip(|Δ_type|/0.15,0,1)>0.01),目标 p_t = p_a^(1−t)·p_b^t(括号阶段型内检出率),当前过检出的部分按 k=round(strength·n·(p_cur−p_t)) 置零;被选细胞由逐类型抽取、跨基因共享的确定性均匀键排序决定(模拟真实的细胞级深度相关 dropout,而非逐基因独立噪声)。只移除、不补入(OFF_ONLY),坐标与其余管线逐位不动。随机源 np.random.default_rng(seed+777001),与 mix 的 rng 流隔离,对 seed 确定。-   - 失败的解码(证明"补入"方向结构性有毒):linear 目标 + ON 补入 q_on=0.25 → **54.57**(variogram 0.0134→0.0310,nbhd 0.0507→0.0844);q_on=0.05 → **56.69**。注入小值经 variogram/nbhd 的 sqrt 核放大,与任务书"把零值整体抬高有害"一致。linear 目标 OFF-only → 62.57(弱于 geom,因 linear 目标下净方向是补入)。-   - 剂量响应(geom OFF-only,A 半 seed 0):strength 0.5/1.0/1.5/2.0 → **62.68/62.99/63.17/62.92**。s=1.5:variogram raw 0.01342→0.01046(skill 0.389→0.47 方向修复)、mmd_u 0.01161→0.01139、nbhd 0.05066→0.05083(+0.0002,噪声边缘)、de_direction 0.3852→0.3842(−0.001,噪声内);s=2.0 时 nbhd 0.05142、de_dir 0.3747 开始受损 → 峰值在 1.5。-   - 种子确认(s=1.5,A 半):seed 0/1/2 → 63.17/62.67/62.90,均值 62.91,**+0.55 vs 同日基线 62.36**;variogram 在三个种子一致改善(0.0103–0.0109 vs 0.0134,远超 0.0002 噪声阈),mmd_u 一致改善(0.0110–0.0114)。-   - 机制生效证据:s=1.5 移除 18,600 个 nnz 条目(约占全部条目 1%),分布跨 10 个共有类型、约 480 基因/类型;未选中细胞与该类型未激活基因逐位不动;检出率与几何目标的平均差距 0.029→0.008。-   - 关闭对照:DETR_FLIP_ON=0 或 --ablate mechanism → 输出与父节点 35 默认逐位一致(sha256 验证)。+按 PLAN 在 DETR 之后实现:逐共有类型(两侧≥10 细胞)× 软权重激活基因(τ=0.15),+m_t = exp((1−t)·ln m_a + t·ln m_b)(m_a/m_b 为括号阶段实测 nnz 均值),m_cur > m_t 时对该型该基因全部+nnz 条目乘 f = (m_t/m_cur)^strength(只缩不放大)。无随机、保稀疏、保序。 -### 提交配置(run.py 默认)+信号检查(PLAN 步骤 5 / 风险 1):机制**有信号**——中位相对 gap 9.8%(>5% 门槛),70% 的型×基因对+m_cur > m_t,平均收缩因子 0.91(在预期 0.85–0.98 内),nnz_delta=0(稀疏模式不变)。但查分全部劣于父节点: -父节点 35 全部管线原样(mix + α=5 + soft + corr 扩散 η=1/asym=0.85 + λ=6 + β=0.2 + aniso 1.25),新增 DETR:T2_DETR_FLIP_ON=1.0、MODE=geom、OFF_ONLY=1、STRENGTH=1.5、TAU=0.15、KEY=cell、Q_ON 无效(不补入)。SPATRESID 默认关闭(THETA=0)。+| 配置 | board (A半 seed0) | variogram | mmd_u | nbhd | de_score |+|---|---:|---:|---:|---:|---:|+| 父节点 37 | **63.17** | 0.010463 | 0.01139 | 0.05083 | 0.2857 |+| pooled s=0.25 | 63.04 | 0.010353 | 0.01130 | 0.05270 | 0.2857 |+| pooled s=0.5 | 62.42 | 0.010276 | 0.01185 | 0.05556 | 0.2500 |+| pooled s=1.0 | 61.00 | 0.010207 | 0.01463 | 0.06350 | 0.2500 |+| sided s=0.5 | 61.30 | 0.010151 | 0.01318 | 0.06183 | 0.2143 |+| sided s=1.0 | 57.88 | 0.010085 | 0.02098 | 0.07994 | 0.2143 |+| gapped(>10%) s=0.5 | 62.49 | 0.010281 | 0.01177 | 0.05527 | 0.2500 |+| gapped(>10%) s=1.0 | 61.16 | 0.010212 | 0.01430 | 0.06270 | 0.2500 | -### 验证过 / 没验证+结论(判无效,满足 ≥3 解码/幅度、≥6 次查分):variogram 收益始终 <0.0004(PLAN 自己的阈值),而+mmd_u / neighborhood_mmd / de_score 随 strength 单调恶化——乘性值缩放即便保序、保稀疏,也把细胞推离+真值拟合的 PCA 流形并破坏表达-位置配对;pb_maxshift(0.14–0.82)远超 PLAN 的 <0.02 预期,"伪批量近似+对消"假设不成立。"nnz 幅度冻结在源阶段"这一动机假设本身为假:α=5 位移后幅度已接近目标(gap 中位仅+9.8%,且收缩方向系统性地偏离真值)。与 node 17/19/37 的教训一致:**值通道修正一律伤 nbhd/mmd,只有+支持集(零/非零)通道可安全修**。AMPSHRINK 代码保留,默认 `T2_AMPSHRINK_ON=0`。 -- 验证:vec-check ok;seed 0 重跑逐位确定;--ablate 逐位还原父节点;θ=1.0 逐位还原(门控无泄漏);A 半 19 次查分(额度 20 内,剩 1 未用);单输入回退路径未受影响(代码路径在 bracket 分支内)。-- 没验证:B 半(正式分);heart 两榜(本 run 只挂 embryo 视图);strength 1.25/1.75 细扫;KEY=gene(逐基因独立键)变体;伪装视图重跑(程序只读视图数据与 seed,不读绝对时间/路径,t 为平移不变量,预期通过)。-- 耗时 ~30 s、峰值内存 <1 GB,limits(30 min / 28 GB)内;EXECUTION.json {"gpu": false}。+## 提交的备选机制 DETR_EXT(针对同一弱项 cell_state/variogram) -### 知识来源+诊断:父节点 DETR 只覆盖共有类型(两侧≥10 细胞,10 个),但 mix 输出按全类型分层抽样,**37% 的输出+细胞(a 侧 857 + b 侧 985,共 24 个单侧类型)的检出支持集完全未校正**,仍冻结在源阶段水平。b 侧细胞+相对合并几何目标在 95% 基因上过检出(0.134 vs 0.045)。 -- 未使用任何保留阶段(E7.25/E7.5 窗口)或保留基因型数据;DETR 的目标检出率完全由视图内括号阶段(E6.75、E8.0)现场计算。-- 方法学依据(非阶段特异性测量):log 空间表达近乘性 → 检出率几何插值;真实 scRNA/空间数据的 dropout 是细胞级深度相关的(逐细胞键跨基因共享),不是逐基因独立噪声。无外部文献数值。-- 评分规则事实来自任务书"T2 评分规则简报"(variogram/nbhd 的 sqrt 核对小值敏感、地板定义、噪声 ~1 分)。+机制:对每个单侧类型的输出细胞,用**逐基因全局检出漂移**作缺失侧代理:+p_t(g) = p_own(g)·(pa_sh(g)/pb_sh(g))^((1−t) 对 b 侧, −t 对 a 侧),其中 pa_sh/pb_sh 只在**共有类型+细胞**上计算(`DETR_EXT_MODE=shared`)——去掉类型组成变化对漂移估计的混杂;两侧任一未检出的基因被+门掉(保护单侧类型的身份基因不被清零)。过检出部分按与 DETR 相同的规则 OFF-only 置零:+k = round((p_cur−p_t)·n·strength),逐细胞确定性键跨基因共享(模拟深度相关 dropout)。无新随机源+(独立 rng = seed+777002,确定性);不注入任何值。 -### 查分明细(A 半,seed 0,除注明外)+生物学依据:发育中检出率随时间的乘性(log 线性)漂移与 node 37 已验证的几何插值目标同源;缺失侧用+群体水平漂移近似是"谱系去向/发育事件顺序"级别的通用程序知识,不含任何保留阶段的测量值。所有量均从+view 输入现场计算,无硬编码。 -| 配置 | board | mmd_u | variogram | nbhd | de_dir |-|---|---:|---:|---:|---:|---:|-| 基线(父 35 默认) | 62.36 | 0.01161 | 0.01342 | 0.05066 | 0.3852 |-| SPATRESID θ=0.1 γ0.5 | 62.38 | 0.01145 | 0.01341 | 0.05089 | 0.3861 |-| SPATRESID θ=0.2 γ0.5 | 62.38 | 0.01149 | 0.01341 | 0.05083 | 0.3859 |-| SPATRESID θ=0.3 γ0.5 | 62.37 | 0.01154 | 0.01342 | 0.05072 | 0.3853 |-| SPATRESID θ=0.4 γ0.5 | 62.37 | 0.01155 | 0.01342 | 0.05070 | 0.3852 |-| SPATRESID θ=0.5 γ0.5 | 62.37 | 0.01158 | 0.01342 | 0.05065 | 0.3853 |-| SPATRESID θ=0.2 γ1.0 | 62.39 | 0.01141 | 0.01339 | 0.05095 | 0.3865 |-| SPATRESID θ=0.2 gated γ0.5 | 62.38 | 0.01149 | 0.01340 | 0.05083 | 0.3862 |-| SPATRESID θ=0.2 gated γ1.0 | 62.40 | 0.01142 | 0.01338 | 0.05094 | 0.3868 |-| DETR linear q0.25 | 54.57 | 0.01744 | 0.03104 | 0.08444 | 0.3613 |-| DETR linear q0.05 | 56.69 | 0.01609 | 0.02827 | 0.07426 | 0.3642 |-| DETR linear off-only | 62.57 | 0.01154 | 0.01243 | 0.05073 | 0.3783 |-| DETR geom off-only s1.0 | 62.99 | 0.01145 | 0.01109 | 0.05062 | 0.3833 |-| DETR geom off-only s0.5 | 62.68 | 0.01149 | 0.01224 | 0.05052 | 0.3839 |-| **DETR geom off-only s1.5(提交)** | **63.17** | 0.01139 | 0.01046 | 0.05083 | 0.3842 |-| DETR geom off-only s2.0 | 62.92 | 0.01141 | 0.01030 | 0.05142 | 0.3747 |-| 提交配置 seed 1 | 62.67 | 0.01101 | 0.01087 | 0.05155 | 0.3738 |-| 提交配置 seed 2 | 62.90 | 0.01112 | 0.01030 | 0.05027 | 0.3780 |--(基线被查分两次——首次输出未落盘,重查一次作锚点;两次同预测。)+机制证据(seed 0):覆盖 24 个类型、1842/5000 细胞(37%)、445 基因;移除 13,678 个 nnz 条目+(这些细胞 nnz 的 ~17%);逐型检出率相对目标的平均绝对 gap 0.0763 → 0.0552;pb_maxshift=0.299+(与已验证安全的 DETR 0.211 同量级);共享类型细胞的输出不受影响(rng 独立,逐位不变)。++## 查分记录(A 半 proxy,共 19 次,余 1)++DETR_EXT 剂量响应(seed 0):++| 配置 | board | variogram | mmd_u | nbhd | de_score | de_dir |+|---|---:|---:|---:|---:|---:|---:|+| mode=all s=0.3 | 64.11 | 0.007848 | 0.01106 | 0.05248 | 0.3214 | 0.3724 |+| mode=all s=0.4 | 64.13 | 0.007258 | 0.01121 | 0.05404 | 0.3214 | 0.3701 |+| mode=all s=0.5 | 64.16 | 0.006922 | 0.01154 | 0.05582 | 0.3571 | 0.3651 |+| mode=all s=0.75 | 63.45 | 0.006364 | 0.01255 | 0.06220 | 0.3571 | 0.3548 |+| mode=all s=1.5 | 54.55 | 0.009063 | 0.01973 | 0.09083 | 0.1429 | 0.0912 |+| **mode=shared s=0.35(提交)** | **64.34** | 0.007513 | 0.01094 | 0.05232 | 0.3214 | 0.3786 |+| mode=shared s=0.5 | 64.27 | 0.006872 | 0.01120 | 0.05444 | 0.3214 | 0.3707 |+| mode=shared s=0.75 | 63.73 | 0.006245 | 0.01209 | 0.05985 | 0.3214 | 0.3657 |++种子确认(mode=shared s=0.35):seed 0/1/2 = 64.34 / 63.89 / 63.97,均值 **64.07**(父节点 seed 0+= 63.17,官方 rank3 = 63.71)。四组变化(seed 0 vs 父):cell_state 53.17→57.94(variogram raw+0.01046→0.00751,mmd_u 0.01139→0.01094),expression_change 61.64→62.24(de_score 0.286→0.321,+de_dir 0.384→0.379),local_spatial 60.12→59.41(nbhd 0.0508→0.0523,代价 −0.7),shape_scale 不变+(坐标逐位未动)。净 +1.17(seed 0)/ +0.9(三种子均值口径)。++选择 shared s=0.35 而非 all s=0.5 的理由:board 更高且 nbhd 伤害减半(0.0523 vs 0.0558)、+de_dir 保留更多;shared 漂移估计去掉组成混杂,更可能迁移到真实括号(两端相邻、共有类型多)。++## 验证与未验证++- 已验证:`vec-check` 通过(seed 0/1/2);`--ablate mechanism` 输出与父节点 37 逐位一致(sha256,+  3 个种子);重跑同 seed 输出逐位一致(确定性);nnz 条目只减不增(OFF-only);单输入回退路径+  (b is None 提前返回,DETR_EXT 需 bracket)不受影响;程序只依赖时间差 t,不依赖绝对时间/视图字段。+- 未验证:真实括号(final 视图)上的效果——真实两端相邻、单侧类型构成不同,漂移代理的偏差未知;+  B 半分数;s 在 0.35–0.5 之间的更细网格(差异在噪声内,未花额度)。+- 已知风险:nbhd 小幅受损(−0.7 分)是该机制的系统性代价;若正式评分的 nbhd 地板/天花板更紧,+  损失可能放大。s≥0.75 时 nbhd 伤害陡增,不要上调。++## 知识来源++无外部文献/数据库条目。全部量(检出率、漂移比、目标、细胞数、t)从 view 的 manifest 与输入 h5ad+现场计算;所用生物学假设仅为"表达检出随发育时间近似乘性漂移"(与父节点已验证的几何插值目标同源,+属通用机制知识,不含保留阶段测量值)。diff --git a/solution/README.md b/solution/README.mdindex 81cabb3..c0786dc 100644--- a/solution/README.md+++ b/solution/README.md@@ -1,16 +1,18 @@-# mix + 表达收敛管线 + DETR 检出率几何插值 OFF 校正(T2:embryo:val_interp)+# mix + 表达收敛管线 + DETR / DETR_EXT 检出率几何插值(T2:embryo:val_interp) -父节点 35 管线原样保留(mix 混抽 + α=5 类型级收敛位移 + 软阈值基因权重 + 相关扩散-η=1/asym=0.85 + λ=6 投影加权 + β=0.2 型内配对收缩 + aniso 坐标整形 damp=1.25;-RESID/EIGPROJ/ITERDIFF/VARISO/TYPE_ANISO/PBPROJ/TSHIFT/SPATRESID 默认关闭)。+父节点 37 管线原样保留(mix 混抽 + α=5 类型级收敛位移 + 软阈值基因权重 + 相关扩散+η=1/asym=0.85 + λ=6 投影加权 + β=0.2 型内配对收缩 + aniso 坐标整形 damp=1.25 + DETR+共有类型检出率 OFF 校正 s=1.5;RESID/EIGPROJ/ITERDIFF/VARISO/TYPE_ANISO/PBPROJ/+TSHIFT/SPATRESID/AMPSHRINK 默认关闭)。 -本节点(37)提交机制 DETR:nnz-only 位移把细胞的零/非零支持集冻结在源阶段,逐基因-检出率相对几何插值目标 p_t = p_a^(1−t)·p_b^t 系统性偏高(log 空间乘性时间插值)。-DETR 按共有类型/软权重基因,把过检出的 nnz 条目按确定性逐细胞键排序置零-(T2_DETR_STRENGTH=1.5,只移除、不补入;ON 补入在 proxy 上结构性有害:54.6/56.7)。-A 半:62.36 → 63.17(seed 0),seeds 0/1/2 均值 62.91;variogram raw 0.01342→0.01046-(地板下弱项),nbhd/mmd_u 不劣。--ablate(或 T2_DETR_FLIP_ON=0)逐位还原父节点 35。+本节点(39)提交机制 DETR_EXT:DETR 只覆盖共有类型,37% 输出细胞(单侧独有类型)的+检出支持集仍冻结在源阶段。DETR_EXT 用共有类型细胞测得的逐基因检出漂移+(pa_sh/pb_sh) 作缺失侧代理,对这些细胞做同一几何插值目标的 OFF-only 置零+(T2_DETR_EXT_MODE=shared,T2_DETR_EXT_STRENGTH=0.35,逐细胞确定性键)。+A 半 seed 0:63.17 → 64.34;seeds 0/1/2 均值 64.07;variogram 0.01046→0.00751,+de_score 0.286→0.321,nbhd 0.0508→0.0523(代价 −0.7 分,已计入净收益)。+--ablate(或 T2_DETR_EXT=0)逐位还原父节点 37(sha256 已验证)。 -PLAN 机制 SPATRESID(坐标混居门控的残余双峰坍缩)已实现并证否:8 配置(θ 0.1–0.5 ×-γ 0.5/1.0 × s-mode)全在基线 +0.04 内,门控把 mmd_u 收益与 nbhd 伤害同比缩小,-解耦失败。T2_SPATRESID_THETA=0 默认关闭。详见 METHOD.md。+PLAN 机制 AMPSHRINK(nnz 幅度几何收缩)已实现并证否:3 解码 × 7 配置全部劣于父节点+(57.88–63.04),值通道乘性缩放单调伤害 mmd_u/nbhd/de。默认 T2_AMPSHRINK_ON=0。+详见 METHOD.md。diff --git a/solution/run.py b/solution/run.pyindex e279333..370b6bf 100644--- a/solution/run.py+++ b/solution/run.py@@ -8,7 +8,31 @@ exp(log r_a + SCALE_DAMP·t·Δlog r), and draws cells stratified by type: round(t·n) from the later stage, the rest from the earlier one. Coordinates travel with the cells. n is log-linear in t, clipped to the board range. -This node (37, DETR, family T2EI-01): the PLAN mechanism (SPATRESID: gate the+This node (39, DETR_EXT, family T2EI-01): the PLAN mechanism (AMPSHRINK:+shrink-only geometric interpolation of per-type per-gene nnz amplitude means+toward m_t = m_a^(1−t)·m_b^t) was implemented and FALSIFIED: 7 configs+(3 decodes pooled/sided/gapped × strengths 0.25..1.5) all land BELOW the+parent (A half seed 0: 63.17 → 57.88..63.04) with monotone dose-response+damage to mmd_u, neighborhood_mmd and de_score — multiplicative value scaling+moves cells off the truth-fitted PCA manifold even though it preserves rank+order and sparsity; the frozen-amplitude hypothesis is false (the α=5+displacement already lands the nnz means near target). AMPSHRINK stays in the+code behind T2_AMPSHRINK_ON=0 (default off). The submitted alternative+mechanism is DETR_EXT: parent DETR only covers shared types (>=10 cells at+both bracket stages), leaving ~37% of output cells (one-side-only types, e.g.+Forebrain/EXE-Ectoderm here) with detection support frozen at the source+stage. DETR_EXT extends the geometric detection interpolation to those types+using the per-gene detection drift measured on SHARED-type cells only+(composition-confounding removed; genes undetected in shared cells at either+stage are gated out, protecting one-side-only identity genes from erasure):+p_t = p_own·(pa_sh/pb_sh)^(1−t) for b-only cells (OFF-only flips, per-cell+deterministic key, strength 0.35). A half seed 0: 64.34 (parent 63.17),+seeds 0/1/2 mean 64.07; variogram 0.01046→0.00751 (biggest below-floor+weak item), de_score 0.286→0.321, nbhd damage contained (0.0508→0.0523).+--ablate (or T2_DETR_EXT=0) reproduces parent node 37 bit-for-bit+(sha256-verified on seeds 0/1/2). See METHOD.md.++Parent node (37, DETR, family T2EI-01): the PLAN mechanism (SPATRESID: gate the node-35 RESID residual collapse on coordinate-mixed cells, 15-NN hetero-source fraction h_i >= θ) was implemented and falsified — 8 configs (θ 0.1..0.5 × γ 0.5/1.0 × s-mode all/gated) all land within +0.04 of the parent (A half seed 0:@@ -283,6 +307,62 @@ DETR_OFF_ONLY = os.environ.get("T2_DETR_OFF_ONLY", "1") == "1" # Flip magnitude: k = round(STRENGTH · n · (p_cur − p_t)_+). STRENGTH=1 closes # the full gap to the target rate; <1 partial (dose-response); >1 overshoots. DETR_STRENGTH = float(os.environ.get("T2_DETR_STRENGTH", "1.5"))+# DETR_EXT (backup mechanism of this node 39, after AMPSHRINK falsification):+# DETR only covers shared types (>=10 cells at BOTH bracket stages), which+# leaves ~36% of output cells (one-side-only types) with their detection+# support completely frozen at the source stage. DETR_EXT extends the same+# geometric-interpolation logic to those types using the GLOBAL per-gene+# detection drift between the bracket stages as the missing side:+#   b-only type: p_t(g) = p_own(g) · (pa_all(g)/pb_all(g))^(1−t)+#   a-only type: p_t(g) = p_own(g) · (pb_all(g)/pa_all(g))^t   (growth; a+#                no-op under OFF-only removal except where drift is negative)+# Rationale: a type absent from one bracket stage has no measurable own-type+# future/past detection, but the stage-level per-gene detection drift+# (sequencing depth + global biology) is observable and is the dominant+# component of the a→b rate change; scaling the type's own rate by the global+# drift raised to the time fraction is the geometric-interpolation target+# under that approximation. Genes not detected at BOTH stages are skipped+# (no drift estimate — protects stage-b-specific identity genes from+# erasure). OFF-only always (ON injection is structurally toxic, node-37+# lesson); same per-cell deterministic key shared across genes.+# T2_DETR_EXT=0 (or --ablate) disables and reproduces parent node 37+# bit-for-bit.+DETR_EXT = os.environ.get("T2_DETR_EXT", "1") == "1"+DETR_EXT_TAU = float(os.environ.get("T2_DETR_EXT_TAU", "0.15"))+# DETR_EXT_MODE: "all" — drift ratio from ALL cells of each bracket stage+# (confounded by type-composition change: genes marking b-only types get a+# huge negative logratio and are nearly erased); "shared" — drift estimated+# only on cells of shared types (present at both stages), so it measures+# technical/generic developmental drift, and genes undetected in shared+# cells at either stage are gated out (protects one-side-only identity+# genes from erasure).+DETR_EXT_MODE = os.environ.get("T2_DETR_EXT_MODE", "shared")+DETR_EXT_STRENGTH = float(os.environ.get("T2_DETR_EXT_STRENGTH", "0.35"))+# AMPSHRINK (mechanism of this node 39, family T2EI-01): DETR repaired the+# zero/nonzero SUPPORT channel; the nnz AMPLITUDE channel is still frozen at+# the source stage (a-side cells keep the E_a nnz-value distribution, b-side+# the E_b one) because nnz-only displacement adds a uniform Δ without changing+# the amplitude distribution shape. AMPSHRINK generalizes the geometric+# interpolation target to nnz amplitudes: per shared type × activated gene+# (same soft-weight decode as DETR, τ=0.15), compute measured nnz means m_a,+# m_b at the bracket stages, the target m_t = exp((1−t)·ln m_a + t·ln m_b),+# and the current output nnz mean m_cur; if m_cur > m_t, multiply every nnz+# entry of that type×gene by f = (m_t/m_cur)^STRENGTH (shrink-only; the ON /+# amplify direction is structurally toxic per node-37 lessons). Deterministic+# proportional scaling: sparsity pattern and within-gene cell order preserved.+# T2_AMPSHRINK_ON=0 (or --ablate mechanism) disables and reproduces parent+# node 37 bit-for-bit.+AMPS_ENABLE = os.environ.get("T2_AMPSHRINK_ON", "0") == "1"+AMPS_STRENGTH = float(os.environ.get("T2_AMPSHRINK_STRENGTH", "0.5"))+AMPS_TAU = float(os.environ.get("T2_AMPSHRINK_TAU", "0.15"))+AMPS_MIN_CELLS = int(os.environ.get("T2_AMPSHRINK_MIN_CELLS", "10"))+# AMPS_DECODE: "pooled" — one f per type×gene from the merged a+b output nnz+# mean (PLAN spec); "sided" — separate f per side (a-side and b-side nnz means+# can straddle m_t in opposite directions, pooled hides that); "gapped" —+# pooled but only for pairs whose relative gap exceeds AMPS_GAP_MIN (spares+# near-correct pairs from any perturbation).+AMPS_DECODE = os.environ.get("T2_AMPSHRINK_DECODE", "pooled")+AMPS_GAP_MIN = float(os.environ.get("T2_AMPSHRINK_GAP_MIN", "0.10")) # per-cell λ-style weighting inside the residual collapse (0 = constant shift) RESID_LAMBDA = float(os.environ.get("T2_RESID_LAMBDA", "0")) # which side moves in the residual collapse: both | a | b (node-34 lesson:@@ -1474,6 +1554,194 @@ def mix_converge(stage_a, stage_b, t: float, params: dict, alpha: float, view: s             pb_after_d = np.vstack([xa, xb]).mean(axis=0).astype(np.float64)             det_info["detr_dp_max"] = float(np.abs(pb_after_d - pb_before_d).max()) +    # DETR_EXT (backup mechanism of this node 39): extend the detection-rate+    # geometric interpolation to one-side-only output types using the global+    # per-gene detection drift as the missing side. See the config block for+    # the full rationale. OFF-only; per-cell deterministic key; no value+    # injection; genes undetected at either bracket stage are skipped.+    ext_info = {"detr_ext_enable": bool(DETR_EXT), "detr_ext_tau": DETR_EXT_TAU, "detr_ext_mode": DETR_EXT_MODE,+                "detr_ext_strength": DETR_EXT_STRENGTH, "detr_ext_n_types_a": 0,+                "detr_ext_n_types_b": 0, "detr_ext_cells_a": 0, "detr_ext_cells_b": 0,+                "detr_ext_n_genes": 0, "detr_ext_n_off": 0,+                "detr_ext_rate_gap_before": None, "detr_ext_rate_gap_after": None,+                "detr_ext_pb_maxshift": None}+    if DETR_FLIP_ON > 0.0 and DETR_EXT and ia.size and ib.size:+        la_e = np.asarray(stage_a.labels).astype(str)+        lb_e = np.asarray(stage_b.labels).astype(str)+        la_o = la_e[ia]+        lb_o = lb_e[ib]+        cnt_a_e = {k: int((la_e == k).sum()) for k in set(la_e.tolist())}+        cnt_b_e = {k: int((lb_e == k).sum()) for k in set(lb_e.tolist())}+        shared10 = {k for k in (set(cnt_a_e) & set(cnt_b_e))+                    if cnt_a_e[k] >= 10 and cnt_b_e[k] >= 10}+        if DETR_EXT_MODE == "shared" and shared10:+            ma_sh = np.isin(la_e, list(shared10))+            mb_sh = np.isin(lb_e, list(shared10))+        else:+            ma_sh = np.ones(la_e.shape[0], dtype=bool)+            mb_sh = np.ones(lb_e.shape[0], dtype=bool)+        pa_all = (np.asarray(stage_a.X[ma_sh].todense(), dtype=np.float64) > 0).mean(axis=0)+        pb_all = (np.asarray(stage_b.X[mb_sh].todense(), dtype=np.float64) > 0).mean(axis=0)+        eps_e = 1e-4+        logratio = np.log((pa_all + eps_e) / (pb_all + eps_e))+        gate = (pa_all > 0) & (pb_all > 0)+        gpb_a = np.asarray(stage_a.X[ma_sh].mean(axis=0)).ravel().astype(np.float64)+        gpb_b = np.asarray(stage_b.X[mb_sh].mean(axis=0)).ravel().astype(np.float64)+        w_e = np.clip(np.abs(gpb_b - gpb_a) / max(DETR_EXT_TAU, 1e-12), 0.0, 1.0)+        act_e = np.where((w_e > 0.01) & gate)[0]+        ext_info["detr_ext_n_genes"] = int(act_e.size)+        if act_e.size:+            rng_e = np.random.default_rng(int(params.get("seed", 0)) + 777002)+            pb_before_e = np.vstack([xa, xb]).mean(axis=0).astype(np.float64)+            gaps_b_e, gaps_a_e = [], []+            for side in ("a", "b"):+                lo = la_o if side == "a" else lb_o+                xo = xa if side == "a" else xb+                expo = -t if side == "a" else (1.0 - t)  # p_t = p_own·exp(expo·logratio)+                for lab in sorted(set(lo.tolist()) - shared10):+                    m = lo == lab+                    n_c = int(m.sum())+                    if n_c == 0:+                        continue+                    Xc = xo[m]+                    p_cur = (Xc > 0).mean(axis=0)+                    p_t = p_cur * np.exp(expo * logratio)+                    u = rng_e.random(n_c)+                    gap_b_side = float(np.abs(p_cur[act_e] - p_t[act_e]).mean())+                    n_off_t = 0+                    Xn = Xc.copy()+                    for g in act_e:+                        dpr = (p_t[g] - p_cur[g]) * n_c * DETR_EXT_STRENGTH+                        if dpr <= -1.0:+                            nz = np.where(Xn[:, g] > 0)[0]+                            k = min(int(round(-dpr)), nz.size)+                            if k > 0:+                                sel = nz[np.argsort(u[nz], kind="stable")[:k]]+                                Xn[sel, g] = 0.0+                                n_off_t += k+                    if n_off_t:+                        xo[m] = Xn+                    p_post = (Xn > 0).mean(axis=0)+                    gaps_b_e.append(gap_b_side)+                    gaps_a_e.append(float(np.abs(p_post[act_e] - p_t[act_e]).mean()))+                    ext_info["detr_ext_n_off"] += n_off_t+                    if side == "a":+                        ext_info["detr_ext_n_types_a"] += 1+                        ext_info["detr_ext_cells_a"] += n_c+                    else:+                        ext_info["detr_ext_n_types_b"] += 1+                        ext_info["detr_ext_cells_b"] += n_c+            if gaps_b_e:+                ext_info["detr_ext_rate_gap_before"] = float(np.mean(gaps_b_e))+                ext_info["detr_ext_rate_gap_after"] = float(np.mean(gaps_a_e))+            pb_after_e = np.vstack([xa, xb]).mean(axis=0).astype(np.float64)+            ext_info["detr_ext_pb_maxshift"] = float(np.abs(pb_after_e - pb_before_e).max())++    # AMPSHRINK (this node 39): shrink-only geometric interpolation of nnz+    # amplitude means, applied AFTER DETR (order matters: DETR removed entries+    # change m_cur). See the config block for the mechanism rationale. No rng:+    # fully deterministic proportional scaling; zeros untouched (sparsity+    # pattern and within-gene cell ranking preserved, so the expression-position+    # pairing that neighborhood_mmd reads is undisturbed).+    amp_info = {"ampshrink_enable": bool(AMPS_ENABLE), "ampshrink_strength": AMPS_STRENGTH,+                "ampshrink_tau": AMPS_TAU, "ampshrink_decode": AMPS_DECODE,+                "ampshrink_n_types": 0, "ampshrink_n_pairs": 0,+                "ampshrink_n_shrunk": 0, "ampshrink_frac_shrunk": None,+                "ampshrink_f_mean": None, "ampshrink_f_min": None, "ampshrink_f_max": None,+                "ampshrink_gap_med_before": None, "ampshrink_gap_med_after": None,+                "ampshrink_gap_frac_over5_before": None, "ampshrink_gap_frac_over5_after": None,+                "ampshrink_pb_maxshift": None, "ampshrink_nnz_delta": None}+    if AMPS_ENABLE and ia.size and ib.size:+        la_s = np.asarray(stage_a.labels).astype(str)+        lb_s = np.asarray(stage_b.labels).astype(str)+        la_o = la_s[ia]+        lb_o = lb_s[ib]+        shared_s = sorted(set(la_o.tolist()) & set(lb_o.tolist()))+        means_a_s = type_means(stage_a.X, stage_a.labels)+        means_b_s = type_means(stage_b.X, stage_b.labels)+        cnt_a_s = {k: int((la_s == k).sum()) for k in means_a_s}+        cnt_b_s = {k: int((lb_s == k).sum()) for k in means_b_s}+        shared_s = [k for k in shared_s+                    if cnt_a_s.get(k, 0) >= AMPS_MIN_CELLS and cnt_b_s.get(k, 0) >= AMPS_MIN_CELLS]+        pb_before_s = np.vstack([xa, xb]).mean(axis=0).astype(np.float64)+        nnz_before = int((xa > 0).sum() + (xb > 0).sum())+        gaps_b, gaps_a, fs, n_pairs, n_shrunk = [], [], [], 0, 0++        def _nnz_mean(Xs):+            s = np.asarray(Xs.sum(axis=0)).ravel().astype(np.float64)+            c = np.asarray((Xs > 0).sum(axis=0)).ravel().astype(np.float64)+            return np.where(c > 0, s / np.maximum(c, 1.0), 0.0), c++        for lab in shared_s:+            ma = la_o == lab+            mb = lb_o == lab+            A = xa[ma]+            B = xb[mb]+            d0 = (means_b_s[lab] - means_a_s[lab]).astype(np.float64)+            w = np.clip(np.abs(d0) / max(AMPS_TAU, 1e-12), 0.0, 1.0)+            act = w > 0.01+            if int(act.sum()) < 5:+                continue+            m_a, _ = _nnz_mean(stage_a.X[la_s == lab])+            m_b, _ = _nnz_mean(stage_b.X[lb_s == lab])+            sA = np.where(A > 0, A, 0.0).sum(axis=0).astype(np.float64)+            cA = (A > 0).sum(axis=0).astype(np.float64)+            sB = np.where(B > 0, B, 0.0).sum(axis=0).astype(np.float64)+            cB = (B > 0).sum(axis=0).astype(np.float64)+            m_cur = np.where(cA + cB > 0, (sA + sB) / np.maximum(cA + cB, 1.0), 0.0)+            ok = act & (m_a > 0) & (m_b > 0) & (cA + cB > 0) & (m_cur > 0)+            if not ok.any():+                continue+            m_t = np.exp((1.0 - t) * np.log(np.maximum(m_a, 1e-9))+                         + t * np.log(np.maximum(m_b, 1e-9)))+            f = np.ones(len(m_t))+            fB = f.copy()+            rel_gap_b = (m_cur - m_t) / np.maximum(m_t, 1e-12)+            if AMPS_DECODE == "sided":+                mA_cur = np.where(cA > 0, sA / np.maximum(cA, 1.0), 0.0)+                mB_cur = np.where(cB > 0, sB / np.maximum(cB, 1.0), 0.0)+                okA = ok & (cA > 0) & (mA_cur > m_t)+                okB = ok & (cB > 0) & (mB_cur > m_t)+                f[okA] = (m_t[okA] / mA_cur[okA]) ** AMPS_STRENGTH+                fB[okB] = (m_t[okB] / mB_cur[okB]) ** AMPS_STRENGTH+                over = okA | okB+            else:+                over = ok & (m_cur > m_t)+                if AMPS_DECODE == "gapped":+                    over &= rel_gap_b > AMPS_GAP_MIN+                f[over] = (m_t[over] / m_cur[over]) ** AMPS_STRENGTH+                fB = f.copy()+            rel_gap_a = (m_cur * np.where(cA + cB > 0, (cA * f + cB * fB) / np.maximum(cA + cB, 1.0), 1.0)+                         - m_t) / np.maximum(m_t, 1e-12)+            if over.any():+                An = np.where(A > 0, A * f.astype(np.float32)[None, :], A).astype(np.float32)+                Bn = np.where(B > 0, B * fB.astype(np.float32)[None, :], B).astype(np.float32)+                xa[ma] = An+                xb[mb] = Bn+            n_pairs += int(ok.sum())+            n_shrunk += int(over.sum())+            gaps_b.extend(rel_gap_b[ok].tolist())+            gaps_a.extend(rel_gap_a[ok].tolist())+            fs.extend(f[over].tolist())+            amp_info["ampshrink_n_types"] += 1+        if n_pairs:+            amp_info["ampshrink_n_pairs"] = n_pairs+            amp_info["ampshrink_n_shrunk"] = n_shrunk+            amp_info["ampshrink_frac_shrunk"] = float(n_shrunk / n_pairs)+            gb = np.asarray(gaps_b)+            ga = np.asarray(gaps_a)+            amp_info["ampshrink_gap_med_before"] = float(np.median(gb))+            amp_info["ampshrink_gap_med_after"] = float(np.median(ga))+            amp_info["ampshrink_gap_frac_over5_before"] = float(np.mean(np.abs(gb) > 0.05))+            amp_info["ampshrink_gap_frac_over5_after"] = float(np.mean(np.abs(ga) > 0.05))+            if fs:+                amp_info["ampshrink_f_mean"] = float(np.mean(fs))+                amp_info["ampshrink_f_min"] = float(np.min(fs))+                amp_info["ampshrink_f_max"] = float(np.max(fs))+            pb_after_s = np.vstack([xa, xb]).mean(axis=0).astype(np.float64)+            amp_info["ampshrink_pb_maxshift"] = float(np.abs(pb_after_s - pb_before_s).max())+            amp_info["ampshrink_nnz_delta"] = int((xa > 0).sum() + (xb > 0).sum()) - nnz_before+     expr = np.clip(np.vstack([xa, xb]), 0.0, None).astype(np.float32) if (ia.size or ib.size) else np.zeros((0, len(stage_a.genes)), np.float32)     clamp_info = {"bracket_clip": BRACKET_CLIP, "n_clamped_cells": 0}     if BRACKET_CLIP > 0 and expr.shape[0]:@@ -1567,6 +1835,8 @@ def mix_converge(stage_a, stage_b, t: float, params: dict, alpha: float, view: s     info.update(resid_info)     info.update(spat_info)     info.update(det_info)+    info.update(ext_info)+    info.update(amp_info)     info.update(         t=t, n=int(expr.shape[0]), rms_a=rms_a, rms_b=rms_b, target_rms=target_rms,         out_rms=rms_radius(coords), n_from_a=int(ia.size), n_from_b=int(ib.size), **conv, **pair_info,@@ -1581,14 +1851,15 @@ def main() -> None:     parser.add_argument("--seed", type=int, default=0)     parser.add_argument("--ablate", default=None,                         help="mechanism-off control: 'mechanism' (or any name) disables this "-                             "node's mechanisms (RESID_GAMMA=0, EIGPROJ_K=0), reproducing "-                             "parent node 34 bit-for-bit")+                             "node's mechanisms (DETR_EXT coverage extension; AMPSHRINK stays "+                             "off), reproducing parent node 37 bit-for-bit")     args = parser.parse_args()-    global RESID_GAMMA, SPATRESID_THETA, DETR_FLIP_ON+    global RESID_GAMMA, SPATRESID_THETA, DETR_FLIP_ON, AMPS_ENABLE, DETR_EXT     if args.ablate:         RESID_GAMMA = 0.0         SPATRESID_THETA = 0.0-        DETR_FLIP_ON = 0.0+        AMPS_ENABLE = False+        DETR_EXT = False     proj_asym = None     eigproj_k = 0 if args.ablate else None @@ -1660,7 +1931,19 @@ def main() -> None:                                           "detr_enable", "detr_flip_on", "detr_q_on", "detr_mode",                                           "detr_key", "detr_off_only", "detr_strength", "detr_n_types",                                           "detr_n_genes", "detr_n_on", "detr_n_off", "detr_dp_max",-                                          "detr_rate_gap_before", "detr_rate_gap_after",+                                           "detr_rate_gap_before", "detr_rate_gap_after",+                                           "detr_ext_enable", "detr_ext_tau", "detr_ext_mode", "detr_ext_strength",+                                           "detr_ext_n_types_a", "detr_ext_n_types_b",+                                           "detr_ext_cells_a", "detr_ext_cells_b", "detr_ext_n_genes",+                                           "detr_ext_n_off", "detr_ext_rate_gap_before",+                                           "detr_ext_rate_gap_after", "detr_ext_pb_maxshift",+                                           "ampshrink_enable", "ampshrink_strength", "ampshrink_tau", "ampshrink_decode",+                                           "ampshrink_n_types", "ampshrink_n_pairs", "ampshrink_n_shrunk",+                                           "ampshrink_frac_shrunk", "ampshrink_f_mean", "ampshrink_f_min",+                                           "ampshrink_f_max", "ampshrink_gap_med_before",+                                           "ampshrink_gap_med_after", "ampshrink_gap_frac_over5_before",+                                           "ampshrink_gap_frac_over5_after", "ampshrink_pb_maxshift",+                                           "ampshrink_nnz_delta",                                          "iterdiff_enable", "iterdiff_eta2", "iterdiff_kernel_cos_vs_C",                                          "asympt_zeta", "asympt_cap", "asympt_asym_mean",                                          "asympt_asym_min", "asympt_asym_max",

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

用到的知识库条目

编号标题出处
k007Interval staging and held-out-window filtering of external datanotes/official/来件/virtualembryo.ai/rules.md
k024World-model evaluation dimensions for state-transition predictorsnotes/competition/07_biomedical_world_models.md
k023Time-split validation with a held-out intermediate or next time pointnotes/handover/02_知识学习路线.md

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

改了什么PLAN 的 AMPSHRINK(逐型×基因 nnz 幅度向几何目标单侧收缩)已实现但被证否(7 配置全劣于父,默认 T2_AMPSHRINK_ON=0);实际提交的是备选机制 DETR_EXT:把父节点 DETR 的检出率几何插值 OFF-only 置零扩展到 37% 输出细胞(24 个单侧独有类型),缺失侧用共有类型细胞测得的逐基因检出漂移作代理(mode=shared,strength=0.35,逐细胞确定性键,不注入值、坐标逐位不动)。
各组分数的变化cell_state:变好,唯一超过噪声的来源:variogram raw 0.010162→0.007408,skill 0.469→0.551(从地板下升到地板上),得分 +1.03;mmd_u raw 0.01084→0.01037,skill 0.625→0.636,+0.13(噪声内);组值 54.70→59.35(+4.65 组百分点 ≈ +1.16 分)
expression_change:混合、净变化在噪声内:de_score raw 0.3103→0.3448,skill 0.600→0.614,+0.17;de_direction raw 0.4029→0.3976,skill 0.644→0.642,-0.03;净 +0.14 分(组值 62.21→62.77)
local_spatial:变坏,系统性代价:neighborhood_mmd raw 0.04775→0.04996,skill 0.620→0.609,得分 15.50→15.22(-0.27);skill 仍 >0.5,结构门未被触发(形状组未被打折)
shape_scale:不变:三项 raw/skill/得分逐位相同(d2_shape 8.03、occupancy_dice 3.53、scale_log_ratio 7.77),因为 DETR_EXT 不改坐标
family_idT2EI-01
假设是否成立否
经验
  1. 在 nnz-only 位移管线里,幅度通道的"冻结在源阶段"假设要先量测再动手:本节点实测逐型×基因 nnz 均值与几何目标的中位相对 gap 只有 9.8%(α=5 位移已把幅度推到接近目标),机制有信号但无收益空间,7 个配置(pooled/sided/gapped × strength 0.25–1.5)全部劣于父节点(57.88–63.04 vs 63.17)。
  2. 值通道的乘性缩放即使保序、保稀疏、只缩不放大,也随 strength 单调伤害 mmd_u(0.01139→0.02098)、neighborhood_mmd(0.0508→0.0799)和 de_score(0.286→0.214),而 variogram 收益始终 <0.0004:把细胞推离真值拟合的 PCA 流形的代价远大于共变结构的收益。
  3. "逐型逐基因收缩在伪批量上近似对消"不成立:单侧(只缩过表达的对)本身就造成系统性 pb 位移,实测 pb_maxshift 0.14–0.82,远超 PLAN 预期的 <0.02;单侧条件化的变换不能按"两侧对消"来估 pb 风险。
  4. 支持集(零/非零)通道仍是唯一可安全修的通道:把已验证的 DETR 几何插值从共有类型扩展到未覆盖的 37% 单侧类型细胞,得到净 +1.03(variogram +1.03、nbhd −0.27、DE 净 +0.14)。
  5. 缺失侧代理要去除组成混杂:漂移比只在共有类型细胞上估计(mode=shared, s=0.35 → 64.34)优于全体细胞估计(mode=all, s=0.4 → 64.13),且 nbhd 伤害约为同强度 all 模式的一半(0.0523 vs 0.0558);对两侧任一未检出的基因做门控可保护单侧类型的身份基因不被清零。
  6. OFF-only 置零的强度上限很窄:DETR_EXT s≥0.75 时 nbhd 与 de_direction 陡增伤害(s=0.75 → 63.73,s=1.5 → 54.55),可用区间只有 0.3–0.5。
mechanism_active是
下一步建议
  1. 针对 local_spatial:把 DETR_EXT 的置零按 15-NN(与 neighborhood_mmd 同尺度)空间门控——只在细胞的邻域内同型/同源占比高时移除条目,或对每细胞限制移除条目数上限,目标把 nbhd raw 从 0.04996 拉回 ≤0.0478(父水平)同时保留 variogram ≤0.0085;强度先固定 shared s=0.35,只做门控开关对照。
  2. 针对 cell_state:DETR_EXT strength 在 0.35–0.5 之间细扫(0.40/0.45)并同时比较 mode=shared 与 mode=all 的漂移估计,因为 variogram 已从地板下升到 0.551、继续压 raw 的边际收益递减而 nbhd 代价递增,选点应以 nbhd skill 不跌破 0.60(结构门裕度)为约束。
  3. 针对迁移性风险:在真实括号(final 视图,两端相邻、共有类型更多)上抽查 shared 漂移代理的逐基因 gap 分布与 pb_maxshift,若单侧类型占比远低于本视图的 37%,DETR_EXT 的 +1.03 会同比缩小,需要据此决定是否保留 s=0.35 还是降到 0.25。
  4. 不要再试幅度/值通道变换(AMPSHRINK 家族、全局或逐型比例缩放、抬零):本节点与 node 17/19/37 一致显示值通道修正一律伤 mmd_u/nbhd;shape_scale 组的 occupancy_dice(skill 0.424,最弱单项)虽然诱人,但历史上所有坐标整形都劣化它,且坐标一改会连带 nbhd 与结构门。

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

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

分析员

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

工程师

角色工程师 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数63
工具调用共 67 次:bash 47、edit 11、read 7、write 2
用时33 分
token 数输入 145,711 · 输出 22,387 · 思考 40,950
任务(第一行)按计划修改程序:AMPSHRINK:nnz 幅度几何插值收缩(DETR 的幅度通道推广)
最后的回答(摘录)
Done. Final summary:

**做了什么**:PLAN 的 AMPSHRINK(nnz 幅度几何收缩)已完整实现(pooled/sided/gapped 3 种解码 × 0.25–1.5 强度,7 次查分),信号检查通过(gap 中位 9.8%、f_mean 0.91、稀疏模式不变)但**全部劣于父节点**(57.88–63.04 vs 63.17),mmd_u/nbhd/de_score 随强度单调恶化——值通道乘性修正被证否,默认关闭。改交备选机制 **DETR_EXT**:诊断发现父节点 DETR 只覆盖共有类型,37% 输出细胞(24 个单侧独有类型)的检出支持集完全未校正;DETR_EXT 用共有类型细胞测得的逐基因检出漂移作缺失侧代理,对这些细胞做几何插值目标的 OFF-only 置零(shared 模式、s=0.35、逐细胞确定性键)。

**查分结果**(A 半 proxy,19/20 次):seed 0/1/2 = 64.34 / 63.89 / 63.97,均值 64.07(父 63.17);variogram 0.01046→0.00751(地板下最弱项)、de_score 0.286→0.321,代价 nbhd 0.0508→0.0523。`--ablate` 与父节点 37 逐位一致(3 种子 sha256 验证);伪装视图(+1 天平移、乱序 manifest、换路径)输出逐位一致;vec-check 通过;确定性重跑一致。

**下一步最值得试**:① DETR_EXT 的 nbhd 代价或可用"移除条目按 15-NN 空间平滑门控"缓解(只对空间邻域内同类细胞多的做移除);② shared/all 模式漂移估计在真实括号(两端相邻、共有类型更多)上的迁移性需在 final 前抽查;③ DETR 主线 strength 1.75 细扫仍未做(s=2.0 已知伤 nbhd)。
原始记录位置/home/spark-longxinyang/vec/runs/formal/20261003-171955-search-t2-embryo-interp-chain-12h/nodes/39/engineer.jsonl 376 KB
/home/spark-longxinyang/vec/runs/formal/20261003-171955-search-t2-embryo-interp-chain-12h/nodes/39/engineer.stderr

调研员

角色调研员 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数1
工具调用共 0 次:—
用时2 分
token 数输入 21,447 · 输出 1,379 · 思考 3,750
任务(第一行)为节点 n39(改进,父节点 n37)写改进计划 PLAN.json
最后的回答(摘录)
标整形均劣化它,暂不触碰。",
  "approach": "步骤:\n1. 在 DETR 之后新增 AMPSHRINK 模块。对每个共有类型(两侧≥10 细胞)× 每个软权重激活基因(与 DETR 相同的 τ=0.15 激活):\n   a) 从括号阶段实测数据计算 m_a = mean(nnz values at stage a),m_b = mean(nnz at stage b);\n   b) 几何目标 m_t = exp((1−t)·ln m_a + t·ln m_b);\n   c) 当前输出中该型×基因的 nnz 均值 m_cur;\n   d) 若 m_cur > m_t(过表达):对该型该基因所有 nnz 条目乘收缩因子 f = (m_t / m_cur)^strength;\n   e) 若 m_cur ≤ m_t:不动(只收缩不放大,ON 方向已证明结构性有毒)。\n2. 参数:strength 初值 0.5,网格 [0.25, 0.5, 1.0, 1.5];t 为插值分数(与 DETR 相同)。\n3. 实现约束:\n   - 随机源:无随机性(确定性比例缩放),无需额外 rng;\n   - 保稀疏:不改变零/非零模式(只做乘法);\n   - 保序:同一基因内的细胞间相对大小不变(比例缩放),保护空间配对;\n   - pb 保护:逐型逐基因的收缩在伪批量上近似对消(a 侧略缩、b 侧略缩),de_score/de_direction 预期不动。\n4. 单输入回退:无括号时不执行(与 DETR 相同,在 bracket 分支内)。\n5. 快速筛选:先跑 strength=0.5,检查 variogram raw 是否下降≥0.0003(当前 0.01016);若不动则检查 m_cur 与 m_t 的实际差距(若差距<5%则机制无信号,直接放弃);若 nbhd raw 上升>0.001 则放弃。\n6. 种子确认:最佳 strength 用 seed 0/1/2 确认,要求三种子 variogram raw 一致低于父节点。\n7. 诊断输出(机制证据):打印被修正的型×基因数、平均收缩因子、m_cur−m_t 差距分布、pb_maxshift。",
  "expected_groups": ["cell_state"],
  "risks": "1) 位移 α=5 已把 nnz 均值推到接近目标(m_cur≈m_t),则无信号可修——Engineer 应先测量 gap 分布,若中位 gap<5% 立即放弃,不浪费查分;2) 比例缩放改变绝对表达水平,可能轻微影响 mmd_u 的核带宽匹配——监控 mmd_u raw 若上升>0.0002 则回退;3) 若收缩幅度太大(strength>1),可能把正常异质性压扁,损害 variogram 的共变信号——以 variogram raw 非单调为停止信号;4) 与 DETR 的交互:DETR 移除了部分条目,剩余条目的均值已变——AMPSHRINK 必须在 DETR 之后计算 m_cur(顺序依赖)。",
  "family_id": "T2EI-01",
  "mechanism": "对每个共有类型×激活基因的 nnz 均值,向几何时间插值目标 m_t=exp((1−t)ln m_a + t ln m_b) 做单侧比例收缩(只缩不放大),修复位移管线冻结在源阶段的幅度双峰。",
  "vs_constant_shift": "常数位移对每型所有基因加同一 Δ;AMPSHRINK 是逐型×逐基因×逐条目的比例缩放(x·f),缩放因子取决于该基因当前 nnz 均值与几何目标的比值,方向单侧(只缩),且只作用于 nnz 条目。它是乘性、条件化、基因特异的,不是加性全局平移。",
  "mechanism_evidence": "Engineer 应报告:(1) 被修正的型×基因对数及占比(应>10% 否则空转);(2) 平均收缩因子(预期 0.85–0.98);(3) 修正前后逐型 nnz 均值与几何目标的差距(应从>10% 降到<5%);(4) variogram raw 变化≥0.0003;(5) pb_maxshift<0.02(DE 通道保护);(6) nnz 条目数不变(不改变稀疏模式)。",
  "mechanism_off_control": "T2_AMPSHRINK_ON=0(或 --ablate mechanism)时,模块不执行,输出与父节点 37 逐位一致(sha256 验证)。预期差别:关闭后 variogram raw 回到 0.01016,cell_state 组回到 54.70。",
  "sources": []
}
原始记录位置/home/spark-longxinyang/vec/runs/formal/20261003-171955-search-t2-embryo-interp-chain-12h/nodes/39/researcher.jsonl 5 KB
/home/spark-longxinyang/vec/runs/formal/20261003-171955-search-t2-embryo-interp-chain-12h/nodes/39/researcher.stderr

审查员

角色审查员 alibaba-token-plan-cn/qwen3.8-max
调用次数1 次
轮数7
工具调用共 12 次:read 9、bash 2、write 1
用时2 分
token 数输入 62,596 · 输出 1,684 · 思考 2,564
任务(第一行)审查节点 n39 的程序是否越界读取、写死目标、钻评分器漏洞
最后的回答(摘录)
REVIEW.json written
原始记录位置/home/spark-longxinyang/vec/runs/formal/20261003-171955-search-t2-embryo-interp-chain-12h/nodes/39/reviewer.jsonl 317 KB
/home/spark-longxinyang/vec/runs/formal/20261003-171955-search-t2-embryo-interp-chain-12h/nodes/39/reviewer.stderr