DoWhy: Addressing Challenges in Expressing and Validating Causal Assumptions
Amit Sharma Vasilis Syrgkanis Cheng Zhang Emre Kıcıman
Abstract
Estimation of causal effects involves crucial assumptions about the data-generating process, such as directionality of effect, presence of instrumental variables or mediators, and whether all relevant confounders are observed. Violation of any of these assumptions leads to significant error in the effect estimate. However, unlike cross-validation for predictive models, there is no global validator method for a causal estimate. As a result, expressing different causal assumptions formally and validating them (to the extent possible) becomes critical for any analysis. We present DoWhy, a framework that allows explicit declaration of assumptions through a causal graph and provides multiple validation tests to check a subset of these assumptions. Our experience with DoWhy highlights a number of open questions for future research: developing new ways beyond causal graphs to express assumptions, the role of causal discovery in learning relevant parts of the graph, and developing validation tests that can better detect errors, both for average and conditional treatment effects. DoWhy is available at https://github.com/microsoft/dowhy.
中文速览
因果推断的核心难题在于:估计因果效应之前,研究者必须对数据生成过程做出大量假设(如混淆变量、工具变量、中介变量的正确识别),而这些假设一旦出错,估计结果就会产生难以察觉的偏差或高方差,且没有类似监督学习中交叉验证那样的全局检验手段。为此,微软研究团队开发了开源 Python 框架 DoWhy,将因果分析拆解为"建模→识别→估计→验证"四个显式步骤,要求用户先用因果图明确声明假设,再自动基于 do 演算完成效应识别,最后通过多种鲁棒性检验(如添加虚拟混淆变量、安慰剂测试等)尽可能验证这些假设是否成立。实验与案例表明,DoWhy 能有效暴露建模阶段的错误——例如将工具变量误当混淆变量导致高方差、将中介变量误当混淆变量导致估计值偏向零——而这些错误若仅靠估计器本身根本无法发现。这一工作的重要意义在于:它将因果假设的表达与验证提升为与估计方法同等重要的"一等公民",为因果机器学习从学术走向可靠落地提供了系统性的工程基础,同时也指出了未来研究的关键开放问题,包括超越因果图的假设表达方式和更强的验证测试方法。
原文 arXiv:2108.13518;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2108.13518v1