Introduction and Applications of Temporal Point Processes · Introduction and Applications of...

30
ETHZ LECTURE, 14 DECEMBER 2018 Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems

Transcript of Introduction and Applications of Temporal Point Processes · Introduction and Applications of...

Page 1: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

ETHZLECTURE,14DECEMBER2018

IntroductionandApplicationsofTemporalPointProcesses

t

IsabelValera

MPIforIntelligentSystems

Page 2: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

OutlineoftheLecture

1.Intensityfunction2.Basicbuildingblocks3.Superposition4.MarksandSDEswithjumps

INTROTOTEMPORALPOINTPROCESSES(TPPS)

APPLICATION:CLUSTERINGEVENTSEQUENCES1.ProblemStatement2.IntroductiontoDPMM3.CRP+HP(a.k.a.HDHP)4.Generativeprocess

Page 3: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

3

1.ProblemStatement2.IntroductiontoDPs

3.CRP+HP(a.k.a.HDHP)4.GenerativeProcess

APPLICATION:CLUSTERINGEVENTSEQUENCES

Page 4: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

4

IntroductiontoprogrammingDiscretemathProjectpresentation

t

For/do-whileloops

If…else

Howtowriteswitch Private

functions

Definefunctions

Classinheritance

Classdestructor

Plotlibrary

Logic

Settheory Geometry

GraphTheoryPowerpointvs.Keynote

Exportpptxtopdf

PPtemplates

1styearcomputersciencestudent

CLUSTERINGEVENTSEQUENCES

Page 5: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

t

1styearcomputersciencestudent

CLUSTERINGEVENTSEQUENCES

Content+Dynamics=Cluster(learningpattern)E.g.,programing+semester

math+semester presentation+week

Page 6: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

CLUSTERINGEVENTSEQUENCES

t t

...

Several people share same clusters

IntroductiontoprogrammingDiscretemathProjectpresentation

Page 7: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

CLUSTERINGEVENTSEQUENCES

t t

...

Event cluster (topic) is hidden è Clustering of events

Unknown number of clusters è Dirichlet Process

Page 8: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

OutlineoftheLecture

1.Intensityfunction2.Basicbuildingblocks3.Superposition4.MarksandSDEswithjumps

INTROTOTEMPORALPOINTPROCESSES(TPPS)

APPLICATION:CLUSTERINGEVENTSEQUENCES1.ProblemStatement2.IntroductiontoDPMM3.CRP+HP(a.k.a.HDHP)4.Generativeprocess

Page 9: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

1.ProblemStatement2.IntroductiontoDPs

3.CRP+HP(a.k.a.HDHP)4.GenerativeProcess

APPLICATION:CLUSTERINGEVENTSEQUENCES

Page 10: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

DirichletProcess(DP)

G0 =1X

`=1

⇡`�✓`

G0 ⇠ DP (�, H) ⇡ = (⇡`)1`=1 ⇠ GEM(�)

✓` ⇠ H(✓)Stick breaking

G0

H

Cluster parameters

DirichletProcess:Randomprocesswhoserealizationconsistsofprobabilitydistributions

Concentration parameter

Base distribution

Page 11: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

DirichletProcess(DP)

Properties:§  Infinite-dimensionalgeneralizationofDirichletdistribution

§  Priorforclustering§  Infinitemodelcomplexity=infinite#ofgroups

§  Partitiondataintogroups

G0 =1X

`=1

⇡`�✓`

Page 12: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

Conjugacytothemultinomial

Page 13: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

ChineseRestaurantProcess(CRP)

Exchangeability:

ü Clusters

· · ·b1 b5

b7b10b12b14

�1 �4 �6 ü Observations

1. Table assignment:

p(bn+1 = `|b1, . . . , bn) =⇢ m`

n+� k K+

↵n+� k +K+ + 1

<latexit sha1_base64="N7H2wloHSE9XEESAax/BKX2nYkE=">AAAC5XicdVJNj9MwEHXC11I+tsCRi0UFWtRVFSMkuKxUiQsSl0WiuyvVJXKcSWrVcYI9QapC7lw4gBBX/hM3/gsHnG4ObLuMZOl55r2Z8YyTSiuHUfQ7CK9cvXb9xt7Nwa3bd+7uD+/dP3FlbSXMZKlLe5YIB1oZmKFCDWeVBVEkGk6T1asufvoRrFOleYfrChaFyI3KlBToXfHwT3WQxI0Zs/aIg9afaBKzQ8p1WqI79Bfz9IhryJA3A7plPIFcmUZYK9Zto3W7w/CczArZFHGXu/VlvAZFS5/Qlc/6gb55P+b8vzIudLUUF2V03InG7BLRThIwad/dFptblS9xMoiHo2gSbYzuAtaDEentOB7+4mkp6wIMSi2cm7OowoUvgkpqaAe8dlAJuRI5zD00ogC3aDZbaulj70lpVlp/DNKN919FIwrn1kXimYXApduOdc7LYvMas5eLRpmqRjDyvFBWa4ol7VZOU2VBol57IKRVvlcql8JPGP3H6IbAtp+8C06eTVg0YW+fj6bTfhx75CF5RA4IIy/IlLwmx2RGZJAEn4OvwbcwD7+E38Mf59Qw6DUPyAULf/4FqH3PLA==</latexit><latexit sha1_base64="N7H2wloHSE9XEESAax/BKX2nYkE=">AAAC5XicdVJNj9MwEHXC11I+tsCRi0UFWtRVFSMkuKxUiQsSl0WiuyvVJXKcSWrVcYI9QapC7lw4gBBX/hM3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RA4IIy/IlLwmx2RGZJAEn4OvwbcwD7+E38Mf59Qw6DUPyAULf/4FqH3PLA==</latexit><latexit sha1_base64="N7H2wloHSE9XEESAax/BKX2nYkE=">AAAC5XicdVJNj9MwEHXC11I+tsCRi0UFWtRVFSMkuKxUiQsSl0WiuyvVJXKcSWrVcYI9QapC7lw4gBBX/hM3/gsHnG4ObLuMZOl55r2Z8YyTSiuHUfQ7CK9cvXb9xt7Nwa3bd+7uD+/dP3FlbSXMZKlLe5YIB1oZmKFCDWeVBVEkGk6T1asufvoRrFOleYfrChaFyI3KlBToXfHwT3WQxI0Zs/aIg9afaBKzQ8p1WqI79Bfz9IhryJA3A7plPIFcmUZYK9Zto3W7w/CczArZFHGXu/VlvAZFS5/Qlc/6gb55P+b8vzIudLUUF2V03InG7BLRThIwad/dFptblS9xMoiHo2gSbYzuAtaDEentOB7+4mkp6wIMSi2cm7OowoUvgkpqaAe8dlAJuRI5zD00ogC3aDZbaulj70lpVlp/DNKN919FIwrn1kXimYXApduOdc7LYvMas5eLRpmqRjDyvFBWa4ol7VZOU2VBol57IKRVvlcql8JPGP3H6IbAtp+8C06eTVg0YW+fj6bTfhx75CF5RA4IIy/IlLwmx2RGZJAEn4OvwbcwD7+E38Mf59Qw6DUPyAULf/4FqH3PLA==</latexit>

2. Cluster (dish) assignment:

�j(K+1) =

(✓` w.p. m`

K+�1for ` = 1, . . . , L

✓L+1 w.p. �1

K+�1

Page 14: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

ChineseRestaurantProcess(CRP)

Exchangeability:

ü Clusters

· · ·b1 b5

b7b10b12b14

�1 �4 �6 ü Observations

CLUSTERINGEVENTSEQUENCES:

-  Eachuserperformasequenceofevents-  Eventsarenotexchangeable

t t

...

Page 15: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

15

1.ProblemStatement2.IntroductiontoDPs

3.CRP+HP(a.k.a.HDHP)4.GenerativeProcess

APPLICATION:CLUSTERINGEVENTSEQUENCES

Page 16: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

CRP+HP(I)

Foreachuserandcluster,werepresenteventsasacountingprocess:

t = 0 t = T

Task Task

t

(tn, pn, qn)Event:

Cluster (hidden)

Time Content

pnNu,`(T ) = 9

Page 17: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

CRP+HP(II)

IntensityforeachuserandclusterfromaHawkesprocess:

t = 0 t = T

Task Task

t

�⇤

u,`(t) = µu⇡` +X

j:tj2Hu,`(t)

k✓`(t� tj)

Exogeneousevent Endogenousevent

Clusterprobability(popularity)

Newtaskrate

Memory Hawkesprocess

Intensityorrate

(events/hour)

Page 18: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

CRP+HP(III)

t

(tn, pn) ⇠ Hawkes

0

B@�⇤u,1(t)...

�⇤u,1(t)

1

CA

ClusterTime

Mark(content/words)

Users adopt more than one learning pattern

User’seventssampledforaninfinitemultivariateHawkes:

Page 19: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

CRP+HP(IV)

Different users adopt same learning patterns

-  Infinite#oflearningpatterns.-  Sharedparametersacrossusers.

LearningpatterndistributionfromaDirichletprocess:

t t

...

Page 20: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

1.ProblemStatement2.IntroductiontoDPs

3.CRP+HP(a.k.a.HDHP)4.GenerativeProcess

APPLICATION:CLUSTERINGEVENTSEQUENCES

Page 21: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

GenerativeProcess(I)

1. Time and user sampling:

Exchangeability: X Events ü Clusters

· · ·

· · ·

b1

b2b3

b4

b5

b6

b7

b8b9

b10

b11

b12

b13

b14 User 1

User 2

�2

�1

�3

�4

�5

�6

�7

(tn, un) ⇠ Hawkes

0

B@

�0 +P

i:ti2Hu(tn)bi(tn, ti)

.

.

.

�0 +P

i:ti2HU(tn)bi(tn, ti)

1

CA

Page 22: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

GenerativeProcess(I)

Exchangeability: X Events ü Clusters

· · ·

· · ·

b1

b2b3

b4

b5

b6

b7

b8b9

b10

b11

b12

b13

b14 User 1

User 2

�2

�1

�3

�4

�5

�6

�7

2. Task (table) assignment :

bn =

(k w. p. �un,k(tn)

�un (tn), for k = 1, . . . ,K

Knew w. p. �0�un (tn)

Page 23: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

GenerativeProcess(I)

Exchangeability: X Events ü Clusters

· · ·

· · ·

b1

b2b3

b4

b5

b6

b7

b8b9

b10

b11

b12

b13

b14 User 1

User 2

�2

�1

�3

�4

�5

�6

�7

3. Learning pattern (dish) assignment:

�j(K+1) =

(✓` w.p. m`

K+�1for ` = 1, . . . , L

✓L+1 w.p. �1

K+�1

Page 24: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

GenerativeProcess(II)

General approach to sample from BNP+HP processes:

Page 25: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

GenerativeProcess(II)

Suitable for online inference (Sequential Monte Carlo):

Page 26: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

Example:OnlineLearningActivity

t t

...

16kusers

1.6millionquestionsusing31.4ktags

Wegathereddatafrom..Over4years(09/2010–08/2014):learningevent:question(andanswers)

time:timewhenthequestionwasasked

content:questiontags

user:userwhoaskedthequestion

Experiments

Page 27: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

Example:OnlineLearningActivity

SEP MAR SEP MAR SEP MAR SEP MAR

SEP MAR SEP MAR SEP MAR SEP MAR

Intensity

Versioncontroltaskstendtobespecific,quicklysolvedafterperformingfewquestions

IntensitiesContent

Page 28: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

Example:OnlineLearningActivity

IntensitiesContent

SEP MAR SEP MAR SEP MAR SEP MAR

SEP MAR SEP MAR SEP MAR SEP MAR

Machinelearningtaskstendtobemorecomplexandrequireaskingmorequestions

Page 29: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

OutlineoftheLecture

1.Intensityfunction2.Basicbuildingblocks3.Superposition4.MarksandSDEswithjumps

INTROTOTEMPORALPOINTPROCESSES(TPPS)

APPLICATION:CLUSTERINGEVENTSEQUENCES1.ProblemStatement2.IntroductiontoDPMM3.CRP+HP(a.k.a.HDHP)4.Generativeprocess

Page 30: Introduction and Applications of Temporal Point Processes · Introduction and Applications of Temporal Point Processes t Isabel Valera MPI for Intelligent Systems. Outline of the

MoreaboutTTPs

1.Intensityfunction2.Basicbuildingblocks3.Superposition4.MarksandSDEswithjumps

TEMPORALPOINTPROCESSES(TPPS):INTRO

MODELS&INFERENCE1.Modelingeventsequences2.Clusteringeventsequences3.Capturingcomplexdynamics4.Causalreasoningoneventsequences

Slides/references: learning.mpi-sws.org/tpp-icml18

1.MarkedTPPs:anewsetting2.Stochasticoptimalcontrol3.Reinforcementlearning

RL&CONTROL