60
1 Mean field models of interacting objects: fluid equations, independence assumptions and pitfalls Jean-Yves Le Boudec EPFL October 2009

Mean field models of interacting objects: fluid equations, independence assumptions and pitfalls

Embed Size (px)

DESCRIPTION

Mean field models of interacting objects: fluid equations, independence assumptions and pitfalls. Jean-Yves Le Boudec EPFL October 2009. Abstract. We consider a generic model of N interacting objects, where each object has a state and interaction between objects is Markovian, - PowerPoint PPT Presentation

Citation preview

Page 1: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

1

Mean field models of interacting objects:

fluid equations,independence assumptions and pitfalls

Jean-Yves Le Boudec

EPFL

October 2009

Page 2: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

2

AbstractWe consider a generic model of N interacting objects, where eachobject has a state and interaction between objects is Markovian,i.e. the evolution of the system depends only on the collection ofstates at any point in time. This is quite a general modelingframework, which was successfully applied to model many forms ofcommunication protocols. When the number of objects N is large, oneoften uses simplifying assumptions called "mean fieldapproximation", "fluid approximation", "fixed point method" or"decoupling assumption". In this tutorial we explain the meaning ofthese four concepts and show that the first two, namely mean fieldapproximation and fluid approximation, are generally valid. However,we also show that the last two, namely fixed point method anddecoupling assumption, require more care, as they may not be valid,even in simple cases. We give sufficient conditions under which theyare valid. We illustrate the concepts with the analysis of the802.11 WiFi protocol.

This slide show is available on my home page under “talks” or directly at http://ica1www.epfl.ch/PS_files/lebSlides.htm

Page 3: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

3

Contents

A Simple Model of Interacting Objects

Fluid Approximation

Mean Field Approximation, Fast Simulation

Stationary Regime and the Decoupling Assumption

The Fixed Point Method

Useful Extensions

Page 4: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

4

A Simple Model of Interacting ObjectsTime is discrete

N objects

Object n has state Xn(t) 2 {1,…,I}

(X1(t), …, XN(t)) is Markov

Objects can be observed only through their state

N is large, I is small

Called “Mean Field Interaction Models” in the Performance Evaluation community (But mean field has other meanings in physics, see later)

Example 1: N wireless nodes, state = retransmission stage k

Example 2: N wireless nodes, state = k,c (c= node class)

Example 3: N wireless nodes, state = k,c,x (x= node location)

Page 5: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

5

Example: 2-step malware propagation

Mobile nodes are either`S’ Susceptible`D’ Dormant`A’ Active

3 states

N nodes

Nodes meet pairwise (bluetooth)

Possible interactions:

1. RecoveryD -> S

2. Mutual upgrade D + D -> A + A

3. Infection by activeD + A -> A + A

4. RecoveryA -> S

5. Recruitment by DormantS + D -> D + D

6. Direct infectionS -> A

Page 6: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

6

Details of the ExampleTo specify the previous model entirely, ( = to be able to simulate it), we need to specify the transition matrixIn a compact form, we define probas of each type of transition.

1. RecoveryD -> S

2. Mutual upgrade D + D -> A + A

3. Infection by activeD + A -> A + A

4. RecoveryA -> S

5. Recruitment by Dormant

S + D -> D + D6. Direct infection

S -> A

Simulation algorithm:At every time step

Pick one case with prob as given in table

sum of probs is less than 1, possible to do nothing at one step(case 1) Pick one node uniformly at random among all nodes that are in state ‘D’(case 2) Pick one pair of nodes uniformly at random among all pairs nodes that are in state ‘D’(case 3) Pick one node among ‘A’ nodes, and one among ‘D’ nodes, each uniformly at randometcS, D, A are the numbers of nodes in state `S’, `D’, `A’

Page 7: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

A(t)Proportion of nodes In state i=2

7

Simulation Runs, N=1000 nodesNode 1

Node 2

Node 3

D(t)Proportion of nodes In state i=1

State = DState = AState = S

Page 8: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

8

Sample Runs with N = 1000

Page 9: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

Simplified Analysis 1 :Decoupling Assumption (Transient Regime)

9

1. RecoveryD -> S

2. Mutual upgrade D + D -> A + A

3. Infection by activeD + A -> A + A

4. RecoveryA -> S

5. Recruitment by Dormant

S + D -> D + D6. Direct infection

S -> A

Page 10: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

Simplified Analysis 2Decoupling Assumption (Stationary

Regime)

Solve for (D,A,S)

Has a unique solution

10

1. RecoveryD -> S

2. Mutual upgrade D + D -> A + A

3. Infection by activeD + A -> A + A

4. RecoveryA -> S

5. Recruitment by Dormant

S + D -> D + D6. Direct infection

S -> A

Page 11: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

11

Issues

When is decoupling assumption valid ?

How to formulate the ODE ?

Is stationary regime of ODE an approximation of stationary regime of original system ?

Page 12: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

12

Contents

A Simple Model of Interacting Objects

Fluid Approximation

Mean Field Approximation, Fast Simulation

Stationary Regime and the Decoupling Assumption

The Fixed Point Method

Useful Extensions

Page 13: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

13

Scaling Assumptions

We want to simplify the model for large N, we need scaling assumptions

Let WN(t) be the (random) number of objects that do a transition at time slot t when there are N objects

Informally, the main scaling assumptions are:The expectation of WN(t) tends to a constant as N growsThe second moment of WN(t) remains bounded as N grows

i.e., for large N, the probability that this object makes a transition is O(1/N)

This is equivalent to a time scale assumption: the time slot duration is O(1/N)

Page 14: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

14

Formal Statements

Definition: Occupancy MeasureMN

i(t) = fraction of objects in state i at time tExample: MN(t) = (D(t), A(t), S(t))

Definition: drift = expected change to MN(t) in one time slot

The scaling assumptions are:

Page 15: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

15

Writing the Drift Without Error

Drift = sum over all transitions of

proba of transition£Delta to the system state MN(t)

Can be automated

http://icawww1.epfl.ch/IS/tsed

Page 16: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

16

Example

Page 17: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

17

Fluid Approximation Theorem

Under the scaling assumption:

stochastic system MN(t) can be approximated by fluid limit (t), solution of the ODE:

Rescaled drift of MN(t)

Page 18: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

18

Example

Page 19: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

19

Fluid limitN = +1

Stochastic system

N = 1000

Page 20: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

20

Fluid Approximation Theorem

Definition: Re-Scaled Occupancy measure

[Benaïm, L] :

Page 21: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

21

Computing the Mean Field Limit

Compute the drift of MN and its limit over intensity

Page 22: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

22

Contents

A Simple Model of Interacting Objects

Fluid Approximation

Mean Field Approximation, Fast Simulation

Stationary Regime and the Decoupling Assumption

The Fixed Point Method

Useful Extensions

Page 23: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

23

Propagation of Chaos

Convergence to an ODE implies “propagation of chaos” [Sznitman, 1991]

This says that, for large N, any k objects are ≈ independentJustifies Decoupling Assumption (transient)

mean field limit

Page 24: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

24

Mean Field Independence

At any time tk nodes are asymptotically independent

Thus for large t :Prob (node n is dormant) ≈ 0.3Prob (node n is active) ≈ 0.6 Prob (node n is susceptible) ≈ 0.1

Page 25: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

25

Fast Simulation Result

A stronger result than propagation of chaos – does not require exchangeability

[Tembine, L et al], 2009

Assume we know the state of object n at time 0; we can approximate its evolution by

Replacing all other objects collectively by the ODE

The state of object n is a jump process, with transition matrix driven by the ODE

Page 26: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

PNi,j (m) is the transition probability for one object, given that the state of the system

is m

Note: Knowing the transition matrix PN (m) is not enough to be able to simulate (or

analyze) the system with N objectsBecause there may be simultaneous transitions of several objects (on the example, up to 2)

However, the fast simulation says that, in the large N limit, we can consider one (or k) objects as if they were independent of the other N-k

(XN1(t/N), MN(t/N)) can be approximated by the process (X1(t), m(t)) where m(t)

follows the ODE and X1(t) is a jump process with time-dependent transition matrix A(m(t)) where

Example

26

Page 27: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

The state of one object is a jump process with transition matrix:

where m = (D, A, S) depends on time (is solution of the ODE)

27

AN

Page 28: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

Example

28

pdf of node 1

pdf of node 2

pdf of node 3

occupancy measure(t)

Page 29: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

ODEs

Let pNj(t|i) be the probability that a node that starts in state i is

in state j at time t:

The fast simulation result says that

With the ODEs:

Page 30: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

Computing the Transition Probability

PNi,j (m) is the transition probability for one object, given that

the state if m

30

Page 31: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

31

The Mean Field Approximation

Common in Physics

Consists in pretending that XNm(t), XN

n(t) are independent in the time evolution equation

It is asymptotically true for large N, at fixed time t, for our model of interacting objects

Also called “decoupling assumption” (in computer science)

Page 32: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

32

Contents

A Simple Model of Interacting Objects

Fluid Approximation

Mean Field Approximation, Fast Simulation

Stationary Regime and the Decoupling Assumption

The Fixed Point Method

Useful Extensions

Page 33: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

33

Stationary Regime

Original system (stochastic):(XN(t)) and (MN(t)) are Markov, finite state space, discrete timeAssume either one is irreducible, thus has a unique stationary proba N

For large N, how does N relate to the stationary regime of the ODE ?

Law of MN(t) N

(t) ???

t -> +1

N -> +1

Page 34: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

Assume (H) the ODE has a unique stable point m* to which all trajectories converge

Theorem Under (H)

i.e.

(1) m* is the limit of N for large N [N = stat. prob. of (X1N(t),

…, XNN(t) ]

and

(2) decoupling assumption holds in stationary regime

34

Under (H), Decoupling Assumption Holds In Stationary Regime

Page 35: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

35

Example

In stationary regime:

Prob (node n is dormant) ≈ 0.3Prob (node n is active) ≈ 0.6 Prob (node n is susceptible) ≈ 0.1

Nodes m and n are independent

We are in the good case: the diagram commutes

Law of MN(t) N

(t) m*

t -> +1

N -> +1

t -> +1

N -> +1

Page 36: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

36

Counter-Example

The ODE does not converge to a unique attractor (limit cycle)

Assumption H does not hold; does the decoupling assumption still hold ?

Same as beforeExcept for one

parameter value

h = 0.1 instead of 0.3

Page 37: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

37

Decoupling Assumption Does Not Hold HereIn Stationary Regime

In stationary regime, m(t) = (D(t), A(t), S(t)) follows the limit cycle

Assume you are in stationary regime (simulation has run for a long time) and you observe that one node, say n=1, is in state ‘A’

It is more likely that m(t) is in region R

Therefore, it is more likely that some other node, say n=2, is also in state ‘A’

This is synchronization

R

Page 38: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

38

Numerical Example

Mean of Limit of N = pdf of one node in stationary regime

Stationary point of ODE

pdf of node 2 in stationary regime, given node 1 is D

pdf of node 2 in stationary regime, given node 1 is S

pdf of node 2 in stationary regime, given node 1 is A

Page 39: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

Simplified Analysis 2Decoupling Assumption (Stationary

Regime)

Solve for (D,A,S)Has a unique solution

10

1. RecoveryD -> S

2. Mutual upgrade D + D -> A + A

3. Infection by activeD + A -> A + A

4. RecoveryA -> S

5. Recruitment by Dormant

S + D -> D + D6. Direct infection

S -> A

Page 40: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

40

Where is the Catch ?

Fluid approximation and fast simulation result say that nodes m and n are asymptotically independent

But we saw that nodes may not be asymptotically independent

… is there a contradiction ?

Page 41: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

The Diagram Does Not Commute

For large t and N:

where T is the period of the limit cycle

Page 42: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

42

Generic Result for Stationary Regime

Original system (stochastic):(XN(t)) is Markov, finite, discrete timeAssume it is irreducible, thus has a unique stationary proba N

Let N be the corresponding stationary distribution for MN(t), i.e.

P(MN(t)=(x1,…,xI)) = N(x1,…,xI) for xi of the form k/n, k integer

Theorem

Birkhoff Center: closure of set of points s.t. m2 (m)Omega limit: (m) = set of limit points of orbit starting at m

Page 43: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

43

Here: Birkhoff center = limit cycle fixed point

The theorem says that the stochastic system for large N is close to the Birkhoff center,

i.e. the stationary regime of ODE is a good approximation of the stationary regime of stochastic system

Page 44: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

ExampleAt fixed t, the large N limit is deterministic (Dirac)

In stationary regime it is not

Stationary regime is periodicSampling algorithm for the stationary regime

pick t uniformly at random in a periodSet m = (t)

Page 45: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

QuizMN(t) is a Markov chain on E={(a, b, c) ¸ 0, a + b + c =1, a, b, c multiples of 1/N}

E (for N = 200)

A. MN(t) is periodic, this is why there is a limit cycle for large N.

B. For large N, the stationary proba of MN tends to be concentrated on the blue cycle.

C. For large N, the stationary proba of MN tends to a Dirac.

D. MN(t) is not ergodic, this is why there is a limit cycle for large N.

Page 46: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

Take Home Message

For large N the decoupling assumption holds at any fixed time t

It holds in stationary regime under assumption (H)ODE has a unique global stable point to which all trajectories converge

Otherwise the decoupling assumption may not hold in stationary regime

It has nothing to do with the properties at finite NIn our example, for h=0.3 the decoupling assumption holds in stationary regimeFor h=0.1 it does not

Study the ODE !

46

Page 47: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

47

Contents

A Simple Model of Interacting Objects

Fluid Approximation

Mean Field Approximation, Fast Simulation

Stationary Regime and the Decoupling Assumption

The Fixed Point Method

Useful Extensions

Page 48: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

48

The Fixed Point Method

Commonly used to model protocol performance, finite state machines etc

When valid, works as followsNodes 1…N each have a state in {1,2,…,I}Assume N is large and therefore nodes are independent (decoupling assumption)Let i be the proba that any given node n is in state I. Write the equilibrium equations using the independenceCan often be cast as a fixed point equation for , solved numerically by iteration

Page 49: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

The Fixed Point Method Consists in Finding the Stationary Points of the ODE

The transition matrix for one object depends on the occupancy measure, assumed equal to

This is the same as

or

For large N it is the same as the drift

Thus is a fixed point of the ODE

This is justified if assumption (H) holds, otherwise not

Page 50: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

50

Existence and Unicity of a Fixed Point are not Sufficient for Validity of Fixed Point Method

Essential assumption is

(H) () converges to a unique m*

It is not sufficient to find that there is a unique stationary point, i.e. a unique solution to F(m*)=0

Counter Example on figure(XN(t)) is irreducible and thus has a unique stationary probability

There is a unique stationary point ( = fixed point ) (red cross)

F(m*)=0 has a unique solutionbut it is not a stable equilibrium

The fixed point method would say hereProb (node n is dormant) ≈ 0.1Nodes are independent

… but in realityWe have seen that nodes are not independent, but are correlated and synchronized

Page 51: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

51

Mean of limit of N = pdf of one node in stationary regime

Stationary point of ODE

Page 52: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

52

Correct Use of Fixed Point Method

Verify scaling assumption

Write ODE

Study stationary regime of ODE, not just fixed point

Verify assumption (H), i.e. there is a unique attractor to which all solutions converge

Page 53: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

53

Example: Bianchi’s Formula

Example: 802.11 single cell

mi = proba one node is in backoff stage I= attempt rate = collision proba

Solve for Fixed Point:

Page 54: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

54

Bianchi’s Formula requires analysis of ODEThe fixed point solution satisfies “Bianchi’s Formula” [Bianchi]

Another interpretation of Bianchi’s formula [Kumar, Altman, Moriandi, Goyal]

= nb transmission attempts per packet/ nb time slots per packet

assumes collision proba remains constant from one attempt to next

(H) true in single cell system [Bordenave,McDonald,Proutière] for q0< ln 2 and K= 1 [Sharma, Ganesh, Key] and for K=1

Method to porve (H) uses majorization by linear systems of ODE

Unclear what happens for heterogeneous systems

Page 55: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

55

Contents

A Simple Model of Interacting Objects

Fluid Approximation

Mean Field Approximation, Fast Simulation

Stationary Regime and the Decoupling Assumption

The Fixed Point Method

Useful Extensions

Page 56: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

56

Useful Extensions

Systems with a global resource that is updated at every transition [Bordenave,McDonald,Proutière], [Benaïm, L]

Multiclass systems [Banerjee et al ] [Chaintreau, L., Ristanovic]

Spatial model : XNn(t) = ( i, c) where c

= location on grid

Continuous state space (instead of discrete) [Chaintreau, L., Ristanovic]

XNn(t) = ( a, c) where a 2 [0, 1)

Page 57: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

57

Conclusion

Convergence to Mean Field:

We have found a simple framework, easy to verify, as general as can beMultiple synchronized transitions are possible in the model

Under very large assumptions, first order properties can be predicted by the limit ODE

But for stationary regime one needs to study the ODE for itself

original system being ergodic does not imply ODE converges to a fixed point

Decoupling assumption holds (in stationary regime) if ODE has a unique attractor to which all trajectories converge

Otherwise, it may not hold

Page 58: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

58

[Benaïm, L] “A Class Of Mean Field Interaction Models for Computer and Communication Systems”, Performance Evaluation, April 2008

[Tembine, L et al] Hamidou Tembine , Jean Yves Le Boudec, Rachid ElAzouzi, Eitan Altman, "Mean Field Asymptotic of Markov Decision Evolutionary Games and Teams", May 2009 " in proceedings of GameNets

[L,Mundinger,McDonald]

[Benaïm,Weibull]

[Sharma, Ganesh, Key]

[Bordenave,McDonald,Proutière]

References

Page 59: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

59

[Chaintreau, L., Ristanovic] A. Chaintreau, J.-Y. Le Boudec and N. Ristanovic, “The age of Gossip: Spatial Mean Field Regime”, ACM Sigmetrics 2009

[Banerjee et al ] N Banerjee, MD Corner, D Towsley, BN Levine, “Relays, base stations, and meshes: enhancing mobile networks with infrastructure”, Mobicom 2008

Sznitman]

[Bianchi]

[Kumar, Altman, Moriandi, Goyal]

Page 60: Mean field models of interacting objects:  fluid equations, independence assumptions and pitfalls

Solution to Quiz

The only correct answer is B.

MN is aperiodic (there are cycles of length 3 and 4)