Abstract
Efforts in cardiovascular disorder detection demand immediate attention as they hold the potential to revolutionize patient outcomes through early detection systems. The exploration of diseases and treatments, coupled with the potential of artifical intelligence to reshape healthcare, highlights a promising avenue for innovation. AI-driven early detection systems offer substantial benefits by improving quality of life and extending longevity through timely interventions for chronic diseases. The evolving landscape of healthcare algorithms presents vast possibilities, particularly in the application of metaheuristics to address complex challenges. An exemplary approach involves employing metaheuristic solutions such as PSO, FA, GA, WOA, and SCA to optimize an RNN for anomaly detection using ECG systems. Despite commendable outcomes in the best and median case scenarios, the study acknowledges limitations, focusing on a narrow comparison of optimization algorithms and exploring RNN capabilities for a specific problem. Computational constraints led to the use of smaller populations and limited rounds, emphasizing the need for future research to transcend these boundaries. Significantly, the introduction of attention layers emerges as a transformative element, enhancing neural network performance. The introduced optimizer proves robust across test scenarios, effectively navigating local minimum traps. Attention layers contribute to a substantial performance boost, reducing the error rate from 0.006837 to an impressive 0.002486, underscoring their role in focusing on pertinent information. This abstract advocates for further research to expand beyond these limitations, exploring novel algorithms and addressing broader medical challenges in the pursuit of refined and advanced solutions.
Introduction
The leading cause of death globally is cardiovascular conditions. Lack of physical activity, diet irregularities, stress, age, as well as mostly alcohol and tobacco are the factors that affect cardiovascular health the most [1]. Health conditions related to such diseases usually develop over longer periods of time and are easy to miss, which results in severe conditions. While conditions take a while to begin deteriorating patient’s standard of living, many clinical indicators can be used to detect developing heart conditions. Increased heart pressure, irregular heart rates, loss of breath, and chronic fatigue are just some of the indicators. However, these conditions are not always caused by heart issues and can point to other conditions as well. Therefore a direct way of monitoring heart electrical activity is often used for diagnosis.
With the advancement of artificial intelligence (AI) other fields received many improvements through the use of such techniques. The smartification of devices has led to a boom in data which was one of the key drawbacks for stable predictors, as data was scarce before this. Not only did the use of computing units and memory in more devices benefit the AI field but the connection of these devices as well. This behavior results in higher quality of data as it allows for a combination of the data from these devices making for more accurate predictions. The described phenomena has been related to the Fourth Industrial Revolution (Industry 4.0), which includes many different fields among which the healthcare field is recognized as Healthcare 4.0. The equipment used by healthcare specialists collects large amounts of data on its own and with Industry 4.0 affecting all fields the case is not different with healthcare. Smart hospitals are being built with smart infrastructure, which improves the daily tasks of healthcare professionals. Furthermore, such infrastructure collects a lot of data which needs to be utilized in the right way. The possibilities are endless as scenarios like smart rooms are being evaluated by researchers [2], as well as more public datasets of specific reading like the gait measurements in Parkinson’s disease prediction [3]. AI demonstrates great potential for the improvement of patients’ treatments. With powerful insights gained through such methods, healthcare staff can adapt and change the treatment which would previously be impossible because a human is not capable of recognizing patterns as AI techniques. Additionally, pattern recognition by AI is at its best when coupled with constant monitoring of patients inside a smart hospital room. With the utilities offered in such healthcare systems, chances and the time for recovery should be improved. The advantages of constant monitoring were previously inaccessible by all individuals due to the financial limitations, but even with high financial power, no patient was able to take advantage of their data before the introduction of AI into healthcare.
AI can not only improve the chances of recovery but also the quality of life for certain chronic disease patients. By applying pattern recognition patients with movement, sight, hearing, and other impairments can greatly benefit. The variety of systems that take advantage of AI is vast and with the advancements in the technology of augmented reality (AR), the possibilities are further increased. The current direction of AI advancements puts an accent on human usability and the evolution of computers. AR kits are becoming more powerful and affordable which will soon result in even more powerful devices and in even smaller form factors. Humans have begun a new step in their evolution by slowly merging with the technologies. Human augmentation began even before the first subject received a Neuralink [4] cranial implant. Less sophisticated techniques in comparison to Neuralink include the implementation of RFID chips in human’s hand for the ease of use of their smart homes. While the risks are still to be observed over long-term use, humans seem eager for such changes in their bodies. Neuralink is an interface created with the purpose of restoring sensory and motor functions to patients but as of recently commercial use seems promising. While a large percentage of the population is concerned with putting trust in their own thoughts to a single company the benefits of such a solution are undeniable. This could be the next big step for mankind as it would allow humans to dive into cyberspace and live with their data.
While it is unknown what the future will hold it is certain that the sensors in medical field play a key role in their treatment. Personal diagnostics systems do not seem like a distant future, but what is left unanswered is the role of doctors. Will the doctors be completely replaced or will there still be a need for a human to supervise these systems? Would a patient trust a robot doctor or nurse who is to provide them with physical treatment for wounds? These are the key questions that will affect the future of the human population and it is paramount that such advancements are thoroughly planned and heavily controlled before released to the general public. For this reason, this research aims to expand the electrocardiograph research with an exhaustive search for the best technique for anomaly prediction in the ECGs. The focus is on early detection as that is one of the key factors in heart condition treatment.
The diseases of the heart are often regarded as silent killers as in most cases the symptoms are scarce. This leads to individuals being careless with what they put in their systems and how they take care of their bodies. Additionally, many refuse treatment because they do not take cardiovascular health seriously. With such individuals more precise detection mechanism and more specific in terms of the root of the problem could bring benefits and possibly better treatment if at all. Furthermore, the sensor systems previously described could help in maintaining good cardiovascular health. The patient’s activity can be tracked considering their physical activity and movement which largely affects the health of the cardiovascular system. Moreover, greater insight into how they prepare food from smart devices in their houses and possible precise nutritional value scanning of foods in the future could bring even more benefits.
The monitoring of the heart’s electrical signals is achieved through the utilization of an electrocardiogram (ECG), a widely recognized technique in the field of cardiology [5]. This system is comprised of an array of 16 strategically placed sensors distributed across the body, with the majority of sensors strategically positioned on the chest region. This comprehensive arrangement enables the accurate and efficient monitoring of not only the heart’s rhythm but also the identification of various cardiac conditions. To decipher and interpret the data obtained from these sensors, specialized expertise in the field of cardiology is indispensable, as the most valuable insights are often gleaned from the visual representations of the ECG readings.
In recent times, modern AI techniques have evolved to provide a novel approach to analyzing ECG time-series data [6]. Inspired by the intricacies of the human brain, a subset of AI known as neural networks has garnered significant attention [7, 8]. The distinctive upper hand of employing neural networks relies on their capacity to extrapolate novel insights and information from the existing ECG data. This innovation represents a promising avenue for enhancing our understanding of cardiac health and facilitating early detection of abnormalities. The advances were noted in other fields of medicine as well [9, 10, 11].
Despite excellent capabilities, AI-based solutions have a negative characteristic that requires the use of external optimization algorithms [12, 13]. These algorithms are employed out of a need to provide the best subset of parameter settings for the required solution [14, 15]. Mostly, such frameworks tend to optimize for general performance [16]. Every problem requires a different subset hence the need for an external algorithm that can do this more precisely and efficiently [17]. In this work, a recurrent neural network (RNN) is applied for time series predictions for detecting anomalies from ECG reading [18] which is then optimized by the particle swarm optimization (PSO) swarm metaheuristic. The research’s focal point is set to construct simpler models containing less layers and units in every layer.
Swarm intelligence represents a subfield of machine learning focused on nature-inspired population-based stochastic algorithms. Such solutions take inspiration from phenomena in nature that can be translated into a population that represents a swarm. The name comes from the first algorithms in this group which include insects and animals as inspiration. The key traits that defined which animals were suitable for these algorithms included way of behaving where the specimens work together in direction of a common objective unreachable on their own. These include search for food, path optimization, search for shelter, hunting, movement, and many other principles. This subfield of ML has provided solutions of high performance that have proven excellent as optimizers. Such optimizers can be applied to other ML techniques for hyperparameter optimization which can yield to models of very high accuracy. Various combinations exist but the SI algorithms shine truly when coupled with an algorithm that improves their deficiency. To elaborate, SI algorithms usually favor one of their two phases which are exploration and exploitation. During the first stage, the algorithm searches the realm of solutions globally with the goal of narrowing down the search to a smaller area. When it is successful in this task, the phase of exploitation begins in which the algorithm focuses on the area solely. The issue with SI solutions is that most of them are significantly better in one of the two, and hence comes the solutions of hybridization. Many forms of modifying algorithms through hybridization exist and the extent of this research cannot cover all of them. The most common form of this process would be an incorporation of a search strategy from a different algorithm and some sort of parameter that can control the alterations between these two search phases. With this principle, the highest performance from SI solutions can be extracted, as well as from other ML techniques that are optimized through such solutions.
This work represents an extension of the previously described research [19]. The results of the original research indicated the high potential of the proposed hybrid swarm metaheuristic of PSO and firefly algorithm (FA) for RNN optimization for time series prediction of cardiovascular diseases. For this reason, further ways of improving the proposed solution are explored. Attention-based RNNs have proven to provide performance increases to the time series type of problem as such mechanism allows for focusing on more important features which improves accuracy as a result. The experiments are repeated for the metaheuristics coupled with attention-based RNNs utilized for comparing the performance of different models. This approach has been taken due the reason that the potential of attention-calculated weights has not been explored for the problem at hand.
The following encapsulates the most significant contributions of the research:
The RNN potential is explored for the case of ECG anomaly detection. The use of attention-based RNNs is explored for further possible improvements of the model. An introduction of an altered variant of the popular PSO algorithm for hyperparameter optimization. Comparison with other metaheuristic-based strong optimizers.
The structure of the research is outlined ahead: Section 2 provides fundamentals of the proposed research, the following Section 3 describes the methodology, while Section 4 provides the characteristics of the experiments performed, and the results of those experiments are given in Section 5. Proposals for future work and a summary of the achieved results are given in the final Section 6.
The AI implementation within the realm of medicine has garnered considerable recognition among scientists for a variety of enthralling reasons. One primary driving force is the incessantly growing healthcare demands and the escalating need for precision in medical diagnoses, which serves as a powerful incentive for numerous scientists to investigate avenues for integrating automation within the medical domain [20, 21, 22]. Additionally, the progression of networking technologies and the advent of the IoT have ushered in a heightened emphasis on security measures. In this context, AI algorithms have once again proven their efficacy, particularly in the realm of intrusion detection and malware identification [23]. Fraud detection is a large problem as more data is available and more devices are connected to the Internet. In the work of Petrovic et al. [24] XGBoost algorithm is optimized with a teaching-learning-based-optimization (TLB) algorithm to detect credit card frauds. Authors of [25] provide yet another XGBoost approach this time tuned with an improved version of the firefly swarm metaheuristic for intrusion detection in IoT systems of Healthcare 4.0. Jovanovic et al. [26] provide yet another XGBoost approach optimized by FA indicating high usability of the XGBoost method for healthcare-related prediction problems.
A fascinating area of application lies inside the reach of time series analysis. Algorithms have proven to be invaluable for observing and forecasting trends found inside continuous data, expediting the identification of patterns, directions, and correlations within datasets. Algorithms equipped with the ability to consider the temporal component in data have shown considerable promise when employed in tackling complex real-world challenges [27]. To further enhance their effectiveness, numerous cutting-edge data decomposition techniques were integrated with time-series data, leading to improved performance achieved by the dissection of signals into a sequence of component signals [28]. This approach frequently brings superior results since forecasting a complex signal can be a formidable task, whereas dealing with a series of simpler signals tends to be more manageable. Jovanovic et al. [29] explored the forecast of crude oil prices in terms of supply and demand. The authors applied a long short-term memory (LSTM) network which is a high-performing RNN optimized by the salp swarm metaheuristic. Furthermore, an even more advanced solution includes a double LSTM network system which is known as a bidirectional LSTM (Bi-LSTM) [30].
A significant challenge entailed in the effective utilization of AI algorithms revolves around the necessity for fine-tuning to achieve enhanced performance [31]. Contemporary AI algorithms are endowed with a multitude of control parameters that dictate their response to the input data at hand. Given that many algorithms are typically designed with the aim of achieving solid overall performance, adjustments become indispensable to optimize their capabilities for specific problem-solving scenarios. In this regard, metaheuristic algorithms have emerged as a valuable asset, consistently delivering exceptional results in the context of selecting hyperparameter values and elevating the performance of foundational algorithms for applications in extensive spectrum of real-world problems [32, 33, 34]. Cryptocurrency [35, 36], gold [37], and other stock related predictions [38] have gained popularity. The performance improvements of metaheuristics have been documented during the most current pandemic of COVID-19 with the uses of such predictions including case detection [39], and fake news detection [40]. The influence of swarm intelligence solutions is recorded in the field of cyber security with accents on IoT [41, 42, 43], fraud detection [44, 45, 46], and intrusion detection [47, 48, 49, 50].
Nonetheless, it’s imperative to acknowledge that not all metaheuristic algorithms are universally well-suited to address every conceivable challenge [51, 52], as aptly illustrated by the “No free lunch” theorem [53]. This theorem essentially underscores the notion that there is no one-size-fits-all solution in the world of optimization algorithms. Consequently, it becomes essential to embark on a journey of experimentation and exploration to identify the most promising approaches for each specific implementation or problem domain.
In that sense, this study delved into the intriguing realm of applying optimization metaheuristic techniques to the classification of time-series data derived from EGC. By doing so, it sought to unravel the optimal strategies for effectively discerning patterns and extracting valuable insights from this intricate and dynamic form of data. This research represents a vital step toward enhancing our understanding of how metaheuristic algorithms can be harnessed to address the unique challenges posed by ECG time-series classification [54].
Recurrent neural network
Modifications towards operations with sequential data lead to an RNN, differing from basic neural networks by incorporating recurrent connections besides regular ones among cells. This feature allows for memory storage of future inputs. The structure is similar to the original solution, consisting of sequential layers with neurons connecting to each other, along with the weights and biases that represent the connections for evaluating input, making decisions, and generating output.
With respect to the task being addressed, neural networks can and have to be customized so that they would provide optimal results [55]. For simpler structures, training and interpretation of data benefit, but nonlinear complex relationships are a struggle. For larger networks the situation is opposite.
Previous hidden state
for which the input activation is
The hidden state is changed after each input processing by the formula in Eq. (2). The new hidden state is determined with application of the activation function
Fundamentals of RNN are described with the previous equations. In the same manner, other AI-based solutions yield tuning [56], RNNs require customized structures for optimal performance.
The phenomenon of attention does not have a precise mathematical definition and its implementation should be regarded as a mechanism. Different expressions in mathematics that are used to describe attention include saliency detection, sliding window methods, local image features, etc. The attention mechanism is precisely defined when used with RNNs.
The networks that adhere to RNN standards and employ any attention mechanism are considered attention-based. The mechanism is used to allow the input sequence to have different weights. This allows for data capture and usability of the input-output relations. A basic way to implement this is with the use of a second RNN.
For this work, the Luong attention-based model is applied. For every timestep
For other mathematical implementations of attention, the weights are computed differently. The softmax function on scaled scores for each token is used with the Luong model. The score is calculated with linear transformation of the matrix
Hyperparameters of Luong-attention based RNN
The addition of the attention mechanism separates the Luong RNN from the original. This mechanism allows the neural network to have a selective focus on the input sequences while creating output. The text ahead explains the hyperparameters required to be tuned in such networks.
Hidden layers number ( Hidden units number per layer ( RNN cell type: Different RNN cells can be used alike in gated recurrent units (GRU) and LSTM RNNs [57]. The purpose of such cells is the mitigation of the vanishing gradient as well as to capture data relations of greater temporal distances. Mechanism of attention: As different mechanisms can be applied this parameter in the case of this research has the value of the Luong attention model. There are two types of attention mechanisms. The first is the global attention used to take care of all positions of the source, and the local attention focuses on the area around the current target. Scoring function for attention: The alignment scores are computed by this function between the source and target sequences. Three different scoring functions are defined by Luong attention: dot product, general (multiplicative), and concatenation (additive). The model’s performance directly depends on the selection of this function as well as its interpretability. Learning rate ( Dropout rate ( Batch size: During a single weights update the number of training samples is defined by the batch size. Models with higher sizes can be more accurate in gradient estimation and increase the speed of training but with higher computational resource requirements. Sequence length: The lengths of model’s input and output sequences. Computational complexity and risk of overfitting rise with the increase of this parameter with the goal of capturing distant data relations.
Models performance for cardiogram anomaly detection relies on proper hyperparameter selection for the Luong attention-based RNN model. This is performed through extensive experimentation, as well as optimization through other metaheuristics.
The original particle swarm optimization method
Kennedy and Eberhart [58] suggested the original PSO in 1995 with the main inspiration being the fish and bird flocking. Particles define the search agents which are individuals of the population. The algorithm has established satisfactory performance for discrete and continuous optimization challenges [59].
The initial step is to apply random velocities to every particle of the population. Particles move with the velocity described by three weights searching for the optimal position. The mentioned three weights are the previous velocity, the best obtained so far, and the neighbor’s best-obtained direction so far.
for which
The position that is the best so far is updated as
The velocities are described as
the best individual so far is given by pbest, while the gbest represents the group’s best solution. Based on both values the next position of the particle is calculated. By applying the inertia weight method, it may be modeled as:
where the particle velocity is shown as
The application of the inertia factor follows:
for which
While the original PSO is very versatile and shows excellent performance when applied to many challenging tasks extensive evaluations using standard CEC [60] functions certain drawbacks can be observed. A popular approach for overcoming similar issues is through hybridization with other algorithms [61]. As such an algorithm that outperforms base algorithms can be formulated.
For this work, due to excellent exploitation potential [62], the FA [63] is chosen for hybridization. This algorithm mimics the mating behaviors of fireflies observed in nature. As a population-based algorithm, initially, a population of random agents is created. Agents are evaluated with respect to the fitness function that is problem-specific. The outcomes of this function are emulated as firefly brightness by the FA. Brightness determines how attractive an agent is to others in the population.
However, the brightness perceived by other agents varies depending on several factors and can be determined for each agent in the population according to the following:
where
where the positional change for agent
To ensure contribution of both metaheuristics to the optimization process, an additional control
As the original PSO is enriched with the FA’s search procedure in the proposed solution it is named the PSO firefly search algorithm (PSO-FS). The pseudocode of the introduced optimization approach is provided below:
Pseudocode of the introduced PSO-FS algorithmDefine control parameters
Determine particle velocities based on the best agent Update agent positions based on determined velocities
Evaluate solutions based on the objective function Store best solution for future updates top-performing individual as the solution
For the simulations that were conducted, a real-world ECG dataset was applied [64], available at
In the first set of simulations metaheuristic methods were assigned to optimize the RNN for this issue. The parameters that were the subject of optimization are model’s layers number
In the second set of simulations metaheuristic methods were allocated to optimize the RNN networks with attention layers under identical conditions. The count of cells in the attention layer present in the network is optimized inside boundaries of
In both simulations the focus is to find light weight architectures and optimize their efficiently for the given task. To this end several state-of-the-art algorithms have been put to comparison alongside the proposed algorithm. These include the original PSO [58], and FA [63] algorithms as well as the well established GA [65], WOA [66] and SCA [67]. Every algorithm used in experiments was applied under the same circumstances having the population size of 6 solutions for 8 rounds. Total lags are applied
In the preceding equations TP and TN denote true positives and negatives, while FP and FN denote false positive and negative instances. The optimization of the objective function is done for the error metric.
An additional metric included in this analysis is Cohen’s Kappa shown in Eq. 14 due to this metric’s ability to deal with imbalanced data.
where the observed agreements
The outcomes of the two conducted experiments are presented in the following order. Initially outcomes with simple RNN are explored. Following this outcomes using attention augmented LSTM networks are presented.
Experiments with simple RNN
Each algorithm is evaluated and compared for the fitness function results over 30 runs in Table 1. Best, worst, and mean outcomes are provided. The Cohen’s kappa comparison results are given in Table 2.
Fitness function overall scores
Fitness function overall scores
Indicator function overall scores
Distributions of the fitness and indicator functions.
Objective and indicator convergence diagrams.
Detailed metrics comparisons among top-performance models
Swarm diversity diagrams for the objective and indicator functions.
As the outcomes shown in Table 1 indicate, the introduced algorithm achieved the best outcomes in the best-case scenario and in the median case of execution. However, the original FA algorithm held the best outcomes in the worst-case scenario. This in turn allowed the FA algorithm to reach the best outcomes in the mean metric. Furthermore, the original FA algorithm attained the highest rate of stability.
Best performing model PR, ROC curves and confusion metric.
Outcomes are somewhat mirrored for the indicator function, where the FA algorithm demonstrated high stability due to good performance in the worst-case scenario, resulting in a good outcome in the mean outcomes. Nevertheless, the best median outcomes are demonstrated by the introduced metaheuristic. Interestingly, the WOA demonstrated the best outcomes evaluated on the indicator function. However, it also achieved the worst results in the worst-case execution, limiting the algorithm’s reliability and demonstrating the lowest stability compared to other algorithms.
Stability comparisons regarding the fitness and indicator functions of each of the evaluated algorithms can be seen in Fig. 1.
Selected parameters for top-performance models
Fitness function overall scores for RNN-ATT experiments
One important indicator of algorithm performance is the convergence rates through iterations. By observing convergence rates, details about the algorithm’s ability to avoid local minima traps as well as the algorithm’s ratio of diversification to intensification can be assessed. Comparison between convergence rates for the top-performance models generated by every optimizer is presented in Fig. 2 for both the indicator and objective functions.
Indicator function overall scores for RNN-ATT experiments
Detailed metrics comparisons among top-performance models for RNN-ATT experiments
Best performing model confusion metric.
Objective and indicator function distribution plots for RNN-ATT simulations.
Swarm diversity diagrams for the fitness and indicator functions for RNN-ATT simulations.
Convergence graphs of fitness and indicator functions for RNN-ATT experiments.
Convergence rates shown in Fig. 2 indicate that in the best possible runs the original FA and SCA algorithm had a near-optimal start showing very little convergence. The convergence of the introduced algorithm demonstrated a steady convergence towards an optimal starting with a sub-optimal position. Furthermore, numerical results indicated that the algorithm also demonstrated an ability to avoid local minimum traps attaining better solutions than algorithms starting with a significant advantage that shows premature convergence. These outcomes are further reinforced in sward diversity plots shown in Fig. 3.
Additional comparisons between the top models constructed by every metaheuristics algorithm are demonstrated in detail in Table 3.
Objective function overall outcomes for RNN-ATT simulations
Best performing model PR, ROC curves and confusion metric for RNN-ATT simulations.
As shown within Table 3 the best promising model that has been produced by the proposed metaheuristics shows the highest accuracy value alongside the highest macro average values. Furthermore, the algorithms also demonstrated the highest precision for anomaly detection compared to other optimized models. Nevertheless, the WOA demonstrated the highest precision for normal heart activity classification. However, it is important to mention that the WOA exhibited low stability stability across other metrics.
The classification PR and ROC curves for the best-performing model are demonstrated in Fig. 4 while the confusion metrics are in Fig. 5.
Hyperparameters that were selected by the algorithms are provided to incite repeatability and further research on this topic in Table 4.
Simulations outcomes that incorporate attention layers are provided in Table 8 in terms of objective function and in Table 6 in terms of indicator function. A strong stability is demonstrated by the PSO. However, the PSO did not showcase the best outcomes. Similarly the WOA demonstrated the superior scores for the mean and median values but did not manage to find an overall optimal solution.
Best performing model confusion metric for RNN-ATT simulations.
Stability comparisons are also provided in Fig. 6 as distribution plots and in Fig. 7 as swarm plots. While the FA showcases high stability, it also fails to attain the best outcomes, suggesting that the lack of exploration exists with this algorithm converging prematurely towards a local minimum. Further details are presented in convergence graphs provided in Fig. 8. Convergence rates suggest that several optimizes converge prematurely towards an local optima failing to locate a best solution. The introduced optimizer showcases a slower convergence rate, but this boost in exploration helps the algorithm locate a more promising outcome.
Detailed comparisons between the most superior models produced by every optimizer are provided in Table 7.
Further details such as the PR and ROC curves for the best model are provide in Fig. 9 followed by the best models confusion matrix in Fig. 10. Finally, parameters for the best constructed models are displayed in Table 8.
The introduction of attention layers improve the performance of neural networks for the given challenge. Additionally, the introduced optimizer performed equally well under both test scenarios suggesting that the introduced modifications help overcome local minimum traps and focus on finding better potential solutions. Additionally, attention layers help the model focus on more relevant information provided to the network allowing for better outcomes boosting performance from the previous best of 0.006837 to a new best of 0.002486 error rate.
The significance of cardiovascular health in future research cannot be overstated, considering it remains the leading global cause of death. The unexplored facets of diseases and their treatments present a promising frontier for AI, holding the potential to revolutionize healthcare. AI-driven early detection systems can markedly enhance quality of life and extend longevity by enabling doctors to intervene promptly, a critical factor in managing chronic diseases. The healthcare landscape is rife with possibilities as an array of advanced AI algorithms continues to evolve, offering solutions for increasingly complex challenges. The application of metaheuristics to healthcare issues presents limitless combinations, with ongoing research aimed at unraveling the unknowns. Health data, often in time series format, serves as the tuning ground for proposed solutions. With minor adjustments and parameter optimization, the untapped potential of these solutions awaits exploration. An innovative approach involves anomaly detection using ECG systems, employing an RNN optimized by metaheuristic solutions such as PSO, FA, GA, WOA, and SCA.
This study, while showcasing commendable outcomes in the best and median case scenarios, has certain limitations. It concentrates on a specific comparison of optimization algorithms and explores the capabilities of RNNs exclusively for this problem. Computational constraints led to the use of smaller population sizes and a limited number of rounds. Future endeavors should extend beyond these limitations, delving into similar medical problems and exploring novel algorithms to enhance the proposed solution.
Noteworthy enhancements come in the form of attention layers, significantly improving neural network performance for the targeted challenge. The introduced optimizer exhibits consistent performance in various test scenarios, suggesting its effectiveness in overcoming local minimum traps and focusing on superior potential solutions. Furthermore, attention layers enable the model to concentrate on pertinent information, resulting in a substantial performance boost – reducing the error rate from the previous best of 0.006837 to an impressive new low of 0.002486. Future research should build on these findings, exploring similar medical challenges and novel algorithms to further refine and advance solutions in this domain.
