Invezz.com - Grow your wealth with trading signals
Sequential Monte Carlo Algorithms for Agent-based Models of Disease Transmission
1. Sequential Monte Carlo Algorithms for
Agent-based Models of Disease Transmission
Jeremy Heng
ESSEC Business School
Joint work with Phyllis Ju (Purdue) and Pierre Jacob (ESSEC)
IMS Annual Meeting in Probability and Statistics
London 2022
JH Agent-based models 1/ 23
2. Agent-based models
• Agent-based models specify how a population of agents
interact and evolve over time
• Can render realistic macroscopic phenomena from simple
microscopic rules
Figure: SimCity by Electronic Arts
JH Agent-based models 2/ 23
3. Calibration of agent-based models
• These models are typically calibrated by matching key features
of simulated and actual data
• Can be computationally intensive and difficult to calibrate
126 CHAPTER 5
Figure 5.3. Simulated and historical settlement patterns, in red, for Long House
Valley in A.D. 1125. North is to the top of the page.
of the 1270–1450 period could have supported a reduced but substantial
population in small settlements dispersed across suitable farming habitats
located primarily in areas of high potential crop production in the
Figure: Simulated and historical settlement patterns in long house valley
JH Agent-based models 3/ 23
4. Statistical inference for agent-based models
• Given occasional noisy measurements of the population, we
could consider statistical inference for such models
• Few works have addressed this important topic as
likelihood-based inference is computationally challenging
• We propose various Monte Carlo algorithms for some
classical agent-based models
• The general principle is to ‘open the black box’ nature of
these models and exploit its inherent structure
JH Agent-based models 4/ 23
5. Compartmental models in epidemiology
• A population-level approach assigns the population to
compartments and models the number of people in each
compartment over time
SIR model
Susceptible
Infected
Recovered
λ
γ
SIS model
Susceptible
Infected
λ
γ
JH Agent-based models 5/ 23
6. Agent-based models in epidemiology
• The agent-based approach assumes agents can take these
states and models the state of each agent n over time
SIR model
Susceptible
Infected
Recovered
λn
γn
SIS model
Susceptible
Infected
λn
γn
JH Agent-based models 6/ 23
7. Agent-based SIS model
• We consider the agent-based SIS model and encode
Susceptible = 0 and Infected = 1
• Let Xt = (Xn
t )n∈[1:N] ∈ {0, 1}N denote the state of a closed
population of N agents at time t ∈ [0 : T]
• Initialization X0 ∼ µθ given by
Xn
0 ∼ Ber(αn
0), independently for n ∈ [1 : N]
• Markov transition Xt ∼ fθ(·|Xt−1) at time t ∈ [1 : T] is
given by
Xn
t ∼ Ber(αn
(Xt−1)), independently for n ∈ [1 : N]
JH Agent-based models 7/ 23
8. Agent-based SIS model
• Transition probability specified as
αn
(Xt−1) =
(
λnD(n)−1
P
m∈N(n) Xm
t−1, if Xn
t−1 = 0
1 − γn, if Xn
t−1 = 1
• Interactions specified by an undirected network: D(n) and
N(n) denote the degree and neighbours of agent n
• Infection and recovery rates are modelled using
agent-specific attributes
λn
= (1 + exp(−β>
λ wn
))−1
, γn
= (1 + exp(−β>
γ wn
))−1
,
where βλ, βγ ∈ Rd are parameters and wn ∈ Rd are the
covariates of agent n (similarly αn
0 depends on β0)
JH Agent-based models 8/ 23
9. Agent-based SIS model
• If the network is fully connected D(n) = N, N(n) = [1 : N]
and the agents are homogeneous λn = λ, γn = γ
• We recover the classical SIS model of Kermack and
McKendrick (1927), which has a deterministic limit as
N → ∞
• These simpler models offer dimension reduction which
facilitates inference
• However, one cannot incorporate network information and
agent attributes
• We will use these simplifications to construct efficient SMC
proposal distributions for the agent-based model
JH Agent-based models 9/ 23
10. Agent-based SIS model
• Observations (Yt)t∈[0:T] are the number of infections
reported over time
• Modelled as conditionally independent given (Xt)t∈[0:T], and
Yt ∼ gθ(·|Xt) = Bin(I(Xt), ρ)
• I(Xt) =
PN
n=1 Xn
t is the number of infections and ρ ∈ (0, 1) is
the reporting rate
• Parameters to be inferred θ = (β0, βλ, βγ, ρ)
JH Agent-based models 10/ 23
11. Likelihood of agent-based SIS model
• We have a standard hidden Markov model
pθ(x0:T , y0:T ) = µθ(x0)
T
Y
t=1
fθ(xt|xt−1)
T
Y
t=0
gθ(yt|xt)
• Computing the marginal likelihood
pθ(y0:T ) =
X
x0:T ∈{0,1}N×(T+1)
pθ(x0:T , y0:T ),
using the forward algorithm costs O(22NT)
• For large N, we have to rely on sequential Monte Carlo
(SMC) methods to approximate the marginal likelihood
JH Agent-based models 11/ 23
12. Likelihood estimation
• Efficiency of SMC crucially relies on the choice of proposal
distributions
• The bootstrap particle filter (BPF) can be readily
implemented as simulating the latent process is
straightforward
• Performance of BPF is poor if observations are informative,
e.g. its marginal likelihood estimator can collapse to zero
• We show how to implement the fully adapted auxiliary
particle filter (APF) that accounts for the next observation
• We propose a novel controlled SMC (cSMC) method that
takes the entire observation sequence into account
JH Agent-based models 12/ 23
13. Auxiliary particle filter
• At time t ∈ [1 : T], the APF samples particles from
pθ(xt|xt−1, yt) and weights them according to pθ(yt|xt−1)
JH Agent-based models 13/ 23
14. Auxiliary particle filter
• At time t ∈ [1 : T], the APF samples particles from
pθ(xt|xt−1, yt) and weights them according to pθ(yt|xt−1)
• The predictive likelihood is
pθ(yt|xt−1) =
X
xt ∈{0,1}N
fθ(xt|xt−1)gθ(yt|xt)
JH Agent-based models 13/ 23
15. Auxiliary particle filter
• At time t ∈ [1 : T], the APF samples particles from
pθ(xt|xt−1, yt) and weights them according to pθ(yt|xt−1)
• The predictive likelihood is
pθ(yt|xt−1) =
X
xt ∈{0,1}N
fθ(xt|xt−1)gθ(yt|xt)
=
X
xt ∈{0,1}N
N
Y
n=1
Ber(xn
t ; αn
(xt−1))Bin(yt; I(xt), ρ)
JH Agent-based models 13/ 23
16. Auxiliary particle filter
• At time t ∈ [1 : T], the APF samples particles from
pθ(xt|xt−1, yt) and weights them according to pθ(yt|xt−1)
• The predictive likelihood is
pθ(yt|xt−1) =
X
xt ∈{0,1}N
fθ(xt|xt−1)gθ(yt|xt)
=
X
xt ∈{0,1}N
N
Y
n=1
Ber(xn
t ; αn
(xt−1))Bin(yt; I(xt), ρ)
=
N
X
it =yt
PoiBin(it; αn
(xt−1))Bin(yt; it, ρ)
since the sum of independent Bernoulli with non-identical
success probabilities follows a Poisson binomial distribution
JH Agent-based models 13/ 23
17. Auxiliary particle filter
• Poisson binomial PMF costs O(N2) to compute (Chen and
Liu, 1997)
• To sample, we augment It = I(Xt) as an auxiliary variable
pθ(xt, it|xt−1, yt) = pθ(it|xt−1, yt)pθ(xt|xt−1, it)
• Conditional distribution of the number of infections is
pθ(it|xt−1, yt) =
PoiBin(it; αn(xt−1))Bin(yt; it, ρ)
pθ(yt|xt−1)
• Distribution of agent states conditioned on their sum is a
conditioned Bernoulli
pθ(xt|xt−1, it) = CondBer(xt; α(xt−1), it),
which costs O(N2) to sample (Chen and Liu, 1997)
JH Agent-based models 14/ 23
18. Controlled sequential Monte Carlo
• The optimal proposal that gives a zero variance marginal
likelihood estimator is the smoothing distribution
pθ(x0:T |y0:T ) = pθ(x0|y0:T )
T
Y
t=1
pθ(xt|xt−1, yt:T )
• At time t ∈ [1 : T], the transition is
pθ(xt|xt−1, yt:T ) =
fθ(xt|xt−1)ψ?
t (xt)
fθ(ψ?
t |xt−1)
• ψ?
t (xt) = p(yt:T |xt) is the backward information filter (BIF)
and fθ(ψ?
t |xt−1) =
P
xt ∈{0,1}N fθ(xt|xt−1)ψ?
t (xt)
JH Agent-based models 15/ 23
19. Controlled sequential Monte Carlo
• BIF satisfies the backward recursion ψ?
T (xT ) = gθ(yT |xT ),
ψ?
t (xt) = gθ(yt|xt)fθ(ψ?
t+1|xt), t ∈ [0 : T − 1]
• This costs O(22NT) to compute, so approximations are
necessary when N is large
• Instead of relying on regression (Guarniero et al., 2017; Heng
et al., 2020), our approach is based on dimensionality
reduction by coarse-graining the agent-based model
• We approximate the model with heterogenous agents by a
model with homogenous agents whose individual infection and
recovery rates given by their population averages, i.e.
λn ≈ λ̄ = N−1
PN
n=1 λn and γn ≈ γ̄ = N−1
PN
n=1 γn
JH Agent-based models 16/ 23
20. Controlled sequential Monte Carlo
• BIF of the approximate model ψt(I(xt)) can be computed
exactly in O(N3T) cost, and approximately in O(N2T)
• We then define the SMC proposal transition as
qθ(xt|xt−1) =
fθ(xt|xt−1)ψt(I(xt))
fθ(ψt|xt−1)
,
which can be sampled and weighted in the same way as APF
• Quality of proposals depend on the coarse-graining
approximation
• Finer-grained approximations can be obtained using clustering
of the infection and recovery rates, at the expense of
increased cost
JH Agent-based models 17/ 23
25. Concluding remarks
• SMC algorithms can be readily deployed within particle
MCMC for parameter and state inference
• We considered APF and cSMC for the agent-based SIR model
• Could reduce cost of evaluating Poisson binomial PMF and
sampling conditioned Bernoulli for small and controllable bias
• A general alternative to SMC methods is MCMC algorithms
to sample from the smoothing distribution
JH Agent-based models 22/ 23
26. Concluding remarks
• arXiv preprint about this talk (to be updated soon)
Sequential Monte Carlo algorithms for agent-based models of
disease transmission. arXiv:2101.12156
• R package on GitHub
https://github.com/nianqiaoju/agents
• arXiv preprint about more efficient sampling of conditioned
Bernoulli distributions with MCMC
A simple Markov chain for independent Bernoulli variables
conditioned on their sum. arXiv:2012.03103
JH Agent-based models 23/ 23