class: center, middle, inverse, title-slide .title[ # Artificial intelligence and
causal inference ] .subtitle[ ## XLVII Convegno AIE ] .author[ ### Claus Thorn Ekstrøm
UCPH Biostatistics ] .date[ ### April 21, 2023
@ClausEkstrom
] --- class: animated, fadeIn layout: true ??? This slide defines a default animated fade-in slide transition --- background-image: url("pics/r2d2.jpeg") background-size: 100% --- # Causal guidance Need a DAG (and assumptions) for causal inference.
Requires someone with .yellow[knowledge and understanding] about the field to propose relevant and realistic DAGs. --- class: middle, center background-image: url(pics/chat-start3.png) background-size: contain --- class: middle, center background-image: url(pics/chat-res.png) background-size: contain --- # Estimating causal effects with AI `$$\mathbb{E}(Y | A, X) = f(A, X)$$` for some functional form `\(f\)`. --- # Estimating causal effects with AI `$$\mathbb{E}(Y | A, X) = \text{AI}(A, X)$$` for some .yellow[AI]-model. Average Treatment Effect (ATE) `$$\mathbb{E}_X [ \underbrace{\mathbb{E}(Y | A=1, X)}_\text{Treated} - \underbrace{\mathbb{E}(Y | A=0, X)}_\text{Untreated}]$$` with estimator `\(\frac{1}{N}\sum_{i=1}^N [ \widehat{\mathbb{E}}(Y | A=1, X_i) - \widehat{\mathbb{E}}(Y | A=0, X_i)]\)` --- # AI `\(g\)`-formula algorithm 1. Estimate `\(\mathbb{E}(Y | A, X)\)` using an AI tool. 2. Set `\(A=1\)` for all observations and predict outcomes for all 3. Set `\(A=0\)` for all observations and predict outcomes for all `$$\frac{1}{N}\sum_{i=1}^N [ \widetilde{\mathbb{E}}(Y | A=1, X_i) - \widetilde{\mathbb{E}}(Y | A=0, X_i)]$$` To interpret *causally* (average causal treatment effect) we still need the standard causal assumptions *and* proper models. --- # Causal discovery / structure learning .pull-left[ *Let a DAG be given ...* Can we learn (parts of) the DAG from data? ] .pull-right[
] -- The PC algorithm identifies *conditional independencies* among the variables. Nice properties - in the oracle setting. .caption-right-vertical[Spirtes & Glymour (1991). *An algorithm for fast recovery of sparse causal graphs*. Social Science Computer Review.] --- # Causal discovery / structure learning There is an edge `\(A − Y\)` if and only if `\(A\)` and `\(Y\)` are *dependent* conditional on *every possible subset* of the other variables. `\(A \perp Y\)`? <br> `\(A \perp Y | X\)`? <br> `\(A \perp Y | M\)`? <br> `\(A \perp Y | X, M\)`? All these tests need a model. Use .yellow[AI] to identify relevant tests for (conditional) independence testing? --- # Remember The premise for .yellow[artificial intelligence] is ... -- .pull-right[ ... .yellow[intelligence]. ] --- # References .small[ **Causal structure learning** Spirtes & Glymour (1991). *An algorithm for fast recovery of sparse causal graphs*. Social Science Computer Review. Petersen, Osler & Ekstrøm (2021). *Data-Driven Model Building for Life Course Epidemiology*. Am J Epidemiology. **Comparing DAGS from experts and machines** Petersen, Ekstrøm, Spirtes & Merete Osler (2023). *Constructing causal life course models: Comparative study of data-driven and theory-driven approaches*. Am J Epidemiology ]