machine learning and development policy - world...

55
Machine Learning and Development Policy Sendhil Mullainathan (joint papers with Jon Kleinberg, Himabindu Lakkaraju, Jure Leskovec, Jens Ludwig, Ziad Obermeyer)

Upload: others

Post on 16-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Machine Learning and Development Policy

Sendhil Mullainathan (joint papers with Jon Kleinberg,

Himabindu Lakkaraju, Jure Leskovec, Jens Ludwig, Ziad Obermeyer)

Page 2: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –
Page 3: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –
Page 4: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –
Page 5: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Magic?

•  Hard not to be wowed

•  But what makes it tick?

•  Could that be used elsewhere? In my own work?

Page 6: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –
Page 7: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

AI Approach

•  We do it perfectly.

•  Introspect how

•  Program that up

Page 8: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Programming

•  For each review make a vector of words

•  Figure out whether it has positive words and negative words

•  Count

Page 9: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Trying to Copy Humans

Dazzling

Brilliant

Cool

Gripping

Moving

Suck

Cliched

Slow

Awful

Bad

60%

Page 10: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

This Approach Stalled

•  “Trivial” problems proved impossible – Marvin Minsky once assigned "the problem of

computer vision" as a summer project

•  Forget about the more “complicated” problems like language

Page 11: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –
Page 12: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

What is the magic trick?

•  Make this an empirical exercise – Collect some data

•  Look at what combination of words predicts being a good review

•  Example dataset: – 2000 movie reviews – 1000 good and 1000 bad reviews

Page 13: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Learning not Programming

Love

Great

Bad

Stupid

Worst

! ?

Superb

STILL

95% ?

!

Pang,  Lee  and  Vaithyanathan  

Page 14: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Machine learning

•  Turn any “intelligence” task into an empirical learning task – Specify what is to be predicted – Specify what is used to predict it

Y = {0, 1}| {z }Positive?

X = {0, 1}k| {z }Word Vector

f = argminfE[L(f(x), y)]

Page 15: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Machine learning

•  Turn any “intelligence” task into an empirical learning task – Specify what is to be predicted – Specify what is used to predict it

•  Underneath most machine intelligence you see

•  Not a coincidence that ML and big data arose together

Page 16: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Wonderful

•  Great that engineers discovered the 100+ year old field of statistics!

•  We’ve been estimating functions from data for a long time

•  In part true

•  But far from the full story

Page 17: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Pang, Lee and Vaithyanathan

Page 18: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Machine Learning

•  High dimensional statistical procedure

•  Despite this machine learning can do well –  It’s no surprise we fit well – We fit well out of sample

Page 19: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

So… Estimation

•  Fit Y with X

•  Low dimensional

Machine Learning

•  Fit Y with X out of sample

•  High dimensional

•  JUST BETTER?

Page 20: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Data size Information going in

How can we get more information out than we’re putting in?

Estimates Information coming out

Estimation

DataSn = (yi, xi) iid

[f, f ]f

Function Class F

Estimates Unbiased functions

ES [ˆ

fA,S ] = f

⇤= E[y|x]

| {z }Right f

Good Confidence Intervals

f

⇤ 2 [f, f ] with high prob

Converge to truth

ˆ

f ! f

Reviews  

Vector  of  Words  

Sen9ment  Predictor  

Thousands?   Tens  of  Thousands  

Page 21: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Estimation

DataSn = (yi, xi) iid

[f, f ]f

Function Class F

Estimates Unbiased functions

ES [ˆ

fA,S ] = f

⇤= E[y|x]

| {z }Right f

Good Confidence Intervals

f

⇤ 2 [f, f ] with high prob

Converge to truth

ˆ

f ! f

Reviews  

Vector  of  Words  

Sen9ment  Predictor  

Do we need this?

Page 22: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Gets  more  out?   Put  more  in  

Unbiased functions

ES [ˆ

fA,S ] = f

⇤= E[y|x]

| {z }Right f

Good Confidence Intervals

f

⇤ 2 [f, f ] with high prob

Converge to truth

ˆ

f ! f

Page 23: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Prediction and Estimation

•  Estimation – Adjudicate between variables – Confidence intervals around coefficients

•  Prediction – Do not adjudicate – Arbitrary choices to deal with covariance

Page 24: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Estimation vs Prediction

Estimation •  Strict assumptions about

data generating process

•  Back out parameters

•  Low dimensional

Prediction •  Allow for flexible functional

forms

•  Get individual predictions

•  Do not adjudicate between observably similar functions (variables)

yiβ

Page 25: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Great for Engineers….

•  Much of what we do is inference of coefficiens

•  In fact we fret about causal inference…

•  What use is a procedure where even the coefficients aren’t meaningful?

Page 26: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Applications of Machine Learning

•  New Data

•  Prediction in Policy

Page 27: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Applications of Machine Learning

•  New Data

•  Prediction in Policy

Page 28: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

New Data

•  An Example

Page 29: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –
Page 30: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Xie  et.  al.  (2016)  

Page 31: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

What does this have to do with ML?

•  Processing of data requires machine learning

•  How do you relate luminosity to income levels?

Page 32: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Crop  Yield  

Page 33: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –
Page 34: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Blumenstock  et.  al.  2015  

Cell Phone Data

Page 35: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Blumenstock  et.  al.  (2015)  

Page 36: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –
Page 37: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

New Kinds of Data

•  Measurement has always played a central role in development

•  These new data give us a new way to measure – Not the depth that Morduch will discuss tomorrow – But breadth – And a very different look at life.

Page 38: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Applications of Machine Learning

•  New Data

•  Prediction in Policy

Page 39: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Applications of Machine Learning

•  New Data

•  Prediction in Policy

Page 40: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Question

•  Can prediction be directly useful in policy?

•  These decisions seem inherently causal – “Should we do policy X”? –  “What will X do?” –  “What happens with and without X?”

•  In fact decisions seem inherently causal

Page 41: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Two Toy Policy Decisions

•  Rain Dance

•  Umbrella

•  Common Elements – Both are decisions with payoffs – Both rely on data of the type:

•  Y = rain, X = variables correlated with rain

– Both use data to estimate function y = f(x)

Predic9on  

Causa9on   �

y

Page 42: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Y

X

X0

Y

X

X0

Causa9on  

Rain  Rain  Dance  

Framework

Decision  

Y

X

Atmospheric  Condi9ons  

Page 43: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Y

X

X0

Y

X

X0

Predic9on  

Rain  

Atmospheric  Condi9ons  

Umbrella  

Decision  

Y

X

Framework

Page 44: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Y

X

X0

Predic9on  

Y

X

X0

Causa9on  

Rain  

Atmospheric  Condi9ons  

Rain  Dance   Rain  

Atmospheric  Condi9ons  

Umbrella  

Experiments   Machine  Learning  

Page 45: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

dΠdX0

= ∂Π∂X0

(Y )+ ∂Π∂Y

∂Y∂X0

dΠdX0

Prediction Causation

Y

X

X0

Causation

Prediction

Page 46: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Are there Umbrella Problems?

•  Decisions where predictions matter…

•  Where we can have big social impact

•  And with enough data

•  Prediction policy problems

Page 47: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Prediction

Page 48: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

A Policy Problem in the US

•  Each year police make over 12 million arrests

•  Where do people wait for trial?

•  Release vs. detain high stakes –  Pre-trial detention spells avg. 2-3 months (can be up to

9-12 months) – Nearly 750,000 people in jails in US – Consequential for jobs, families as well as crime

Kleinberg  Lakkaraju  Leskovec  Ludwig  and  Mullainathan  

Page 49: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Judge’s Problem

•  Judge must decide whether to release or not (bail)

•  Defendant when out on bail can behave badly: – Fail to appear at case – Commit a crime

•  The judge is making a prediction

Page 50: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Prediction Policy Problem

•  Large dataset of decisions

•  Build a prediction algorithm

Page 51: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Build a Decision Aid?

•  Simplest aid: safeguard

Page 52: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Build a Decision Aid?

•  Simplest aid: safeguard

•  Re-ranking?

Page 53: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Bail Not Unique

•  Pure prediction problems: –  Poverty targeting (Adelmen et. al. 2016) – Retail crystal ball:

•  Weather and yield prediction (Rosenzweig and Udry 2013)

– Teacher selection (Predict non-attendance?) •  Pseudo-prediction problems – Treatment effects depend on risk –  Predict risk – Target high risk pregnancies for hospital delivery

Page 54: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Key Inputs

•  Problem: – Prediction affects deicision –  Individual, micro decisions

•  Inputs – Reasonable individual data – Large samples (10,000+?)

Page 55: Machine Learning and Development Policy - World Bankpubdocs.worldbank.org/en/120221466521866201/ABCDE-for... · Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig –

Conclusion •  Fortunate enough to see two large changes in policy: –  RCTs –  Behavioral economics

•  I think this will be the next one

•  Three papers I’ve drawn on: –  “Machine Learning: An Econometric Approach,” wih Jann

Spiess, Journal of Economic Perspectives, forthcoming. –  “Human Decisions and Machine Predictions,” with Jon

Kleinberg, Himabindu Lakkaraju, Jure Leskovec, and Jens Ludwig

–  “Targeting Poverty by Predicting Poverty: Using Machine Learning in Targeted Transfer Program, with Melissa Adelman, Jonathan Glidden, Paul Niehaus, and Jack Willis.