Source-linked AI summary
Integrating adaptive human behavior into epidemic models with large language models
Yicheng Mao, Haoyang Li, Rob Deardon, Hongru Du
TL;DR
Epidemic models lack direct, prospective representations of context-dependent human behavior, despite its importance for transmission. GABLE uses LLMs to generate adaptive age-structured contact matrices within a mechanistic epidemic model. In France, it reproduced informative mixing patterns, improved short-term forecasts over reference approaches, and supported policy-scenario evaluation, while alternative policies remain directly unvalidated.
Problem
Contact surveys are limited and delayed, mobility data are indirect, and existing prospective models require behavioral mechanisms to be specified in advance.
Method
GABLE uses an LLM-based behavioral layer to translate epidemic and policy conditions into age-structured contact matrices coupled to mechanistic transmission dynamics.
Results
GABLE reproduced informative temporal and age-specific mixing, improved short-term forecasts relative to mobility-driven and statistical references, and generated distinct trajectories under alternative policies.
Takeaways & Limitations
GABLE provides a framework for prospective epidemic modeling when direct behavioral observations are sparse, delayed, or unavailable.
Takeaways & Limitations
Counterfactual policy outcomes cannot be directly validated because alternative policy scenarios were not observed.
Abstract
from arXiv · showhide
Infectious disease transmission is shaped by patterns of human interaction, which adapt as epidemic conditions change. Capturing these context-dependent behaviors remains a fundamental challenge for epidemic models. Here, we recast this challenge by using large language models (LLMs) to represent adaptive human behavior within mechanistic epidemic models. We operationalize this idea through Generative Adaptive Behavioral Layer for Epidemics (GABLE), which adapts LLMs to infer behavioral responses to epidemic and policy conditions and translates them into age-structured contact matrices coupled to a mechanistic epidemic model. Applied to COVID-19 in France, GABLE reproduced responses in population mixing and age-specific contact structures that remained epidemiologically informative. In short-term forecasting, LLM-generated contact matrices outperformed mobility-driven matrices derived from real-world mobility data, with the largest gains at longer horizons. GABLE also extends beyond forecasting to prospective policy evaluation by projecting behavioral and epidemic responses to candidate interventions before implementation. When supplied with subsequently implemented policies, GABLE reproduced epidemic trajectories and generated distinct responses to alternative policy timing and composition. By leveraging LLMs as a flexible behavioral layer, GABLE provides a framework for coupling context-sensitive behavioral generation with epidemic dynamics.
Introduction
Epidemic models need to represent adaptive human behavior, but existing behavioral data and predefined mechanisms limit prospective simulation. GABLE addresses this by using an LLM-based behavioral layer to generate adaptive age-structured contact matrices coupled to mechanistic epidemic dynamics.
- Human behavior and disease dynamics continually reshape one another, so epidemic models must jointly represent transmission and adaptive responses.
- Contact surveys are limited in availability and timeliness, while mobility data do not uniquely capture interpersonal or age-specific mixing.
- Predefined behavioral models enable prospective simulation but require behavioral mechanisms and functional relationships to be specified in advance.
- The framework couples generated contact matrices to a mechanistic epidemic model, feeding epidemic outcomes back to update subsequent behavior.
- GABLE uses an LLM-based behavioral layer to integrate policy, epidemic, demographic, and contact information into adaptive population mixing patterns represented by age-structured contact matrices.
- In COVID-19 forecasting in France, GABLE improved short-term forecasts relative to mobility-driven and statistical reference models and produced distinct trajectories under alternative policies.
Results
GABLE generated adaptive, age-specific contact structures that remained epidemiologically informative and improved prospective hospitalization forecasts, especially at longer horizons. It also produced ordered behavioral and epidemic responses to alternative policy timing and composition.
- Behavioral layer: GABLE iteratively conditioned on epidemic state, policy conditions, participant characteristics, and pre-pandemic contacts to generate age-structured contact matrices that governed transmission.The updated epidemic state was fed back to the behavioral layer, allowing contacts and disease dynamics to co-evolve.
- Adaptive contact patterns: 12.67 contacts per person per day fell to 3.15–3.74 across LLMs during the first lockdown, then recovered and contracted again during the second lockdown.The LLM trajectories broadly agreed with mobility-driven contact changes while retaining model-specific overall levels.
- Age-specific structure: Adolescent contacts fell by 62.1%–80.1% during the second lockdown, versus 53.0% in mobility-driven matrices, while adult contacts fell by 51.8%–70.3%, versus 61.2%.Across the study period, adolescents had the largest maximum reduction and seniors the smallest; contact intensity also declined as policy stringency increased.
- Epidemiological evaluation: After calibration, all five configurations reproduced national hospitalization-wave timing and scale, but age-specific performance varied across models and age groups.Static pre-pandemic contacts had only +2% aggregate bias while overestimating adult admissions by 24.0% and underestimating senior admissions by 10.2%.
- Forecasting: GABLE achieved a mean WIS of 1298 versus 2443 for mobility-driven matrices and 3047–4148 for statistical references, with the largest gains at two-to-four-week horizons.It achieved 96.2% coverage of nominal 95% prediction intervals and outperformed mobility-driven matrices at 11 of 13 forecast origins; failures concentrated around the second lockdown’s introduction.
- Policy evaluation: At the lockdown branch, retaining late-October measures increased contacts by 41.4% and cumulative admissions by 45.8% over four weeks relative to factual scenarios.Maximum measures reduced contacts and admissions by 17.2% and 14.0% at lockdown, while school closure produced age-specific effects, including a 45.3% adolescent-contact reduction.
Discussion
GABLE couples context-sensitive behavioral generation to epidemic dynamics, enabling prospective analysis when direct behavioral observations are limited. The study demonstrates useful forecasting and policy-analysis capabilities, while identifying important validation and model-uncertainty limits.
- GABLE translates changing epidemic and policy conditions into transmission-relevant behavioral responses without requiring contemporaneous behavioral measurements.Its behavioral layer updates responses as epidemic conditions evolve and couples them directly to the epidemiological model.
- LLMs jointly interpret multiple contextual influences and convert them into structured age-structured contact matrices rather than unconstrained outputs.The matrices provide the interface between contextual behavioral generation and mechanistic transmission.
- GABLE reproduced subsequent epidemic trajectories under implemented French policies while future hospitalization outcomes were withheld, supporting prospective policy analysis.The factual-policy evaluation provides an empirical reference for counterfactual analysis but cannot directly validate unobserved alternative policies.
- The generated matrices could not be directly validated against longitudinal measurements of realized contact behavior over the same period.Evaluation instead used mobility-reconstructed contact patterns and hospitalization dynamics after transmission-model propagation.
- Differences among LLMs indicate uncertainty in how epidemic context is translated into behavior and may reflect distinct behavioral priors or response tendencies.The authors identify ensemble methods and explicit behavioral-model uncertainty propagation as future needs.
Materials and Methods
The framework couples an LLM-generated, age-structured contact matrix to a stochastic epidemic model through recursive behavioral–epidemic updates. Its implementation uses diary-based contact generation, policy and epidemic inputs, fixed epidemiological structure, and calibrated transmission parameters.
- GABLE couples a generative behavioral layer to an age-structured stochastic epidemiological model through a time-varying contact matrix.Changing epidemic and policy conditions modify contact structure, which then alters disease transmission.
- Behavioral contexts combine public-health policy conditions and epidemic information, with behavioral contexts and contact matrices updated weekly while epidemiological transitions are simulated daily.The weekly contact matrix is held fixed between behavioral updates.
- Each LLM evaluates participant contact diaries under the current context and returns binary contact-retention decisions that are adjusted for calendar and household constraints.The adjusted contacts are aggregated into an age-structured contact matrix.
- The transmission model applies symptom- and case-detection-related contact reductions before evolving the stochastic epidemiological state.The model is stratified by age, viral strain, and vaccination status and includes multiple infection and recovery states.
- Prospective simulations recursively feed projected epidemic trajectories into the behavioral layer, whose next contact matrix modifies subsequent transmission.The behavioral and epidemiological operators remain unchanged across retrospective reconstruction, forecasting, and policy analyses.
- All configurations shared the same epidemiological structure, natural-history parameters, vaccination and variant inputs, calibration targets, and simulation procedure.They differed only in the source of the age-structured contact matrix; transmission parameters were calibrated using hospital admissions and a time-varying correction factor.
Supplementary Materials for Integrating adaptive human behavior into epidemic models with large
The supplied supplementary-materials entries list the authors and the supplementary components accompanying the paper.
- The listed authors are Yicheng Mao, Haoyang Li, Rob Deardon, and Hongru Du.
- The supplementary materials include text, Figures S1 to S4, and Tables S1 to S5.
Data sources
The study combines French contact diaries, national policy and epidemic surveillance inputs, and age-stratified hospital admissions for calibration and evaluation.
- The data-and-methods section describes the inputs used to construct behavioral representations, generate contact matrices, calibrate transmission, and evaluate outputs.
- The behavioral inputs use 650 French contact-survey participants spanning children, adolescents, adults, and seniors after diary restrictions.Each participant contributed one regular-weekday, non-holiday diary, with high-contact professional occupations excluded.
- Weekly French containment policies come from seven national Oxford COVID-19 Government Response Tracker indicators summarized by modal weekly levels.
- Retrospective epidemic information uses nationally reported cases and deaths, with unreliable early case counts withheld and deaths retained.The weekly presentation includes current and previous weeks for comparison.
- Daily age-stratified hospital admissions from the SI-VIC database support calibration and scoring of the transmission model.Admissions summed over age groups are used as the calibration target, with age-stratified admissions used for evaluation.
LLM prompts and queries
The prompts ask an LLM to decide which diary contacts would still occur for a specific person under the current epidemic, policy, and calendar conditions. These decisions are returned as retained-contact numbers and used to represent realized rather than perfect compliance.
- Prompt inputs: Each weekly query combines a fixed task instruction and situation with the participant’s age and pre-pandemic contact diary.The situation includes policies, epidemic indicators, policy duration, and school-term status.
- Contact decisions: The model evaluates every diary contact individually and reports the numbers that would still take place in the current week.The output is a JSON object containing a still_happen list; omitted contacts are treated as discontinued.
- Contact settings: The prompt distinguishes six settings: home, work, school, transport, leisure, and otherplace.These settings correspond to physical locations of contact used in the diary and policy context.
- Behavioral reasoning: Decisions weigh restrictions, setting risk, epidemic severity, essentiality, livelihood, caregiving, and adherence fatigue for the specific person and contact.The prompt explicitly instructs the model to represent realized behavior rather than perfect compliance.
- Behavioral assumptions: Household contacts are treated as continuing under strict lockdown because co-residents keep seeing one another daily.This is an explicit modeling assumption in the prompt.
Contact-matrix construction
The construction procedure converts weighted diary contacts into age-structured contact-rate matrices, applying the same reconstruction to the baseline and weekly LLM configurations. LLM-specific retention decisions determine the contact weights, with calendar and household adjustments applied before reconstruction.
- Matrix reconstruction: A single procedure turns weighted contacts into a 4 × 4 contact-rate matrix across baseline and weekly LLM configurations.The matrix construction is held constant while contact weights vary between configurations.
- Weighted contacts: Each diary contact is assigned a contact age class and enters the age-group aggregation with a weight between zero and one.The weight is derived from the LLM retention vector for weekly matrices.
- Reciprocity correction: Reported age-group contacts are corrected for unequal sampling using population sizes, producing a reciprocity-corrected matrix.The corrected orientation retains participant age in rows and contact age in columns.
- Deterministic adjustments: Academic-holiday school contacts receive zero weight, while household weights are raised when necessary to prevent home contact from being removed entirely.The household floor uses the average French household size and is skipped when no household contact is reported.
- Contact intensity: Age-specific contact intensity is the mean daily number of contacts reported by each participant age group after reciprocity correction.The same definitions are applied across retrospective, forecasting, and counterfactual analyses.
Transmission model
The transmission model uses the behavioral layer’s age-structured contact matrix within an age-stratified stochastic epidemic model. It represents disease progression, multiple strains, vaccination, and disease-stage-specific contact reductions while keeping epidemiological inputs fixed across matrix configurations.
- Model structure: The model is an age-stratified stochastic transmission model configured for the Wuhan-like strain and Alpha variant.It includes age-specific progression and severity parameters.
- Disease states: Each age class tracks susceptible, latent, presymptomatic, asymptomatic, symptomatic, waiting, hospital, and recovered states.Daily hospital admissions are the flow used as the calibration target.
- Transmission coupling: The behavioral contact matrix is modified into compartment-specific contact rates before calculating infection risk.The force of infection combines contact rates with transmission, susceptibility, infectiousness, and infectious counts.
- Transmission assumptions: All contacts contribute equally to transmission, without distinguishing contact setting or physical contact type.This is an explicit transmission-model assumption.
- Disease-stage adjustments: Severe symptoms reduce contacts by 75 percent, and identified infectious individuals reduce contacts by 90 percent.The testing reduction is zero through the first wave and first lockdown, then 50% from the first-lockdown exit onward.
- Variants and vaccination: The Alpha variant is introduced using observed surveillance prevalence, while vaccination moves adults and seniors through dose states with effects on infection, transmission, symptoms, and severity.Vaccination coverage is capped at 0.99.
Model inference
Model inference calibrates transmission and contact-scaling parameters against hospital admissions using repeated stochastic simulations. The procedure fixes the per-contact transmission rate first, then estimates window-specific correcting factors while using ensemble medians to reduce stochastic variability.
- Transmission-rate fitting: β = 0.098 is selected by maximizing a simulation-based Poisson objective over a pre-lockdown grid with baseline contacts.The grid spans 0.060 to 0.120 in steps of 0.002, with 50 stochastic runs per candidate.
- Calibration objective: Candidate parameters are compared using a simulation-based Poisson objective based on the ensemble-median predicted daily hospital admissions.Observed admissions are summed across age groups within each fitting window.
- Calibration interpretation: The ensemble median reduces the influence of highly variable stochastic realizations and is not interpreted as a full probabilistic likelihood.It is used for parameter selection rather than complete probabilistic inference.
- Fitting windows: Retrospective fitting covers the lockdown period and fifteen consecutive windows from 11 May 2020 through 4 July 2021.The windows begin on dates spanning May 2020 to May 2021.
Real-time forecasting
Real-time forecasts generate future contact matrices without post-origin observations, recursively feeding projected epidemic states back into the behavioral layer across a four-week horizon.
- 13 rolling origins from 14 September to 7 December 2020 each projected a four-week horizon using 100 stochastic runs.Each run produced daily age-resolved quantile trajectories.
- For each future week, the LLM regenerated contact matrices using a frozen policy, published school-calendar information, and no observations after the forecast origin.The epidemic context used reported admissions through the origin and model predictions thereafter.
- Weekly correcting factors were fitted through the origin and frozen forward using the mean of the last K=4 fitted factors.The lockdown period retained the factor fitted for 16 March to 10 May 2020.
- Probabilistic accuracy was summarized with the weighted interval score using the predictive median and 11 central prediction intervals.The intervals covered the standard 23 quantile levels.
Statistical forecast baselines
Three purely statistical forecasters served as reference methods, each fitted in real time to weekly hospital-admission series without epidemiological structure.
- Automatic ARIMA, automatic exponential smoothing, and the Theta method provided statistical forecasting references without epidemiological structure.All three methods ran through statsforecast in a non-seasonal setting.
- Each statistical forecaster used complete Monday-to-Sunday admissions from 11 May 2020 through the forecast origin on the log(1+x) scale.Age-specific forecasts fitted each method independently to each age group’s weekly admission series.
Counterfactual policy experiments
Counterfactual experiments branched from selected forecast origins to compare policy scenarios, behavioral responses, contact intensity, and cumulative admissions over four weeks.
- Experimental design: All scenarios shared the pre-branch epidemic state, contact matrices, transmission parameters, vaccination and variant inputs, correcting factor, random seeds, and school calendar.The scenario-specific policy sequence and duration counter were the initial differences across runs.
- Branch-point selection: Branch points were chosen from 13 rolling origins to represent consequential tightening and relaxation episodes.The selected weeks were 26 October 2020 for lockdown and 23 November 2020 for relaxation.
- Policy-effect contrast: The policy-effect contrast used factual-policy and frozen-policy projected admissions at the four-week target, with positive values indicating reduced admissions under the factual change.Negative values indicated that the factual change increased projected admissions.
- Scenario specification: Six scenarios included factual policy, no change, one- or two-week delays, maximum measures, and school closure.School closure changed only the school-closing indicator to its maximum while other indicators followed the factual sequence.
- Scenario specification: Counterfactual epidemic states were updated recursively from branch-time observations and the model’s own median admissions predictions, excluding post-branch observations.Policy-duration counters were recomputed along each scenario-specific sequence.
- Outcome summaries: Four-week scenario summaries averaged contact intensities and summed hospital admissions, expressing changes relative to the factual-policy projection.Age-specific contact intensities were averaged over the same window.
- Outcome summaries: The analysis tested whether scenario stringency orderings corresponded to aggregate contact and cumulative-admission orderings using Pearson correlation across ten non-factual scenarios.Stringency averaged nine normalized indicators, with counterfactual policy levels and observed values retained according to the specified rules.
- Age-specific responses: School-contact shares were defined as mean school contacts per respondent divided by mean total contacts per respondent within each age group.This compared age-specific responses to school closure with pre-pandemic diary contact composition.
Supplementary Text
Across 68 matched weeks, LLM-generated contact matrices showed model-specific age-allocation patterns while preserving meaningful correspondence with mobility-driven matrices. Policy-conditioned projections reproduced major epidemic turning points, but counterfactual policy outcomes remained unvalidated and retrospective evaluation faced possible historical-information leakage.
- Matrix comparison: 68 weeks were analyzed by partitioning all 16 matrix elements into adult–senior and younger-group sets for comparison with mobility-driven matrices.The first set contained four elements; the second contained 12 elements involving at least one child or adolescent group.
- Matrix comparison: GPT-4o mini had an adult–senior slope of b=0.72 and correlation r=0.96, while younger-group elements had b=0.99 and r=0.90.Median contact intensity relative to mobility-driven matrices was 0.75 among adults and 0.67 among seniors.
- Matrix comparison: Gemini 2.5 Flash shifted contact intensity toward adults: adult and senior median ratios were 1.21 and 0.89, while younger-related elements had b=0.78 and r=0.87.Its adult–senior block had b=1.14 and r=0.94.
- Matrix comparison: Grok 3 mini produced lower contact intensity across all age groups, with median ratios of 0.82, 0.79, 0.89, and 0.71 for children, adolescents, adults, and seniors.Its adult–senior and young-related slopes were b=0.86 and b=0.75, respectively.
- Validation and limitations: Counterfactual policy outcomes could not be validated directly because alternative policy scenarios were unobserved, and retrospective prompts posed potential information leakage from historical COVID-19 cues.Perturbing historical identifiability nevertheless left generated contact structures and downstream findings largely insensitive to those changes.
- Validation and limitations: Factual-policy projections reproduced autumn 2020 turning points, while mean absolute relative error rose from 2.8% at one week to 21.7% at four weeks.Mean 95% interval coverage was 96%, and four-week signed error reached −12.2%.