using program synthesis for social...

12
Using Program Synthesis for Social Recommendations Alvin Cheung Armando Solar-Lezama Samuel Madden MIT

Upload: others

Post on 03-Jan-2021

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Using Program Synthesis for Social Recommendations

Alvin Cheung Armando Solar-Lezama Samuel Madden

MIT

Page 2: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Building social networking apps using phone data

•  Mobile phones now come with various sensors – Accelerometer – GPS – Proximity

•  Data collected from sensors can be used to automatically generate events – Enables new social networking apps

10/30/2012 2 CIKM 2012

Page 3: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

LifeJoin: Automatic generation of interesting events

10/30/2012 CIKM 2012 3

Event Ratings

Learned model

Inferred events

Page 4: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Learning example

•  Given labeled data:

•  Possible classifier:

(User = Joe) and (location = Office or location = Bar) and (time < 7 am or time > 10pm)

10/30/2012 CIKM 2012 4

User Location Time Interested?

Joe Office 10am N

Bill Home 3pm N

Joe Office 11pm Y

Joe Bar 6am Y

Page 5: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Applying machine learning to LifeJoin

•  Does not create decomposable models

•  Need to encode inputs into feature space representation – Create substantial time and space overhead

•  Events are highly personalized – Hard to leverage labeled data from others

10/30/2012 CIKM 2012 5

(User = Joe) and (location = Office or location = Bar) and vs. 0.25x1 + 0.65x2 > 0 (time < 7 am or time > 10pm)

Page 6: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Intro to program synthesis

10/30/2012 CIKM 2012 6

Input-output spec

f(5) = 12 f(10) = 22

Search space grammar f(x) { return expr(x); } expr(x) ::= n

| x | expr(x) + expr(x)

f(x) { return x + x + 2; }

Forms hypothesis

Test on spec Symbolic encoding of

search space

Program Synthesizer

Page 7: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Applying synthesis to LifeJoin

10/30/2012 CIKM 2012 7

Input-output spec Interest([Peter, jog, Charles, 5PM]) = Y Interest([Mary, office, 9AM]) = N …

Search space grammar interest(e) { act(e) | loc(e) |

act(e) & loc(e) | …} act(e) ::= e.user = u

| e.activity = a | e.time = t | act(e) & act(e)

interest(e) { e.user = Peter and e.activity = jog }

Generalization guarantees

Active learning

Program Synthesizer

interest(e) { e.user ≠ Mary and e.time > 4PM }

Shortcomings:

Page 8: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Our new hybrid approach

10/30/2012 CIKM 2012 8

Labeled data

Program Synthesizer

user = Peter and activity = jog

Interest grammar

user ≠ Mary and time > 4PM

Interest functions

Page 9: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

SVM features

Our new hybrid approach

10/30/2012 CIKM 2012 9

Labeled data

Program Synthesizer

user = Peter

Interest grammar

SVM Program

Synthesizer

SVM model

SVs

Interest grammar

Symbolic encoding of search space

Labeled data

Generalization guarantees Decomposable

model

user = Peter and

time > 4PM

activity = jog

user ≠ Mary

time > 4PM

Active learning

Page 10: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Experimental results

•  Implemented different feature selection algorithms and classifiers

10/30/2012 CIKM 2012 10

Name Feature selection Classification

Linear None Linear SVM

Poly Unary features only Poly. kernel SVM

L1 LASSO Linear SVM

MI Mutual information Linear SVM

Tree C4.5 on unary features Linear SVM

Hybrid Features extracted from 10 synthesized functions

Linear SVM

Page 11: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

45

50

55

60

65

70

75

80

85

90

95

1 3 5 7 9 11 13 15 17 19

Ave

rage

Acc

ura

cy (%

)

Active Learning Round #

Hybrid Decision tree Mutual info + SVM Lasso + SVM Poly kernel

Experimental results: active learning

10/30/2012 CIKM 2012 11

Hybrid approach has a much faster learning rate

Page 12: Using Program Synthesis for Social Recommendationspeople.csail.mit.edu/akcheung/papers/cikm12_slides.pdf · 2012. 11. 2. · Using Program Synthesis for Social Recommendations Alvin

Learning user interests in LifeJoin

•  Learning user interests from phone data poses new challenges

•  Combine machine learning algorithms and programming synthesis techniques to solve the learning problem

10/30/2012 CIKM 2012 12

http://people.csail.mit.edu/akcheung