# Learning DiscoSCM 实验图解

> 状态：中文读者导览 v1  
> 页面版本：`LEARNING-DISCOSCM-EXPERIMENT-EXPLAINER-2026-07-16-V1`  
> 对应实验：`learning-discoscm-yshuffle-curve-robustness-v1`

## 一句话先看懂

模拟器生成 6,000 个 synthetic units；每个 unit 只向 learner 留下一条 factual record。训练时，实验故意把一部分 outcome 配错对象；测试时，再用 evaluator 私藏的 21 点 conditional response law，检查模型能否恢复 query-response curve。

这是一个 **synthetic label-linkage robustness benchmark**，不是真实干预实验，也不是 individual counterfactual identification。

## 1. 跟着一个 unit 走一遍

以 `matched, seed=11` 的第一个 test unit 为例，learner 能看见：

```text
evidence O = [0.851, 0.465, 0.038, -0.146, 0.732, -0.028, 0.702, 0.173]
factual query x = 0.862
factual outcome y = 0.331
```

训练时，`y` 用来计算所有训练 units 的 likelihood loss；对一个 test unit 做 `abduce(evidence)` 时，当前实现只读取八维 `O`，不读取该 unit 的 factual `y`。

evaluator 另外持有 21 个 `x in [-1,1]` 上的 oracle location/scale。上述 test unit 的三个代表点是：

| query | oracle location | oracle scale |
|---:|---:|---:|
| -1 | 0.477 | 0.355 |
| 0 | 0.458 | 0.362 |
| 1 | 0.438 | 0.368 |

这 21 点不是 exact latent unit 的 21 个 realized potential outcomes。当前代码中的 oracle 是由同一 evidence row 索引的 composed conditional law `P(Y(x) | O=o)` 的 location/scale grid。

## 2. 一次实验的六步流程

1. 生成 6,000 个 synthetic units，每个 unit 只有一条 factual row。
2. 按 60/20/20 切成 3,600 train、1,200 validation、1,200 test。
3. 只在 train + validation 的 4,800 个 outcomes 中做 Y-shuffle。
4. 七个模型使用相同 split、corruption design 和训练预算。
5. 在 clean test units 上，Unit model 对 `O` abduct 一次，并固定结果查询 21 个 `x`；direct model 对每个 `(O,x)` 直接预测。
6. evaluator 把预测的 conditional response curve 与私藏 oracle curve 比较。

实验的主角不是预测一个 `y`，而是从一行 factual evidence 推出一条 hidden query-response law。

## 3. Y-shuffle 改了什么

Y-shuffle 只交换选中 rows 的 outcome：

```text
clean                         shuffled
(O1, x1) -> y1               (O1, x1) -> y3
(O2, x2) -> y2               (O2, x2) -> y1
(O3, x3) -> y3               (O3, x3) -> y2
```

- `O` 和 `x` 不变；只移动 `Y`。
- 选中 rows 使用无固定点 derangement，每个被选 outcome 都换主人。
- `rho = 0, .1, .2, .3, .4`；`rho=.4` 时，4,800 个 train/validation rows 中有 1,920 个 `Y` 被错配。
- test 与 evaluator oracle 始终保持 clean。
- outcome multiset 与边际分布保持不变。

因此，它测试的是 input-outcome linkage 受损后的结构鲁棒性，不是 causal intervention。

## 4. 四个 synthetic worlds

| World | 真正改变的内容 | 科学问题 |
|---|---|---|
| `matched` | DGP 与 Cauchy Unit + bilinear mechanism 匹配 | 在最有利的正确设定中，Unit factorization 能否胜过 direct predictor？ |
| `no_heterogeneity` | `U` 对 outcome 的 coefficient 被设为 0 | 模型会不会在没有 unit heterogeneity 时制造虚假优势？ |
| `weak_evidence` | 给定 `O` 后的 `U` scale 明显变宽 | evidence 不充分时，不确定性是否诚实变宽？ |
| `narrow_support` | factual `x` 只落在 `[-.3,.3]`，oracle 仍查询 `[-1,1]` | support 外是否暴露 extrapolation failure？ |

## 5. 七个模型其实回答三个问题

### Primary factorization test

- `cauchy_unit`：5,267 parameters
- `direct_cauchy_matched`：5,216 parameters

二者参数差低于 1%，主问题是显式 Unit factorization 是否有价值。

### Uncertainty geometry

- `gaussian_unit`
- `deterministic_unit`

它们与 Cauchy Unit 比较 point / Gaussian / Cauchy 的 learner-side uncertainty choice。

### Flexible non-unit alternatives

- `direct_gaussian_matched`
- `varying_cauchy`
- `cauchy_moe4`

七个模型不是七个平行主张。冻结的主检验只有：`matched` world、40% Y-shuffle、Cauchy Unit 对 capacity-matched Direct Cauchy。

## 6. 怎样判胜

主指标是 evaluator-hidden curve-location error：对 1,200 个 clean test units、每个 21 个 queries，计算预测 location 与 oracle location 的平均绝对差。越小越好。

对每个 seed：

```text
delta_s = log(E_direct,s / E_unit,s)
```

`delta_s > 0` 表示 Unit error 更小。正式 gate 同时要求：

1. mean delta > 0；
2. two-sided 95% t interval 的下界 > 0；
3. one-sided exact sign test `p <= .05`；
4. `no_heterogeneity` 中虚假 Unit advantage 的 95% 上界不超过 10%。

## 7. 当前证据状态

### Smoke

8-row mechanics smoke 已完成。它只证明 runner、truth firewall 与接口可运行。

### Development

700-row development matrix 已完成，但按 protocol 只能作为诊断：

- `matched, rho=.4` 中，Unit 的点估计 error 约低 2.9%；
- 只赢 3/5 seeds，sign test `p=.5`；
- 95% log-effect interval `[-.168,.228]` 跨 0；
- `no_heterogeneity` guardrail 未过，可能 advantage 的 95% 上界约 15.6%，高于 10% ceiling。

因此，development 没有给出可升级的结构优势。它不是正式否定，也绝不是 superiority evidence。

### Confirmatory

1,400-row confirmatory matrix 已完成 1,400/1,400 cells，没有失败。正式结果是 `not_confirmed`：

- 在冻结的 primary cell `matched, rho=.4` 中，mean `log(E_direct/E_unit) = -0.00715`；点估计方向略偏向 Direct，而不是 Unit；
- 95% t interval 为 `[-0.0496, 0.0353]`，跨过 0；
- Unit 只赢 4/10 seeds，one-sided exact sign test `p=.8281`；
- 因此 primary robustness gate 的三个条件全部未通过；
- `no_heterogeneity` guardrail 通过：虚假 Unit advantage 的 95% 上界约 6.01%，低于 10% ceiling。

所以，这次正式实验**不支持 Unit factorization 比 capacity-matched direct predictor 更抗 Y-link corruption**。这是预先声明检验得到的正式未确认结果；它不等于证实“没有任何效应”，也不等于证明整个 DiscoSCM ontology 错误。

## 8. 它能与不能证明什么

这次 confirmatory 真正支持的是：

- 预先冻结的 synthetic protocol 已完整运行，且正式主张没有被结果确认；
- 在声明的 DGP 与主指标下，没有证据表明 Unit factorization 比 capacity-matched direct predictor 更鲁棒；
- `no_heterogeneity` 负对照没有暴露超过 10% ceiling 的虚假 Unit advantage。

它不能证明：

- 恢复 actual latent `U`；
- 识别 individual counterfactual；
- 验证 distribution-consistency；
- 学会完整 Layer 3 joint law；
- 具备真实世界 causal intervention 能力；
- DiscoSCM 普遍优于现有 causal methods。

## 9. 四个常见问题

### 隐藏 21 点是同一个 unit 的 21 个结果吗？

不是。它们是 simulator 给出的 conditional response law 参数，不是 21 个 realized outcomes。

### 测试时 abduction 使用 factual `y` 吗？

当前实现不用，只用八维 evidence `O`。训练数据中的 `y` 用于学习共享模型参数和 factual evaluation。

### 为什么仍称为 same-token？

因为同一个 `O`-indexed test token 的 abduction result 被计算一次并跨 query 复用。这是一条 computational interface contract，不是 identification theorem。

### Y-shuffle 是 causal intervention 吗？

不是。它是人为破坏训练/验证数据中 input-outcome pairing 的 stress test。

## Truth sources

- Protocol：`implementation/config/yshuffle.json`
- DGP：`paper/unit-mechanism-learning/implementation/src/unit_mechanism/synthetic.py`
- Corruption：`implementation/src/learning_discoscm/yshuffle_protocol.py`
- Evaluation：`implementation/src/learning_discoscm/yshuffle_evaluation.py`
- Development verdict：`implementation/evidence/yshuffle/development/analysis/verdict.json`
- Confirmatory checkpoint：`implementation/confirmatory/yshuffle-v1.checkpoint.json`
- Confirmatory verdict：`implementation/evidence/yshuffle/confirmatory/analysis/verdict.json`

## 下一轮 K=1 实验设计提案

已执行的 Y-shuffle benchmark 与下一轮优化设计保持分离。优化设计仍固定
`events_per_unit=1`：每个 unit 只公开 `(W,A^F,Y^F)`，使用高维 pre-action proxy
evidence、64D actual unit state、8D nonlinear action 与 evaluator-only same-unit
structural counterfactual outcomes。由于 strict K=1 不能自由识别 cross-action
coupling，也不能合法训练 naive Direct ex-post / standard CNP，本设计公开冻结同一
shared-state coupling family（其中 R channel 为 rank one），并比较 response-informed Unit、conditional GP / deep
kernel 与 single-point-likelihood generative function priors。

该设计当前为 `proposal_only / unrun`，不能被表述成新实验结果。Canonical 设计源：
[`experiment-design-k1-zh.md`](experiment-design-k1-zh.md)；读者页面：
`/blog/hcgm/learning-discoscm/experiment/k1-design/`。
