Household SARS-CoV-2 secondary transmission risk prediction for Swedish national register data using TabPFN with SHAP-based explainability
Artificial intelligence is increasingly applied to infectious disease surveillance and intervention planning through large-scale health data analysis. One of the challenges in this domain is understanding household transmission risk and identifying factors associated with secondary cases. We perform household SARS-CoV-2 secondary transmission risk prediction using TabPFN, a transformer-based tabular foundation model, on Swedish national register data, and explain the model’s predictions both across the population and for single households. The task is formulated as supervised binary classification using 287 nationwide demographic, socioeconomic, and clinical features for 990,916 individuals in 252,472 households with primary (index) infections. To address the structural context-size limitations of TabPFN, we introduce a bagging ensemble with positive-class oversampling, achieving a ROC-AUC of 0.625 ± 0.002, within the narrow 0.605–0.630 range spanned by five tree-based and linear baselines. TabPFN was selected because it fits new data through in-context learning rather than task-specific gradient-based training, while performing comparably to the baselines. SHAP explanations identify household income, age composition and living area as the most influential single features, illustrated with two example households. As the data cover Sweden’s first pandemic year, before vaccination and major variants, applicability to later phases requires further validation. These findings provide a basis for further investigation of explainable AI approaches for infectious disease risk prediction using large-scale population register data. Code is available at: https://github.com/mingtongdu862-dot/Household-SARS-CoV-2-secondary-case-prediction-with-TabPFN-and-SHAP.
Authors
- Amir Aminifar (ORCID: https://orcid.org/0000-0002-1673-4733)
- Jonas Björk (ORCID: https://orcid.org/0000-0003-1883-2000)
- Atiye Sadat Hashemi (ORCID: https://orcid.org/0000-0001-5191-0424)
- Mingtong Du
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-11-26
- DOI
- https://doi.org/10.1038/s41598-026-81330-2
- Primary Topic
- COVID-19 epidemiological studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00