# Application of the ant colony method for orderly tracking of hyperparameters in models of pandemic disease development

UDC 519.6
Publication date: 31.10.2022
International Journal of Professional Science №9-2022

# Application of the ant colony method for orderly tracking of hyperparameters in models of pandemic disease development

Titov P. Yurii
Esther Luna Colombini
Hanlie Smuts

1. Moscow Aviation Institute (National Research University)
2. Keldysh Institute of Applied Mathematics (Russian Academy of Sciences)
3. Institute of Computing (IC) - University of Campinas, Av. Albert Einstein
4. University of Pretoria
Abstract: The paper considers the possibility of using the ant colony method to select the optimal parameters for simulation models. To specify a set of parameters, a parametric graph is used, consisting of layers (a separate parameter) and vertices in a layer (a specific parameter value). For this graph, the route will be the choice of one vertex in each layer, i.e. one value for each parameter. Calculation of the optimal route in such a graph is carried out using the ant colony method. The paper proposes to use the ant colony method not for the convergence of the method to a certain solution, but for directed enumeration of various solutions. In this case, after the first finding of the optimal solution, the algorithm continues the search, since the convergence of the algorithm to a local extreme is possible. To take into account the considered solutions, the use of a hash table is proposed. The paper proposes modifications of the algorithm aimed at solving the problem of convergence of the algorithm to one solution and accelerating (on average) the number of solutions considered until the optimal one is obtained. To test the algorithm, the SIRVD model was considered, where the parameters were the coefficients of the differential equations (a problem of low dimension) and the initial state (a problem of high dimension). Optimization was carried out until the parameters of the SIRVD model were obtained, which describe the real data from the Our World in Data aggregator with the least error. In this paper, we studied the influence of the parameters of the ant colony method on the efficiency of the method.
Keywords: Ant colony method, optimization, simulation, CIR

Introduction.

Pandemics in modern history are not uncommon. In 2019, the global health system was tested by the SARS-Covid-19 pandemic. The modern public has reacted with the introduction of a mask regime, the introduction of lock-down, the abrupt opening of quarantine zones and departments of medical centers. Considering the increased cargo and passenger traffic, restrictions bring great difficulties. For medical centers, it is expected that it will be possible to quickly (up to two weeks) create quarantine zones and open additional quarantine departments. These activities involve hiring new staff, purchasing supplies, training and organizing staff and residents (or patients). With this approach, situational management is often used, when the decision to open additional branches is given when the existing ones are filled.

To simplify management decision-making, it is necessary to predict the situation. Existing forecasting systems are usually based on statistical information and use machine learning methods. These systems require a sufficiently large training sample (i.e., the accuracy depends on the time of collection of statistical information and its accuracy).

To describe the process of changing the number of healthy, sick, recovered people, there are systems of differential equations, for example, SIR, SEIR, SIRVD, etc. Where the number of people belonging to the categories is considered: Susceptible, Exposed, Infected, Recovered, Vaccinated, Dead. To tune the system, it is necessary to calculate the weight coefficients of the system of differential equations.

Simulation and analytical models can more accurately describe some of the processes taking place during a pandemic. These models are not based on statistical data, but on the description of the process of changing the state of the system over time. In such models, it is possible to take into account the methods of infection transmission, quarantine rules, various levels of quarantine and methods of testing the population, vaccination processes, transport, logistics processes, and others. The main problem of these systems is the need to check the adequacy of the model. Due to the large number of stochastic factors, a large number of accurate models are inadequate. For simulation and analytical models, the parameters can be varied and be both quantitative and qualitative. Calculation of model parameters, allowing building an adequate model, is a labor-intensive task. The use of expert assessments also requires a thorough check of the processes in the simulation model. But the availability of statistical data allows not only assessing the adequacy of the processes of the functioning of the model, but also the parameters of this model.

At present, it has become possible to transfer many optimization, computational tasks from humans to computers. The user of such a system describes sets of parameters, and the computing system selects the optimal parameters by enumerating them. Most often, enumeration of parameters is carried out by brute force methods, since the computer system solves not an optimization problem, but a calculation one.

The paper proposes to develop software that could rearrange parameter sets so that rational sets are calculated earlier than if they were considered sequentially. The input data of such a system are sets of parameters and, in the process of operation, the values ​​of criteria for a particular set of parameters. Recent results such as [1-4] demonstrate that the problem of optimizing hyperparameters in large and multilayer models is a direct obstacle to scientific progress. There are similar systems, for example, the Bayesian optimizer (IBM Bayesian Optimization Accelerator (BOA)). In world practice, studies of the Bayesian optimizer are widespread [5-13]. IBM has taken an artificial intelligence approach based on Bayesian optimization, which builds and optimizes the model in real time to predict the most «promising» points that are calculated by existing tools. However, BOA-based solutions are expensive, require a separate computing cluster, and use metaheuristics to generate multiple hypotheses. These metaheuristics are commercially closed and are not subject to analysis. These features often become disadvantages of the Bayesian optimizer.

The paper considers the application of the developed modification of the ant colony method for directed enumeration of hyperparameters. The algorithm of the ant colony method, developed for finding the traveling salesman path [14-16], can be easily modified for parametric problems [15-21]. In the presented works, the task of the ant colony method is to find rational solutions, while the majority of ants (agents) must move along the same path. At the same time, modifications that allow ants to find new, non-repeating solutions at each iteration were not considered by the scientific community. This approach is necessary when the task.

Methods and techniques

The operation of the ant colony method requires a graph structure, along the arcs of which agents (ants) move. For parametric optimization, the graph familiar to the traveling salesman problem is, in fact, a set of linked lists [21-29]. Each list defines a set of parameter values ​​and may be referred to as a layer. The algorithm selects one vertex in each layer (i.e. for each parameter), i.e. parameter value. To take into account the already considered vertices, it is supposed to enter the paths of agents in the Hash table. In general terms, the modified ant colony method for directed enumeration of hyperparameters is shown in Figure 1. The block «Calculation of criteria values ​​for a certain set of parameters» is supposed to be performed based on the operation of a simulation or analytical model that takes a vector of parameter values ​​as input, and, as output variables, gives the value of the optimality criteria for the set of parameters. This approach allows testing the operation of the modified ant colony method independently of a complex analytical or simulation model, for example, on a simple simulation model.

#### References

1. Nicolas Pinto, David Doukhan, James J. DiCarlo, and David D. Cox. A high-throughput screening approach to discovering good forms of biologically inspired visual representation. // PLoS Comput Biol, 5(11):e1000579, 11. 2009. https://doi.org/10.1371/journal.pcbi.1000579
2. Coates, A., Ng, A. &amp; Lee, H.. (2011). An Analysis of Single-Layer Networks in Unsupervised Feature Learning. // Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, in Proceedings of Machine Learning Research (Open Access 10.10.2022) https://proceedings.mlr.press/v15/coates11a.html.
A. Coates and A. Y. Ng. The importance of encoding versus training with sparse coding and vector quantization. // ICML'11: Proceedings of the 28th International Conference on International Conference on Machine Learning June 2011 Pages 921–928
3. James Bergstra, Remi Bardenet, Remi Bardenet, Balazs Kegl. Algorithms for Hyper-Parameter Optimization (Open Access 10.10.2022: https://proceedings.neurips.cc/paper/2011/file/86e8f7ab32cfd12577bc2619bc635690-Paper.pdf)
4. Feurer, M., Hutter, F.. Hyperparameter Optimization. In: Hutter, F., Kotthoff, L., Vanschoren, J. (eds) Automated Machine Learning. // The Springer Series on Challenges in Machine Learning. Springer, Cham. 2019. https://doi.org/10.1007/978-3-030-05318-5_1
5. Koehrsen, Will. A conceptual explanation of bayesian hyperparameter optimization for machine learning. 2018. (Open Access 10.10.2022: https://towardsdatascience.com/a-conceptual-explanation-of-bayesian-model-based-hyperparameter-optimization-for-machine-learning-b8172278050f)
6. Bergstra, James S., Rémi Bardenet, Yoshua Bengio, and Balázs Kégl. Algorithms for hyper-parameter optimization. // In Advances in neural information processing systems, pp. 2546-2554. 2011.
7. Akiba, Takuya, Shotaro Sano, Toshihiko Yanase, Takeru Ohta, and Masanori Koyama. Optuna: A next-generation hyperparameter optimization framework. // In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2623-2631. 2019. https://doi.org/10.48550/arXiv.1907.10902
8. https://krasserm.github.io/2018/03/21/bayesian-optimization (Open Access 10.10.2022)
9. https://krasserm.github.io/2018/03/19/gaussian-processes (Open Access 10.10.2022)
10. https://towardsdatascience.com/a-conceptual-explanation-of-bayesian-model-based-hyperparameter-optimization-for-machine-learning-b8172278050f (Open Access 24.08.2022)
11. Ian Dewancker, Michael McCourt, Scott Clark Bayesian Optimization Primer (Open Access 10.10.2022: https://static.sigopt.com/b/20a144d208ef255d3b981ce419667ec25d8412e2/static/pdf/SigOpt_Bayesian_Optimization_Primer.pdf )
12. IBM Bayesian Optimization Accelerator 1.1 helps identify optimal product designs faster with breakthrough performance for scientific discovery and high-performance computing simulation (Open Access 10.10.2022: https://www.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/6/877/ENUSZP20-0186/index.html&request_locale=en)
13. Colorni A., Dorigo M., Maniezzo V. Distributed Optimization by Ant Colonies. // Proc. First Eur. Conf. on Artific. Life, Paris, France, F.Varela and P.Bourgine (Eds.), Elsevier Publishing. pp. 134-142, 1992
14. Dorigo, M., St¨ utzle, T.: Ant Colony Optimization //MIT Press, p. 321, 2004
15. Joseph M. Pasia, Richard F. Hartl, Karl F. Doerner. Solving a Bi-objective Flowshop Scheduling Problem by Pareto-Ant Colony Optimization M. Dorigo et al. (Eds.) // ANTS 2006, LNCS 4150, pp. 294–305, 2006
16. Torry Tufteland(B), Guro Ødesneltvedt(B), and Morten Goodwin Optimizing PolyACO Training with GPU-Based Parallelization M. Dorigo et al. (Eds.) // ANTS 2016, LNCS 9882, pp. 233–240, 2016. DOI: 10.1007/978-3-319-44427-7 20
17. Parpinelli, R., Lopes, H., Freitas, A.: Data mining with an ant colony optimization algorithm // IEEE Trans. Evol. Comput. 6(4), pp. 321–332, 2002
18. Bremer, Jörg and Sebastian Lehnhoff. “Constrained Scheduling of Step-Controlled Buffering Energy Resources with Ant Colony Optimization. // ANTS Conference, 2020.
19. Acevedo J., Maldonado S., Lafuente S., Gomez H., Gil P. Model Selection for Support Vector Machines Using Ant Colony Optimization in an Electronic Nose Application. In: Dorigo M., Gambardella L.M., Birattari M., Martinoli A., Poli R., Stützle T. (eds) // Ant Colony Optimization and Swarm Intelligence. ANTS 2006. Lecture Notes in Computer Science, vol 4150. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11839088_47
20. Sinicyn, I. N., Titov YU.P. Razvitie stohasticheskih algoritmov murav'inoj organizacii // Bionika – 60 let. Itogi i perspektivy. Sbornik statej Pervoj Mezhdunarodnoj nauchno-prakticheskoj konferencii, 17-19 dekabrya 2021 goda, g. Moskva / Pod red. A.P. Karpenko // M.: Associaciya tekhnicheskih universitetov. c. 210-220. 2022. DOI: 10.53677/9785919160496_210_220
21. Parpinelli, R., Lopes, H., Freitas, A.: Data mining with an ant colony optimization algorithm. // IEEE Trans. Evol. Comput. 6(4), pp 321–332, 2002/
22. Junior, I.C.: Data mining with ant colony algorithms. In: Huang, D.-S., Jo, K.- H., Zhou, Y.-Q., Han, K. (eds.) // ICIC 2013. LNCS, vol. 7996, pp. 30–38. Springer, Heidelberg, 2013
23. Martens, D., De Backer, M., Haesen, R., Vanthienen, J., Snoeck, M., Baesens, B.: Classification with ant colony optimization. // IEEE Trans. Evol. Comput. 11(5), pp 651–665, 2007
24. Hahulin G.f. Titov, YU. P. Sistema podderzhki reshenij postavok zapasnyh chastej letatel'nyh apparatov voennogo naznacheniya. // Izvestiya Samarskogo nauchnogo centra Rossijskoj akademii nauk. 2014. T. 16. № 1-5. s. 1619-1623.
25. Titov YU.P., Modifikacii metoda murav'inyh kolonij dlya resheniya zadach razrabotki aviacionnyh marshrutov. // Avtomatika i telemekhanika, 2015, vypusk 3. s. 108–124.
26. Titov, YU. P. Modifikacii metoda murav'inyh kolonij dlya razrabotki programmnogo obespecheniya resheniya zadach mnogokriterial'nogo upravleniya postavkami. // Sovremennye informacionnye tekhnologii i IT-obrazovanie. 2017. T. 13. № 2 s. 64-74. DOI 10.25559/SITITO.2017.2.222.
27. Sudakov V.A., Bat'kovskij A.M., Titov YU.P. Algoritmy uskoreniya raboty modifikacii metoda murav'inyh kolonij dlya poiska racional'nogo naznacheniya sotrudnikov na zadachi s nechetkim vremenem vypolneniya.// Sovremennye informacionnye tekhnologii i IT-obrazovanie. 2020. T. 16. № 2. s. 338-350. doi:10.25559/SITITO.16.202002.338-350
28. Sinicyn, I. N., Titov YU.P. Instrumental'noe programmnoe obespechenie analiza i sinteza stohasticheskih sistem vysokoj dostupnosti (XV) // Sistemy vysokoj dostupnosti. 2021. T. 17. № 4. s. 24-33. DOI 10.18127/j20729472-202104-02. – EDN YEGVMR.
29. Our World in Data. Coronavirus Pandemic (COVID-19). Open Access 10.10.2022 https://ourworldindata.org/coronavirus )
30. Data on COVID-19 (coronavirus) by Our World in Data. (Open Access 10.10.2022 https://github.com/owid/covid-19-data/tree/master/public/data/ )
31. Zhifang Liao, Peng Lan, Xiaoping Fan, Benjamin Kelly, Aidan Innes, Zhining Liao, SIRVD-DL: A COVID-19 deep learning prediction model based on time-dependent SIRVD, Computers in Biology and Medicine, Volume 138, 2021, https://doi.org/10.1016/j.compbiomed.2021.104868.
32. Yuto Omae, Yohei Kakimoto, Makoto Sasaki, Jun Toyotani, Kazuyuki Hara, Yasuhiro Gon, Hirotaka Takahashi. SIRVVD model-based verification of the effect of first and second doses of COVID-19/SARS-CoV-2 vaccination in Japan[J]. Mathematical Biosciences and Engineering, 2022, 19(1): 1026-1040. doi: 10.3934/mbe.2022047