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

Use What You Know: Causal Foundation Models with Partial Graphs

这篇论文让一个预先在大量 synthetic SCMs 上训练的 Causal Foundation Model,在 test time 不只读取 observational dataset 和 intervention query,还能读取一张把“已知是祖先、已知不是祖先、未知”分开的 partial ancestral matrix;正确知识会收窄模型考虑的 causal worlds,而把不确定关系留空,通常远比猜错方向安全。

01 · Misconception repair

先拆掉最容易产生的误会

第一个误会是:Causal Foundation Model 已经从数据中自动发现真实 SCM,这篇论文只是给它“加一点专家提示”。

论文中的 CFM 更准确地说是一种 Prior-Data-Fitted Network:它先从研究者设计的 p(ψ) 反复采样 synthetic SCM、observational datasets 与 interventional targets,训练一个 Transformer 直接近似 posterior predictive:

\[p(y\mid do(t),x,D)=\int p(y\mid x,\psi_{do(t)})p(\psi\mid D)d\psi.\]

模型的 causal world family、mechanism distribution 与 graph prior 都来自训练生成器。它把昂贵的 Bayesian averaging amortize 到一次 forward pass;这不是“摆脱 assumptions”,而是把 assumptions 放进 prior 与 training distribution。

第二个误会是 partial graph 等于“一张可能漏了几条边的 adjacency matrix”。本文主要使用的是 partially known ancestor matrix (PAM):它不要求知道 X 是否直接指向 Y,只记录 X 是否位于 Y 上游。每个 entry 有三个状态:

+1 = 已知 zi 是 zj 的 ancestor
-1 = 已知 zi 不是 zj 的 ancestor
 0 = 不知道,模型应保留两种可能

0 不是“没有边”,而是 epistemic unknown。这个三值区别是论文最实用的设计之一。

第三个误会是:加入图知识后,模型就会抵抗错误专家知识。恰恰相反,论文 Appendix K 显示,错误翻转 ancestral relation 会迅速伤害性能。模型是在“给定 supplied knowledge 为真”的条件下做推断;它不会神奇地从 observational data 中推翻一个在该数据下本来就不可识别的错误方向。

02 · Objective verdict

先给一个客观判决

判决层级 最稳妥的表述
论文有力支持 一个 CFM 可以被训练成在同一模型中处理 no / partial / full ancestral information,并在 test time 利用正确的图知识改善 interventional prediction。
论文最实用的发现 对不确定关系标 unknown 的退化是渐进的;把方向猜错的伤害明显更快、更大。
论文的架构结论 在作者测试的 variants 中,learnable soft attention bias,尤其配合 GCN structural encoder,整体优于 hard mask 或 GCN-only。
论文仍未证明 一个真正覆盖现实 causal tasks 的 all-in-one foundation model 已经实现;也没有处理 hidden variables、错误知识校验或 graph 之外的 mechanism knowledge。

这是一个扎实的 conditioning paper,不是“causal foundation model solved causality”。它解决的是:当 domain expert 已经知道一部分上游关系时,怎样让统一模型少在被排除的 causal worlds 上浪费 posterior mass,同时保留未知关系的不确定性。

03 · Mental model

一个直观世界

想象一名医生面对一位病人的 observational record,要预测 do(treatment) 后的 outcome。模型内部像有一整排候诊室,每个房间放着一套可能的 causal story:

Room A: treatment -> outcome
Room B: outcome -> treatment
Room C: confounder -> treatment and outcome
Room D: covariate -> ... -> outcome
...

只给 data 时,有些 rooms 产生几乎相同的 observational distribution,模型无法把它们完全排除,于是最后的 intervention forecast 是多个 rooms 的加权混合,uncertainty 很宽。

现在专家只提供两条可靠知识:

treatment 位于 outcome 上游
baseline age 不可能由 treatment 引起
其余关系不知道

模型不需要专家画出完整 DAG。PAM 像门禁卡:把与两条知识冲突的 rooms 关掉,未知的 rooms 继续开放。posterior predictive 因而更集中。

但如果专家把第一条写反,门禁会关掉正确房间、保留错误房间。论文的口号“Use What You Know”真正的下一句应该是:只编码你真的知道的;不确定就保留 unknown。

04 · Real setup

真实问题与实验设定

1. 模型究竟回答什么 query

输入包括:

  • observational context dataset D
  • intervention value do(t)
  • query covariates x
  • optional partial ancestral matrix T_tilde

输出不是一张 discovered graph,而是 outcome 的 posterior predictive distribution:

\[q_\theta(y\mid do(t),x,D,\widetilde T).\]

因此本论文的 primary task 是 causal effect / interventional distribution estimation under structural uncertainty。graph information 是 conditioning input,不是主要输出。

2. Adjacency、ancestry 与 partial ancestry

若 DAG adjacency 为 A,ancestor matrix 是其 transitive closure:

\[T=\operatorname{sgn}(A+A^2+A^3+\cdots).\]

多张 adjacency matrices 可以有相同 ancestor matrix,所以 ancestry 信息通常更粗;但它更容易由 domain expert 表达。“吸烟导致癌症”不要求专家断言吸烟是癌症结构方程里的直接 parent,中间可以存在多步生物机制。

PAM T_tilde∈{-1,0,1}^{K×K} 又允许只知道一部分 ancestor/non-ancestor facts。时间顺序也能自然产生 -1:如果 zizj 之前测量,通常可以排除未来的 zj 是过去 zi 的 ancestor。

3. 模型怎样接收 graph knowledge

基础模型交替执行两类 attention:

  • sample-wise attention:跨 observations 汇总 dataset information;
  • feature-wise attention:在同一 sample 内交换 variables 的信息。

论文在 feature-wise stage 比较四类 conditioning:

  1. soft attention bias;
  2. hard masking;
  3. GCN structural modulation;
  4. GCN + soft attention。

Soft bias 为已知 ancestor 增加 learnable +β_anc,为已知 non-ancestor 增加 -β_non-anc,unknown 加 0。参数按 layer/head 分开;例如 6 layers × 4 heads 只多 24 个 scalar bias parameters。GCN 则从 PAM 与 variable role embeddings 产生 global structural representation,再通过 Adaptive Layer Normalisation 调制 Transformer hidden states。

4. 数据从哪里来

论文使用两种 synthetic priors:

  • LinGaus-Prior:linear mechanisms + Gaussian noise,用来隔离 graph-conditioning effect;
  • TFM-Prior:作者新建的 natively causal tabular foundation-model prior,node 数从 2 到 52,graph 用 Erdős–Rényi sampling,mechanisms 可为随机 MLP 或拟合 Gaussian noise 的 XGBoost,并可直接生成 observational 与 interventional data。

主训练设置为 50,000 steps、batch size 32,对应 1.6 million synthetic datasets;每个 dataset 1,000 samples,在 context/target 间随机切分。一个 GCN + Soft Attention model 约 11.19M parameters,在单张 80GB H100 上约训练 2 天 3 小时。

外部 evaluation 使用 RealCause semi-synthetic IHDP、ACIC、CPS 与 PSID。它们保留现实 covariates,同时用 synthetic outcome/confounding process 提供 CATE/ATE ground truth;这仍不是在真实人群里观测到两个 potential outcomes。

05 · Method walkthrough

方法或任务流程

Training:把 Bayesian inference amortize 进模型

从 prior 采样一个 SCM ψ
-> 从 ψ 采样 observational context D
-> 选择 treatment t,并在 ψ 上执行 do(t)
-> 采样 query covariates x 与 interventional outcome y
-> 随机隐藏 PAM 中一部分 entries,形成 no/partial/full knowledge cases
-> 输入 D, do(t), x, PAM
-> 最小化 outcome distribution 的 negative log-likelihood

目标函数等价于在 prior 产生的 tasks 上,最小化真实 posterior predictive 与模型近似之间的 forward KL。模型不显式输出或枚举 p(ψ|D,T_tilde),而是直接学习最终的 outcome distribution。

Inference:用已知关系收窄 worlds

新 observational dataset D
+ treatment query do(t), covariates x
+ domain expert 填写的 PAM
-> sample-wise attention 读取 empirical evidence
-> feature-wise attention 受 ancestor/non-ancestor/unknown bias 调制
-> GCN 编码变量在 partial graph 中的 global role
-> decoder 输出 discretised bar distribution over y

Experiments:逐步回答四个问题

  1. 在 30,000 个 LinGaus datasets 上比较 conditioning architecture;
  2. 比较一个 amortised model 与只处理 always-full / always-none 的 specialised models;
  3. 在 30,000 个 complex-prior datasets 上逐渐隐藏 PAM entries;
  4. 在 100,000 samples 上对比 hiding vs sign-flipping;
  5. 在 RealCause 上检查 partial ancestry encoding unconfoundedness 是否改善 PEHE / ATE error。
06 · Worked example

自己走一遍最小例子

论文 Figure 2 用一个两变量世界说明 observational ambiguity。我们把它完整手算一遍。

真世界是:

\[T\sim\mathcal N(0,1),\qquad Y=0.25T+\varepsilon,\qquad \varepsilon\sim\mathcal N(0,0.1).\]

于是 observational joint distribution 中,TY 相关。但同一个二元 Gaussian joint 也可以写成反方向 Y -> T 的 structural factorization;只看 observations,方向不可识别。

现在问 do(T=2)

World A:正确方向 T -> Y

切断 T 的入边并设为 2:

\[Y\mid do(T=2)\sim\mathcal N(0.5,0.1).\]

interventional mean 是 .5

World B:反方向 Y -> T

Y 是 upstream、T 是它的 child,对 T intervention 不会改变 Y。observational marginal 中:

\[\operatorname{Var}(Y)=0.25^2\times1+0.1=0.1625,\]

所以:

\[Y\mid do(T=2)\sim\mathcal N(0,0.1625).\]

interventional mean 是 0

不给图知识

论文的教学图让模型对两个 directions 各给 .5 posterior weight:

\[q(Y\mid do(T=2),D) =0.5p_A(Y\mid do(T=2))+0.5p_B(Y\mid do(T=2)).\]

这个 mixture 的 mean 是 .25,而且因为两个 components 的 means 不同,uncertainty 比正确 World A 更宽。它不是“预测失败”,而是在当前 data + prior 下诚实保留 structural ambiguity。

给 partial ancestry

只需填写:

T_tilde[T,Y] = +1  # T 是 Y 的 ancestor
T_tilde[Y,T] = -1  # Y 不是 T 的 ancestor

模型就可排除 World B,预测向正确的 N(.5,.1) 集中。不必知道完整多变量 DAG。

猜错的代价

如果两项反填,模型会输出 World B 的答案,mean 0。observational data 本身无法证明 expert 错了。这解释了为何论文发现 misspecification 比 unknown 更危险:留 0 至少保留正确 world 的 posterior mass;写错会主动把它删掉。

07 · Results and evidence

关键结果与证据层级

结果一:soft bias 与 GCN + soft bias 最稳定

在 30,000 个 linear-Gaussian datasets、2/5/20/35/50 nodes、每个 500 train + test samples 的对照中,所有 graph-conditioned variants 相对 identical no-graph baseline 都有显著改善。Soft Attention 与 GCN + Soft Attention 在 NLL/MSE/R² 上整体最好,hard masking 与 GCN-only 较弱。

Ancestor matrix 与完整 adjacency 的差距很小;在部分 MSE/R² case 中 ancestry 甚至略好。作者推测 direct-parent-only bias 可能过窄,而 ancestors 给 attention 更广的 causal context。这是 empirical hypothesis,不是证明 ancestor information 在一般意义上优于 adjacency。

结果二:一个模型可以 amortise 不同 knowledge coverage

训练时随机改变 PAM 中已知 entry 比例的 model,与只处理 full information 或 no information 的 specialised models 表现接近。它支持“同一个 model 可以处理 no/partial/full knowledge”,但实验仍在同一 prior family 内,未检验任意新知识语言。

结果三:complex prior 上 full knowledge 有益,知识逐渐消失后 mean metrics 回到 baseline

在 30,000 个 complex-prior datasets 上,full ancestor information 对 NLL/MSE/R² 都有改善。随着 hidden fraction 接近 1,MSE 与 R² 不再显著优于 no-graph baseline。NLL 仍显示 graph-conditioned training 有小幅一致收益,作者把它解释为结构尊重可能改善 training dynamics。

绝对 improvement 不大。论文自己给出关键背景:在 10,000 个 TFM-Prior SCMs 中,仅 12.64% 的 observational conditional 与 interventional distribution 通过 KS test 得到 p<.05;平均 Wasserstein-1 distance 仅 .052,mean squared mean-difference .0036,mean JS divergence .0207。如果多数 tasks 中 intervention 与 observation 本来差得很小,graph information 能带来的绝对 causal gain 自然受限。

结果四:unknown 明显比 wrong direction 安全

Appendix K 在 100,000 samples 上逐步 corrupt full PAM:

  • hiding:把 +1/-1 改成 0
  • misspecifying:把 sign 反转。

前者让性能逐渐下降,后者快速、大幅下降。这个结果直接支持 PAM 的三值语义。但它没有提供自动识别错误专家知识的能力;模型只是让用户有“不猜”的选项。

结果五:RealCause 多数数据集改善,但不是全面胜利

Dataset No ancestry: √PEHE / relative ATE error With ancestry 更准确的判断
IHDP 6.28 / .67 5.49 / .49 两项改善
ACIC 3.47 / .46 2.79 / .17 两项明显改善
CPS 12,800 / .99 11,213 / .70 改善但绝对 PEHE 仍大
PSID, unbalanced 13,096 / .98 12,975 / 1.09 PEHE 微改善,ATE error 反而更差
PSID, balanced 21,896 / .94 19,711 / .65 subsampling untreated 后两项改善

PSID 原始数据只有 141 treated 对 2,266 untreated。作者把 untreated subsample 到 500 后,所有方法改善,ancestry benefit 也更明显。这说明 graph knowledge 不能替代基本 overlap / balance;数据支持太弱时,结构条件也救不了 estimation。

结果六:specialised prior alignment 仍可胜过 generality

Extended comparison 中 CausalPFN 在 RealCause 整体最好,例如 IHDP 为 .58 PEHE / .03 ATE error,远好于本文 ancestry-conditioned model 的 5.49 / .49。作者认为原因是 CausalPFN training DGP 与 RealCause 的 propensity/outcome family 高度匹配。

这非常重要:general-purpose model 能利用 partial graph,不等于它在每个特定 benchmark 上胜过 matched specialised prior。Foundation model 的价值在 flexibility,不能用“统一”偷换成“处处最优”。

证据层级

层级 直接证据 仍然开放
Architectural ablation 同一 prior/architecture 下比较 soft/hard/GCN conditioning 换 backbone、scale 或 knowledge type 后是否同样排序
Synthetic causal evaluation 真 SCM、真 PAM、真 interventional samples 可用 prior 是否覆盖现实 mechanism 与 effect size
Semi-synthetic evaluation 现实 covariates + synthetic potential outcomes 现实 treatment effect ground truth 与 external validity
Misspecification stress hidden vs flipped PAM 的 controlled comparison 如何发现 expert knowledge 已经错了
08 · Objective review

综合客观评价

它真正推进了什么

  1. 把 causal knowledge 变成 test-time input,而不是 training-prior choice。 过去若要换 graph assumption,常需训练另一个 CFM;本文让同一模型接受 varying knowledge。
  2. PAM 的 -1/0/+1 语义很干净。 已知 absence 与 unknown 不再被压成同一个 0,这是正确处理 epistemic state 的关键。
  3. 不仅展示 full graph oracle。 论文专门测 partial coverage、unknown 与 misspecification,更接近真实专家知识的形态。
  4. 架构改动小但作用明确。 soft attention bias 只需极少额外 scalar parameters,GCN 再提供 global structure。
  5. 主动暴露 prior weakness。 Appendix 对 causal-effect size distribution 的检查说明作者没有用小 absolute gains 包装成巨大突破。

需要保持克制的地方

  1. 模型仍然学习 researcher-designed prior。 它没有绕过因果假设,只是把 posterior integration 与 query answering amortize。
  2. 正确 PAM 被当作可信输入。 错知识会产生“在错误假设下正确”的错误答案;模型没有 evidence-conflict detector。
  3. RealCause 的 ground truth 是 semi-synthetic。 它能严谨评分,却不能证明真实政策或医疗 effect estimation 已可靠。
  4. 主要 query 是 conditional interventional distribution。 “all-in-one causal model”这个愿景远大于目前覆盖的 graph knowledge、fully observed DAG 与 outcome prediction。
  5. best specialised model 仍可能大幅领先。 CausalPFN 在 prior-matched RealCause 上的优势说明 task/prior alignment 仍极关键。

最合理的评价是:这篇论文解决了 CFM 的一个真实接口缺口——怎样把部分结构知识纳入 posterior predictive;它让 foundation approach 更诚实、更灵活,却没有消除 identification、prior misspecification 与现实 benchmark 的基本难题。

09 · Limitations

主要局限性

  1. 假设 causal sufficiency。 训练与实验都不处理 hidden variables;现实 partial graph 往往恰好因 latent confounding 才不完整。
  2. knowledge 只覆盖 ancestry。 不支持 mechanism form、monotonicity、effect sign、noise distribution、selection process 或 transportability knowledge。
  3. PAM 默认输入语义正确。 错误 sign 会迅速伤害性能,且模型缺少自动 disagreement warning 或 robust contamination model。
  4. DAG / acyclic scope。 ancestor matrix 与 transitive closure 的设计不直接处理 feedback、cycles 与 dynamic time-scale ambiguity。
  5. synthetic prior 的 causal effects 多数很弱。 只有 12.64% TFM-Prior SCMs 显示 KS-detectable difference,限制了 graph conditioning 的检验强度。
  6. absolute gains 小。 多个 synthetic metrics 虽统计显著,却可能对 downstream decision 没有实际意义;论文没有把 improvement 连接到 decision regret。
  7. RealCause 是 semi-synthetic。 potential outcomes 与 treatment effects 由 generator 产生,external validity 仍未知。
  8. specialised prior alignment 影响巨大。 CausalPFN 的明显优势说明 model ranking 可能主要反映 training DGP 与 benchmark DGP 的接近程度。
  9. compute 不轻。 单模型约在 H100 上训练 51 小时;若扩大 prior、variables 和 knowledge types,成本可能快速增长。
  10. unknown 并非 confidence score。 PAM 的 0 只表达未指定,没有表达专家对 +1/-1 的概率、source reliability 或冲突来源。
  11. partial matrix consistency 未成为用户侧核心检查。 多条祖先判断可能互相矛盾或违反 acyclicity,实际系统需要 validation 与 conflict resolution。
  12. 输出 calibration 仍依赖 prior calibration。 一个集中 posterior 可能只是更自信地跟随错误或不匹配的 prior,窄不等于真。
  13. “all-in-one”覆盖面有限。 当前没有 graph discovery output、counterfactual unit-level query、mediation、longitudinal treatment、missingness 或 selection-bias interface。
10 · Stronger tests

什么实验会让结论更强

  • 加入 latent-confounder prior 与 PAG-style knowledge。 检查 partial ancestral input 在隐藏变量下是否仍有一致语义。
  • 让 expert knowledge 带概率与来源。 比较 hard +1/-1/0、confidence-weighted relation、多个专家冲突与 learned reliability。
  • 训练 knowledge-error model。 在 training 中随机翻转一部分 PAM entries,让模型输出 posterior over “graph fact is wrong”,而不是无条件服从。
  • 构造 strong-effect held-out priors。 系统改变 observational/interventional gap,检验 graph conditioning gain 是否随真实 causal relevance 单调变化。
  • 做 generator-family OOD。 训练只见 MLP/XGBoost mechanisms,测试 additive/non-additive、heteroskedastic、discontinuous 与 dynamic mechanisms。
  • 直接比较 matched compute/tuning。 对 general CFM、CausalPFN、CausalFM 与 classical estimators统一 training budget、prior access 与 query set。
  • 评 calibration 与 coverage。 不只报告 NLL/MSE/R²/PEHE,也检查 posterior intervals 在正确、unknown、错误 graph input 下是否覆盖真 effect。
  • 连接到 decisions。 用 treatment selection、policy value 或 regret 测试 partial graph 的 improvement 是否改变实际 action。
  • 真实 prospective study。 让 domain experts 只提交他们愿意签字确认的 partial relations,预注册 unknown/known,测试模型是否比不使用知识的 estimator 更好。
  • 做 logical consistency UI。 输入 PAM 时即时检查 transitivity、acyclicity 与冲突,并把模型采用了哪些 expert facts 展示给用户。
11 · Claim boundary

论文可以支持什么结论

它可以支持:

  • 现有 PFN-style CFMs 可以通过 architecture/training 改造,在 inference 时使用 varying amounts of ancestral knowledge;
  • PAM 能把 known ancestor、known non-ancestor 与 unknown 清楚分开;
  • 在本文 priors 与 benchmarks 上,soft attention bias + GCN 是有效 conditioning mechanism;
  • 正确 partial ancestry 常能改善 interventional prediction 与 RealCause PEHE/ATE error;
  • 当方向不确定时,留 unknown 通常显著优于猜错;
  • 同一个 flexible model 可以接近 no/full-knowledge specialised variants 的表现。

它不能支持:

  • CFM 已经从 observational data 识别真实世界 SCM;
  • 输入 partial graph 后 causal query 自动 identified;
  • 模型能识别、修复或抵抗错误 expert knowledge;
  • graph-conditioning 比所有 specialised estimators 更好;
  • semi-synthetic result 证明现实个体 treatment recommendation 安全;
  • causal foundation model 已覆盖 hidden confounding、cycles、counterfactuals 与所有 causal quantities;
  • 更窄的 posterior 必然更接近真相。
12 · Research connection

为什么它与当前研究有关

这篇论文给当前 research portfolio 一个非常清楚的 source/state boundary:

observed data
!= supplied causal knowledge
!= model prior
!= inferred posterior
!= preserved mechanism

如果一个系统已经知道“X 在 Y 上游”,应把它记录为 supplied knowledge,并说明来源与置信度;不能假装它由当前 dataset 发现。若未知,应保留 unknown,而不是为填满 graph 而猜。

对 mechanism preservation under shift,更关键的是 partial graph 只描述 topology:

X remains an ancestor of Y

并不保证:

f_Y unchanged
noise distribution unchanged
effect magnitude unchanged
lag unchanged
target population unchanged

因此 DiscoSCM 的安全增量问题可以是:在相同 PAM 下,显式加入 function/noise/regime status,是否能检测“graph relation 保持但 mechanism 改变”的 worlds,并改善 calibrated intervention prediction?它必须与 graph-only CFM 做 paired comparison;不能只声称更细的 schema 更有解释力。

另一个直接可借鉴的产品原则是:unknown 必须是一等状态。 无论 causal graph、runtime diagnosis 还是 evidence record,都不应把“不知道”编码成“不存在”。论文的 misspecification experiment 给这条原则提供了非常直观的 empirical warning。

13 · Reading path

推荐阅读顺序

  1. Figure 1 与 Introduction:先抓住核心:partial knowledge 收窄 posterior over SCMs,而不是凭空提供 causal answer。
  2. Figure 2:用两变量 non-identifiable example 理解 no graph / right graph / wrong graph 的三种 posterior predictive。
  3. Sections 2 与 Equation (1):弄清 CFM 近似的是 SCM posterior-averaged interventional distribution。
  4. Sections 4.1-4.2:重点读 adjacency、ancestor matrix、PAM -1/0/+1 的语义。
  5. Section 4.3 与 Figure 3:看 soft bias、hard mask、GCN、GCN+soft 分别在哪里注入 structure。
  6. Sections 5.2-5.4 与 Figure 4:读 partial coverage、complex prior、unknown vs misspecified。
  7. Table 1 与 Appendix F.3/Table 2:核对 IHDP/ACIC/CPS/PSID 的改善与 imbalance boundary。
  8. Appendix E.3、Figures 6-8:一定要读 prior 中 causal effects 多数很小这一背景,否则会误解 absolute gains。
  9. Appendix J/Table 3:最后看 CausalPFN 为何在 prior-matched RealCause 上领先,防止把 flexibility 误写成 universal superiority。
  10. Appendix K/Figures 19-20:把“ignorance is better than misspecification”落实成可视化 failure case。
14 · Sources and next reading

论文来源与相邻阅读

  • Official ICML page: https://icml.cc/virtual/2026/poster/61982
  • OpenReview forum: https://openreview.net/forum?id=l1PVCATRCx
  • Current paper PDF / arXiv v2: https://arxiv.org/pdf/2602.14972
  • arXiv abstract and version history: https://arxiv.org/abs/2602.14972
  • Official code: https://github.com/ArikReuter/Graphs4CausalFoundationModels