When Contacts Come and Go: Modeling Epidemics on Temporal, Activity-Driven Networks
Capturing the rhythm of human interaction in outbreak simulations
⏳ Introduction
Imagine a city where every handshake, coffee chat, or bus ride is fleeting—here today, gone tomorrow. Unlike your close-knit group of friends or household, these are ephemeral encounters: random, short-lived, and constantly reshuffled. Now imagine a virus trying to hitch a ride on this ever-changing web of human motion.
This is the world of the Temporal / Activity-Driven Network agent-based model—an elegant framework that captures how diseases spread through dynamic, time-varying contacts rather than fixed relationships. Instead of assuming people interact with the same neighbors every day (like in static network models), this approach treats social activity as a stochastic process: each person “wakes up” with a certain probability, reaches out to strangers, and then goes quiet again.
Developed to bridge the gap between oversimplified “well-mixed” models and data-heavy dynamic networks, activity-driven models [1–3] have become vital for studying diseases that thrive on casual, transient contact—think influenza in a subway, norovirus at a conference, or SARS-CoV-2 in a bustling marketplace.
In this article, we’ll explore how this model works, why its timing matters, and how it helps public health experts anticipate outbreaks in a world where who you meet today may never cross your path again.
🔄 Model Description
The Temporal / Activity-Driven Network model simulates an epidemic over discrete time steps (usually days), where the contact network is rebuilt from scratch at each step based on individual activity patterns.
Each agent i is assigned an activity rate aᵢ ∈ (0,1], representing the probability they become “active” on any given day. When active, agent i initiates contact with m other agents, chosen uniformly at random from the population (excluding themselves). These contacts form ephemeral, undirected edges that exist only for that time step.
💡 Key insight: Contacts are not persistent. Today’s coffee shop companion is not tomorrow’s. This mirrors real-world casual interactions in urban or high-mobility settings.
🦠 Transmission Rule
On day t, for every active infectious agent i (in state I) who contacts a susceptible agent j (S), transmission occurs with probability:
pᵢⱼ(t) = 1 − exp(−β · g(τᵢ))
Where:
- β (beta) is the baseline transmissibility scale (0 < β ≤ 1),
- τᵢ is the time since agent i became infectious (in days),
- g(τ) is the infectiousness profile, typically peaking early (e.g., 1–3 days post-infection).
This rule is identical to other micro-simulations—but now applied only to newly formed, time-specific contacts.
⏳ Disease Natural History
Agents progress through a SEIR trajectory:
- S → E: Upon successful transmission,
- E → I: After an incubation period Tᴱᵢ (drawn per agent),
- I → R: After an infectious period Tᴵᵢ (also agent-specific).
Both Tᴱ and Tᴵ are typically sampled from log-normal or gamma distributions to reflect biological variability. For example:
- Influenza: ⟨Tᴱ⟩ ≈ 2 days, ⟨Tᴵ⟩ ≈ 5 days
- SARS-CoV-2: ⟨Tᴱ⟩ ≈ 5 days, ⟨Tᴵ⟩ ≈ 7 days
Once recovered (R), agents are immune for the simulation duration (unless waning immunity is added—see extensions).
📈 Network Generation Algorithm (Daily)
For each day t:
- For every agent i:
a. With probability aᵢ, mark i as active.
b. If active, select m distinct agents j₁, j₂, …, jₘ uniformly at random.
c. Create temporary edges (i, jₖ) for k = 1 to m. - Apply transmission rules across all active edges.
- Update disease states based on timers.
This process repeats until the epidemic dies out or the simulation ends.
📊 Key Parameter Definitions & Typical Values
| N | Population size | Total agents | 1,000 – 1,000,000 |
| aᵢ | Activity rate | Daily probability agentiinitiates contacts | 0.01 – 0.5 (often homogeneous:aᵢ = a) |
| m | Contacts per active agent | Number of new partners per active day | 1 – 20 |
| β | Transmissibility scale | Per-contact infection risk | 0.02 – 0.3 |
| g(τ) | Infectiousness curve | Relative transmission potential over time | Bell-shaped; peak at τ = 1–3 |
| ⟨Tᴱ⟩ | Mean incubation period | Avg. time to infectiousness | 1–10 days |
| ⟨Tᴵ⟩ | Mean infectious period | Avg. duration of infectiousness | 3–14 days |
🌟 Heterogeneous activity: In advanced versions, aᵢ follows a power-law distribution (e.g., P(a) ∝ a⁻ᵞ), mimicking “super-active” individuals who drive spread [2].
⚖️ Assumptions and Applicability
The model rests on several deliberate simplifications:
✅ Memoryless contacts: No repeated interactions unless by chance.
✅ Homogeneous mixing among non-active agents: Only active agents initiate ties.
✅ Time-scale separation: Contact formation is faster than disease progression (valid for acute infections).
✅ No spatial structure: All agents are equally reachable (suitable for well-connected urban populations).
🎯 When is this model most useful?
- High-turnover settings: Public transit, conferences, markets, festivals [4].
- Acute respiratory or gastrointestinal infections: Spread via brief, casual contact (e.g., flu, norovirus, common cold coronaviruses).
- Early-phase outbreak modeling: When detailed contact data is unavailable, but activity heterogeneity is suspected.
- Studying burstiness: How “bursty” human activity (periods of high interaction) affects epidemic speed [5].
It is less appropriate for:
- Diseases requiring prolonged exposure (e.g., tuberculosis),
- Close-contact settings like households or schools (use static networks),
- Long-term endemic diseases where immunity wanes over years.
🔧 Model Extensions and Variants
Researchers have enriched the base model to reflect real-world complexity. Key variants include:
1. Heterogeneous Activity Distributions
Instead of uniform a, assign aᵢ from a heavy-tailed distribution:
P(a) = (γ − 1) aₘᵢₙᵞ⁻¹ a⁻ᵞ, a ≥ aₘᵢₙ
This captures “superspreaders” who are highly active [2]. Epidemic thresholds shift dramatically under such heterogeneity.
2. Memory and Reinforcement
Allow a small probability ρ that an agent reconnects with a previous contact, introducing weak memory:
With probability ρ, choose j from last L contacts; else, random.
Useful for modeling semi-stable communities (e.g., coworkers who occasionally meet outside work) [6].
3. Layered Activity
Define separate activity rates for different contexts:
- aₕ: household activity (low, but high transmission risk)
- aᵥ: workplace/school activity
- a꜀: community activity
Each layer has its own mₗ and βₗ, enabling targeted interventions [7].
4. Adaptive Behavior
Let activity rates drop during outbreaks:
aᵢ(t) = a₀ · exp(−κ · I(t)/N)
where I(t) is current prevalence and κ is behavioral responsiveness. Captures “social distancing” as reduced activity [8].
5. Waning Immunity & Reinfection
After recovery, agents return to S after time Tᵂ ~ distribution:
R → S after Tᵂ days
Enables modeling of seasonal reinfection (e.g., endemic coronaviruses) [9].
These extensions preserve the model’s computational efficiency while adding realism for specific policy questions.
🎉 Conclusion
The Temporal / Activity-Driven Network model captures a fundamental truth of modern life: our social world is fluid. We don’t just interact with a fixed circle—we brush shoulders with strangers, attend pop-up events, and navigate crowds whose composition changes by the hour. For diseases that exploit these fleeting moments, static models fall short.
By tying transmission to individual activity rhythms, this framework reveals how heterogeneity in human behavior—not just biology—shapes epidemics. A small group of highly active individuals can accelerate spread; a city-wide drop in activity can slow it dramatically.
Best of all, the model remains computationally lean, making it ideal for rapid scenario testing during emerging outbreaks. Whether simulating a flu wave in a metropolis or evaluating mask mandates on public transit, activity-driven networks offer a sweet spot between realism and tractability.
So the next time you board a crowded train or join a conference, remember: you’re not just moving through space. You’re weaving a temporary thread in a vast, invisible tapestry—and in that moment, you might just change the course of an epidemic.
📚 Key References
- Perra, N. et al. (2012). Activity-driven modeling of time-varying networks. Scientific Reports. https://doi.org/10.1038/srep00469
- Liu, S. et al. (2014). Controlling contagion processes in activity-driven networks. Physical Review Letters. https://doi.org/10.1103/PhysRevLett.112.118702
- Holme, P. & Saramäki, J. (2012). Temporal networks. Physics Reports. https://doi.org/10.1016/j.physrep.2012.03.001
- Sun, K. et al. (2021). Transmission heterogeneities in public transport networks. Nature Communications. https://doi.org/10.1038/s41467-021-22051-0
- Rocha, L.E.C. et al. (2011). Simulated epidemics in an empirical spatiotemporal network. PLOS Computational Biology. https://doi.org/10.1371/journal.pcbi.1001109
- Moinet, A. et al. (2018). Generalized activity-driven model with memory. Physical Review E. https://doi.org/10.1103/PhysRevE.97.042302
- Aleta, A. et al. (2020). Modelling the impact of testing and contact tracing. Nature Human Behaviour. https://doi.org/10.1038/s41562-020-0931-9
- Verelst, F. et al. (2020). Behavioral changes during epidemics. Epidemics. https://doi.org/10.1016/j.epidem.2020.100408
- Lavine, J.S. et al. (2011). Immunological dynamics of endemic coronaviruses. Science. https://doi.org/10.1126/science.1208130
- Glass, K. et al. (2022). Agent-based models for infectious disease policy. Philosophical Transactions B. https://doi.org/10.1098/rstb.2021.0030