Skip to main content
QUICK REVIEW

[Paper Review] DoWhy: An End-to-End Library for Causal Inference

Amit Sharma, Emre Kıcıman|arXiv (Cornell University)|Nov 9, 2020
Advanced Causal Inference TechniquesMathematics5 references15 citations
TL;DR

DoWhy is an open-source, end-to-end Python library for causal inference that systematizes causal analysis into four unified steps: Model, Identify, Estimate, and Refute. It enables non-experts to build causal models using graphical models and do-calculus, estimate causal effects with multiple statistical methods—including integrations with EconML and CausalML—and automatically test robustness via refutation methods, significantly improving reliability and accessibility of causal inference in data science.

ABSTRACT

In addition to efficient statistical estimators of a treatment's effect, successful application of causal inference requires specifying assumptions about the mechanisms underlying observed data and testing whether they are valid, and to what extent. However, most libraries for causal inference focus only on the task of providing powerful statistical estimators. We describe DoWhy, an open-source Python library that is built with causal assumptions as its first-class citizens, based on the formal framework of causal graphs to specify and test causal assumptions. DoWhy presents an API for the four steps common to any causal analysis---1) modeling the data using a causal graph and structural assumptions, 2) identifying whether the desired effect is estimable under the causal model, 3) estimating the effect using statistical estimators, and finally 4) refuting the obtained estimate through robustness checks and sensitivity analyses. In particular, DoWhy implements a number of robustness checks including placebo tests, bootstrap tests, and tests for unoberved confounding. DoWhy is an extensible library that supports interoperability with other implementations, such as EconML and CausalML for the the estimation step. The library is available at https://github.com/microsoft/dowhy

Motivation & Objective

  • To address the lack of a systematic, user-friendly framework for causal inference in data science, especially for practitioners unfamiliar with causal modeling.
  • To reduce the barrier to entry for causal inference by making modeling assumptions explicit and testable through a causal graph-based approach.
  • To provide a unified interface that integrates graphical models and potential outcomes frameworks, supporting diverse estimation methods.
  • To automate robustness checks via refutation techniques, enabling users to validate causal estimates against unverified assumptions.
  • To bridge the gap between theoretical causal inference and practical application by offering an extensible, interoperable, and open-source tool.

Proposed method

  • The library is structured around four key steps: Model (formalizing prior knowledge as a causal graph), Identify (using do-calculus and graph-based criteria to find estimands), Estimate (applying statistical estimators including from EconML and CausalML), and Refute (testing robustness via multiple refutation methods).
  • It uses graphical models and do-calculus to encode and validate causal assumptions, ensuring that all modeling decisions are explicit and analyzable.
  • The identification step supports multiple criteria: back-door, front-door, instrumental variables, and mediation-based estimands.
  • Estimation leverages both parametric and non-parametric methods, including propensity score stratification, inverse probability weighting, and machine learning-based estimators such as double machine learning via EconML.
  • Refutation methods include placebo treatment, dummy outcome, random common cause, unobserved confounder simulation, data subset validation, and bootstrap validation to test robustness across modeling, identification, and estimation stages.
  • The library is designed to be extensible, allowing independent implementation and combination of the four steps, and supports integration with existing statistical and ML libraries.

Experimental results

Research questions

  • RQ1How can causal inference be made accessible to data scientists without deep expertise in causal modeling?
  • RQ2What systematic framework can unify the four core stages of causal analysis—modeling, identification, estimation, and refutation—into a single workflow?
  • RQ3How can automated refutation methods improve confidence in causal estimates when ground truth is unavailable?
  • RQ4To what extent can a library reduce errors from unverified assumptions in causal modeling and estimation?
  • RQ5How can causal inference tools be designed to interoperate with existing machine learning and econometrics libraries?

Key findings

  • DoWhy provides a principled, four-step framework that makes causal modeling, identification, estimation, and refutation explicit and systematic, reducing reliance on ad hoc assumptions.
  • The library supports multiple identification criteria—including back-door, front-door, instrumental variables, and mediation—enabling flexible causal analysis across diverse data scenarios.
  • By integrating with EconML and CausalML, DoWhy enables the use of advanced estimators such as double machine learning, improving performance on high-dimensional confounders.
  • Automated refutation methods, including placebo treatment and random common cause tests, successfully detect spurious effects and validate the robustness of estimated causal effects.
  • The library’s design allows for modular extension of each step, enabling researchers and practitioners to plug in new models, estimators, and refutation techniques independently.
  • DoWhy has achieved broad adoption with over 2300 GitHub stars and 31 contributors, indicating strong community engagement and practical utility in both industry and academia.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.