Design of Neural Network-based Computational Methods for Solving the Anthrax Disease Model in Animals

V
Vikash Panthi1
M
R
Ruchi Tripathi1
N
Nikita Kashyap1,*
1Department of Electronics and Communication Engineering, School of Studies of Engineering and Technology, Guru Ghasidas Vishwavidyalaya, Bilaspur-495 009, Chhattisgarh, India.
2Department of Electrical Engineering, School of Studies of Engineering and Technology, Guru Ghasidas Vishwavidyalaya, Bilaspur-495 009, Chhattisgarh, India.

Background: Bacillus anthracis causes anthrax, which remains a significant zoonotic concern owing to the remarkable environmental hardiness of its spores. This environmental persistence implies long-term risks to livestock, wildlife and public health systems. We explore the dynamics of anthrax transmission, for which we constructed a compartment model in which the host population is divided into susceptible, infected, carcass and environmental reservoir and vaccinated. The nonlinear system of ODEs (Ordinary Differential Equations) was solved using two different numerical approaches: the classical fourth-order Runge-Kutta (RK4) method and the Adams-Bashforth fourth-order (AB4) method.

Methods: We used RK4 to generate the initial conditions needed for AB4 to obtain long-term solutions efficiently. We demonstrate that these numerical solvers replicate the key features of anthrax transmission, such as indirect infection via carcasses. The study shows how numerical solvers can be useful in epidemiological modelling and serve as a sound framework for assessing interventions, such as vaccination strategies. To obtain numerical solutions, we propose a stochastic computational approach utilising an artificial neural network (ANN) optimised with a Bayesian regularisation backpropagation algorithm. The ANN architecture is designed with a single hidden layer containing twenty-seven neurons and a logistic sigmoid activation function to effectively map the complex dynamics of the disease system.

Result: The correctness and reliability of the proposed solver are validated by comparing the obtained results with reference numerical solutions from standard solvers, achieving a reducible absolute error in the range of 10-05 to 10-08. Statistical analyses, including regression plots and error histograms, further confirm the consistency and robustness of the method. This machine learning framework demonstrates significant potential in addressing parameter uncertainty and provides a dependable alternative for simulating anthrax outbreaks to inform public health policies.

The extraordinary persistence of bacillus anthracis spores in terrestrial environments continues to make anthrax a significant epidemiological concern both in veterinary and public health (Alam et al., 2022; Gopal and Kumar, 2020). The spores may remain viable for extended periods, often running to decades (Savransky et al., 2020), thus serving as a long-term environmental reservoir that sustains recurring outbreaks (Rezapour et al., 2020; Kumar et al., 2023). Along with direct transmission between hosts, this ecological persistence creates a decidedly nonlinear and multi-layered disease system that requires intensive mathematical and computational study (Farayola et al., 2021).
       
Compartmental modelling frameworks have provided a well-established methodology for capturing such complex transmission dynamics (Matar et al., 2020; Kashyap and Kashyap, 2024). The SIC-V structure provides a mechanistic paradigm that synthesises empirical field data with experimental observations; this enables quantitative prediction of outbreak progression and the systematic evaluation of intervention strategies (Nisar et al., 2024).  Since these formulations yield coupled nonlinear ODEs, closed-form analytical solutions are generally unattainable and high-fidelity numerical solvers must be employed (Rezapour et al., 2020). The comparative analysis of existing studies and the proposed work is illustrated in Table 1.

Table 1: Comparative analysis of existing studies and the proposed work.


       
The choice of numerical scheme for integration directly influences the stability, accuracy and computational tractability of model factors that are crucial in forecasting epidemic trajectories, performing sensitivity analyses and conducting parameter identifiability studies (Panthi et al., 2026; Kashyap and Kashyap, 2025; Shadangi et al., 2026). Herein, we will develop an SICV anthrax transmission model and carry out a comparative evaluation of two classical numerical integration schemes.  The RK4 method is used to generate the initial conditions, on account of its robustness (Singh et al., 2024) and high-order accuracy; the AB4 method is employed to yield computational gains during long-horizon simulations (Yilmazer et al., 2025). This dual-solver framework is employed to assess the trade-offs between the numerical precision and computational overhead, particularly because it impacts model validation and optimization of control measures, including vaccination campaigns and carcass management protocols (Kashyap et al., 2023).
This section highlights the work done in MATLAB simulation, using nonlinear ordinary differential equations to model the system. Using the fourth-order Runge-Kutta (RK4) and Adams-Bashforth (AB4) methods, the equations were numerically solved. The present work was conducted in the Department of Electronics and Communication Engineering, Guru Ghasidas Vishwavidyalaya Bilaspur (C.G.) from January 2025 to March 2026.
 
Mathematical model formulation
 
A deterministic compartmental approach was used in modelling the dynamics of anthrax disease in animal populations. The total population was divided into four compartments (Panthi et al., 2026).
The model divides the total animal population into four compartments:
• s: Susceptible animals.
• i: Infected and infectious animals.
• c: Concentration of anthrax spores in the environment (proxied by carcasses).
• v: Vaccinated/immune animals.
       
We defined transitions between compartments using nonlinear ordinary differential equations (ODEs) describing direct transmission, environmental exposure, vaccination and natural and disease-induced mortality (Seanego et al., 2025).

The general form of ordinary differential equations (ODEs) is demonstrated as-


 
Where the parameters are:
• β: Transmission rate from infected animals.
• α: Transmission rate from environmental spores (carcasses).
• γ: Rate of removal from infected class (recovery/death and subsequent contribution to spore pool).
• δ: Decay rate of spores in the environment (inversely related to spore persistence).
• ν: Vaccination rate.
       
The transmission dynamics can be seen as a reinforcing loop infected hosts die and release spores into the environment and this contamination later infects more susceptible animals (Sabir and Simbawa, 2025).
 
Neural network-based computational design
 
A feedforward neural network was designed for the purpose of approximating the numerical solutions obtained from the RK4 and AB4 solvers (Ibrahim et al., 2023; Ali et al., 2024). The architecture (Fig 1) consists of an input layer with the time variable t, two hidden layers with 20 neurons each using the hyperbolic tangent (tanh) activation function and an output layer that is used to predict the compartmental states s, i, c, v.

Fig 1: Two-layer feedforward network design


       
The neural network is trained with the Levenberg-Marquardt optimization algorithm by minimizing the mean square error between network outputs and numerical solutions. Training was conducted over 1000 epochs with a learning rate of 0.001. This design enabled the neural model to generalize the dynamics and provide continuous approximations over the simulation horizon.
 
Numerical computation setup
 
The simulation was implemented in MATLAB R2024a. The initial conditions and parameter values (Table 2) were chosen for illustrative purposes to demonstrate model behaviour and solver performance (Workineh et al., 2024).

Table 2: Initial conditions and model parameters for model behaviour and solver performance.


       
The system was integrated over a time span of t = [0, 100] days with a step size of h = 0.1.
 
Numerical solvers
 
Runge-kutta fourth-order method
 
The Runge-Kutta Fourth-Order method was implemented as the primary and reference solver.
       
For a given ODE dy/dt = f (t, y), it calculates the next time step as:
 

 
This method provides an excellent balance of accuracy and stability for a wide range of problems and was used to generate the initial values for the multi-step method (Heilat et al., 2025).
 
Adams-bashforth fourth-order method
 
The Adams-Bashforth Fourth-Order method is a multi-step explicit method (Shafiyeva et al., 2024) that uses the solution at four previous time points to advance:


 
To start the Adams-Bashforth Fourth-Order method, the first four points (y1, y2, y3, y4) were calculated using the Runge-Kutta Fourth-Order Method. This hybrid approach is standard practice (Moulai-Khatir, 2025).
The computational model successfully simulated the dynamics of an anthrax outbreak and the effect of vaccination. The output from the RK4 solver is visualized in Fig 2. A line plot with time on the x-axis and population on the y-axis. The susceptible population (S, blue) declines sharply initially and then gradually. The infected population (I, red) shows a sharp peak before declining to near zero. The carcass/spore compartment (C, green) rises and falls similarly to I but with a slightly delayed peak. The vaccinated compartment (V, magenta) shows a steady logistic-like increase.

Fig 2: Solution of anthrax model using runge-kutta fourth-order method (RK4).


       
The Solution of Anthrax Model using RK4 shows the following classic epidemic dynamics:
1. The susceptible population (S) decreases due to infection and vaccination.
2. The infected population (I) spikes rapidly as the disease spreads through both direct (β) and environmental (α) routes, then declines as animals are removed (γ).
3. The carcass/spore compartment (C) rises following the death of infected animals and then decays exponentially at rate δ, maintaining a long-term environmental risk.
4. The vaccinated population (V) grows logistically, proportional to the vaccination rate ν and the remaining susceptible pool.
       
Fig 3 shows the Summary, which is trained by the neural network using the Levenberg-Marquardt algorithm and RK4.

Fig 3: Neural network learning outcomes using Runge-kutta (RK4) simulation data.


       
Fig 4 illustrate the training progress of the neural network using RK4. It keeps track of the Mean Squared Error, which is a measure of how far the model’s predictions are from the actual values. A lower value is better. The blue line (Validation) is the most important, as it shows the model’s performance on unseen data used to tune it. The green line (Test) shows performance on a completely separate, held-out dataset. The dashed line (Best) marks the point where the validation error was the lowest. The best performance was achieved at the final epoch (epoch 1000), with a very low error of 1.1227e-10. This indicates the model learned successfully and did not get worse by training for the full 1000 cycles.

Fig 4: Mean square error over epochs for Anthrax Model Simulation using RK4.


       
This conclusion is further enforced by the error histogram shown in Fig 5. Most of the RK4 errors are tightly packed around zero, with only a few outliers of larger magnitude. This narrow symmetric distribution is indicative of the general reliability and precision that RK4 has consistently returned, making it an excellent baseline against which to validate alternative schemes or neural surrogates.

Fig 5: Error Histogram for RK4.


       
Following the analysis of the RK4-based results, the results obtained using the Adams-Bashforth method AB4 exhibit a similar learning profile. Fig 6 illustrates the Neural network learning outcomes using Adams-Bashforth (AB4) and Levenberg -Marquardt algorithm. Fig 7: Training progress graph of the neural network using AB4, in terms of MSE. The important result is that the model provides a very high degree of accuracy. At the end of 1000 training cycles, otherwise known as epochs, it reaches its best performance on the validation set: 3.86e-08. A value of 3.86e-08 can be considered close to zero, which suggests the model makes virtually perfect predictions. The model was fitted for the full 1000 epochs with near-perfect performance on the validation data, which suggests that the model learned the underlying pattern in the data extremely well.

Fig 6: Neural network learning results based on Adams-bashforth (AB4) simulated data.



Fig 7: Mean square error over epochs for anthrax model simulation using AB4.


       
Accordingly, the error histogram of AB4 shown in Figure 8 shows most prediction errors clustered very close to zero, with only a few larger discrepancies. This bodes well, as strong agreement in the error distribution of AB4 and RK4 confirms that AB4 can be used as a computationally efficient alternative to RK4 without sacrificing output quality. Such findings justify the use of AB4 where efficiency is necessary since it provides accuracy practically undistinguishable from that of RK4 for the anthrax model neural simulation task.

Fig 8: Error histogram for AB4.


       
A qualitative comparison of the responses RK4 and responses AB4 datasets confirmed that both solvers produced nearly identical results for this system and chosen step size, validating the implementation. The model achieves numerical accuracy and computational efficiency using RK4 to initialize and then switching to AB4 for scalability over long time-scale simulations.
• Parameter estimation: The data could be used with inverse problem techniques or neural networks to fit the model parameters (β, α, etc.) to real observed outbreak data.
• Machine learning surrogates: Using this data, a neural network could be trained to learn a surrogate model approximating the dynamics of the ODE system, ultimately allowing for ultra-fast prediction for varying sets of parameters.
• Intervention optimization: The dataset clearly shows the impact of vaccination rate ν, so the policy maker can run in-silico experiments to determine what vaccination effort would be required to prevent future outbreaks.
In this work, we developed a computational framework for the mathematical model of anthrax transmission in animals. We have shown the application of two numerical solvers, RK4 and Adams-Bashforth, for integrating the system of ODEs. Results depict the complex dynamics due to interactions between animal hosts and the persistent environmental reservoir of anthrax spores, while the mitigating effect of vaccination is emphasized.
       
The critical contribution of this work is the strong computational pipeline that transforms a conceptual mathematical model into a dynamic simulation and finally into a structured reusable dataset. This pipeline is a foundational step toward advanced, data-driven analyses of anthrax dynamics, including parameter estimation using optimization algorithms and the development of machine learning-based surrogate models. Future work will involve fitting the model to real data and using numerical solvers to investigate optimal control strategies for anthrax prevention and management.
 
Disclaimers
 
The views and conclusions expressed in this article are solely those of the authors and do not necessarily represent the views of their affiliated institutions. The authors are responsible for the accuracy and completeness of the information provided, but do not accept any liability for any direct or indirect losses resulting from the use of this content.

Informed consent
 
Not applicable. This study did not involve any live specimen.
The authors declare that there are no conflicts of interest regarding the publication of this article. No funding or sponsorship influenced the design of the study, data collection, analysis, decision to publish, or preparation of the manuscript.

  1. Alam, M.E., Kamal, M.M., Rahman, M., Kabir, A., Islam, M.S. and Hassan, J. (2022). Review of anthrax: A disease of farm animals. Journal of Advanced Veterinary and Animal Research. 9(2): 323-334. https://doi.org/10.5455/javar.2022.i599.

  2. Ali, A.J., Abbas, A.F. and Abdelhakem, M.A. (2024). Comparative analysis of Adams-Bashforth-Moulton and Runge-Kutta methods for solving ordinary differential equations using MATLAB. Mathematical Modelling of Engineering Problems.  11(3): 641-647.

  3. Farayola, M.F., Shafie, S., Mohd Siam, F., Mahmud, R. and Ajadi, S.O. (2021). Mathematical modeling of cancer treatments with fractional derivatives: An overview. Malaysian Journal of Fundamental and Applied Sciences. 17(4): 389-401.

  4. Gopal, G.J. and Kumar, A. (2020). Characterization of putative type IV secretion system of Bacillus anthracis. Indian Journal of Animal Research. 54(12): 1525-1531. doi: 10.18805/IJAR.B-3865.

  5. Heilat A.S. (2025). A comparison between Euler’s method and 4th order Runge-Kutta method for numerical solutions of neutrosophic and dual differential problems. Neutrosophic Sets and Systems. 81(1): 540-559.

  6. Ibrahim, S. (2023). Solution of first-order differential equation using fourth-order Runge-Kutta approach and Adams-Bashforth methods. International Journal on Recent and Innovation Trends in Computing and Communication. 11(11): 308- 316.

  7. Kashyap N. and Kashyap A.K. (2024). Enhanced skin disease detection and classification system using deep learning technique. International Journal of Advanced Technology and Social Sciences. 2: 93-104. 

  8. Kashyap, A.J., Bordoloi, A.J., Mohan, F. and Devi, A. (2023). Dynamical analysis of an anthrax disease model in animals with nonlinear transmission rate. Mathematical Modelling and Control. 3(4): 370-386.

  9. Kashyap, N. and Kashyap, A.K. (2025). Deep learning VGG19 model for precise plant disease detection. Agricultural Science Digest. 1-8. doi: 10.18805/ag.D-6220.

  10. Kumar, S., Dutta, T.K. and Roychoudhury, P. (2023). Transboundary animal diseases in the perspective of North East India: A review. Indian Journal of Animal Research. 57(12): 1577-1585. doi: 10.18805/IJAR.B-4402.

  11. Matar, M.M., Amra, I.A. and Alzabut, J. (2020). Existence of solutions for tripled system of fractional differential equations involving cyclic permutation boundary conditions. Boundary Value Problems. 1-13. Article 140.

  12. Moulai-Khatir, A. (2025). Refining Euler and fourth-order Runge- Kutta methods using curvature-based adaptivity. Journal of Innovative Applied Mathematics and Computational Sciences. 5(1): 82-96. https://doi.org/10.58205/jiamcs.v5i1.1922.

  13. Nisar, K.S., Farman, M., Abdel-Aty, M. and Ravichandran, C. (2024). A review of fractional order epidemic models for life sciences problems: Past, present and future. Alexandria Engineering Journal. 95: 283-305.

  14. Osman, S., Makinde, O.D. and Theuri, D.M. (2018). Mathematical modelling of transmission dynamics of anthrax in human and animal population. Mathematical Theory and Modeling.  8(1): 1-10.

  15. Panthi V., Kashyap N. and Gupta M. (2026). Neural Network-Based Simulation Framework for Anthrax Disease Progression in Animal Populations. IEEE Madhya Pradesh Section Conference, Gwalior, India. pp. 1627-1631. doi: 10.1109/MPCON69668.2026.11508500.

  16. Panthi, V., Kashyap, N., Gupta, M., Alenizi, F.A., Suanpang, P. and Nanthaamornphong, A. (2026). A two-hidden-layer Levenberg- Marquardt neural network for supervised trajectory approximation of a nonlinear anthrax in animals epidemic model. Discover Artificial Intelligence. 6(1): Article 1234.

  17. Rezapour, S. and Mohammadi, H. (2020). A study on the AH1N1/09 influenza transmission model with the fractional Caputo- Fabrizio derivative. Advances in Difference Equations. 1-15. https://doi.org/10.1186/s13662-020-02651-4.

  18. Rezapour, S., Etemad, S. and Mohammadi, H. (2020). A mathematical analysis of a system of Caputo-fabrizio fractional differential equations for the anthrax disease model in animals. Advances in Difference Equations. 1: Article 481. 

  19. Sabir, Z. and Simbawa E. (2025). A machine learning computational approach for the mathematical anthrax disease system in animals. PLOS ONE. 20(4): Article e0320327. https://doi.org/10.1371/journal.pone.0320327.

  20. Savransky, V., Ionin, B. and Reece, J. (2020). Current status and trends in prophylaxis and management of anthrax disease. Pathogens. 9(5): Article 370. https://doi.org/10.3390/pathogens9050370.

  21. Seanego, L.M. and Chitura, T. (2025). Catalytic effects of temperature and rainfall variabilities on the occurrence of ruminant livestock diseases in some Southern African countries: A review. Agricultural Reviews. 46(4): 630-638. doi: 10.18805/ag.RF-265.

  22. Shadangi, P., Kashyap, N., Tripathi, R., Tiwari, N., Patidar, R. and Swain, S.D. (2026). Cyberbullying detection in social media using machine learning techniques with multimodal analysis. In International Conference on Electrical and Electronics for Sustainable Innovations (ICEESI). 1-6. doi: 10.1109/ICEESI68020.2026.11583302.

  23. Shafiyeva, G.Kh., Ibrahimov, V.R. and Juraev, D.A. (2024). On some comparison of Adam’s methods with multistep methods and their application to solve initial-value problems for first-order ODEs. Karshi Multidisciplinary International Scientific Journal. 1(2): 181-188. https://doi.org/10.22105/kmisj.v1i2.55.

  24. Singh, R., Rana, O., Sharma, Y.K. and Gaur, S.S. (2024). Numerical approximation methods and comparison with RK-4 method  for a linear differential equation with initial conditions using Scilab 6.1.1. Current Natural Sciences and Engineering Journal. 1(6): 471-479. https://doi.org/10.63015/5c-2447.1.6.

  25. Workineh, Y., Mekonnen, H. and Belew, B. (2024). Numerical methods for solving second-order initial value problems of ordinary differential equations with Euler and Runge-Kutta fourth- order methods. Frontiers in Applied Mathematics and Statistics. 10: Article 1360628. https://doi.org/10.3389/fams.2024.1360628.

  26. Yilmazer, M.Ç., Goktas, S., Yilmaz, E. and Et, M. (2025). Adams- bashforth methods on bigeometric calculus. AIMS Mathematics. 10(8): 18627-18640. https://doi.org/10.3934/math.2025 832.

Design of Neural Network-based Computational Methods for Solving the Anthrax Disease Model in Animals

V
Vikash Panthi1
M
R
Ruchi Tripathi1
N
Nikita Kashyap1,*
1Department of Electronics and Communication Engineering, School of Studies of Engineering and Technology, Guru Ghasidas Vishwavidyalaya, Bilaspur-495 009, Chhattisgarh, India.
2Department of Electrical Engineering, School of Studies of Engineering and Technology, Guru Ghasidas Vishwavidyalaya, Bilaspur-495 009, Chhattisgarh, India.

Background: Bacillus anthracis causes anthrax, which remains a significant zoonotic concern owing to the remarkable environmental hardiness of its spores. This environmental persistence implies long-term risks to livestock, wildlife and public health systems. We explore the dynamics of anthrax transmission, for which we constructed a compartment model in which the host population is divided into susceptible, infected, carcass and environmental reservoir and vaccinated. The nonlinear system of ODEs (Ordinary Differential Equations) was solved using two different numerical approaches: the classical fourth-order Runge-Kutta (RK4) method and the Adams-Bashforth fourth-order (AB4) method.

Methods: We used RK4 to generate the initial conditions needed for AB4 to obtain long-term solutions efficiently. We demonstrate that these numerical solvers replicate the key features of anthrax transmission, such as indirect infection via carcasses. The study shows how numerical solvers can be useful in epidemiological modelling and serve as a sound framework for assessing interventions, such as vaccination strategies. To obtain numerical solutions, we propose a stochastic computational approach utilising an artificial neural network (ANN) optimised with a Bayesian regularisation backpropagation algorithm. The ANN architecture is designed with a single hidden layer containing twenty-seven neurons and a logistic sigmoid activation function to effectively map the complex dynamics of the disease system.

Result: The correctness and reliability of the proposed solver are validated by comparing the obtained results with reference numerical solutions from standard solvers, achieving a reducible absolute error in the range of 10-05 to 10-08. Statistical analyses, including regression plots and error histograms, further confirm the consistency and robustness of the method. This machine learning framework demonstrates significant potential in addressing parameter uncertainty and provides a dependable alternative for simulating anthrax outbreaks to inform public health policies.

The extraordinary persistence of bacillus anthracis spores in terrestrial environments continues to make anthrax a significant epidemiological concern both in veterinary and public health (Alam et al., 2022; Gopal and Kumar, 2020). The spores may remain viable for extended periods, often running to decades (Savransky et al., 2020), thus serving as a long-term environmental reservoir that sustains recurring outbreaks (Rezapour et al., 2020; Kumar et al., 2023). Along with direct transmission between hosts, this ecological persistence creates a decidedly nonlinear and multi-layered disease system that requires intensive mathematical and computational study (Farayola et al., 2021).
       
Compartmental modelling frameworks have provided a well-established methodology for capturing such complex transmission dynamics (Matar et al., 2020; Kashyap and Kashyap, 2024). The SIC-V structure provides a mechanistic paradigm that synthesises empirical field data with experimental observations; this enables quantitative prediction of outbreak progression and the systematic evaluation of intervention strategies (Nisar et al., 2024).  Since these formulations yield coupled nonlinear ODEs, closed-form analytical solutions are generally unattainable and high-fidelity numerical solvers must be employed (Rezapour et al., 2020). The comparative analysis of existing studies and the proposed work is illustrated in Table 1.

Table 1: Comparative analysis of existing studies and the proposed work.


       
The choice of numerical scheme for integration directly influences the stability, accuracy and computational tractability of model factors that are crucial in forecasting epidemic trajectories, performing sensitivity analyses and conducting parameter identifiability studies (Panthi et al., 2026; Kashyap and Kashyap, 2025; Shadangi et al., 2026). Herein, we will develop an SICV anthrax transmission model and carry out a comparative evaluation of two classical numerical integration schemes.  The RK4 method is used to generate the initial conditions, on account of its robustness (Singh et al., 2024) and high-order accuracy; the AB4 method is employed to yield computational gains during long-horizon simulations (Yilmazer et al., 2025). This dual-solver framework is employed to assess the trade-offs between the numerical precision and computational overhead, particularly because it impacts model validation and optimization of control measures, including vaccination campaigns and carcass management protocols (Kashyap et al., 2023).
This section highlights the work done in MATLAB simulation, using nonlinear ordinary differential equations to model the system. Using the fourth-order Runge-Kutta (RK4) and Adams-Bashforth (AB4) methods, the equations were numerically solved. The present work was conducted in the Department of Electronics and Communication Engineering, Guru Ghasidas Vishwavidyalaya Bilaspur (C.G.) from January 2025 to March 2026.
 
Mathematical model formulation
 
A deterministic compartmental approach was used in modelling the dynamics of anthrax disease in animal populations. The total population was divided into four compartments (Panthi et al., 2026).
The model divides the total animal population into four compartments:
• s: Susceptible animals.
• i: Infected and infectious animals.
• c: Concentration of anthrax spores in the environment (proxied by carcasses).
• v: Vaccinated/immune animals.
       
We defined transitions between compartments using nonlinear ordinary differential equations (ODEs) describing direct transmission, environmental exposure, vaccination and natural and disease-induced mortality (Seanego et al., 2025).

The general form of ordinary differential equations (ODEs) is demonstrated as-


 
Where the parameters are:
• β: Transmission rate from infected animals.
• α: Transmission rate from environmental spores (carcasses).
• γ: Rate of removal from infected class (recovery/death and subsequent contribution to spore pool).
• δ: Decay rate of spores in the environment (inversely related to spore persistence).
• ν: Vaccination rate.
       
The transmission dynamics can be seen as a reinforcing loop infected hosts die and release spores into the environment and this contamination later infects more susceptible animals (Sabir and Simbawa, 2025).
 
Neural network-based computational design
 
A feedforward neural network was designed for the purpose of approximating the numerical solutions obtained from the RK4 and AB4 solvers (Ibrahim et al., 2023; Ali et al., 2024). The architecture (Fig 1) consists of an input layer with the time variable t, two hidden layers with 20 neurons each using the hyperbolic tangent (tanh) activation function and an output layer that is used to predict the compartmental states s, i, c, v.

Fig 1: Two-layer feedforward network design


       
The neural network is trained with the Levenberg-Marquardt optimization algorithm by minimizing the mean square error between network outputs and numerical solutions. Training was conducted over 1000 epochs with a learning rate of 0.001. This design enabled the neural model to generalize the dynamics and provide continuous approximations over the simulation horizon.
 
Numerical computation setup
 
The simulation was implemented in MATLAB R2024a. The initial conditions and parameter values (Table 2) were chosen for illustrative purposes to demonstrate model behaviour and solver performance (Workineh et al., 2024).

Table 2: Initial conditions and model parameters for model behaviour and solver performance.


       
The system was integrated over a time span of t = [0, 100] days with a step size of h = 0.1.
 
Numerical solvers
 
Runge-kutta fourth-order method
 
The Runge-Kutta Fourth-Order method was implemented as the primary and reference solver.
       
For a given ODE dy/dt = f (t, y), it calculates the next time step as:
 

 
This method provides an excellent balance of accuracy and stability for a wide range of problems and was used to generate the initial values for the multi-step method (Heilat et al., 2025).
 
Adams-bashforth fourth-order method
 
The Adams-Bashforth Fourth-Order method is a multi-step explicit method (Shafiyeva et al., 2024) that uses the solution at four previous time points to advance:


 
To start the Adams-Bashforth Fourth-Order method, the first four points (y1, y2, y3, y4) were calculated using the Runge-Kutta Fourth-Order Method. This hybrid approach is standard practice (Moulai-Khatir, 2025).
The computational model successfully simulated the dynamics of an anthrax outbreak and the effect of vaccination. The output from the RK4 solver is visualized in Fig 2. A line plot with time on the x-axis and population on the y-axis. The susceptible population (S, blue) declines sharply initially and then gradually. The infected population (I, red) shows a sharp peak before declining to near zero. The carcass/spore compartment (C, green) rises and falls similarly to I but with a slightly delayed peak. The vaccinated compartment (V, magenta) shows a steady logistic-like increase.

Fig 2: Solution of anthrax model using runge-kutta fourth-order method (RK4).


       
The Solution of Anthrax Model using RK4 shows the following classic epidemic dynamics:
1. The susceptible population (S) decreases due to infection and vaccination.
2. The infected population (I) spikes rapidly as the disease spreads through both direct (β) and environmental (α) routes, then declines as animals are removed (γ).
3. The carcass/spore compartment (C) rises following the death of infected animals and then decays exponentially at rate δ, maintaining a long-term environmental risk.
4. The vaccinated population (V) grows logistically, proportional to the vaccination rate ν and the remaining susceptible pool.
       
Fig 3 shows the Summary, which is trained by the neural network using the Levenberg-Marquardt algorithm and RK4.

Fig 3: Neural network learning outcomes using Runge-kutta (RK4) simulation data.


       
Fig 4 illustrate the training progress of the neural network using RK4. It keeps track of the Mean Squared Error, which is a measure of how far the model’s predictions are from the actual values. A lower value is better. The blue line (Validation) is the most important, as it shows the model’s performance on unseen data used to tune it. The green line (Test) shows performance on a completely separate, held-out dataset. The dashed line (Best) marks the point where the validation error was the lowest. The best performance was achieved at the final epoch (epoch 1000), with a very low error of 1.1227e-10. This indicates the model learned successfully and did not get worse by training for the full 1000 cycles.

Fig 4: Mean square error over epochs for Anthrax Model Simulation using RK4.


       
This conclusion is further enforced by the error histogram shown in Fig 5. Most of the RK4 errors are tightly packed around zero, with only a few outliers of larger magnitude. This narrow symmetric distribution is indicative of the general reliability and precision that RK4 has consistently returned, making it an excellent baseline against which to validate alternative schemes or neural surrogates.

Fig 5: Error Histogram for RK4.


       
Following the analysis of the RK4-based results, the results obtained using the Adams-Bashforth method AB4 exhibit a similar learning profile. Fig 6 illustrates the Neural network learning outcomes using Adams-Bashforth (AB4) and Levenberg -Marquardt algorithm. Fig 7: Training progress graph of the neural network using AB4, in terms of MSE. The important result is that the model provides a very high degree of accuracy. At the end of 1000 training cycles, otherwise known as epochs, it reaches its best performance on the validation set: 3.86e-08. A value of 3.86e-08 can be considered close to zero, which suggests the model makes virtually perfect predictions. The model was fitted for the full 1000 epochs with near-perfect performance on the validation data, which suggests that the model learned the underlying pattern in the data extremely well.

Fig 6: Neural network learning results based on Adams-bashforth (AB4) simulated data.



Fig 7: Mean square error over epochs for anthrax model simulation using AB4.


       
Accordingly, the error histogram of AB4 shown in Figure 8 shows most prediction errors clustered very close to zero, with only a few larger discrepancies. This bodes well, as strong agreement in the error distribution of AB4 and RK4 confirms that AB4 can be used as a computationally efficient alternative to RK4 without sacrificing output quality. Such findings justify the use of AB4 where efficiency is necessary since it provides accuracy practically undistinguishable from that of RK4 for the anthrax model neural simulation task.

Fig 8: Error histogram for AB4.


       
A qualitative comparison of the responses RK4 and responses AB4 datasets confirmed that both solvers produced nearly identical results for this system and chosen step size, validating the implementation. The model achieves numerical accuracy and computational efficiency using RK4 to initialize and then switching to AB4 for scalability over long time-scale simulations.
• Parameter estimation: The data could be used with inverse problem techniques or neural networks to fit the model parameters (β, α, etc.) to real observed outbreak data.
• Machine learning surrogates: Using this data, a neural network could be trained to learn a surrogate model approximating the dynamics of the ODE system, ultimately allowing for ultra-fast prediction for varying sets of parameters.
• Intervention optimization: The dataset clearly shows the impact of vaccination rate ν, so the policy maker can run in-silico experiments to determine what vaccination effort would be required to prevent future outbreaks.
In this work, we developed a computational framework for the mathematical model of anthrax transmission in animals. We have shown the application of two numerical solvers, RK4 and Adams-Bashforth, for integrating the system of ODEs. Results depict the complex dynamics due to interactions between animal hosts and the persistent environmental reservoir of anthrax spores, while the mitigating effect of vaccination is emphasized.
       
The critical contribution of this work is the strong computational pipeline that transforms a conceptual mathematical model into a dynamic simulation and finally into a structured reusable dataset. This pipeline is a foundational step toward advanced, data-driven analyses of anthrax dynamics, including parameter estimation using optimization algorithms and the development of machine learning-based surrogate models. Future work will involve fitting the model to real data and using numerical solvers to investigate optimal control strategies for anthrax prevention and management.
 
Disclaimers
 
The views and conclusions expressed in this article are solely those of the authors and do not necessarily represent the views of their affiliated institutions. The authors are responsible for the accuracy and completeness of the information provided, but do not accept any liability for any direct or indirect losses resulting from the use of this content.

Informed consent
 
Not applicable. This study did not involve any live specimen.
The authors declare that there are no conflicts of interest regarding the publication of this article. No funding or sponsorship influenced the design of the study, data collection, analysis, decision to publish, or preparation of the manuscript.

  1. Alam, M.E., Kamal, M.M., Rahman, M., Kabir, A., Islam, M.S. and Hassan, J. (2022). Review of anthrax: A disease of farm animals. Journal of Advanced Veterinary and Animal Research. 9(2): 323-334. https://doi.org/10.5455/javar.2022.i599.

  2. Ali, A.J., Abbas, A.F. and Abdelhakem, M.A. (2024). Comparative analysis of Adams-Bashforth-Moulton and Runge-Kutta methods for solving ordinary differential equations using MATLAB. Mathematical Modelling of Engineering Problems.  11(3): 641-647.

  3. Farayola, M.F., Shafie, S., Mohd Siam, F., Mahmud, R. and Ajadi, S.O. (2021). Mathematical modeling of cancer treatments with fractional derivatives: An overview. Malaysian Journal of Fundamental and Applied Sciences. 17(4): 389-401.

  4. Gopal, G.J. and Kumar, A. (2020). Characterization of putative type IV secretion system of Bacillus anthracis. Indian Journal of Animal Research. 54(12): 1525-1531. doi: 10.18805/IJAR.B-3865.

  5. Heilat A.S. (2025). A comparison between Euler’s method and 4th order Runge-Kutta method for numerical solutions of neutrosophic and dual differential problems. Neutrosophic Sets and Systems. 81(1): 540-559.

  6. Ibrahim, S. (2023). Solution of first-order differential equation using fourth-order Runge-Kutta approach and Adams-Bashforth methods. International Journal on Recent and Innovation Trends in Computing and Communication. 11(11): 308- 316.

  7. Kashyap N. and Kashyap A.K. (2024). Enhanced skin disease detection and classification system using deep learning technique. International Journal of Advanced Technology and Social Sciences. 2: 93-104. 

  8. Kashyap, A.J., Bordoloi, A.J., Mohan, F. and Devi, A. (2023). Dynamical analysis of an anthrax disease model in animals with nonlinear transmission rate. Mathematical Modelling and Control. 3(4): 370-386.

  9. Kashyap, N. and Kashyap, A.K. (2025). Deep learning VGG19 model for precise plant disease detection. Agricultural Science Digest. 1-8. doi: 10.18805/ag.D-6220.

  10. Kumar, S., Dutta, T.K. and Roychoudhury, P. (2023). Transboundary animal diseases in the perspective of North East India: A review. Indian Journal of Animal Research. 57(12): 1577-1585. doi: 10.18805/IJAR.B-4402.

  11. Matar, M.M., Amra, I.A. and Alzabut, J. (2020). Existence of solutions for tripled system of fractional differential equations involving cyclic permutation boundary conditions. Boundary Value Problems. 1-13. Article 140.

  12. Moulai-Khatir, A. (2025). Refining Euler and fourth-order Runge- Kutta methods using curvature-based adaptivity. Journal of Innovative Applied Mathematics and Computational Sciences. 5(1): 82-96. https://doi.org/10.58205/jiamcs.v5i1.1922.

  13. Nisar, K.S., Farman, M., Abdel-Aty, M. and Ravichandran, C. (2024). A review of fractional order epidemic models for life sciences problems: Past, present and future. Alexandria Engineering Journal. 95: 283-305.

  14. Osman, S., Makinde, O.D. and Theuri, D.M. (2018). Mathematical modelling of transmission dynamics of anthrax in human and animal population. Mathematical Theory and Modeling.  8(1): 1-10.

  15. Panthi V., Kashyap N. and Gupta M. (2026). Neural Network-Based Simulation Framework for Anthrax Disease Progression in Animal Populations. IEEE Madhya Pradesh Section Conference, Gwalior, India. pp. 1627-1631. doi: 10.1109/MPCON69668.2026.11508500.

  16. Panthi, V., Kashyap, N., Gupta, M., Alenizi, F.A., Suanpang, P. and Nanthaamornphong, A. (2026). A two-hidden-layer Levenberg- Marquardt neural network for supervised trajectory approximation of a nonlinear anthrax in animals epidemic model. Discover Artificial Intelligence. 6(1): Article 1234.

  17. Rezapour, S. and Mohammadi, H. (2020). A study on the AH1N1/09 influenza transmission model with the fractional Caputo- Fabrizio derivative. Advances in Difference Equations. 1-15. https://doi.org/10.1186/s13662-020-02651-4.

  18. Rezapour, S., Etemad, S. and Mohammadi, H. (2020). A mathematical analysis of a system of Caputo-fabrizio fractional differential equations for the anthrax disease model in animals. Advances in Difference Equations. 1: Article 481. 

  19. Sabir, Z. and Simbawa E. (2025). A machine learning computational approach for the mathematical anthrax disease system in animals. PLOS ONE. 20(4): Article e0320327. https://doi.org/10.1371/journal.pone.0320327.

  20. Savransky, V., Ionin, B. and Reece, J. (2020). Current status and trends in prophylaxis and management of anthrax disease. Pathogens. 9(5): Article 370. https://doi.org/10.3390/pathogens9050370.

  21. Seanego, L.M. and Chitura, T. (2025). Catalytic effects of temperature and rainfall variabilities on the occurrence of ruminant livestock diseases in some Southern African countries: A review. Agricultural Reviews. 46(4): 630-638. doi: 10.18805/ag.RF-265.

  22. Shadangi, P., Kashyap, N., Tripathi, R., Tiwari, N., Patidar, R. and Swain, S.D. (2026). Cyberbullying detection in social media using machine learning techniques with multimodal analysis. In International Conference on Electrical and Electronics for Sustainable Innovations (ICEESI). 1-6. doi: 10.1109/ICEESI68020.2026.11583302.

  23. Shafiyeva, G.Kh., Ibrahimov, V.R. and Juraev, D.A. (2024). On some comparison of Adam’s methods with multistep methods and their application to solve initial-value problems for first-order ODEs. Karshi Multidisciplinary International Scientific Journal. 1(2): 181-188. https://doi.org/10.22105/kmisj.v1i2.55.

  24. Singh, R., Rana, O., Sharma, Y.K. and Gaur, S.S. (2024). Numerical approximation methods and comparison with RK-4 method  for a linear differential equation with initial conditions using Scilab 6.1.1. Current Natural Sciences and Engineering Journal. 1(6): 471-479. https://doi.org/10.63015/5c-2447.1.6.

  25. Workineh, Y., Mekonnen, H. and Belew, B. (2024). Numerical methods for solving second-order initial value problems of ordinary differential equations with Euler and Runge-Kutta fourth- order methods. Frontiers in Applied Mathematics and Statistics. 10: Article 1360628. https://doi.org/10.3389/fams.2024.1360628.

  26. Yilmazer, M.Ç., Goktas, S., Yilmaz, E. and Et, M. (2025). Adams- bashforth methods on bigeometric calculus. AIMS Mathematics. 10(8): 18627-18640. https://doi.org/10.3934/math.2025 832.
In this Article
Published In
Indian Journal of Animal Research

Editorial Board

View all (0)