ORIGINAL RESEARCH article

Front. Big Data, 12 November 2025

Sec. Medicine and Public Health

Volume 8 - 2025 | https://doi.org/10.3389/fdata.2025.1666962

Application and comparison of ARIMA, LSTM, and ARIMA-LSTM models for predicting foodborne diseases in Liaoning Province

  • Liaoning Provincial Center for Disease Control and Prevent, Shenyang, Liaoning, China

Abstract

Objective:

To compare the application of the ARIMA model, the Long Short-Term Memory (LSTM) model and the ARIMA-LSTM model in forecasting foodborne disease incidence.

Methods:

Monthly case data of foodborne diseases in Liaoning Province from January 2015 to December 2023 were used to construct ARIMA, LSTM, and ARIMA-LSTM models. These three models were then applied to forecast the monthly incidence of foodborne diseases in 2024, and their predictions were compared with those of a baseline model. Model performance was evaluated by comparing the predicted and observed values using root mean square error (RMSE), mean absolute error (MAE), and mean absolute percentage error (MAPE), allowing identification of the optimal model. The best-performing model was subsequently employed to predict the monthly incidence for 2025.

Results:

The ARIMA-LSTM model was identified as the optimal model. Specifically, the ARIMA (2,0,0) (0,1,1)12 model produced RMSE = 300.03, MAE = 187.11, and MAPE = 16.38%, while the LSTM model yielded RMSE = 408.71, MAE = 226.03, and MAPE = 17.21%. In contrast, the ARIMA-LSTM model achieved RMSE = 0.44, MAE = 0.44, and MAPE = 0.08%, representing a dramatic improvement over the baseline model (RMSE = 204.17, MAE = 146.75, MAPE = 15.62%), with reductions of 99.5%, 99.7%, and 99.4% in RMSE, MAE, and MAPE, respectively. Based on the ARIMA–LSTM model, the predicted monthly cases of foodborne diseases for 2025 are: 214.62 (Jan), 260.84 (Feb), 462.92 (Mar), 590.92 (Apr), 800.88 (May), 965.11 (Jun), 2410.36 (Jul), 2651.36 (Aug), 1711.15 (Sep), 941.22 (Oct), 628.21 (Nov), and 465.05 (Dec).

Conclusion:

The ARIMA-LSTM model is considered the optimal model for predicting foodborne disease incidence in Liaoning Province in 2025.

1 Introduction

Foodborne diseases represent one of the most critical global public health challenges, significantly impacting human health and quality of life (). According to World Health Organization (WHO) data, millions of people worldwide fall ill or die annually due to foodborne illnesses. In 2015, the WHO released its first global estimates of foodborne disease burden, revealing that nearly 1 in 10 people globally suffer from illnesses caused by contaminated food each year, resulting in 420,000 deaths and the loss of 33 million healthy life-years (DALYs) ().

Foodborne diseases exhibit notable seasonal patterns (). Therefore, developing predictive models based on historical incidence data can provide valuable support for the prevention and control of foodborne diseases. The ARIMA model is a commonly used method in infectious disease forecasting and is particularly well-suited for seasonal data. However, foodborne disease incidence is also influenced by factors such as geography, climate, and socioeconomic conditions, leading to nonlinear trends (; ). The LSTM model, with its capacity for nonlinear fitting and its ability to capture temporal patterns in data, may improve forecasting accuracy (). The ARIMA model performs well in capturing linear trends and seasonality (); however, it assumes that the data-generating process is primarily linear, making it difficult to model complex nonlinear dynamics (). In recent years, Long Short-Term Memory (LSTM) networks have demonstrated strong capabilities in time series forecasting, particularly in handling long-term dependencies and nonlinear features (). Nevertheless, using LSTM alone also has limitations, such as requiring a relatively large amount of training data and being less efficient in modeling linear components (). To overcome the shortcomings of individual models, researchers have proposed the ARIMA–LSTM hybrid model ().

In this study, we constructed ARIMA, LSTM, and ARIMA-LSTM hybrid models using foodborne disease data from 2015 to 2023. These three models were employed to predict the monthly number of foodborne disease cases in 2024, and the predictions were compared with the actual reported cases as well as with a baseline model to identify the most accurate model. Finally, the optimal model was applied to forecast the number of cases in 2025, providing a scientific basis for the development of prevention and control strategies for foodborne diseases in Liaoning Province.

2 Materials and methods

2.1 Data sources

Monthly case counts of foodborne diseases from January 2015 to December 2024 were extracted from the Liaoning Provincial Foodborne Disease Risk Surveillance System. The dataset from January 2015 to December 2023 served as the training set, while the data from 2024 were used as the validation set for model evaluation.

2.2 Research methods

2.2.1 ARIMA model

The construction process of the ARIMA model is shown in Figure 1.

Figure 1

The autoregressive integrated moving average (ARIMA) model is a linear, univariate time series model that combines three components: autoregression (AR), differencing (I), and moving average (MA) (). Its general form can be expressed as:

Where yt denotes the observed value at time t, B is the backward shift operator (Byt = yt−1), and d represents the order of differencing required to achieve stationarity. The autoregressive component is defined as φ(B)=1–φ1B–φ2...B2-...–φpBp, while the moving average component is defined as θ(B)=11B2B2+...+θqBq. The error term εt represents white noise.

In practice, the differencing operator (1–B)d is applied to remove non-stationarity in the series. The AR part captures the dependence of the current observation on its past values, whereas the MA part accounts for the dependency on past forecast errors. By integrating these three components, ARIMA provides a flexible yet interpretable framework for modeling and forecasting time series data.

Considering the seasonal characteristics of foodborne diseases, the model structure was specified as ARIMA (p,d,q) (P, D, Q)s, where:

  • p and q represent the orders of non-seasonal autoregression and moving average, respectively;

  • d denotes the degree of non-seasonal differencing;

  • P and Q indicate the seasonal autoregressive and moving average orders;

  • D stands for seasonal differencing;

  • s corresponds to the seasonal period length.

2.2.1.1 Series stationarization

Prior to modeling, the time series must be tested for stationarity using the ADF test. For non-stationary series, appropriate transformations (e.g., Box-Cox transformations, seasonal differencing) are applied until stationarity is confirmed via repeated testing.

2.2.1.2 Model identification

The autocorrelation function (ACF) and partial autocorrelation function (PACF) plots are examined to determine the preliminary model structure. Based on the ACF and PACF patterns, initial parameters are identified (typically with orders not exceeding 2) (). The Akaike Information Criterion (AIC) and Bayesian Information Criterion (BIC) are then computed, and the model with the lowest AIC and BIC values is selected as the optimal model.

2.2.1.3 Model diagnostics

Residual diagnostics were conducted using the Ljung-Box test for white noise. The non-significant test result (P > 0.05) confirms the residuals are uncorrelated, validating the model's suitability for predictions.

2.2.1.4 Model forecasting

The final selected optimal model was employed for prediction. The goodness-of-fit between the actual and predicted values across the entire series was evaluated using the RMSE, MAE, MAPE.

2.2.2 LSTM model

The Long Short-Term Memory (LSTM) model is a specialized type of recurrent neural network (RNN) that incorporates memory cells along with three gating mechanisms—namely, the input gate, forget gate, and output gate (). These gates regulate the flow of information and enable the model to selectively retain or discard information, thereby effectively addressing the issues of vanishing and exploding gradients commonly encountered in modeling long time series with traditional RNNs ().

Prior to model construction, all time series data were normalized to the range [0, 1] using the Min–Max scaling method to ensure numerical stability during training. Input sequences were generated with a fixed time window, where the values from the preceding N time steps were used to predict the next observation. The dataset was divided into a training set and a validation set to assess model performance (Figure 2).

Figure 2

The long short-term memory (LSTM) network was implemented with the following architecture and configurations:

Hidden units: determining the model's capacity to capture temporal dependencies.

Number of LSTM layers: to balance model complexity and computational efficiency.

Dropout rate: a dropout rate of 0.2 was applied to mitigate overfitting.

Activation functions: tanh and sigmoid, as defined by the standard LSTM architecture.

Optimizer: Adam with a learning rate of 0.001.

Loss function: mean squared error (MSE), suitable for continuous-valued predictions.

Batch size: defined the number of samples.

Epochs: with an early stopping criterion to prevent overfitting, and early stopping strategy was employed based on the validation loss with a patience of 10 epochs.

2.2.3 ARIMA-LSTM model

The following is a simplified flowchart for constructing the ARIMA–LSTM model (Figure 3).

Figure 3

First, the collected data were organized and preprocessed. An ARIMA model was then constructed using the processed data to generate forecasts, which were compared with the observed values to obtain the residuals. The residuals were subsequently modeled with an LSTM network to capture their nonlinear characteristics, producing forecasts of the residual component. Finally, the predictions from the ARIMA model and the LSTM residual forecasts were combined to obtain the predictions of the hybrid model.

2.2.4 Baseline model

Since foodborne diseases exhibit seasonality, the Seasonal Naïve method can be used as a baseline model. This approach is a simple yet commonly applied time series forecasting method for data with seasonal patterns, where the forecast value is set equal to the observation from the same point in the previous season.

ŷt = yts

Here, s is the length of the seasonal period, ŷt is the forecasted value, yts and is the observed value from the same month in the previous year or the same quarter in the previous season.

2.2.5 Model evaluation metrics

In this study, model performance in terms of fitting and forecasting was assessed using RMSE, MAE, MAPE value of less than 10% indicates excellent predictive performance, values between 10% and 20% indicate good performance, and values below 40% are considered acceptable.

2.2.6 Statistical methods

Data were organized using Excel 2019. The ARIMA model was constructed using R 4.4.2 software, while the LSTM model and the ARIMA-LSTM model were developed using Python 3.13. A significance level of α = 0.05 was adopted, and P-values less than 0.05 were considered statistically significant.

3 Results

3.1 ARIMA model construction

3.1.1 Time series stationarity

The stationarity of the raw time series data (Figure 4) was examined through the Augmented Dickey-Fuller test (ADF). A statistically significant p-value (P = 0.01 < 0.05) suggested the rejection of the null hypothesis, demonstrating that the data followed a stationary time series pattern; therefore, d = 0.

Figure 4

3.1.2 Model identification and order determination

Seasonality was removed by applying seasonal differencing identified through nsdiffs() function, resulting in D = 1. Following the principle of model parsimony and practical experience, the orders of p, q, P, and Q were generally limited to no more than 2. Examination of the ACF and PACF plots (Figure 5), together with parameter optimization using the auto.arima function from the R forecast package and consideration of AIC/BIC minimization criteria, led to the selection of ARIMA (2,0,0) (0,1,1)12 as the optimal model (AICc = 1,548.26).

Figure 5

3.1.3 Model diagnostics

The Box-Ljung test for white noise produced a p-value of 0.9696 (P > 0.05), confirming that the model residuals exhibit white noise behavior, suggesting all extractable information from the time series has been captured. The autocorrelation (ACF) and partial autocorrelation (PACF) plots of the residual series (Figure 6) show that nearly all residuals fall within the 95% confidence intervals, demonstrating the model's adequacy for forecasting.

Figure 6

3.1.4 Model fitting

The monthly incidence of foodborne diseases from 2015 to 2023 was fitted using a seasonal ARIMA (2,0,0) (0,1,1)12 model. The fitted values exhibited strong agreement with the observed data trends (Figure 7). The model was then applied to forecast case numbers for January to December 2024 (Table 1).

Figure 7

Table 1

TimePredicted valuesActual values95% LCL95% UCL
Jan231.81277−1,217.181,680.80
Feb274.95182−1,901.102,451.00
Mar470.81421−2,061.323,002.94
Apr594.76593−2,080.543,270.06
May802.44845−1,919.013,523.89
Jun965.571,281−1,767.053,698.19
Jul2,410.422,848−323.885,144.72
Aug2,651.363,484−83.005,385.73
Sept1,711.241,739−1,023.164,445.64
Oct841.421,108−1,793.073,675.92
Nov628.51683−2,106.063,363.08
Dec465.42544−2,269.193,200.02

Comparison between predicted and observed monthly incidence of foodborne diseases in 2024 (case).

LCL, Lower confidence limit; UCL, Upper confidence limit.

3.2 LSTM model development

An LSTM model was constructed using data from 2015 to 2023 as the training set and data from 2024 as the validation set. The data were normalized to a range between 0 and 1 prior to model construction. Given the seasonal characteristics of the dataset, a time step of 12 was selected as optimal. For a comprehensive consideration of avoiding overfitting, maintaining computational efficiency, and ensuring interpretability, the LSTM model consists of two layers: an LSTM layer and a Dense layer, and each with 50 hidden units. The Adam optimizer was employed, with mean squared error (MSE) used as the loss function. The Adam optimizer was selected due to its adaptive learning rate mechanism, fast convergence, and robustness, which make it a widely adopted and effective choice for time series prediction tasks. The batch size was set to 12. The model was trained for 200 epochs. After training, both the fitted and predicted values were denormalized (Figure 8). Based on this model, monthly case numbers for 2024 were forecasted and compared with the observed values (Table 2).

Figure 8

Table 2

TimePredicted valuesActual values
Jan300.35227
Feb258.13182
Mar323.40421
Apr520.96593
May896.40845
Jun1,470.411,281
Jul2,129.492,848
Aug2,302.453,484
Sept1,765.141,739
Oct1,168.871,108
Nov718.35683
Dec445.62544

Comparison between predicted and actual values for 2024 (case).

3.3 ARIMA-LSTM model construction

Since the ARIMA forecasts had already been obtained, the corresponding residuals were calculated and used to build an LSTM model. Residuals from 2015 to 2023 were used for training, and those from 2024 for validation. To reduce overfitting while maintaining efficiency, the model included one LSTM layer and one Dense layer, with 64 hidden units. A time step of 12 was selected to account for the seasonal pattern in the residuals. The tanh activation function, default in LSTM and suitable for nonlinear time series, was applied, while the Adam optimizer was chosen for its adaptive and efficient learning. Given the relatively small dataset (120 observations), a batch size of 8 and 100 epochs were used. The residual predictions were then combined with the ARIMA forecasts to generate the final results, which showed close agreement with the observed values (Figure 9). The specific forecasted values for 2024 are shown in Table 3.

Figure 9

Table 3

TimePredicted valuesActual values
Jan276.56277
Feb181.56182
Mar420.56421
Apr592.56593
May844.56845
Jun1,280.551,281
Jul2,847.562,848
Aug3,834.563,484
Sept1,738.561,739
Oct1,107.561,108
Nov682.56683
Dec543.56544

Comparison between the ARIMA–LSTM model forecasts and the actual values for 2024 (case).

3.4 Baseline model development

Because foodborne diseases exhibit seasonal periodicity, the parameter was set to s = 12, and the baseline model forecasts (ŷt)for 2024 are equal to the actual values of 2023.

3.5 Comparison of forecasting performance between the four models

The predicted values of the four models for 2024 were compared with the actual observations, and model performance was evaluated using RMSE, MAE, and MAPE (Figure 10). The results showed that the ARIMA-LSTM hybrid model achieved the best agreement with the observed data and had the lowest error metrics (Table 4). Compared with the baseline model, RMSE, MAE, and MAPE were reduced by 99.5%, 99.7%, and 99.4%, respectively. Therefore, the ARIMA-LSTM model was identified as the optimal predictive model in this study.

Figure 10

Table 4

Model/evaluation metricsRMSEMAEMAPE
Baseline204.17146.7515.62%
ARIMA300.0303187.110816.38%
LSTM408.71226.0317.21%
ARIMA-LSTM0.440.440.08%

Validation performance comparison between the four models.

RMSE, Root mean square error; MAE, Mean absolute error; MAPE, Mean absolute percentage error.

3.6 Forecasting with the optimal model

The ARIMA-LSTM model was employed to forecast the monthly number of foodborne disease cases in Liaoning Province for the year 2025 (Table 5). And compared to the case numbers in 2024, a slight decline is observed.

Table 5

TimePredicted values
Jan214.62
Feb260.84
Mar462.92
Apr590.92
May800.88
Jun965.11
Jul2,410.36
Aug2,651.36
Sept1,711.15
Oct941.22
Nov628.21
Dec465.05

Predicted monthly incidence of foodborne diseases in 2025 (case).

4 Discussion

As one of the most critical global public health challenges, foodborne diseases present extensive coverage, multifactorial influences, and significant management difficulties (). To mitigate their occurrence, comprehensive control measures targeting various influencing factors are essential, along with timely prediction of disease trends to provide evidence-based support for prevention strategies.

The ARIMA model, a classical approach in time series analysis, has been widely applied to short-term forecasting of infectious diseases. In recent years, its application has extended to predicting foodborne diseases (; ; ). For instance, developed an ARIMA product model to forecast monthly incidence trends of foodborne illnesses. Similarly, employed SARIMA, Holt-Winters, and exponential models to predict the incidence of foodborne diseases in Nan'an District, Chongqing.

With the continuous advancement of technologies such as computer science and big data, LSTM models have been increasingly applied in the medical field. For example, developed LSTM neural network, SARIMA, and Holt-Winters models to forecast the incidence trend of hepatitis B (). employed a two-stage TSA-LATM model to predict the incidence and mortality rates of cancer. proposed a combined ARIMA-EEMD-LSTM approach for forecasting the incidence of hand, foot, and mouth disease.

The ARIMA-LSTM hybrid model integrates the strengths of both ARIMA and LSTM approaches, making it particularly suitable for capturing complex temporal dynamics. Owing to its enhanced predictive capability, this model has been increasingly applied in the medical and epidemiological domains. For instance, utilized the ARIMA-LSTM framework to analyze and forecast the trajectory of COVID-19, while Liu et al. applied it to predict the hand, foot, and mouth disease incidence in Taiwan ().

In this study, ARIMA, LSTM, and ARIMA-LSTM hybrid models were developed using data from 2015 to 2023, with 2024 data serving as the validation set. While all three models captured the overall trends in 2024, the ARIMA-LSTM model achieved the closest agreement with the observed values, confirming its superiority in predictive performance. However, this model is not without limitations. Although the hybrid structure allows ARIMA and LSTM to complement each other, it does not account for external determinants of foodborne diseases, such as meteorological conditions, geographic distribution, and lifestyle factors, which may contribute to residual prediction errors (). Future research could therefore enhance the ARIMA-LSTM framework by integrating relevant external variables and fine-tuning the LSTM component to dynamically adapt to variations in the data, thereby improving both accuracy and robustness of predictions.

By examining the incidence patterns from 2015 to 2024 and the predicted cases for 2025, it was observed that foodborne diseases usually peak in summer (July–September). Therefore, during this period, stricter food management and safety inspections in the catering sector are essential. For example, leftovers should be refrigerated promptly, reheated thoroughly before consumption, raw and cooked foods should be stored separately, and untreated water should be avoided. Public health authorities could also issue early warnings and strengthen education campaigns before the summer season. Since older adults and children have weaker immune systems and higher susceptibility, it would be beneficial to enhance food safety training in schools and nursing institutions and to develop dietary guidance tailored for these vulnerable groups. Although external variables were not included in this study, future work could incorporate meteorological, population mobility, and food monitoring data through collaboration with relevant agencies to enhance the model's interpretability and generalizability.

In conclusion, the ARIMA-LSTM model outperformed the ARIMA model and LSTM model in forecasting the incidence of foodborne diseases in Liaoning Province, effectively capturing the trend and providing a valuable reference for developing prevention and control strategies.

Statements

Data availability statement

The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding authors.

Ethics statement

The manuscript presents research on animals that do not require ethical approval for their study.

Author contributions

XD: Software, Formal analysis, Writing – original draft, Methodology. HY: Data curation, Validation, Writing – original draft. HZ: Data curation, Investigation, Writing – original draft. XL: Writing – original draft, Visualization. XY: Writing – original draft, Data curation, Visualization. TX: Supervision, Writing – review & editing, Methodology. WD: Resources, Funding acquisition, Writing – review & editing.

Funding

The author(s) declare that financial support was received for the research and/or publication of this article. This study was supported by funding from the Key Research and Development Program of Liaoning Province (2024JH2/102500073).

Acknowledgments

We are very grateful to the Foodborne Disease Surveillance Center of Liaoning Province for providing data support and to the Department of Science and Technology of Liaoning Province for financial support.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Generative AI statement

The author(s) declare that no Gen AI was used in the creation of this manuscript.

Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.

References

Summary

Keywords

foodborne, ARIMA model, LSTM model, ARIMA-LSTM model, predicting

Citation

Du X, Yu H, Zhang H, Liu X, Yu X, Xie T and Diao W (2025) Application and comparison of ARIMA, LSTM, and ARIMA-LSTM models for predicting foodborne diseases in Liaoning Province. Front. Big Data 8:1666962. doi: 10.3389/fdata.2025.1666962

Received

18 July 2025

Accepted

23 October 2025

Published

12 November 2025

Volume

8 - 2025

Edited by

Rashid Amin, University of Chakwal, Pakistan

Reviewed by

Deepika Koundal, University of Eastern Finland, Finland

Adeel Ahmed, The University of Haripur, Pakistan

Updates

Copyright

*Correspondence: Tao Xie, ; Wenli Diao,

Disclaimer

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.

Outline

Figures

Cite article

Copy to clipboard


Export citation file


Share article

Article metrics