54
Causality: Philosophy, Math and Machine Learning Renjie Yang COMPHI LAB for Social Data Science June 2019 Causality: Philosophy, Math and Machine Learning 1/54

Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causality: Philosophy, Math and MachineLearning

Renjie Yang

COMPHI LAB for Social Data Science

June 2019

Causality: Philosophy, Math and Machine Learning 1/54

Page 2: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Outline

1 The Concept of Causality

2 Potential Outcomes and Counterfactuals

3 Causal Machine Learning: The Graphical Modeling Framework

4 The Limitation of Causal Discovery

Causality: Philosophy, Math and Machine Learning 2/54

Page 3: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Principle of Causality

The laws that are used in the explanations of mature sciencescannot be interpreted as causal laws.

● The same causes always have the same effects.

● Russell (1912): “Given any event E1, there is an event E2

and a time-interval τ such that, whenever E1 occurs, E2

follows after an interval τ”

Causality: Philosophy, Math and Machine Learning 3/54

Page 4: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Fundamental Physics vs. Causality

Causality: Philosophy, Math and Machine Learning 4/54

Page 5: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Fundamental Physics vs. Causality(Sean Carroll, 2016)

Causality: Philosophy, Math and Machine Learning 5/54

Page 6: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Functional Law vs. Causality(Sean Carroll, 2016)

Causality: Philosophy, Math and Machine Learning 6/54

Page 7: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Philosophical Analysis of Causality I

● Counterfactual analysis: for any two events C and E thathave actually occurred, C causes E if and only if it is truethat: if C had not occurred, E would not have occurred.

● The process analysis: an event C causes another event E ifand only if there is a physical process of transmission betweenC and E.

Causality: Philosophy, Math and Machine Learning 7/54

Page 8: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Philosophical Analysis of Causality II

● The probabilistic analysis: factor C exercises a causalinfluence on factor E if and only if an event of type C raisesthe probability of an event of type E.

● The manipulability analysis: there is a causal relation betweentwo variables C and E if and only if interventions modifyingthe value of C modify the value of E.

Causality: Philosophy, Math and Machine Learning 8/54

Page 9: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Counterfactual Analysis (Lewis, 1986)

● “If C were the case, E would be the case” is true in a worldw if and only if (1) C is not true in any possible world or (2)if some world in which both C and E are true is closer to wthan all possible worlds in which C is true but E false.

● C is a cause of E if and only if there is a finite chain ofintermediate events E1,E2, ...,Ek, between C and E, suchthat the nth link depends causally on the preceding (n − 1)thlink.

Causality: Philosophy, Math and Machine Learning 9/54

Page 10: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Process Analysis (Salmon, 1984)

● pV = nRT

● A causal process is a process that (1) has structure orqualities that are either permanent or only changingcontinuously and (2) is capable of transmitting a mark.

Causality: Philosophy, Math and Machine Learning 10/54

Page 11: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Probabilistic Analysis (Cartwright, 1979)

● C causes E if and only if P (E∣C&Di) > P (E∣non −C&Di)for all Di, where Di are causes of E that are not caused by C.

Causality: Philosophy, Math and Machine Learning 11/54

Page 12: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Manipulability Analysis

● A cause C of an effect E is an action that would give a humanagent a means to obtain E if she decided to make C happen.

Causality: Philosophy, Math and Machine Learning 12/54

Page 13: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Probablistic PredictionWe observe training data Z1, ..., Zn ∼ P where Zi = (Xi, Yi),Xi ∈ R

d. Given a new pair Z = (X,Y ) we want to predict Y fromX.

Causality: Philosophy, Math and Machine Learning 13/54

Page 14: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Questions

Prediction and causation are very different.

● Prediction: Predict Y after observing X = x

● Causation: Predict Y after setting X = x

Causality: Philosophy, Math and Machine Learning 14/54

Page 15: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Questions

● Prediction: Predict health given that a person takes vitamin C

● Causation: Predict health if I give a person vitamin C

“If I place this ad on a web page, will people click on it?” and “If Irecommend a product will people buy it?” are causal questions,not predictive questions.

Causality: Philosophy, Math and Machine Learning 15/54

Page 16: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Outline

1 The Concept of Causation

2 Potential Outcomes and Counterfactuals

3 Causal Machine Learning: The Graphical Modeling Framework

4 The Limitation of Causal Discovery

Causality: Philosophy, Math and Machine Learning 16/54

Page 17: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

The Role of Causation in Social Science

Jon Elster(2015):

● “The main task of the social sciences is to explain socialphenomena.”

● “I argue that all explanation is causal.”

● “To explain a phenomenon (an explanandum) is to cite anearlier phenomenon (the explanans) that caused it.”

Causality: Philosophy, Math and Machine Learning 17/54

Page 18: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Two types of causal questions

● Causal Inference(Causal Effect): How do cell phones causebrain cancer?

● Causal Discovery: Given a set of variables, determine thecausal relationship between the variables.

Causality: Philosophy, Math and Machine Learning 18/54

Page 19: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Counterfactuals

Causality: Philosophy, Math and Machine Learning 19/54

Page 20: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Counterfactuals

Causality: Philosophy, Math and Machine Learning 20/54

Page 21: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Potential Outcomes

Causality: Philosophy, Math and Machine Learning 21/54

Page 22: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Effect

θ = E(Y1) −E(Y0) = E(Y ∣setX = 1) −E(Y ∣setX = 0)α = E(Y1) −E(Y0) = E(Y ∣X = 1) −E(Y ∣X = 0)

● There are uniform consistent estimators for α. But α and βare not equal!

Causality: Philosophy, Math and Machine Learning 22/54

Page 23: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Two Ways to Make θ Estimable

Causality: Philosophy, Math and Machine Learning 23/54

Page 24: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Randomized Experiments

1 Randomization: Suppose that we randomly assign X. ThenX will be independent of (Y0;Y1).

2 If X is randomly assigned then correlation = causation.

Causality: Philosophy, Math and Machine Learning 24/54

Page 25: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Measure Confounding Variables

1 If we measure enough confounding variables U = (U1; . . . ;Uk),then, perhaps the treated and untreated groups will becomparable, conditional on Z.

2 Causal inference in observational studies is not possiblewithout subject matter knowledge.

Causality: Philosophy, Math and Machine Learning 25/54

Page 26: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Outline

1 The Concept of Causation

2 Potential Outcomes and Counterfactuals

3 Causal Machine Learning: The Graphical ModelingFramework

4 The Limitation of Causal Discovery

Causality: Philosophy, Math and Machine Learning 26/54

Page 27: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Representation: SEM

Causality: Philosophy, Math and Machine Learning 27/54

Page 28: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Structural Equation Models: Definition

Causality: Philosophy, Math and Machine Learning 28/54

Page 29: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Inferences: Assumptions (Spirtes, 2010)

Causality: Philosophy, Math and Machine Learning 29/54

Page 30: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Markov Assumption(Spirtes, 2000)

Causality: Philosophy, Math and Machine Learning 30/54

Page 31: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Faithfulness Assumption(Pearl, 2000)

Causality: Philosophy, Math and Machine Learning 31/54

Page 32: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Discovery

Causality: Philosophy, Math and Machine Learning 32/54

Page 33: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Discovery

Causality: Philosophy, Math and Machine Learning 33/54

Page 34: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Discovery

Causality: Philosophy, Math and Machine Learning 34/54

Page 35: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

The PC Algorithm (Spirtes, 2000)

1 Start by testing marginal independencies

2 Next step: conditional independencies tests of size 1, 2, ...,until no tests of a given size pass

3 Orient edges according to which tests passed

Causality: Philosophy, Math and Machine Learning 35/54

Page 36: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

The PC Algorithm (Spirtes, 2000)

Causality: Philosophy, Math and Machine Learning 36/54

Page 37: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

The PC Algorithm (Spirtes, 2000)

Causality: Philosophy, Math and Machine Learning 37/54

Page 38: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

The PC Algorithm (Spirtes, 2000)

Causality: Philosophy, Math and Machine Learning 38/54

Page 39: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

The PC Algorithm (Spirtes, 2000)

Causality: Philosophy, Math and Machine Learning 39/54

Page 40: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

The PC Algorithm (Spirtes, 2000)

Causality: Philosophy, Math and Machine Learning 40/54

Page 41: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

PC Algorithm Application (Spirtes, 2000)

Causality: Philosophy, Math and Machine Learning 41/54

Page 42: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Machine Learning

Causality: Philosophy, Math and Machine Learning 42/54

Page 43: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Machine Learning for Social Science

Causality: Philosophy, Math and Machine Learning 43/54

Page 44: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Machine Learning with Latent Constructs

Causality: Philosophy, Math and Machine Learning 44/54

Page 45: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Outline

1 The Concept of Causation

2 Potential Outcomes and Counterfactuals

3 Causal Machine Learning: The Graphical Modeling Framework

4 The Limitation of Causal Discovery

Causality: Philosophy, Math and Machine Learning 45/54

Page 46: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Effect

θ = E(Y1) −E(Y0) = E(Y ∣setX = 1) −E(Y ∣setX = 0)α = E(Y1) −E(Y0) = E(Y ∣X = 1) −E(Y ∣X = 0)

● There are uniform consistent estimators for α. But α and βare not equal!

● In general, there does not exist a uniformly consistentestimator of θ.

Causality: Philosophy, Math and Machine Learning 46/54

Page 47: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Statistical Learning Theory

Causality: Philosophy, Math and Machine Learning 47/54

Page 48: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Statistical Learning Theory

Causality: Philosophy, Math and Machine Learning 48/54

Page 49: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Test for Zero Causal Effect

Consider testing H0 ∶ θ = 0 vs. H1 ∶ θ ≠ 0

Causality: Philosophy, Math and Machine Learning 49/54

Page 50: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Consistency for Causal Discovery(Robins et al, 2003)

Causality: Philosophy, Math and Machine Learning 50/54

Page 51: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Consistency for Causal Discovery(Robins et al, 2003)

Causality: Philosophy, Math and Machine Learning 51/54

Page 52: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Causal Effect

θ = E(Y1) −E(Y0) = E(Y ∣setX = 1) −E(Y ∣setX = 0)α = E(Y1) −E(Y0) = E(Y ∣X = 1) −E(Y ∣X = 0)

● There are uniform consistent estimators for α. But α and βare not equal.

● Even assuming unfaithfulness, there does not exist a uniformlyconsistent estimator of θ!

So what to do next?

Causality: Philosophy, Math and Machine Learning 52/54

Page 53: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

Take Away Message

1 Causal inferences are typically much harder than statisticalinferences.

2 Causal effects can be estimated consistently from randomizedexperiments.

3 It is difficult to estimate causal effects from observational dataor non-randomized experiments.

4 Causal discovery is statistically impossible.

Causality: Philosophy, Math and Machine Learning 53/54

Page 54: Causality: Philosophy, Math and Machine Learningwangyanjing.com/wp-content/uploads/2019/08/CausalityPKU.pdf · The Role of Causation in Social Science Jon Elster(2015): \The main

References

1 Barnabs Pczos’ lecture Slides “Risk Minimization”

2 Bertrand Russell, “On the Notion of Cause”

3 David Lewis, “Causation”, in Philosophical Papers

4 Frederick Eberhardt’s lecture Slides “All of Causal Discovery”

5 Judea Pearl, Causality

6 Larry Wasserman’s notes on Causation

7 Max Kistler, “Causality”, in The Philosophy of Science: ACompanion

8 Nancy Cartwright, Causal Laws and Effective Strategies

9 Ricardo Silva’s slides “Causal Inference in Machine Learning”

10 Robins et al., “Uniform Consistency in Causal Inference”

11 Sean Carroll, The Big Picture

12 Spirtes et al., Causation, Prediction and Search

13 Wesley Salmon, Scientific Explanation and the CausalStructure of the World

Causality: Philosophy, Math and Machine Learning 54/54