VLGA: A Chaos-Enhanced Genetic Algorithm for Optimizing Transformer-Based Prediction of Infectious Diseases
Abstract
1. Introduction
2. Materials and Methods
2.1. Materials
2.1.1. Data Sources
2.1.2. Model Parameter Configuration
2.2. Methods
2.2.1. Theory
VMD
- The analytical signal of is obtained through the Hilbert transform, and its one-sided spectrum is calculated. By multiplying it with the operator , the center band of is modulated to the corresponding baseband [35]:
- The square norm of the demodulation gradient is computed, and the bandwidth of each modal component is estimated. The process is represented by the following formula:In this equation, represents the decomposed IMF components, and denotes the center frequencies of each component.To find the optimal solution to the constrained variational problem, we first introduce the Lagrange multiplier and the second-order penalty factor , transforming the constrained variational problem into an unconstrained one. The second-order penalty factor ensures the accuracy of signal reconstruction in a Gaussian noise environment. The Lagrange multipliers help maintain the strictness of the constraint conditions. The extended Lagrangian expression is as follows:
- The Alternating Direction Method of Multipliers (ADMM) is used to continuously update each component and its center frequency, ultimately yielding the saddle point of the unconstrained model, which is the optimal solution to the original problem. All components can be obtained in the frequency domain as follows:In this equation, represents the frequency, while , are the Fourier transforms corresponding to , , , respectively.
- is the residual of after Wiener filtering. The algorithm re-estimates the centroid frequency based on the power spectral centroid of each component, and the specific process is as follows:(1) Initialize , , and ;(2) Execute cycle: ;(3) When , update ;(4) Update ;(5) Update ;(6) Repeat steps (2) to (5) until the iteration stopping criteria are satisfied.
Transformer Model
Genetic Algorithm
- (1)
- Population Initialization: Randomly generate the initial population , where each individual represents a potential solution.Here, each individual represents a solution to the problem, usually a parameter vector.
- (2)
- Fitness Evaluation: For each individual in the population, compute its fitness , where the fitness function is typically defined based on the objective of the problem.
- (3)
- Selection Operation: Select parent individuals based on their fitness values. Common selection methods include roulette wheel selection and tournament selection.
- (4)
- Crossover Operation: Perform crossover on the selected parent individuals to generate offspring individuals. The crossover operation exchanges parts of the genes of two parent individuals to create new solutions:Here, and are parent individuals, and is the offspring individual.
- (5)
- Mutation Operation: Apply mutation to the offspring individuals, randomly altering some of their genes (parameter values):
- (6)
- Termination Condition: If the termination condition is met (e.g., reaching the maximum number of iterations or no significant improvement in fitness), the algorithm terminates and returns the optimal solution.
Lorenz System
2.2.2. VLGA-Transformer Model
2.2.3. Evaluation Metrics
2.2.4. VLGA Optimization of Transformer Process
- Initialize parameters: Define basic hyperparameters, including population size, number of generations for the genetic algorithm, crossover rate, and mutation rate. The population size is set to 20, the number of generations to 10, the crossover rate to 0.1, and the mutation rate to 0.8.
- Population Initialization: In the application of genetic algorithms, population initialization is one of the key factors influencing search performance. In this study, each individual is considered a solution, with the genes of each individual containing two hyperparameters: the number of neurons in the fully connected layer and the dropout rate in the Transformer model. Chaotic systems are highly sensitive and irregular, where small changes in initial conditions can lead to completely different outcomes. To enhance population diversity and exploration ability, we choose to use the Lorenz attractor for population initialization. The chaotic nature of the Lorenz attractor generates more complex and diverse initial parameters, performing a global search through intricate, nonlinear trajectories, thereby improving global optimization and helping the genetic algorithm escape from local optima.
- Fitness function: The fitness function is a key component of the genetic algorithm and is typically used to assess individuals based on their performance. We use the Mean Squared Error (MSE) of the trained Transformer model as the fitness measure.
- Selection operation: The selection operation is based on the results of the fitness function, meaning individuals with higher fitness are selected for reproduction. Tournament Selection is used to choose individuals with higher fitness.
- Crossover operation: The crossover operation combines the genetic information of two individuals to generate new offspring. A single-point crossover is applied in this study.
- Mutation operation: The mutation operation randomly alters the value of a hyperparameter to increase the diversity of the population. Gaussian Mutation is used to adjust the genes of individuals.
- Evaluate the fitness of the current population.
- Select high-fitness individuals based on the evaluation.
- Perform crossover to generate the next generation.
- Apply mutation to the new generation of individuals.
- Iterate until the predetermined number of generations is reached.
3. Results
3.1. VMD Decomposition of PTB Sequence
3.2. Experimental Results
4. Discussion
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Günther, G.; Guglielmetti, L.; Leu, C.; Lange, C.; van Leth, F.; Tuberculosis Network European Trials group. Availability and costs of medicines for the treatment of tuberculosis in Europe. Clin. Microbiol. Infect. 2023, 29, 77–84. [Google Scholar] [CrossRef] [PubMed]
- Churchyard, G.; Kim, P.; Shah, N.S.; Rustomjee, R.; Gandhi, N.; Mathema, B.; Dowdy, D.; Kasmar, A.; Cardenas, V. What We Know About Tuberculosis Transmission: An Overview. J. Infect. Dis. 2017, 216 (Suppl. 6), S629–S635. [Google Scholar] [CrossRef] [PubMed]
- Rouillon, A.; Perdrizet, S.; Parrot, R. Transmission of tubercle bacilli: The effects of chemotherapy. Tubercle 1976, 57, 275–299. [Google Scholar] [CrossRef] [PubMed]
- Menzies, N.A.; Quaife, M.; Allwood, B.W.; Byrne, A.L.; Coussens, A.K.; Harries, A.D.; Marx, F.M.; Meghji, J.; Pedrazzoli, D.; Salomon, J.A.; et al. Lifetime burden of disease due to incident tuberculosis: A global reappraisal including post-tuberculosis sequelae. Lancet Glob. Health 2022, 10, e336. [Google Scholar] [CrossRef]
- Oubbéa, S.; Pilmis, B.; Seytre, D.; Lomont, A.; Billard-Pomares, T.; Zahar, J.-R.; Foucault-Fruchard, L. Risk factors for non-isolation of patients admitted for pulmonary tuberculosis in a high-incidence département: A single-center retrospective study. J. Hosp. Infect. 2024, 155, 130–134. [Google Scholar] [CrossRef]
- Dartois, V.A.; Rubin, E.J. Anti-tuberculosis treatment strategies and drug development: Challenges and priorities. Nat. Rev. Microbiol. 2022, 20, 685–701. [Google Scholar] [CrossRef]
- Kim, C.J.; Kim, Y.; Bae, J.Y.; Kim, A.; Kim, J.; Son, H.; Choi, H. Risk factors of delayed isolation of patients with pulmonary tuberculosis. Clin. Microbiol. Infect. 2020, 26, 1058–1062. [Google Scholar] [CrossRef]
- Nam, B.D.; Hwang, J.H.; Park, S.Y.; Kim, T.H.; Oh, E.; Lee, E.J. Delayed Isolation of Active Pulmonary Tuberculosis in Hospitalized Patients: A Pivotal Role of Radiologic Evaluation. AJR Am. J. Roentgenol. 2020, 215, 359–366. [Google Scholar] [CrossRef]
- Chakaya, J.; Petersen, E.; Nantanda, R.; Mungai, B.N.; Migliori, G.B.; Amanullah, F.; Lungu, P.; Ntoumi, F.; Kumarasamy, N.; Maeurer, M.; et al. The WHO Global Tuberculosis 2021 Report—Not so good news and turning the tide back to End TB. Int. J. Infect. Dis. 2022, 124 (Suppl. 1), S26–S29. [Google Scholar] [CrossRef]
- Petersen, E.; Al-Abri, S.; Chakaya, J.; Goletti, D.; Parolina, L.; Wejse, C.; Mucheleng’ANga, L.A.; Al Khalili, S.; Yeboah-Manu, D.; Chanda-Kapata, P.; et al. World TB Day 2022: Revamping and Reshaping Global TB Control Programs by Advancing Lessons learnt from the COVID-19 pandemic. Int. J. Infect. Dis. 2022, 124 (Suppl. 1), S1–S3. [Google Scholar] [CrossRef]
- Dale, K.D.; Trauer, J.M.; Dodd, P.J.; Houben, R.M.G.J.; Denholm, J.T. Estimating the prevalence of latent tuberculosis in a low-incidence setting: Australia. Eur. Respir. J. 2018, 52, 1801218. [Google Scholar] [CrossRef]
- Hamdar, H.; Nahle, A.A.; Ataya, J.; Jawad, A.; Salame, H.; Jaber, R.; Kassir, M.; Wannous, H. Comparative analysis of pediatric pulmonary and extrapulmonary tuberculosis: A single-center retrospective cohort study in Syria. Heliyon 2024, 10, e36779. [Google Scholar] [CrossRef] [PubMed]
- Bagcchi, S. WHO’s Global Tuberculosis Report 2022. Lancet Microbe 2023, 4, e20. [Google Scholar] [CrossRef]
- Liu, Q.; Jing, W.; Liu, M.; Liu, J. Health disparity and mortality trends of infectious diseases in BRICS from 1990 to 2019. J. Glob. Health 2022, 12, 04028. [Google Scholar] [CrossRef] [PubMed]
- Litvinjenko, S.; Magwood, O.; Wu, S.; Wei, X. Burden of tuberculosis among vulnerable populations worldwide: An overview of systematic reviews. Lancet Infect. Dis. 2023, 23, 1395–1407. [Google Scholar] [CrossRef]
- Michaud, C.M. Global Burden of Infectious Diseases. Encycl. Microbiol. 2009, 444–454. [Google Scholar] [CrossRef] [PubMed Central]
- Raviglione, M.; Sulis, G. Tuberculosis 2015: Burden, Challenges and Strategy for Control and Elimination. Infect. Dis. Rep. 2016, 8, 6570. [Google Scholar] [CrossRef]
- Liu, J.; Ong, G.P.; Pang, V.J. Modelling effectiveness of COVID-19 pandemic control policies using an Area-based SEIR model with consideration of infection during interzonal travel. Transp. Res. Part A Policy Pract. 2022, 161, 25–47. [Google Scholar] [CrossRef]
- Franco, N. COVID-19 Belgium: Extended SEIR-QD model with nursing homes and long-term scenarios-based forecasts. Epidemics 2021, 37, 100490. [Google Scholar] [CrossRef] [PubMed]
- Tsang, T.K.; Du, Q.; Cowling, B.J.; Viboud, C. An adaptive weight ensemble approach to forecast influenza activity in an irregular seasonality context. Nat. Commun. 2024, 15, 8625. [Google Scholar] [CrossRef]
- Kanesamoorthy, K.; Dissanayake, M.B. Prediction of treatment failure of tuberculosis using support vector machine with genetic algorithm. Int. J. Mycobacteriol. 2021, 10, 279–284. [Google Scholar] [CrossRef] [PubMed]
- Hladish, T.J.; Pillai, A.N.; Pearson, C.A.B.; Ben Toh, K.; Tamayo, A.C.; Stoltzfus, A.; Longini, I.M. Evaluating targeted COVID-19 vaccination strategies with agent-based modeling. medRxiv 2023. medRxiv:2023.03.09.23285319. [Google Scholar] [CrossRef]
- Klein, B.; Zenteno, A.C.; Joseph, D.; Zahedi, M.; Hu, M.; Copenhaver, M.S.; Kraemer, M.U.G.; Chinazzi, M.; Klompas, M.; Vespignani, A.; et al. Forecasting hospital-level COVID-19 admissions using real-time mobility data. Commun. Med. 2023, 3, 25. [Google Scholar] [CrossRef] [PubMed]
- Chae, S.; Kwon, S.; Lee, D. Predicting Infectious Disease Using Deep Learning and Big Data. Int. J. Environ. Res. Public Health 2018, 15, 1596. [Google Scholar] [CrossRef]
- Wan, Y.; Song, P.; Liu, J.; Xu, X.; Lei, X. A hybrid model for hand-foot-mouth disease prediction based on ARIMA-EEMD-LSTM. BMC Infect. Dis. 2023, 23, 879. [Google Scholar] [CrossRef]
- Miller, A.C.; Singh, I.; Koehler, E.; Polgreen, P.M. A Smartphone-Driven Thermometer Application for Real-time Population- and Individual-Level Influenza Surveillance. Clin. Infect. Dis. 2018, 67, 388–397. [Google Scholar] [CrossRef]
- Caminade, C.; McIntyre, K.M.; Jones, A.E. Impact of recent and future climate change on vector-borne diseases. Ann. N. Y. Acad. Sci. 2019, 1436, 157–173. [Google Scholar] [CrossRef]
- Lin, M.; Chen, H.; Song, H. Progress in researches on internet big data-based infectious disease prediction and early warning. Chin. J. Public Health 2021, 37, 1478–1482. [Google Scholar] [CrossRef]
- Gao, S.; Xu, P.; Chen, Z.; Cheng, C. A short-term calgorithm based on improved LSTM neural network. South. Energy Constr. 2024, 11, 112–121. [Google Scholar] [CrossRef]
- Ghaderzadeh, M.; Garavand, A.; Salehnasab, C. Artificial intelligence in polycystic ovary syndrome: A systematic review of diagnostic and predictive applications. BMC Med. Inform. Decis. Mak. 2025, 25, 427. [Google Scholar] [CrossRef]
- Benabbou, T.; Sahel, A.; Badri, A.; Mourabit, I.E. Enhancing cancer diagnostics through a novel deep learning-based semantic segmentation algorithm: A low-cost, high-speed, and accurate approach. Comput. Biol. Med. 2025, 195, 110617. [Google Scholar] [CrossRef] [PubMed]
- Dragomiretskiy, K.; Zosso, D. Variational Mode Decomposition. IEEE Trans. Signal Process. 2014, 62, 531–544. [Google Scholar] [CrossRef]
- Hou, S.; Geng, Q.; Huang, Y.; Bian, Z. Rainfall Prediction Model Based on CEEMDAN-VMD-BiLSTM Network. Water Air Soil Pollut. 2024, 235, 482. [Google Scholar] [CrossRef]
- Wang, W.; Tong, M.; Yu, M. Blood Glucose Prediction with VMD and LSTM Optimized by Improved Particle Swarm Optimization. IEEE Access 2020, 8, 217908–217916. [Google Scholar] [CrossRef]
- Liu, H.; Shang, J.; Bi, T.; Li, Y. Feature Analysis and Extraction Method of Power Grid Frequency Signal Based on Measured Data. Autom. Electr. Power Syst. 2023, 47, 135–144. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Neural Inf. Process. Syst. 2017, 30, 5998–6008. [Google Scholar] [CrossRef]
- Xu, Y.; Zhang, Y.; Cui, Y.; Zhou, K.; Yu, G.; Yang, W.; Wang, X.; Li, F.; Guan, X.; Zhang, X.; et al. GA-GBLUP: Leveraging the genetic algorithm to improve the predictability of genomic selection. Brief. Bioinform. 2024, 25, bbae385. [Google Scholar] [CrossRef]
- Olland, J.H. Adaptation in Natural and Artificial Systems; University of Michigan Press: Ann Arbor, MI, USA, 1975. [Google Scholar]
- Lorenz, E.N. Deterministic nonperiodic flow. J. Atmos. Sci. 1963, 20, 130–141. [Google Scholar] [CrossRef]
- Wang, S.; Du, M.; Luo, J.; Hu, P.; Cheng, D. Application of GM(1,1) model and LSTM neural network in predicting the incidence of pulmonary tuberculosis. J. Public Health Prev. Med. 2019, 30, 11–14. Available online: https://med.wanfangdata.com.cn/Paper/Detail?id=PeriodicalPaper_ggwsyyfyx201905003&dbid=WF_QK (accessed on 9 November 2025).
- Yilihamu, Y.; Yuemaier, N.; Wu, D.; Shi, Y.; Zheng, Y.; Zhang, L. Analysis on the incidence trend of pulmonary tuberculosis before and after the COVID-19 in Hotan, Xinjiang, from 2015 to 2021. Acta Univ. Med. Anhui 2024, 59, 678–683. [Google Scholar] [CrossRef]
- Li, S.; Zhang, Y. Application of LSTM and Prophet Models in Predicting the Number of Tuberculosis Cases. Henan Sci. 2020, 38, 173–178. [Google Scholar] [CrossRef]
- Wang, Y.; Gao, C.; Wang, L. Comparison of the effectiveness of five time series models for prediction of pulmonary tuberculosis incidence. China Prev. Med. J. 2022, 34, 1194–1200. [Google Scholar] [CrossRef]







| RMSE | MSE | MAPE | MAE | R-Squared | |
|---|---|---|---|---|---|
| GM (1,1) [40] | 417.73 | 174,501.36 | 13.18 | 341.43 | 0.25 |
| JPR [41] | 401.55 | 161,244.97 | 12.75 | 327.61 | 0.30 |
| LSTM [42] | 352.89 | 124,530.92 | 10.41 | 261.02 | 0.46 |
| Holt-Winters Multiplicative Model [43] | 202.39 | 40,960.84 | 6.20 | 159.99 | 0.82 |
| Holt-Winters Additive Model [43] | 195.25 | 38,124.22 | 5.86 | 153.76 | 0.83 |
| Transformer | 330.67 | 109,347.21 | 9.81 | 248.55 | 0.52 |
| V-Transformer | 183.12 | 33,536.57 | 5.44 | 146.33 | 0.85 |
| VLGA-Transformer | 94.36 | 8903.83 | 2.80 | 75.49 | 0.96 |
| RMSE | MSE | MAPE | MAE | R-Squared | |
|---|---|---|---|---|---|
| Models for HBV | 53.63 | 2876.23 | 3.23 | 42.35 | 0.93 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, G.; Zhang, L.; Zhang, F.; Xu, W. VLGA: A Chaos-Enhanced Genetic Algorithm for Optimizing Transformer-Based Prediction of Infectious Diseases. Mathematics 2025, 13, 3908. https://doi.org/10.3390/math13243908
Li G, Zhang L, Zhang F, Xu W. VLGA: A Chaos-Enhanced Genetic Algorithm for Optimizing Transformer-Based Prediction of Infectious Diseases. Mathematics. 2025; 13(24):3908. https://doi.org/10.3390/math13243908
Chicago/Turabian StyleLi, Guodong, Lu Zhang, Fuxin Zhang, and Wenxia Xu. 2025. "VLGA: A Chaos-Enhanced Genetic Algorithm for Optimizing Transformer-Based Prediction of Infectious Diseases" Mathematics 13, no. 24: 3908. https://doi.org/10.3390/math13243908
APA StyleLi, G., Zhang, L., Zhang, F., & Xu, W. (2025). VLGA: A Chaos-Enhanced Genetic Algorithm for Optimizing Transformer-Based Prediction of Infectious Diseases. Mathematics, 13(24), 3908. https://doi.org/10.3390/math13243908
