http://cs224w.stanford.edu In decision-based models nodes make - - PowerPoint PPT Presentation

http cs224w stanford edu in decision based models nodes
SMART_READER_LITE
LIVE PREVIEW

http://cs224w.stanford.edu In decision-based models nodes make - - PowerPoint PPT Presentation

CS224W: Machine Learning with Graphs Jure Leskovec, Stanford University http://cs224w.stanford.edu In decision-based models nodes make decisions based on pay-off benefits of adopting one strategy or the other In epidemic spreading: Lack


slide-1
SLIDE 1

CS224W: Machine Learning with Graphs Jure Leskovec, Stanford University

http://cs224w.stanford.edu

slide-2
SLIDE 2

¡ In decision-based models nodes make

decisions based on pay-off benefits of adopting one strategy or the other

¡ In epidemic spreading:

§ Lack of decision making § Process of contagion is complex and unobservable

§ In some cases it involves (or can be modeled as) randomness

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 2

Recap

slide-3
SLIDE 3

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 3

slide-4
SLIDE 4

¡ Epidemic Model based on Random Trees

§ (a variant of branching processes) § A patient meets d new people § With probability q > 0 she infects each

  • f them

¡ Q: For which values of d and q

does the epidemic run forever?

§ Run forever: lim

$→& 𝑸 𝒃 𝒐𝒑𝒆𝒇 𝒃𝒖 𝒆𝒇𝒒𝒖𝒊 𝒊

𝒋𝒕 𝒋𝒐𝒈𝒇𝒅𝒖𝒇𝒆 > 𝟏 § Die out: lim

$→& 𝑸 𝒃 𝒐𝒑𝒆𝒇 𝒃𝒖 𝒆𝒇𝒒𝒖𝒊 𝒊

𝒋𝒕 𝒋𝒐𝒈𝒇𝒅𝒖𝒇𝒆 = 𝟏

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 4

Root node, “patient 0” Start of epidemic d subtrees

slide-5
SLIDE 5

¡ 𝒒𝒊 = prob. a node at depth 𝒊 is infected ¡ We need: lim

$→& 𝑞$ = ? (based on 𝑟 and 𝑒)

§ We are reasoning about a behavior at the root of the tree. Once we get a level out, we are left with identical problem of depth ℎ − 1.

¡ Need recurrence for 𝒒𝒊

𝑞$ = 1 − 1 − 𝑟 ⋅ 𝑞$?@

A

¡ 𝒎𝒋𝒏

𝒊→& 𝒒𝒊 = result of iterating

f x = 1 − 1 − 𝑟 ⋅ 𝑦 A

§ Starting at the root: 𝑦 = 1 (since 𝑞@ = 1)

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 5

No infected node at depth h from the root

d subtrees

We iterate: x1=f(1) x2=f(x1) x3=f(x2)

slide-6
SLIDE 6

If we want to epidemic to die out, then iterating 𝑔(𝑦) must go to zero. So, 𝑔(𝑦) must be below 𝑧 = 𝑦.

¡ What’s the shape of 𝒈(𝒚)?

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 6

x f(x) 1 y=x=1 Going to the first fixed point

y = f x

x … prob. a node at level h-1 is infected. We start at x=1 because p1=1. f(x) … prob. a node at level h is infected q … infection prob. d … degree

Fixed point: 𝑔(𝑦) = 𝑦 This means that

  • prob. there is an

infected node at depth ℎ is constant (>0)

We iterate: x1=f(1) x2=f(x1) x3=f(x2)

slide-7
SLIDE 7

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 7

x f(x) 1 y=x=1

  • 𝑔 0 = 0
  • 𝑔 1 = 1 − 1 − 𝑟 A < 1
  • 𝑔P 𝑦 = 𝑟 ⋅ 𝑒 1 − 𝑟𝑦 A?@
  • 𝑔P 0 = 𝑟 ⋅ 𝑒

𝒈′(𝒚) is monotone non-increasing on [0,1]!

What do we know about the shape of 𝒈(𝒚)?

Going to the first fixed point

f’(x) is monotone: If g’(y)>0 for all y then g(y) is monotone. In our case, 0≤x,q≤1, d>1 so f’(x)>0, so f(x) is monotone. f’(x) non-increasing: since term (1-qx)d-1 in f’(x) is decreasing as x decreases.

y = f x

x … prob. a node at level h-1 is infected. We start at x=1 because p1=1. f(x) … prob. a node at level h is infected q … infection prob. d … degree

slide-8
SLIDE 8

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 8

x f(x) 1 y=x y = f x

For the epidemic to die out we need 𝒈(𝒚) to be below 𝒛 = 𝒚! So: 𝒈P 𝟏 = 𝒓 ⋅ 𝒆 < 𝟐

lim

$→& 𝑞$ = 0 𝑥ℎ𝑓𝑜 𝒓 ⋅ 𝒆 < 𝟐

𝒓 ⋅ 𝒆 = expected # of people that get infected

Reproductive number 𝑺𝟏 = 𝒓 ⋅ 𝒆: There is an epidemic if 𝑺𝟏³ 𝟐

slide-9
SLIDE 9

¡ Reproductive number 𝑺𝟏 = 𝒓 ⋅ 𝒆:

§ It determines if the disease will spread or die out.

¡ There is an epidemic if 𝑺𝟏 ≥ 𝟐 ¡ Only R0 matters:

§ 𝑺𝟏 ≥ 𝟐: epidemic never dies and the number of infected people increases exponentially § 𝑺𝟏 < 𝟐: Epidemic dies out exponentially quickly

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 9

slide-10
SLIDE 10

¡ When R0 is close 1, slightly changing 𝒓 or 𝒆 can

result in epidemics dying out or happening

§ Quarantining people/nodes [reducing 𝒆] § Encouraging better sanitary practices reduces germs spreading [reducing 𝒓] § HIV has an R0 between 2 and 5 § Measles has an R0 between 12 and 18 § Ebola has an R0 between 1.5 and 2

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 10

slide-11
SLIDE 11

Characterizing social cascades in Flickr. Cha et al. ACM WOSN 2008

slide-12
SLIDE 12

¡ Flickr social network:

§ Users are connected to other users via friend links § A user can “like/favorite” a photo

¡ Data:

§ 100 days of photo likes § Number of users: 2 million § 34,734,221 likes on 11,267,320 photos

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 12

slide-13
SLIDE 13

¡ Users can be exposed to a photo via social

influence (cascade) or external links

¡ Did a particular like spread through social links?

§ No, if a user likes a photo and if none of his friends have previously liked the photo § Yes, if a user likes a photo after at least one of her friends liked the photo à Social cascade

¡ Example social cascade:

A à B and A àC à E

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 13

slide-14
SLIDE 14

¡ Recall: 𝑆0 = 𝑟 ∗ 𝑒 ¡ Estimate of 𝑆0:

§ Estimating 𝒓: Given an infected node count the proportion of its neighbors subsequently infected and average § Then: 𝑆] = 𝑟 ∗ 𝑒 ∗

^_`(Aa

b)

^_` Aa b

¡ Empirical 𝑆0:

§ Given start node of a cascade, count the fraction of directly infected nodes and proclaim that to be 𝑆0

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 14

𝑒 … avg degree 𝑒c …degree of node 𝑗 Correction factor due to skewed degree distribution of the network

slide-15
SLIDE 15

¡ Data from top 1,000 photo cascades ¡ Each + is one cascade

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 15

slide-16
SLIDE 16

¡ The basic reproduction number of popular

photos is between 1 and 190

¡ This is much higher than very infectious

diseases like measles, indicating that social networks are efficient transmission media and

  • nline content can be very infectious.

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 16

slide-17
SLIDE 17
slide-18
SLIDE 18

Virus Propagation: 2 Parameters:

¡ (Virus) Birth rate β:

§ probability that an infected neighbor attacks

¡ (Virus) Death rate δ:

§ Probability that an infected node heals

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 18

Infected Healthy N N1 N3 N2

  • Prob. β

P r

  • b

. β

  • Prob. δ
slide-19
SLIDE 19

¡ General scheme for epidemic models:

§ Each node can go through phases:

§ Transition probs. are governed by the model parameters

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu

S…susceptible E…exposed I…infected R…recovered Z…immune

19

slide-20
SLIDE 20

¡ SIR model: Node goes through phases

§ Models chickenpox or plague:

§ Once you heal, you can never get infected again

¡ Assuming perfect mixing (The network is a

complete graph) the model dynamics are:

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 20

Susceptible Infected Recovered time Number of nodes

dI dt = βSI −δI dS dt = −βSI dR dt =δI

I(t) S(t) R(t) 𝛾 𝜀

slide-21
SLIDE 21

¡ Susceptible-Infective-Susceptible (SIS) model ¡ Cured nodes immediately become susceptible ¡ Virus “strength”: 𝒕 = 𝜸 / 𝜺 ¡ Node state transition diagram:

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 21

Susceptible Infective

Infected by neighbor with prob. β Cured with

  • prob. δ
slide-22
SLIDE 22

¡ Models flu:

§ Susceptible node becomes infected § The node then heals and become susceptible again

¡ Assuming perfect

mixing (a complete graph):

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu

Susceptible Infected

I SI dt dI d b

  • =

I SI dt dS d b +

  • =

time Number of nodes

22

I(t) S(t)

slide-23
SLIDE 23

¡ SIS Model:

Epidemic threshold of an arbitrary graph G is τ, such that:

§ If virus “strength” s = β / δ < τ the epidemic can not happen (it eventually dies out)

¡ Given a graph what is its epidemic threshold?

Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 23 11/5/19

slide-24
SLIDE 24

¡ Fact: We have no epidemic if:

Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu

β/δ < τ = 1/ λ1,A

► λ1,A alone captures the property of the graph!

(Virus) Birth rate (Virus) Death rate Epidemic threshold largest eigenvalue

  • f adj. matrix A of G

[Wang et al. 2003]

11/5/19 24

slide-25
SLIDE 25

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 25

100 200 300 400 500 250 500 750 1000

Time Number of Infected Nodes

δ: 0.05 0.06 0.07 Oregon β = 0.001

s=β/δ > τ (above threshold) s=β/δ = τ (at the threshold) s=β/δ < τ (below threshold)

10,900 nodes and 31,180 edges

[Wang et al. 2003]

Autonomous Systems Graph

slide-26
SLIDE 26

¡ Does it matter how many people are

initially infected?

Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 11/5/19 26

slide-27
SLIDE 27

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 27

[Gomes et al., 2014]

[Gomes et al., Assessing the International Spreading Risk Associated with the 2014 West African Ebola Outbreak, PLOS Current Outbreaks, ‘14]

slide-28
SLIDE 28

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 28

S: susceptible individuals, E: exposed individuals, I: infectious cases in the community, H: hospitalized cases, F: dead but not yet buried, R: individuals no longer transmitting the disease

[Gomes et al., Assessing the International Spreading Risk Associated with the 2014 West African Ebola Outbreak, PLOS Current Outbreaks, ‘14]

slide-29
SLIDE 29

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 29

[Gomes et al., 2014] Read an article about how to estimate R0 of ebola.

slide-30
SLIDE 30

References: 1. Epidemiological Modeling of News and Rumors on Twitter. Jin et al. SNAKDD 2013 2. False Information on Web and Social Media: A survey. Kumar et al., arXiv :1804.08559

slide-31
SLIDE 31

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 31

slide-32
SLIDE 32

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 32

slide-33
SLIDE 33

Notation:

§ S = Susceptible § I = Infected § E = Exposed § Z = Skeptics

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 33

slide-34
SLIDE 34

Tweets collected from eight stories: Four rumors and four real

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 34

REAL EVENTS RUMORS

slide-35
SLIDE 35

¡ SEIZ model is fit to each cascade to minimize the

difference |𝐽(𝑢) – 𝑢𝑥𝑓𝑓𝑢𝑡(𝑢)|:

§ 𝑢𝑥𝑓𝑓𝑢𝑡(𝑢) = number of rumor tweets § 𝐽(𝑢) = the estimated number of rumor tweets by the model

¡ Use grid-search and find the parameters with

minimum error

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 35

slide-36
SLIDE 36

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 36

SEIZ model better models the real data, especially at initial points

slide-37
SLIDE 37

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 37

SEIZ model better models the real data, especially at initial points

slide-38
SLIDE 38

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 39

Notation: S = Susceptible I = Infected E = Exposed Z = Skeptics

New metric:

All parameters learned by model fitting to real data (from previous slides)

slide-39
SLIDE 39

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 40

Parameters obtained by fitting SEIZ model efficiently identifies rumors vs. news

Rumors

slide-40
SLIDE 40
slide-41
SLIDE 41

¡ Initially some nodes S are active ¡ Each edge (u,v) has probability (weight) puv ¡ When node u becomes active/infected:

§ It activates each out-neighbor v with prob. puv

¡ Activations spread through the network!

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 42

0.4 0.4 0.4 0.4 0.2 0.2 0.2 0.4 0.3 0.3 0.3 0.3 0.3 0.3 0.2

e g f c b a d h i f g e

slide-42
SLIDE 42

¡ Independent cascade model

is simple but requires many parameters!

§ Estimating them from data is very hard [Goyal et al. 2010]

¡ Solution: Make all edges have the same

weight (which brings us back to the SIR model)

§ Simple, but too simple

¡ Can we do something better?

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 43

0.4 0.4 0.4 0.4 0.2 0.2 0.2 0.4 0.3 0.3 0.3 0.3 0.3 0.3 0.2

e g f c b a d h i f g e

slide-43
SLIDE 43

¡ From exposures to adoptions

§ Exposure: Node’s neighbor exposes the node to the contagion § Adoption: The node acts on the contagion

44

[KDD ‘12]

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu

slide-44
SLIDE 44

¡ Exposure curve:

§ Probability of adopting new behavior depends on the total number

  • f friends who have already adopted

¡ What’s the dependence?

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 45

k = number of friends adopting

  • Prob. of adoption

k = number of friends adopting

  • Prob. of adoption

“Probabilistic” spreading: Viruses, Information Critical mass: Decision making … adopters

slide-45
SLIDE 45

¡ From exposures to adoptions

§ Exposure: Node’s neighbor exposes the node to information § Adoption: The node acts on the information

¡ Examples of different adoption curves:

46

Prob(Infection) # exposures Probability of infection ever increases Nodes build resistance [KDD ‘12]

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu

slide-46
SLIDE 46

¡ Senders and followers of recommendations

receive discounts on products

¡ Data: Incentivized Viral Marketing program

§ 16 million recommendations § 4 million people, 500k products

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 47

10% credit 10% off

[Leskovec et al., TWEB ’07]

slide-47
SLIDE 47

Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 48

Probability of purchasing

0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1 10 20 30 40

DVD recommendations (8.2 million observations) # recommendations received

[Leskovec et al., TWEB ’07]

11/5/19

slide-48
SLIDE 48

¡ Group memberships spread over the

network:

§ Red circles represent existing group members § Yellow squares may join

¡ Question:

§ How does prob. of joining a group depend on the number of friends already in the group?

Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 49

[Backstrom et al. KDD ‘06]

11/5/19

slide-49
SLIDE 49

¡ LiveJournal group membership

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 50

k (number of friends in the group)

  • Prob. of joining

[Backstrom et al., KDD ’06]

slide-50
SLIDE 50

¡ Twitter [Romero et al. ‘11]

§ Aug ‘09 to Jan ’10, 3B tweets, 60M users § Avg. exposure curve for the top 500 hashtags § What are the most important aspects of the shape of exposure curves? § Curve reaches peak fast, decreases after!

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 51

slide-51
SLIDE 51

¡ Persistence of P is the

ratio of the area under the curve P and the area

  • f the rectangle of height

max(P), width max(D(P))

§ D(P) is the domain of P § Persistence measures the decay of exposure curves

¡ Stickiness of P is max(P)

§ Stickiness is the probability of usage at the most effective exposure

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 52

slide-52
SLIDE 52

¡ Manually identify 8

broad categories with at least 20 HTs in each

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 53

Persistence

  • Idioms and Music

have lower persistence than that of a random subset of hashtags of the same size

  • Politics and Sports

have higher persistence than that of a random subset of hashtags of the same size True

  • Rnd. subset
slide-53
SLIDE 53

¡ Technology and Movies have lower stickiness than

that of a random subset of hashtags

¡ Music has higher stickiness than that of a random

subset of hashtags (of the same size)

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu 54

slide-54
SLIDE 54

60

§ Basic reproductive number R0 § General epidemic models § SIR, SIS, SEIZ § Independent cascade model § Applications to rumor spread § Exposure curves

11/5/19 Jure Leskovec, Stanford CS224W: Machine Learning with Graphs, http://cs224w.stanford.edu