02/08/2023 Software Lab on Causality with DoWhy Peter Goetz Sr. Software Development Engineer at AWS @ petergtz Patrick Bloebaum Sr. Applied Scientist at AWS @ PatrickBloebaum
DoWhy - Table of contents Introduction and Problem Space Deep Dive Session 1 Design and Implementation Details Deep Dive Session 2 PyWhy
What can you do with DoWhy ? 3 G raphical C ausal M odels
Understanding Graphical Causal Models (GCMs) 4
Understanding Graphical Causal Models (GCMs) 5
Understanding Graphical Causal Models (GCMs) find cause-effect relationships perform root cause analysis do what-if analysis 6
Example problems causal inference can solve PCB Manufacturing Component 1…N Manufacturing Component Mfg. for Sub Assemblies 1…N PCB Assembly w/SMT machines Sub Assembly 1…N PCB Assembly Testing (EOL) Component 1…N Testing Sub Assembly 1…N Testing Final Device Test SoC Testing Box-Builds / Electro-mechanical Assembly Manfred from manufacturing… Sue from supply chain… 7 Root cause analysis with DoWhy : dowhy.gcm. distribution_change ( causal_model , …)
Example problems causal inference can solve Clark operating a cloud service… 8 Anomaly score attribution & what-if analysis with DoWhy : dowhy.gcm. attribute_anomalies ( causal_model , …) dowhy.gcm. interventional_samples ( causal_model , …)
Example problems causal ML can solve 9 Many more…
Example: Gender Bias Study
11
12
13
14
15
16
17
18
19
20
21
22
If we boil down how to use DoWhy GCM, in many cases it’s this 3-step recipe: 1. causal_model = gcm. StructuralCausalModel ( nx.DiGraph ([( 'X' , 'Y' )])) gcm. auto . assign_causal_mechanisms ( causal_model , data) 2. gcm. fit ( causal_model , data) 3. r esults = gcm. answer_some_causal_question ( causal_model , ...) 23
24 1. causal_model = gcm. StructuralCausalModel ( nx.DiGraph ([( 'X' , 'Y' )])) gcm. auto . assign_causal_mechanisms ( causal_model , data) 2. gcm. fit ( causal_model , data) 3. r esults = gcm. answer_some_causal_question ( causal_model , ...) If we boil down how to use DoWhy GCM, in many cases it’s this 3-step recipe:
Example: Root Cause Analysis in a Distributed System
27
28
29
30
31
32
33
34
35
36
37
38
39
PyWhy 40 PyWhy’s mission is to build an open-source ecosystem for causal machine learning that moves forward the state-of-the-art and makes it available to practitioners and researchers. We build and host interoperable libraries, tools, and other resources spanning a variety of causal tasks and applications, connected through a common API on foundational causal operations and a focus on the end-to-end analysis process.
PyWhy Projects 41 DoWhy EconML DoDiscover causal-learn Emre Kıcıman Sr. Principal Researcher at Microsoft Amit Sharma Principal Researcher at Microsoft Robert Ness Sr. Researcher at Microsoft Adam Li Postdoctoral Research Scientist at Columbia University Eleanor Dillon Principal Economist at Microsoft Keith Battocchi Sr. Research Software Development Engineer at Microsoft Kun Zhang Professor at Carnegie Mellon University Yujia Zheng MS student at Carnegie Mellon University Peter Goetz Sr. Software Development Engineer at AWS Patrick Bloebaum Sr. Applied Scientist at AWS
42
Thank you. Peter Goetz Sr. Software Development Engineer at AWS @ petergtz Patrick Bloebaum Sr. Applied Scientist at AWS @ PatrickBloebaum