SHAP解释边界:从“模型归因”到“因果识别”
上一篇推文中,我以两篇 Nature/Science 子刊论文为例,讨论了 SHAP 的解释边界问题,收到了很多关注与讨论,也有一些公众号进行了转载和延伸分析( 从两篇 Nature/Science 子刊论文看 SHAP 的滥用 如何更好/合理的使用SHAP的一些案例 )。在…
- Reference
- notes:n19
- Published
- 2026.04.09
- Series
- note
- Source
- Source ↗
上一篇推文中,我以两篇 Nature/Science 子刊论文为例,讨论了 SHAP 的解释边界问题,收到了很多关注与讨论,也有一些公众号进行了转载和延伸分析( 从两篇 Nature/Science 子刊论文看 SHAP 的滥用 如何更好/合理的使用SHAP的一些案例 )。在此,向所有参与讨论、提出批评与补充意见的朋友表示感谢。大家的反馈也反映了,关于 SHAP 是否被过度解释、是否越过了其应有的epistemic boundary,这并不是个别案例,而是当前学术研究与应用实践中一个具有普遍性的认识论问题。
假期回来后,我重新阅读并梳理了大家的评论,也据此反思了上一篇推文中的一些表述。我逐渐意识到,单纯以“是否滥用”来讨论 SHAP 欠妥,需要对其解释结论进行更清晰的epistemic classification。基于这一点,本文尝试在前一个推文的基础上,重新讨论 SHAP 的解释边界,并将其区分为三个递进层次: model-based attribution 、 process-informed interpretation 与 causality-informed identification 。
1. model-based attribution
第一层 model-based attribution ,是 SHAP 最本源、也最严格的层次。在这一层,SHAP 所分解的是模型输出 (f(x)),而不是现实过程本身;它所提供的是 feature 对 prediction 的local attribution与global attribution,而不是变量对现实结果的ontological effect。换句话说,SHAP 在这一层解释的对象,不是phenomenon,而是representation;不是world structure,而是model structure。
只要这一层不被混淆,SHAP 完全可以是一个非常稳健的解释工具,因为它确实能够回答:模型依赖了哪些输入、在什么条件下改变判断、哪些变量在模型中表现出更强的marginal contribution。因此,凡属于这一层的表述,都应保持为“在本研究训练得到的模型中,变量 X 对预测结果具有较大贡献”,而不应直接写成“变量 X 是系统变化的关键机制”或“变量 X 驱动了结果 Y”(Lundberg,SHAP Doc., 2018)。
2. process-informed interpretation
第二层 process-informed interpretation 的前提,是模型解释已经过了充分的科学约束。许多地学、生态学、水文学问题,并不是在一个absence of theory的真空中使用 SHAP。研究者往往先验地拥有process theory、regime distinction与domain knowledge,知道哪些变量在学科语言中本来就属于candidate drivers,知道哪些dependence structure会在不同条件下发生切换,也知道哪些关系更可能是coupling,哪些更可能是confounding。
在这一前提下,attribution 可以被放进一个既有的过程框架中来理解:这里讨论的是 attribution 是否与已知机制一致,是否在特定regime下呈现出理论上可接受的 pattern,是否能够帮助我们refine current process understanding。这可以帮助 gain insight into how input features interact and influence geoscientific phenomena,并服务于process understanding、hypothesis generation与model evaluation(Jiang et al.,Earth’s Future, 2024)。
但需要强调的是, process-informed interpretation 仍然不能等同于 causal discovery。 它建立在 predictive model 对 observational data 的 attribution 之上。虽然, domain knowledge 可以提供mechanistic plausibility, process theory 可以提供interpretive discipline。但是,这些约束本质上只是在提升解释的可信度与可读性,并不能自动完成因果识别,因为它们并不直接排除 confounding、proxy dependence、selection effect 或 shortcut learning 等替代解释。 换言之,process-informed interpretation 提供的是 theory-calibrated support,而非explicit identification strategy。
3.causality-informed identification
第三层 causality-informed identification ,则标志着研究问题已经从“模型在观测分布下学到了什么”转向“当我们干预变量 X 时,结果 Y 会如何变化”。预测任务面对的是observational conditional probability,而因果任务面对的则是interventional probability。二者在认识论与方法论上并不相同。
SHAP 官方文档对此给出了非常直接的警告:SHAP 只是让 predictive models 捕捉到的 correlations 变得透明, “making correlations transparent does not make them causal.” 因此,单靠标准预测模型上的 SHAP,并不能完成因果识别。只有在输入变量不受未观测混杂影响,或研究进一步引入结构因果模型、准实验设计、double machine learning、causal discovery等额外识别框架时,才可以讨论更强的因果主张。
以大家推荐的 Nature Plants 论文 When and where soil dryness matters to ecosystem photosynthesis 为例,该研究使用了 causal SHAP 。但这里尤其需要强调, 因果性并不是来自 SHAP 本身 。SHAP 作为一种 attribution 方法,本身并不会自动把 correlation 变成 causation;真正赋予分析以因果含义的,是研究者预先引入的 causal structure :例如对water-limited与energy-limited条件的 regime distinction、对变量关系的causal chain graphs表达,以及将 attribution 建立在 Pearl’sdo-calculus所定义的interventional conditional probability之上。所以,SHAP 在这里并不是因果结论的来源,而是一个在既定因果框架内用于表达和分解 effect attribution 的工具。也正因为如此, causality-informed identification 所承担的 burden 从来不在 SHAP 本身,而在这些外加的 causal commitments 是否成立:causal graph是否合理,regime partition是否可靠,intervention object是否定义清楚,所谓confounding是否真的被结构化处理。此类研究的方法论价值正在于它没有把因果性偷渡给 SHAP,而是把因果前提显式化;而它的方法论代价,也正在于它必须为这些前提负责。

图 1|因果结构并不是 SHAP 给出的(Wang et al.,Nature Plants)该图展示了在不同 regime(water-limited vs energy-limited)下,GPP 与关键驱动因子之间的因果关系结构,以及土壤湿度与生态系统功能之间的阈值型响应关系。
写在最后
重审 SHAP 的解释边界是为了强调这三个层次之间本来应有的 distinction。SHAP 在 model-based attribution 层面完全成立;在 process-informed interpretation 层面也可以非常有价值,只要研究者明确,这仍然是model-consistent support,而不是mechanism validation。而只有在 causality-informed identification 层面,研究才可以讨论intervention-relevant effect,但此时因果不是来自 SHAP 本身,而是来自显式的causal graph、identification assumptions与structural commitments。
真正需要避免的,从来不是使用 SHAP,而是 collapsing these levels into one another 。因为一旦这种 collapse 发生,contribution就会被写成driver,driver又会被读成effect,最后model attribution便会被误认为是world causation。这不是措辞问题的细枝末节,而是 scientific inference 的本体边界。

References
Jiang, S., Sweet, L.-B., Blougouras, G., Brenning, A., Li, W., Reichstein, M., Denzler, J., Shangguan, W., Yu, G., Huang, F., & Zscheischler, J. (2024). How interpretable machine learning can benefit process understanding in the geosciences .Earth’s Future, 12, e2024EF004540.
Lundberg, S. (2018).SHAP Documentation.
Liu, J.. et al. When and where soil dryness matters to ecosystem photosynthesis .Nature Plants.