ChatGPT-Assisted Deep Learning Models for Influenza-Like Illness Prediction in Mainland China: Time Series Analysis

Abstract BackgroundInfluenza in mainland China results in a large number of outpatient and emergency visits related to influenza-like illness (ILI) annually. While deep learning models show promise for improving influenza forecasting, their technical complexity remains a barri...

Full description

Saved in:
Bibliographic Details
Main Authors: Weihong Huang, Wudi Wei, Xiaotao He, Baili Zhan, Xiaoting Xie, Meng Zhang, Shiyi Lai, Zongxiang Yuan, Jingzhen Lai, Rongfeng Chen, Junjun Jiang, Li Ye, Hao Liang
Format: Article
Language:English
Published: JMIR Publications 2025-06-01
Series:Journal of Medical Internet Research
Online Access:https://www.jmir.org/2025/1/e74423
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1849709432163794944
author Weihong Huang
Wudi Wei
Xiaotao He
Baili Zhan
Xiaoting Xie
Meng Zhang
Shiyi Lai
Zongxiang Yuan
Jingzhen Lai
Rongfeng Chen
Junjun Jiang
Li Ye
Hao Liang
author_facet Weihong Huang
Wudi Wei
Xiaotao He
Baili Zhan
Xiaoting Xie
Meng Zhang
Shiyi Lai
Zongxiang Yuan
Jingzhen Lai
Rongfeng Chen
Junjun Jiang
Li Ye
Hao Liang
author_sort Weihong Huang
collection DOAJ
description Abstract BackgroundInfluenza in mainland China results in a large number of outpatient and emergency visits related to influenza-like illness (ILI) annually. While deep learning models show promise for improving influenza forecasting, their technical complexity remains a barrier to practical implementation. Large language models, such as ChatGPT, offer the potential to reduce these barriers by supporting automated code generation, debugging, and model optimization. ObjectiveThis study aimed to evaluate the predictive performance of several deep learning models for ILI positive rates in mainland China and to explore the auxiliary role of ChatGPT-assisted development in facilitating model implementation. MethodsILI positivity rate data spanning from 2014 to 2024 were obtained from the Chinese National Influenza Center (CNIC) database. In total, 5 deep learning architectures—long short-term memory (LSTM), neural basis expansion analysis for time series (N-BEATS), transformer, temporal fusion transformer (TFT), and time-series dense encoder (TiDE)—were developed using a ChatGPT-assisted workflow covering code generation, error debugging, and performance optimization. Models were trained on data from 2014 to 2023 and tested on holdout data from 2024 (weeks 1‐39). Performance was evaluated using mean squared error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). ResultsILI trends exhibited clear seasonal patterns with winter peaks and summer troughs, alongside marked fluctuations during the COVID-19 pandemic period (2020‐2022). All 5 deep learning models were successfully constructed, debugged, and optimized with the assistance of ChatGPT. Among the 5 models, TiDE achieved the best predictive performance nationally (MAE=5.551, MSE=43.976, MAPE=72.413%) and in the southern region (MAE=7.554, MSE=89.708, MAPE=74.475%). In the northern region, where forecasting proved more challenging, TiDE still performed best (MAE=4.131, MSE=28.922), although high percentage errors remained (MAPE>400%). N-BEATS demonstrated the second-best performance nationally (MAE=9.423) and showed greater stability in the north (MAE=6.325). In contrast, transformer and TFT consistently underperformed, with national MAE values of 10.613 and 12.538, respectively. TFT exhibited the highest deviation (national MAPE=169.29%). Extreme regional disparities were observed, particularly in northern China, where LSTM and TFT generated MAPE values exceeding 1918%, despite LSTM’s moderate performance in the south (MAE=9.460). ConclusionsDeep learning models, particularly TiDE, demonstrate strong potential for accurate ILI forecasting across diverse regions of China. Furthermore, large language models like ChatGPT can substantially enhance modeling efficiency and accessibility by assisting nontechnical users in model development. These findings support the integration of AI-assisted workflows into epidemic prediction systems as a scalable approach for improving public health preparedness.
format Article
id doaj-art-cac5ef330a604beb9951659ad264e2cc
institution DOAJ
issn 1438-8871
language English
publishDate 2025-06-01
publisher JMIR Publications
record_format Article
series Journal of Medical Internet Research
spelling doaj-art-cac5ef330a604beb9951659ad264e2cc2025-08-20T03:15:18ZengJMIR PublicationsJournal of Medical Internet Research1438-88712025-06-0127e74423e7442310.2196/74423ChatGPT-Assisted Deep Learning Models for Influenza-Like Illness Prediction in Mainland China: Time Series AnalysisWeihong Huanghttp://orcid.org/0009-0006-2511-2772Wudi Weihttp://orcid.org/0000-0001-6703-4529Xiaotao Hehttp://orcid.org/0009-0002-3622-0358Baili Zhanhttp://orcid.org/0009-0007-7639-7824Xiaoting Xiehttp://orcid.org/0009-0002-1259-8575Meng Zhanghttp://orcid.org/0009-0004-4342-9357Shiyi Laihttp://orcid.org/0009-0001-5057-1181Zongxiang Yuanhttp://orcid.org/0009-0000-0398-0268Jingzhen Laihttp://orcid.org/0000-0003-2054-6396Rongfeng Chenhttp://orcid.org/0000-0002-6704-8530Junjun Jianghttp://orcid.org/0000-0003-4905-9348Li Yehttp://orcid.org/0000-0001-7688-4867Hao Lianghttp://orcid.org/0000-0001-7534-5124 Abstract BackgroundInfluenza in mainland China results in a large number of outpatient and emergency visits related to influenza-like illness (ILI) annually. While deep learning models show promise for improving influenza forecasting, their technical complexity remains a barrier to practical implementation. Large language models, such as ChatGPT, offer the potential to reduce these barriers by supporting automated code generation, debugging, and model optimization. ObjectiveThis study aimed to evaluate the predictive performance of several deep learning models for ILI positive rates in mainland China and to explore the auxiliary role of ChatGPT-assisted development in facilitating model implementation. MethodsILI positivity rate data spanning from 2014 to 2024 were obtained from the Chinese National Influenza Center (CNIC) database. In total, 5 deep learning architectures—long short-term memory (LSTM), neural basis expansion analysis for time series (N-BEATS), transformer, temporal fusion transformer (TFT), and time-series dense encoder (TiDE)—were developed using a ChatGPT-assisted workflow covering code generation, error debugging, and performance optimization. Models were trained on data from 2014 to 2023 and tested on holdout data from 2024 (weeks 1‐39). Performance was evaluated using mean squared error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE). ResultsILI trends exhibited clear seasonal patterns with winter peaks and summer troughs, alongside marked fluctuations during the COVID-19 pandemic period (2020‐2022). All 5 deep learning models were successfully constructed, debugged, and optimized with the assistance of ChatGPT. Among the 5 models, TiDE achieved the best predictive performance nationally (MAE=5.551, MSE=43.976, MAPE=72.413%) and in the southern region (MAE=7.554, MSE=89.708, MAPE=74.475%). In the northern region, where forecasting proved more challenging, TiDE still performed best (MAE=4.131, MSE=28.922), although high percentage errors remained (MAPE>400%). N-BEATS demonstrated the second-best performance nationally (MAE=9.423) and showed greater stability in the north (MAE=6.325). In contrast, transformer and TFT consistently underperformed, with national MAE values of 10.613 and 12.538, respectively. TFT exhibited the highest deviation (national MAPE=169.29%). Extreme regional disparities were observed, particularly in northern China, where LSTM and TFT generated MAPE values exceeding 1918%, despite LSTM’s moderate performance in the south (MAE=9.460). ConclusionsDeep learning models, particularly TiDE, demonstrate strong potential for accurate ILI forecasting across diverse regions of China. Furthermore, large language models like ChatGPT can substantially enhance modeling efficiency and accessibility by assisting nontechnical users in model development. These findings support the integration of AI-assisted workflows into epidemic prediction systems as a scalable approach for improving public health preparedness.https://www.jmir.org/2025/1/e74423
spellingShingle Weihong Huang
Wudi Wei
Xiaotao He
Baili Zhan
Xiaoting Xie
Meng Zhang
Shiyi Lai
Zongxiang Yuan
Jingzhen Lai
Rongfeng Chen
Junjun Jiang
Li Ye
Hao Liang
ChatGPT-Assisted Deep Learning Models for Influenza-Like Illness Prediction in Mainland China: Time Series Analysis
Journal of Medical Internet Research
title ChatGPT-Assisted Deep Learning Models for Influenza-Like Illness Prediction in Mainland China: Time Series Analysis
title_full ChatGPT-Assisted Deep Learning Models for Influenza-Like Illness Prediction in Mainland China: Time Series Analysis
title_fullStr ChatGPT-Assisted Deep Learning Models for Influenza-Like Illness Prediction in Mainland China: Time Series Analysis
title_full_unstemmed ChatGPT-Assisted Deep Learning Models for Influenza-Like Illness Prediction in Mainland China: Time Series Analysis
title_short ChatGPT-Assisted Deep Learning Models for Influenza-Like Illness Prediction in Mainland China: Time Series Analysis
title_sort chatgpt assisted deep learning models for influenza like illness prediction in mainland china time series analysis
url https://www.jmir.org/2025/1/e74423
work_keys_str_mv AT weihonghuang chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT wudiwei chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT xiaotaohe chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT bailizhan chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT xiaotingxie chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT mengzhang chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT shiyilai chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT zongxiangyuan chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT jingzhenlai chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT rongfengchen chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT junjunjiang chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT liye chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis
AT haoliang chatgptassisteddeeplearningmodelsforinfluenzalikeillnesspredictioninmainlandchinatimeseriesanalysis