Symptom-based diagnostic models for common respiratory viral infections: a machine learning and natural language
Mingqing Xie1, Suyi Zhang2, Jianyong Shen3
1Department of Biostatistics, School of Public Health, Fudan University, Shanghai, China.
Infectious Disease Modelling
|May 25, 2026
Summary
This study developed an efficient diagnostic tool using natural language processing and machine learning to identify respiratory viruses like SARS-CoV-2 and influenza based on symptoms, offering a cost-effective alternative to PCR testing.
Area of Science:
- Medical Informatics
- Computational Biology
- Epidemiology
Background:
- Accurate and timely diagnosis of respiratory viruses is crucial for effective treatment and public health management.
- Traditional diagnostic methods like PCR can be resource-intensive and have limitations in rapid deployment.
- Developing cost-effective and efficient diagnostic strategies is essential for widespread application.
Purpose of the Study:
- To develop and validate an efficient, cost-saving diagnostic approach for common respiratory viruses using natural language processing (NLP) and explainable machine learning (ML).
- To identify SARS-CoV-2, influenza, respiratory syncytial virus (RSV), and adenovirus based on clinical symptoms extracted from electronic health records.
- To assess the model's interpretability and robustness across different patient demographics.
Main Methods:
- Utilized NLP to extract and normalize symptom features from unstructured clinical text of 11,863 Influenza-like illness cases.
- Evaluated five ML algorithms based on AUC, accuracy, sensitivity, and specificity to select the optimal model.
- Performed subgroup analyses and calculated SHAP values for model interpretability and robustness assessment.
Main Results:
- The developed ML model demonstrated high diagnostic performance, with AUCs ranging from 0.737 to 0.856 for the four viruses.
- The model showed particularly high accuracy for SARS-CoV-2 (AUC: 0.856) and RSV (AUC: 0.801).
- Excellent discriminative accuracy was observed in pediatric and afebrile patient subgroups.
Conclusions:
- NLP and ML techniques can effectively identify respiratory viruses using only symptom data, presenting a feasible diagnostic alternative.
- This approach offers a low-cost, efficient alternative to PCR testing, potentially reducing reliance on resource-intensive methods.
- The developed model can enhance early detection, support clinical screening, and aid resource allocation in public health settings.

