Pre-training Epidemic Time Series Forecasters with Compartmental Prototypes
Zewen Liu, Juntong Ni, Max S. Y. Lau, Wei Jin
TL;DR
CAP E tackles brittle epidemic forecasters by learning a dictionary of $K$ latent compartment prototypes and expressing each outbreak as a time-varying mixture over these prototypes. It combines self-supervised pre-training with epidemic-aware regularizers to promote robust generalization under data scarcity and distribution shifts. Across a comprehensive benchmark spanning 17 diseases and 50+ regions, CAP E achieves superior zero-shot, few-shot, and full-shot forecasting, demonstrating strong transferability and epidemiological grounding. The work provides an open-source framework and insights into how latent compartment dynamics can yield transferable epidemic forecasts with practical public-health impact.
Abstract
Accurate epidemic forecasting is crucial for outbreak preparedness, but existing data-driven models are often brittle. Typically trained on a single pathogen, they struggle with data scarcity during new outbreaks and fail under distribution shifts caused by viral evolution or interventions. However, decades of surveillance data from diverse diseases offer an untapped source of transferable knowledge. To leverage the collective lessons from history, we propose CAPE, the first open-source pre-trained model for epidemic forecasting. Unlike existing time series foundation models that overlook epidemiological challenges, CAPE models epidemic dynamics as mixtures of latent population states, termed compartmental prototypes. It discovers a flexible dictionary of compartment prototypes directly from surveillance data, enabling each outbreak to be expressed as a time-varying mixture that links observed infections to latent population states. To promote robust generalization, CAPE combines self-supervised pre-training objectives with lightweight epidemic-aware regularizers that align the learned prototypes with epidemiological semantics. On a comprehensive benchmark spanning 17 diseases and 50+ regions, CAPE significantly outperforms strong baselines in zero-shot, few-shot, and full-shot forecasting. This work represents a principled step toward pre-trained epidemic models that are both transferable and epidemiologically grounded.
