Abstract
BACKGROUND: Understanding disease transmission through human contact networks is critical for public health decision-making. Traditional epidemic models often assume homogeneous mixing or static contact patterns, misrepresenting real-world infection dynamics. The increasing availability of empirical human mobility data presents an opportunity to overcome these limitations. However, working with temporal network data introduces computational challenges, particularly for large populations. RESULTS: We introduce Replay, a GPU-accelerated framework for efficiently simulating infectious disease spread over temporal contact networks. Replay transforms timestamped empirical contact data into duration-weighted contact graphs and employs sparse matrix operations to account for each exposure event that occurs. By literally “replaying” observed contacts across various scenarios, it enables realistic, data-driven epidemic simulations. This matrix-based approach facilitates large-scale Monte Carlo simulations, executing thousands of parallel runs per second on commodity hardware. Benchmarks demonstrate substantial GPU-based performance gains compared to equivalent CPU-based algorithms. Crucially, Replay responds to localized outbreaks and superspreader events without requiring reparameterization. CONCLUSIONS: Replay offers a practical solution for modeling disease transmission using empirical contact data in an efficient and realistic way. It is especially valuable for public health planning, hospital infection control, and retrospective outbreak analysis.