Mechanism shift / dynamics / benchmarks · 逐篇深读 · 面向读者的解释

Dissecting Causal Mechanism Shifts via FANS: Function And Noise Separation

FANS 先在 source environment 学会一套 causal mechanism,再用它反解 target data 中的 residual noise:如果 residual 仍与 parents 独立,更像 noise process 变了;如果 residual 开始携带 parent information,更像 structural function 变了。它真正解决的是“变化发生在哪一层”,而不只是“分布有没有变化”。

01 · Misconception repair

先拆掉最容易产生的误会

最容易产生的误会是:

P_target(Y | Parents) != P_source(Y | Parents)
=> causal function 一定变了

这不成立。结构方程可以写成:

\[Y=f(\mathrm{PA},\varepsilon).\]

同一个 conditional distribution 的变化至少可能来自:

  • function shift:相同 parent input 被新的 structural function 转成 outcome;
  • noise alteration:function 不变,但 exogenous noise distribution 变了;
  • simultaneous shift:两者同时变化。

三种变化对应不同动作。Function shift 倾向于要求重新估计或修复 mechanism;noise alteration 可能只需重新校准 uncertainty、tail risk 或 prediction interval;simultaneous shift 则可能需要拒绝唯一归因。

第二个误会是把 FANS 理解成普通 residual variance test。论文处理的是 non-additive、non-linear SCM,noise shift 也不只等于 variance 变大。真正的关键不是 residual 有多大,而是 source mechanism 反解出的 residual 是否开始依赖 parents。

第三个误会是认为 FANS 在任何数据上都能自动给出唯一标签。论文明确承认 function 与 noise 同时变化时通常不可辨识;要继续拆分,必须加入 Assumption 3.3 一类额外结构限制。

02 · Objective verdict

先给一个客观判决

问题 当前判决
它解决了什么? 把 causal mechanism shift 拆成 function、noise 和 simultaneous 三类可行动诊断。
核心新意是什么? 用 source causal flow 反演 target residual,再用 parent-residual independence 判断 source function 是否仍成立。
它比普通 shift detector 多了什么? 不只定位 shifted node,还试图解释变化来自 function 还是 noise。
理论边界在哪里? simultaneous shifts 没有额外假设时不可唯一识别。
实验覆盖什么? ER/SF synthetic SCM、Morpho-MNIST 和 Sachs,并与五类 baseline 比较。
我们复现了吗? 尚未。官方代码已检查,但完整 CNF baseline 仍需兼容的旧版 PyTorch/CUDA 环境和长训练。

最公平的评价是:FANS 提出了一个很好的 diagnostic object,也给出了理论与实现路径;但它依赖已知 graph、可逆 noise mechanism、causal sufficiency 和经验阈值。它不是一个无需假设的通用 shift oracle。

03 · Mental model

一个直观世界

想象一台自动烤箱:

熟度 Y = 控制程序 f(设定温度 X, 电网与原料扰动 epsilon)

一天后,产品熟度分布变了。

情况 A:noise alteration

控制程序没改,但电网更不稳定、原料含水量更散。相同温度下产品波动变大。旧程序仍然正确,只是 uncertainty model 需要更新。

情况 B:function shift

firmware 更新后,设定温度到加热功率的 mapping 改了。仍用旧程序解释新数据时,误差会系统地随温度变化。Residual 不再只是独立扰动,而携带 X 的 pattern。

FANS 做的事

FANS 把 source environment 学到的 mechanism 当成一把校准尺:

target observation
-> source mechanism 的 inverse
-> inferred residual noise
-> residual 是否仍与 parents 独立?

如果独立,旧 function 仍可能成立;如果依赖,旧 function 无法把 parent signal 解释干净。

04 · Real setup

真实问题与实验设定

1. 两个环境中的 SCM

对节点 X_j,source 与 target 分别有结构方程:

\[X_j^{(e)}=f_j^{(e)}\!\left(\mathrm{PA}_j^{(e)},\varepsilon_j^{(e)}\right), \qquad e\in\{s,t\}.\]

FANS 的输入不是只有两份 data。它还要求一个已知的 base DAG,并在以下假设下工作:

  • known base DAG:算法不是同时学习 graph structure;
  • causal sufficiency:没有未建模的 hidden confounder 破坏 noise independence;
  • noise invertibility:每个 structural equation 对 noise argument 可逆;
  • shared invariant link:论文把 mechanism 写成 g_j(h_j(PA_j), epsilon_j),环境变化主要落在 parent-side function h_j
  • target parent set 与 source 相同或缩小,不能任意新增 parents。

这些不是实现细节,而是 residual 能否被解释成 exogenous noise 的识别基础。

2. 四类标准场景

场景 Function Noise 期望诊断
no shift same same 继续 transfer
pure function shift changed same structural repair
pure noise alteration same changed uncertainty recalibration
simultaneous shift changed changed 额外假设或拒绝唯一归因

3. 论文的 synthetic benchmark

论文在 Erdős-Rényi 与 scale-free DAG 上生成 nonlinear SCM:

  • 节点数 J = 10, 20, 30, 40, 50
  • 平均边数约为 4J
  • 每张图约 20% 的节点发生 shift;
  • 每种设置使用 30 个随机 DAG;
  • 每个 environment 生成 50,000 个样本,其中 40,000 train、10,000 validation。

Real-data sections 使用 Morpho-MNIST 和 Sachs。前者提供可控的图像属性变化,后者是经典蛋白信号数据;它们是方法行为的应用性检查,不等于真实世界中 function/noise ground truth 都完全可观测。

05 · Method walkthrough

方法或任务流程

FANS 是清楚的两阶段 pipeline。

Stage 0:只在 source 训练 causal normalizing flow

官方实现使用 NAF-based conditional normalizing flow。对每个节点,它学习一个可逆 conditional mechanism:

\[\widehat\varepsilon_j =g_{j,\hat\theta}^{-1}(X_j;\mathrm{PA}_j).\]

代码中的典型训练配置包括最高 3000 epochs、batch size 1024、初始 learning rate 0.01 与 decay。Target diagnosis 复用 source model,不为每个 target environment 重训整套 flow。

Stage 1:检测哪个节点发生 shift

Source flow 用于构造跨环境的 conditional counterfactual comparison。若 source/target conditional behavior 的 divergence 超过阈值,节点被标记为 shifted。

这一阶段回答:

哪里变了?

Stage 2:拆解 function 与 noise

对已检测到的节点,把 target observations 通过 source inverse 映射成 inferred residual。然后检验:

\[\widehat\varepsilon_j^{(t)}\;\perp\!\!\!\perp\;\mathrm{PA}_j^{(t)}\;?\]
  • 若仍独立:source function 仍能解释 parent-to-outcome mapping,差异更像 noise alteration;
  • 若不独立:function mismatch 泄漏进 residual,存在 function shift。

有限样本实现使用 distance-correlation-based signal。官方代码还包含经验 threshold;评审和 rebuttal 都讨论了 threshold calibration 的敏感性。

simultaneous shift 为什么需要 Assumption 3.3

只看到 residual dependence 与 residual distribution change,通常无法唯一知道两者分别贡献多少。论文加入 generalized affine interaction 假设,并对 inferred noise 做 conditional standardization;在相应 null 下,标准化噪声平方应符合 chi-square-style behavior。

正确理解是:Assumption 3.3 让一个原本不可辨识的问题在受限模型族中可处理。它不是证明 simultaneous shifts 在完全一般的 SCM 中都能被拆开。

06 · Worked example

自己走一遍最小例子

用 additive linear 特例手算一次。它不是论文完整模型,只用于看懂 independence criterion。

Source:

\[X\sim\mathcal N(0,1),\qquad Y=X+N,\qquad N\perp X.\]

Source residual extractor 是 R=Y-X

Pure noise shift

Target 变成:

\[Y=X+N',\qquad N'\sim\operatorname{Laplace}(0,b),\qquad N'\perp X.\]

于是 R=N'。Residual distribution 变了,但仍与 X 独立。诊断是 noise alteration。

Pure function shift

Target 变成:

\[Y=2X+N.\]

仍用 source function 反解:

\[R=Y-X=X+N.\]

此时:

\[\operatorname{Cov}(X,R)=\operatorname{Var}(X)=1.\]

Residual 明确携带 parent information,诊断是 function shift。

Mixture shift:FANS 当前没有单独建模的情况

假设 population 有两个稳定 unit types:

Type A: Y = 1.4 X + noise
Type B: Y = 2.6 X + noise

Source 是 50% A + 50% B,target 变成 80% A + 20% B,但两类内部 mechanism 完全不变。Pooled conditional behavior 仍会变化,因而可能被误读成 function/noise shift。

这不是 FANS 论文声称解决的对象。它正是当前 DiscoSCM replacement experiment 的入口:先保留 stable unit identity,再分别判断 within-type function、noise 与 mixture share。

07 · Results and evidence

关键结果与证据层级

论文比较了哪些 baselines

Synthetic experiments 包括:

  • iSCAN
  • LinearCCP
  • LCIT
  • PreDITEr
  • SplitKCI

它们覆盖 shift localization、conditional-independence 与 distribution-comparison 等相邻策略。FANS 的比较重点是同时完成 detection 与 function/noise dissection,而不是只做一个全局 two-sample test。

可以从论文结果得出什么

全文实验支持以下趋势:

  • source causal flow 加 residual criterion 能定位并拆解多种 synthetic mechanism shifts;
  • 方法覆盖 nonlinear、non-additive DGP,而不是只在 additive Gaussian toy 上成立;
  • Morpho-MNIST 与 Sachs 用来说明 pipeline 可以进入图像属性和真实 scientific data;
  • threshold 选择、sample size、graph size 和 model fit 会影响 detection/dissection behavior。

本导读不抄写单个 table 的最佳数字,因为我们当前目标是先看懂任务和识别逻辑,并且官方 CNF 尚未在本项目环境复现。Paper-reported trend 与 locally reproduced result 必须保持分开。

官方代码告诉了我们什么

官方 repository 已检查,能确认:

  • source CNF 训练与 inverse-residual pipeline 已公开;
  • detection、distance-correlation dissection 和 simultaneous-shift check 有对应实现;
  • synthetic generators、Morpho-MNIST/Sachs data 与 baseline code/configs 可见;
  • repository 依赖 Python 3.9、PyTorch 1.13.1/CUDA 11.7 一类旧环境,完整 reproduction 不是当前系统 Python 下的一条轻命令。

所以 source gate 已通过,但 faithful reproduction gate 仍未通过。

应该怎样读论文里的实验趋势

Detection 与 dissection 必须分开读。一个方法可能准确发现“这个节点变了”,却把 function shift 和 noise alteration 分错;因此只看 shifted-node accuracy 不够,还要看 shift-type classification。Graph size 从 10 增加到 50 时,flow estimation、parent dimension 和 multiple-node testing 会同时变难,不能把所有性能变化都解释成 independence criterion 本身失效。

论文与代码还显示 threshold 是 practical pipeline 的重要部分。Rebuttal 讨论的 detection threshold 大致落在 0.06-0.14 的敏感区间,约 0.10 表现较稳;dissection threshold 也在约 0.12-0.14 的范围内检查。这里的数字是作者实现与敏感性分析中的配置证据,不是跨数据集通用常数。把它迁移到新 DGP 时仍需要 held-out calibration。

Morpho-MNIST 与 Sachs 的意义也不同。Morpho-MNIST 更接近可控 stress test,可以人为改变厚度、亮度等生成属性;Sachs 提供 scientific observational setting,但真实数据没有像 synthetic SCM 那样完整的 function/noise ground truth。因此 real-data section 更适合回答“诊断是否产生可解释 pattern”,不适合单独证明分类标签绝对正确。

最后,论文结果与项目 pilot 要保持三层证据边界:paper table 是作者报告;official-code reproduction 是我们尚未完成的基线;run-009 是使用线性 oracle-residual proxy 的 extension gate。三者不能互相替代,也不能把 run-009 的完美 synthetic score写成 FANS 的官方结果。

08 · Objective review

综合客观评价

强点

  1. 问题拆得对。 “是否 shift”与“哪一部分 shift”是不同问题,后者更接近实际 repair decision。
  2. 诊断对象清楚。 Parent-residual dependence 把抽象的 function mismatch 变成可检验 signal。
  3. 超越 additive noise。 Causal flow 允许更一般的 nonlinear/non-additive mechanism。
  4. 诚实面对不可辨识。 论文没有把 simultaneous shift 假装成无条件可解。
  5. 代码和 DGP 完整度较好。 训练、数据生成、baselines 与 real-data paths 均有公开实现。

压力点

  1. Known DAG 是强输入。 Graph 错误会直接污染 residual interpretation。
  2. Flow fit 与 shift signal 缠在一起。 Source model 没学好,也会制造 parent-residual dependence。
  3. Threshold calibration 仍偏经验。 不同 graph、sample size 与 shift strength 下可能需要重新校准。
  4. Assumption 3.3 的现实性决定 mixed-shift claim 的强弱。 违反时应输出不充分证据,而非唯一标签。
  5. Population composition 未被单独拆出。 Stable subpopulation proportions 改变可能伪装成 pooled mechanism shift。
09 · Limitations

主要局限性

  1. 需要已知 base DAG。 FANS 不是 graph discovery method。漏掉真实 parent 会让 residual 保留 parent signal,加入错误变量也会改变 conditional flow 与 independence test,因而 graph error 可能被误读成 mechanism shift。
  2. 依赖 causal sufficiency。 Hidden confounder 同时影响 parents 与 outcome 时,inferred noise 本来就可能依赖 observed parents。环境间 confounder distribution 再发生变化,会产生类似 simultaneous function/noise shift 的表象。
  3. 要求 noise invertibility。 Structural equation 必须能从 outcome 与 parents 反推出 noise。离散、many-to-one、censoring 或不可逆 measurement process 都可能让 residual object 不唯一。
  4. Shared-link restriction 限制变化形式。 g_j(h_j(PA_j), epsilon_j) 的分解把环境变化约束在特定 parent-side component;若 link 本身也变化,function/noise attribution 可能不再对应论文定义。
  5. Target parent set 只能保持或缩小。 新环境出现新的 causal parent,不属于论文保证覆盖的 shift family。此时旧 residual 的 dependence 既可能表示 function shift,也可能只是漏掉新增 parent。
  6. Simultaneous shift 本来不可辨识。 Assumption 3.3 提供的是受限模型族中的识别路径,不是无条件分解。违反 generalized affine interaction 时,系统应返回 evidence insufficient。
  7. Threshold calibration 带来实践敏感性。 Detection divergence 与 distance-correlation signal 都需要阈值;不同 graph size、sample size、shift strength 和 flow quality 下,一个固定阈值未必保持相同 type-I error。
  8. 高维 independence testing 的 power 有限。 Parents 增多、function shift 很小或 noise 很强时,population dependence 可以存在而 finite-sample test 检不出来,形成 false negative。
  9. Source flow misspecification 会伪造 function shift。 如果 source mechanism 从未拟合好,target residual 携带 parent information 并不能证明 target function 改变。需要先做 source-fit diagnostics 或 cross-fitting。
  10. 没有显式分开 measurement、selection 与 mixture shift。 Sensor mapping、sample selection 或 stable subpopulation proportions 的变化都能改变 pooled conditional distribution,但对应的修复动作与 structural function shift 不同。
  11. Noise alteration 不是低风险标签。 Function 不变并不意味着系统可直接 transfer。Variance、tail probability 或 rare-event process 改变,仍可能彻底改变安全边界和 downstream policy。
  12. 检测 function shift 不等于恢复新 function。 FANS 告诉我们旧 mechanism 失效,但不会自动给出新 structural equation、变化幅度、可迁移范围或最优 repair。
  13. Real-data ground truth 有限。 Morpho-MNIST 较可控,Sachs 更接近真实 scientific data;后者难以像 synthetic benchmark 一样逐节点验证 function/noise 真值。
  14. 官方 reproduction 成本不低。 Repository 使用 Python 3.9、PyTorch 1.13.1、CUDA 11.7 和最高 3000 epochs 的训练配置。代码公开不等于在现代 CPU-only 环境中可以即时复现全部结果。
10 · Stronger tests

什么实验会让结论更强

对 FANS 本身,最有价值的压力测试是:

  • 把 graph misspecification、hidden confounding 与 measurement shift 加入 factorial DGP;
  • 对 threshold 做 held-out calibration,而不是固定一个全局经验值;
  • 连续改变 shift strength,报告 type-I error、power、AUROC 和 macro-F1;
  • 把 mechanism fitting 与 independence testing cross-fit,减少 overfitting signal;
  • 对 Assumption 3.3 做 violation sensitivity;
  • 报告从 diagnosis 到 repair/recalibration decision 的真实收益。

对我们的 replacement question,还需要四个 stable-unit 场景:

1. 所有 unit 都发生 function shift
2. 所有 unit 都发生 noise shift
3. 只有一个 stable unit type 发生 function shift
4. unit-specific mechanisms 不变,只改变 mixture proportions

比较 Pooled FANSObserved-unit oracleLatent-unit DiscoSCM,并要求 mixture-only shift 不被解释成 function/noise shift。

11 · Claim boundary

论文可以支持什么结论

可以支持:

  • causal mechanism shift 应区分 function 与 noise;
  • source-model residual 与 parents 的依赖是 function mismatch 的核心诊断信号;
  • causal normalizing flow 可以把这一原则扩展到 nonlinear、non-additive SCM;
  • FANS 提供 two-stage detection/dissection pipeline;
  • simultaneous shifts 需要额外 identifying assumption;
  • synthetic、Morpho-MNIST 与 Sachs experiments 支持论文报告的主要趋势。

不能支持:

  • 不知道 graph 也能直接使用同样保证;
  • residual dependence 在 hidden confounding 或 poor source fit 下仍有唯一解释;
  • Assumption 3.3 在所有真实系统都合理;
  • FANS 已经区分 stable-unit mixture shift;
  • 我们已经复现官方 CNF 的全部表格和结论;
  • 当前三随机种子的轻量 pilot 可以替代官方 baseline。
12 · Research connection

为什么它与当前研究有关

FANS 给 P20 一个非常干净的 opponent object:

FANS: population-level function/noise dissection
DiscoSCM extension: preserve stable unit identity before dissection

当前 replacement question 是:

如果总体其实混合多个 stable unit types,能否先推断 P(U_i | O_i),再判断每类 unit 的 function、noise 或 mixture share 到底发生了什么变化?

我们已经实现一个明确标注为 FANS-aligned reconstruction 的轻量 pilot。三随机种子下:

方法 macro-F1 decision accuracy
Pooled FANS-aligned 0.6333 0.7143
Observed-unit oracle 1.0000 1.0000
Latent-unit DiscoSCM 1.0000 1.0000

最关键的 decision delta 是 mixture-only 场景:pooled 方法判成 mixed mechanism shift,unit-aware 方法判成 mixture shift,把动作从“拒绝唯一归因”改成“按 unit reweight/condition”。

但 promotion gate 仍是关闭的,因为 official_fans_cnf_reproduced = false。下一步必须先在 compatible environment 复现 homogeneous FANS 趋势,再把 stable-unit DGP 接进官方 residual pipeline。

13 · Reading path

推荐阅读顺序

第一次读,不要从 theorem 开始:

  1. 先读 abstract 和本文“一个直观世界”,只抓住 function/noise 的行动差异;
  2. 再看论文 problem setup,标出 known DAG、causal sufficiency、invertibility 与 shared link;
  3. 读 two-stage algorithm,区分 shift detectionshift dissection
  4. 用本文 linear toy 手算 residual independence;
  5. 回到 Assumption 3.3,理解 simultaneous shift 为什么需要额外限制;
  6. 看 synthetic DGP 与 baselines,确认比较对象到底评 detection 还是 dissection;
  7. 最后看 Morpho-MNIST/Sachs 与 limitations;
  8. 再进入 DiscoSCM replacement,避免在没看懂 FANS 前先讨论 extension。

如果只记三句话:

1. Distribution shift 不等于 function shift。
2. Source inverse 后 residual 是否依赖 parents,是 FANS 的核心判据。
3. Stable-unit mixture shift 是我们的 extension,不是 FANS 已解决的对象。
14 · Sources and next reading

论文来源与相邻阅读

  • OpenReview paper, reviews, decision, and author responses: https://openreview.net/forum?id=blowNYT1qn
  • ICML virtual paper page: https://icml.cc/virtual/2026/poster/62929
  • Official implementation: https://github.com/MLAI-Yonsei/FANS/
  • Author publication record: https://yonghanjung.me/publications/
  • Evidence boundary: primary sources and official code inspected; official CNF reproduction still pending.