Optimized Deep Learning Model Using Modified Whale’s Optimization Algorithm for EEG Signal Classification

Brain-Computer Interface (BCI) is a technology in which Electroencephalogram (EEG) signals are utilized to create a link between a person’s mental state and a computer-based signal processing system that decodes the signals without needing muscle movement. The mental process of picturing the movement of a body component without actually moving that body part is known as Motor Imagery (MI). MI BCI is a Motor Imagery-based Brain-Computer Interface that allows patients with motor impairments to interact with their environment by operating robotic prostheses, wheelchairs


Introduction
Several people worldwide suffer from neural diseases that result in body paralysis. Those kinds of people cannot be able to communicate directly, so Brain-Computer Interface System (BCI) is used to estimate the voltage deviations from the electrodes fixed on the patient's scalp and to classify them as commands. A Brain-computer Interface (BCI) is a system that allows direct communication between the brain and an external device, such as a computer or a prosthetic limb, without requiring any muscle movement or peripheral nerves. Some electronic indicators transform brain signals to outfit classes [36]. This is useful for identifying the patient's intentions, controlling robots, wheelchair operation, and alphabet selections, and used in neuro-prosthesis for the movement of paralyzed legs [6,19,22,24]. BCI uses electroencephalogram (EEG) to record collectively and analyze neuron activity approximately for mobile devices, so it should be analyzed in depth. EEG is applied everywhere because of its simplicity and low cost. BCI construction has three stages. The first is to accession data from EEG, which is derived from brain signals [36]. The second thing is extracting features from the result of the previous step. The final one is to classify the signals and circulate them to different devices. Several classification techniques are availed to predict the category of motor imagery tasks from EEG signals [18,23]. The outcomes are helpful in BCI applications for producing command controls. Several devices like robotic devices, intelligent home appliances, and the movement of wheelchairs [15] avail above output. Several classification techniques, such as Random Forest, Naive Bayes, SVM, KNN, and CNN, are availed to classify the EEG data.
Electronic indicators are devices used to measure and detect brain signals, also known as neural activity. These indicators are used to transform the electrical signals produced by the brain into a digital format that can be analyzed by computer software or other electronic devices Current Scholars are mostly applying CNN for classifications such as object detection [25], audio classification [9], motion prediction [17,4], disease analysis [29,17], sentiment analysis [1], and also modern agriculture [27]. Exceeding the other classification tech-nique, Deep CNN results in better milestones [12,13]. Still, it remains significant to achieve a perfect CNN framework. While creating a CNN framework, several parameters need to be in mind, like the levels of the network, type of each layer, the count and size of the convolution layer, and the relation between layers. The above parameters affect the overall results of CNN, so it is considered to be a difficult task to design the best CNN. Note that trying the same CNN framework for different jobs does not provide the optimal solution, so CNN should be redesigned accordingly for every task. When experts are trying to design a CNN manually for a dataset specifically, it requires several amounts of time and more research knowledge [30]. Developing the CNN framework uses evolutionary algorithms, which becomes an optimization problem. Most researchers use the same evolutionary techniques to obtain optimal neural networks. In this work, a modified Whale Optimization algorithm is used to design CNN architecture.
The contribution of the proposed work is given as follows: _ An optimal convolutional neural network architecture search algorithm WOAIMCNN is proposed. _ A mutual vector is generated in the proposed work to provide an exploitation search for the local information. _ A novel difference and addition operator with a mutualism phase is provided. It enhances the exploration capability of the algorithm without trapping into optimum local value. _ This study involves the utilization of the Whale Optimization Algorithm, which includes an Improved Mutualism Phase. _ The goal of this approach is to efficiently identify the optimal Convolutional Neural Network architecture that can accurately classify motor imagery tasks with minimal computational complexity.
The paper is organized as follows: Section 3 explains the proposed methodology and the WOAIMCNN algorithm. The dataset description, results, and discussion are provided in Section 4. Section 5 concludes the proposed work.

Related Works
In 2020, Zhang et al. [41] plan to provide an improved ELM-based technique for EEG categorization in MIbased BCI. Here, the PSO-ELM considerably increases the classification accuracy for both two-class and four-class MI classifications compared to SVM, ELM, and PSO-SVM. In 2020, Chen [7] introduced the FBSF-TSCNN method, which combines filter bank spatial filtering with deep temporal-spatial feature learning to generate a quick and accurate method. Experimental findings on the BCI IV 2a and SMR-BCI datasets, respectively. Demonstrate the usefulness of the recommended approach.
Fan [39] invented QNet in the year 2020, which uses 3D-AM to learn attention weights for channels, time points, and feature maps. On average, the highest level of accuracy was 68%, followed by 74.75 percent and 82.88 percent.
In 2021 [34] Varsehi proposed a unique motor imagery EEG data channel selection technique based on Granger causality analysis. It outperforms the previous correlation-based method. Xiao [28] presented a novel EWT-based technique that outperforms the previous correlation-based method for improving MI task EEG signal categorization accuracy in the context of a motor imagery task. The proposed EWT technique achieves higher classification accuracy than current techniques that use 118 electrode channels, with the IA and IF components achieving average classification accuracy of up to 95.19 percent and 94.60 percent, respectively, for dataset IVa.
For designing Neural Networks, genetic algorithms are used in Neuro Evolution of Augmenting Technology (NEAT) [32]. HyperNEAT was designed by combining NEAT with secondary encoded topology using connected Compositional Pattern Producing Networks (CPPN) [31]. Many researchers have discussed that because of several parameters required for the CNN framework, evolutionary algorithms are not compatible with the computational model of CNN [2]. Google team proposed an algorithm based on GA for the CNN framework, which is applied for all tasks until 2017 and is called Large scale Evaluation of Image Classifier (LEIC) [26]. Another algorithm called EvoCNN based on GA is designed to show CNN construct with an evolutionary algorithm within optimal time [33]. Another scholar proposed an algorithm called IPPSO, Particle Swarm Optimization (PSO) on CNN for simulating IPs for encoding CNN [35]. Francisco designed a search algorithm for the CNN framework called PSO CNN based on PSO [14]. Still, the researchers are more interested in introducing and proving their knowledge by designing an optimal algorithm that provides the best on the CNN framework with the evolutionary network.
The attraction with the performance of the algorithms, this novel work introduced an enhanced method called WOAIMCNN, which is presented by combining formal WOA with a modified mutualism phase. Even though the formal technique is optimal, it lacks less exploration facility, delays convergence speed, and is efficiently confined to a communal result. Formal WOA uses a coefficient vector as a parameter (AC) in the interval between -2 and 2. AC value reduces to 0 from 2 in each iteration; when AC>=1, it is selected as the exploration phase. This guarantees the execution of the exploitation segment inside the second half of the iteration and weakens the exploration phase. Another novel method is a modified SOS algorithm to get optimal solutions by balancing the search process.
In the modern era, SOS updates independently by random independents instead of the overall optimal independents, which increases the heterogeneity of the result. Since the global efficiency of the algorithm is increased, this is useful to jump to the next level in the optimal communal solution. This way, WOA exploration capacity increases, investigations are eventually adjusted, and coupling speed increases.
One of the significant challenges with BCI systems is inter-subject variability. EEG signals can vary significantly between individuals due to differences in brain structure, skull thickness, and other factors. This variability makes it challenging to create a one-size-fits-all BCI system that works equally well for everyone. To address this challenge, researchers have been exploring approaches that can adapt to individual differences in EEG signals, such as personalized training and calibration procedures, and using machine learning algorithms to learn individual-specific features of EEG signals.
Another major challenge with BCI systems is the low signal-to-noise ratio of EEG signals. EEG signals are often contaminated by various types of noise, including muscle artifacts, electrode movement, and environmental interference. This noise can make it difficult to decode the user's intentions from the EEG signal accurately. To address this challenge, researchers have been developing signal processing techniques, such as filtering and artifact removal methods, to improve the quality of the EEG signal. Additionally, researchers have been exploring novel electrode designs and placement strategies to reduce noise and improve the quality of the EEG signal.
In addition to these challenges, other issues need to be addressed in any BCI-related work, such as real-time processing of EEG signals, ensuring user safety and privacy, and developing user-friendly BCI interfaces. Researchers in the field of BCI are continuously working on developing new techniques and approaches to address these challenges and make BCI systems more practical and accessible for everyday use.

Whale Optimization Algorithm (WOA)
The Whale Optimization Algorithm copies the Bryde whale's behavior. Like standard methods, WOA optimization also begins with initializing the population. The overall searching technique is split into 3 phases: Search for target prey, surround the prey, and rounded feeding by bubble-net manner. The efficiency of every is based on the stability of local and global techniques; WOA avails the whale technique for exploitation and exploration phase balancing based on some criteria. Final terminations are based on the requirements already defined by fitness value or several iterations. a Searching the Prey At the current location, randomly, the whale searches for prey. The same behavior of the Bryde whale is applied to magnify the exploration potential of the algorithm. Here, new CNN architecture generation process is done by using Equations (1)-(2), as is described in Figure 5. The mathematical representation of the equations is as follows: Another major challenge with BCI systems is the low signal-to-noise ratio of EEG signals. EEG signals are often contaminated by various types of noise, including muscle artifacts, electrode movement, and environmental interference. This noise can make it difficult to decode the user's intentions from the EEG signal accurately. To address this challenge, researchers have been developing signal processing techniques, such as filtering and artifact removal methods, to improve the quality of the EEG signal. Additionally, researchers have been exploring novel electrode designs and placement strategies to reduce noise and improve the quality of the EEG signal. In addition to these challenges, other issues need to be addressed in any BCI-related work, such as real-time processing of EEG signals, ensuring user safety and privacy, and developing user-friendly BCI interfaces. Researchers in the field of BCI are continuously working on developing new techniques and approaches to address these challenges and make BCI systems more practical and accessible for everyday use.

Whale Optimization Algorithm (WOA)
The Whale Optimization Algorithm copies the Bryde whale's behavior. Like standard methods, WOA optimization also begins with initializing the population. The overall searching technique is split into 3 phases: Search for target prey, surround the prey, and rounded feeding by bubble-net manner. The efficiency of every is based on the stability of local and global techniques; WOA avails the whale technique for exploitation and exploration phase balancing based on some criteria. Final terminations are based on the requirements already defined by fitness value or several iterations. a) Searching the Prey At the current location, randomly, the whale searches for prey. The same behavior of the Bryde whale is applied to magnify the exploration potential of the algorithm. Here, new CNN architecture generation process is done by using Equations (1)-(2), as is described in Figure 5. The mathematical representation of the equations is as follows: (1) Another major challenge with BCI systems is the low signal-to-noise ratio of EEG signals. EEG signals are often contaminated by various types of noise, including muscle artifacts, electrode movement, and environmental interference. This noise can make it difficult to decode the user's intentions from the EEG signal accurately. To address this challenge, researchers have been developing signal processing techniques, such as filtering and artifact removal methods, to improve the quality of the EEG signal. Additionally, researchers have been exploring novel electrode designs and placement strategies to reduce noise and improve the quality of the EEG signal. In addition to these challenges, other issues need to be addressed in any BCI-related work, such as real-time processing of EEG signals, ensuring user safety and privacy, and developing user-friendly BCI interfaces. Researchers in the field of BCI are continuously working on developing new techniques and approaches to address these challenges and make BCI systems more practical and accessible for everyday use.

Whale Optimization Algorithm (WOA)
The Whale Optimization Algorithm copies the Bryde whale's behavior. Like standard methods, WOA optimization also begins with initializing the population. The overall searching technique is split into 3 phases: Search for target prey, surround the prey, and rounded feeding by bubble-net manner. The efficiency of every is based on the stability of local and global techniques; WOA avails the whale technique for exploitation and exploration phase balancing based on some criteria. Final terminations are based on the requirements already defined by fitness value or several iterations. a) Searching the Prey At the current location, randomly, the whale searches for prey. The same behavior of the Bryde whale is applied to magnify the exploration potential of the algorithm. Here, new CNN architecture generation process is done by using Equations (1)-(2), as is described in Figure 5. The mathematical representation of the equations is as follows: where P represents the population's position vector which is CNN architecture, Brand is a population vector randomly chosen from the current population, x denotes current iteration, Diff represents space between the population's current and random individuals, and the operator dot (.) represents multiplication process element by element, | | represents the absolute result. Two coefficient vectors, CV and Q, are defined as in Equations (3)-(4).
where P represents the population's position vector which is CNN architecture, Brand is a population vector randomly chosen from the current population, x denotes current iteration, Diff represents space between the population's current and random individuals, and the operator dot (.) represents multiplication process element by element, | | represents the absolute result. Two coefficient vectors, CV and Q, are defined as in Equations (3)-(4).

*
where r represents a number that linearly decreases by 2 to 0 in iteration, rand is a random number chosen between intervals.
b) Encircling the Prey In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several arbitrary values in the sp During the process of se Q value exploration pr exploitation process. W the exploration process global searching base Suppose Q is negati location started by indiv (6) or Equation (8). probability, WOA jum bubble-net raids for atta technique. For every value will be 0.5. The m for the above method i (10) as follows: 3.2 Proposed Whale Op Improved Mutualism Ph Algorithm (WOAIMCN Based on the current n populations are initia individual's fitness is e optimal global solution. mutation phase is pro absolute values of the p every individual (Pq), ch random from the overa not equal to Ps to intera architecture is generate (12), as described in mutation is mathematica where best represents any with high fitness va advantages both individ in inaugurating a mu correlation. It is defined result of the above tw ranges between 1 and 2 by comparing how i benefits from each othe (13). (3) where P represents the population's position vector which is CNN architecture, Brand is a population vector randomly chosen from the current population, x denotes current iteration, Diff represents space between the population's current and random individuals, and the operator dot (.) represents multiplication process element by element, | | represents the absolute result. Two coefficient vectors, CV and Q, are defined as in Equations (3)-(4).

*
where r represents a number that linearly decreases by 2 to 0 in iteration, rand is a random number chosen between intervals.

b) Encircling the Prey
In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution.
Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several arbitrary values in the sp During the process of se Q value exploration pr exploitation process. W the exploration process global searching base Suppose Q is negati location started by indiv (6) or Equation (8). B probability, WOA jum bubble-net raids for atta technique. For every value will be 0.5. The m for the above method i (10) as follows: 3.2 Proposed Whale Op Improved Mutualism Ph Algorithm (WOAIMCN Based on the current n populations are initia individual's fitness is e optimal global solution. mutation phase is pro absolute values of the p every individual (Pq), ch random from the overa not equal to Ps to intera architecture is generate (12), as described in mutation is mathematica where best represents any with high fitness va advantages both individ in inaugurating a mu correlation. It is defined result of the above tw ranges between 1 and 2 by comparing how in benefits from each othe (13).
where r represents a number that linearly decreases by 2 to 0 in iteration, rand is a random number chosen between intervals.
b Encircling the Prey In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where P represents the population's position vector which is CNN architecture, Brand is a population vector randomly chosen from the current population, x denotes current iteration, Diff represents space between the population's current and random individuals, and the operator dot (.) represents multiplication process element by element, | | represents the absolute result. Two coefficient vectors, CV and Q, are defined as in Equations (3)-(4).

*
where r represents a number that linearly decreases by 2 to 0 in iteration, rand is a random number chosen between intervals.

b) Encircling the Prey
In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several arbitrary values in the s During the process of se Q value exploration p exploitation process. W the exploration process global searching base Suppose Q is negati location started by indiv (6) or Equation (8). probability, WOA jum bubble-net raids for atta technique. For every value will be 0.5. The m for the above method i (10) as follows: 3.2 Proposed Whale Op Improved Mutualism Ph Algorithm (WOAIMCN Based on the current n populations are initia individual's fitness is e optimal global solution. mutation phase is pro absolute values of the p every individual (Pq), c random from the overa not equal to Ps to intera architecture is generate (12), as described in mutation is mathematic where best represents any with high fitness va advantages both individ in inaugurating a mu correlation. It is defined result of the above tw ranges between 1 and 2 by comparing how i benefits from each othe (13).

(5)
where P represents the population's position vector which is CNN architecture, Brand is a population vector randomly chosen from the current population, x denotes current iteration, Diff represents space between the population's current and random individuals, and the operator dot (.) represents multiplication process element by element, | | represents the absolute result. Two coefficient vectors, CV and Q, are defined as in Equations (3)-(4).

*
where r represents a number that linearly decreases by 2 to 0 in iteration, rand is a random number chosen between intervals.
b) Encircling the Prey In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)- (8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several arbitrary values in the sp During the process of se Q value exploration pr exploitation process. W the exploration process global searching base Suppose Q is negati location started by indiv (6) or Equation (8). B probability, WOA jum bubble-net raids for atta technique. For every value will be 0.5. The m for the above method i (10) as follows: 3.2 Proposed Whale Op Improved Mutualism Ph Algorithm (WOAIMCN Based on the current n populations are initia individual's fitness is e optimal global solution. mutation phase is pro absolute values of the po every individual (Pq), ch random from the overa not equal to Ps to intera architecture is generate (12), as described in mutation is mathematica where best represents any with high fitness va advantages both individ in inaugurating a mut correlation. It is defined result of the above tw ranges between 1 and 2 by comparing how in benefits from each othe (13). (6) where best represents the present optimal solution.
c Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where P represents the population's position vector which is CNN architecture, Brand is a population vector randomly chosen from the current population, x denotes current iteration, Diff represents space between the population's current and random individuals, and the operator dot (.) represents multiplication process element by element, | | represents the absolute result. Two coefficient vectors, CV and Q, are defined as in Equations (3)-(4).

*
where r represents a number that linearly decreases by 2 to 0 in iteration, rand is a random number chosen between intervals.
b) Encircling the Prey In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)- (8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several arbitrary values in the s During the process of se Q value exploration pr exploitation process. W the exploration process global searching base Suppose Q is negati location started by indiv (6) or Equation (8). probability, WOA jum bubble-net raids for atta technique. For every value will be 0.5. The m for the above method i (10) as follows: where P represents the population's position vector which is CNN architecture, Brand is a population vector randomly chosen from the current population, x denotes current iteration, Diff represents space between the population's current and random individuals, and the operator dot (.) represents multiplication process element by element, | | represents the absolute result. Two coefficient vectors, CV and Q, are defined as in Equations (3)-(4).

*
where r represents a number that linearly decreases by 2 to 0 in iteration, rand is a random number chosen between intervals.
b) Encircling the Prey In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several arbitrary values in the s During the process of se Q value exploration pr exploitation process. W the exploration process global searching base Suppose Q is negati location started by indiv (6) or Equation (8). probability, WOA jum bubble-net raids for atta technique. For every value will be 0.5. The m for the above method i (10) as follows: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): where P represents the population's position vector which is CNN architecture, Brand is a population vector randomly chosen from the current population, x denotes current iteration, Diff represents space between the population's current and random individuals, and the operator dot (.) represents multiplication process element by element, | | represents the absolute result. Two coefficient vectors, CV and Q, are defined as in Equations (3)-(4).

*
where r represents a number that linearly decreases by 2 to 0 in iteration, rand is a random number chosen between intervals.
b) Encircling the Prey In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several arbitrary values in the s During the process of se Q value exploration p exploitation process. W the exploration process global searching base Suppose Q is negati location started by indi (6) or Equation (8). probability, WOA jum bubble-net raids for atta technique. For every value will be 0.5. The m for the above method i (10) as follows:  The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several arbitrary values in the span [0, 1].
During the process of searching, depending on the Q value exploration process is switched to the exploitation process. When Q is positive (Q>=1), the exploration process is activated, which starts global searching based on Equations (1)- (2). Suppose Q is negative (Q<1), alteration of location started by individuals based on Equation (6) or Equation (8). Based on the AC value probability, WOA jumps the process between bubble-net raids for attacking and encircling prey technique. For every strategy, the probability value will be 0.5. The mathematical representation for the above method is represented as Equation (10)  During the process of searching, depending on the Q value exploration process is switched to the exploitation process. When Q is positive (Q>=1), the exploration process is activated, which starts global searching based on Equations (1)-(2). Suppose Q is negative (Q<1), alteration of location started by individuals based on Equation (6) or Equation (8). Based on the AC value probability, WOA jumps the process between bubble-net raids for attacking and encircling prey technique. For every strategy, the probability value will be 0.5. The mathematical representation for the above method is represented as Equation (10) as follows: where best represents any one population Ps or Pq with high fitness value, MUV shows the advantages both individuals attain from everyone in inaugurating a mutually optimal symbiotic correlation. It is defined by calculating the average result of the above two individuals; B1 & B2 ranges between 1 and 2 is a proportion coefficient by comparing how individuals are obtaining benefits from each other. It is shown in Equation (13).

Proposed Whale Optimization Algorithm with Improved Mutualism Phase of SOA Optimization Algorithm (WOAIMCNN)
Based on the current new process of searching, populations are initialized, and then every individual's fitness is estimated to determine the optimal global solution. Later in all iterations, the mutation phase is processed initially after the absolute values of the population are updated. For every individual (Pq), choose an individual (Ps) as random from the overall population where Pq is not equal to Ps to interact with Pq. The new CNN architecture is generated using Equations (11)-(12), as described in Figures 3-4. The above mutation is mathematically defined as follows: b) Encircling the Prey In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several (10) 3.2 Proposed Whale Optimization Algorithm with Improved Mutualism Phase of SOA Optimization Algorithm (WOAIMCNN) Based on the current new process of searching, populations are initialized, and then every individual's fitness is estimated to determine the optimal global solution. Later in all iterations, the mutation phase is processed initially after the absolute values of the population are updated. For every individual (Pq), choose an individual (Ps) as random from the overall population where Pq is not equal to Ps to interact with Pq. The new CNN architecture is generated using Equations (11)- (12), as described in Figures 3-4. The above mutation is mathematically defined as follows: ( 1 where best represents any one population Ps or Pq with high fitness value, MUV shows the advantages both individuals attain from everyone in inaugurating a mutually optimal symbiotic correlation. It is defined by calculating the average result of the above two individuals; B1 & B2 ranges between 1 and 2 is a proportion coefficient by comparing how individuals are obtaining benefits from each other. It is shown in Equation (13). (11) b) Encircling the Prey In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several (10) 3.2 Proposed Whale Optimization Algorithm with Improved Mutualism Phase of SOA Optimization Algorithm (WOAIMCNN) Based on the current new process of searching, populations are initialized, and then every individual's fitness is estimated to determine the optimal global solution. Later in all iterations, the mutation phase is processed initially after the absolute values of the population are updated. For every individual (Pq), choose an individual (Ps) as random from the overall population where Pq is not equal to Ps to interact with Pq. The new CNN architecture is generated using Equations (11)- (12), as described in Figures 3-4. The above mutation is mathematically defined as follows: ( 1 where best represents any one population Ps or Pq with high fitness value, MUV shows the advantages both individuals attain from everyone in inaugurating a mutually optimal symbiotic correlation. It is defined by calculating the average result of the above two individuals; B1 & B2 ranges between 1 and 2 is a proportion coefficient by comparing how individuals are obtaining benefits from each other. It is shown in Equation (13). (12) In this second phase, the most optimal solution determined in the previous iteration is nearer to the best value. The remaining individuals and inhabitants update their locations close to the current optimal solution. Here, location refers to the layers used in the CNN architecture. New CNN architecture designed using Equations (5)-(6) is described in Figure 5.
where best represents the present optimal solution. c) Bubble-net Attacking Strategy Humpback or Bryde whales stick to bubble-net raids on the helix structure path to attack the prey. New CNN architecture is generated by using Equations (7)-(8), which is described in Figure 4. Same bubble-net technique is followed in WOA while searching, which is represented as: where s represents the logarithmic shape of the spiral and it is also a constant value, r is chosen as a random number evaluated by the below given mathematical representation as Equation (9): The r2 value is linearly decreased between the range -1 to -2 during the iteration process, and the rand is several (10) 3.2 Proposed Whale Optimization Algorithm with Improved Mutualism Phase of SOA Optimization Algorithm (WOAIMCNN) Based on the current new process of searching, populations are initialized, and then every individual's fitness is estimated to determine the optimal global solution. Later in all iterations, the mutation phase is processed initially after the absolute values of the population are updated. For every individual (Pq), choose an individual (Ps) as random from the overall population where Pq is not equal to Ps to interact with Pq. The new CNN architecture is generated using Equations (11)- (12), as described in Figures 3-4. The above mutation is mathematically defined as follows: ( 1 where best represents any one population Ps or Pq with high fitness value, MUV shows the advantages both individuals attain from everyone in inaugurating a mutually optimal symbiotic correlation. It is defined by calculating the average result of the above two individuals; B1 & B2 ranges between 1 and 2 is a proportion coefficient by comparing how individuals are obtaining benefits from each other. It is shown in Equation (13). (13) where best represents any one population Ps or Pq with high fitness value, MUV shows the advantages both individuals attain from everyone in inaugurating a mutually optimal symbiotic correlation. It is defined by calculating the average result of the above two individuals; B1 & B2 ranges between 1 and 2 is a proportion coefficient by comparing how individuals are obtaining benefits from each other. It is shown in Equation (13).  The changes are done on two individuals among the overall population at a particular time using the optimal individual selected randomly among the two individuals already selected randomly, which enables high diversity in the result. After the enhanced mutation phase global best optimal solution is evaluated and reassigned if it gives the best than the already defined best results; by integrating the enhanced mutation phase, the requirement of exploration capacity of WOA is Algorithm 1.

749
Information Technology and Control 2023/3/52 The changes are done on two individuals among the overall population at a particular time using the optimal individual selected randomly among the two individuals already selected randomly, which enables high diversity in the result. After the enhanced mutation phase global best optimal solution is evaluated and reassigned if it gives the best than the already defined best results; by integrating the enhanced mutation phase, the requirement of exploration capacity of WOA is controlled here. The convergence speed of the algorithm increases by selecting optimal individuals during the current phase and the globally best optimal individuals during the local search. This above process is continued until the best result is obtained according to the termination criteria. The pseudo-code for the proposed method is defined in Algorithm1, and the complete architecture model is drawn in Figure 1. Here, CNN architecture is provided as the whale's population. Based on the population, it is regenerated. From the population the candidate CNN is trained and the fitness value is calculated. WOA computes for 'm' iterations and testing data are performed in the best CNN.
a Candidate CNN Architecture Representation for WOAIMCNN Algorithm While dealing with most complex architecture models, the important thing is the representation; here, it is CNN architecture Representation for EEG data classification. This novel method introduces a direct encoding method for the CNN model. This work only focuses on the CNN model, which contains three layer types pooling, fully connected, and convolutional. Every individual in a population of WOAIMCNN is represented as shown in Figure 3, which is the candidate model of CNN architecture. The number of layers in candidate CNN architecture varies in the WOAIMCNN process, which may increase individual diversity in the population space. The Initialization of the WOAIMCNN Population To start the WOAIMCNN process, the input parameters are initialized with the original population value, which is CNN architecture. In Algorithm 2, the initialization process is explained in detail. The initialization of the population is done by using the method followed in [24] and with some improvement to obtain a correct process. The generated CNN model will be an effective architecture with the first layer as a convolutional layer and the final last layer as a fully connected layer with the middle as a pooled layer, convolution layer and fully connected layer provided randomly.
In an integrated coding update model, while generating the CNN model automatically, the position of the fully connected layer should be located after the convolutional and pooling layer. When the fully connected layer is inserted before the other two layers, the final result will have extreme weight in connec- b) The Initialization of the WOAIMCNN Population To start the WOAIMCNN process, the input parameters are initialized with the original population value, which is CNN architecture. In Algorithm 2, the initialization process is explained in detail. The initialization of the In the integrated update method adaptive span encoding model is used, which will not limit the length of architecture in the CNN model.

Figure 2 Representation of the Individual Population
The lmax is the maximum count of layers, set for the count of layers on the network during the initialization.
Side by side, the network model architecture is generated and re-initialized by considering the tion. It will lead CNN architecture into a detrimental stage, and two different stages were added to the CNN model calculation. The resultant architecture should be arranged by adjusting the fully connected layer after all other pooling and convolutional layers. Due to consecutive down-sampling stages in the continuous pooling layer, the convolutional layer is added in between the continuous pooling layers. In the integrated update method adaptive span encoding model is used, which will not limit the length of architecture in the CNN model.
The lmax is the maximum count of layers, set for the count of layers on the network during the initialization. Side by side, the network model architecture is generated and re-initialized by considering the WOAIMCNN. Here, the algorithm finds the optimal structure by considering the requirements of the original dataset. An individual from the WOAIMCNN population is an architecture model for a CNN candidate. The best individuals are obtained from the population of WOAIMCNN and reframed as the optimal CNN architecture. The mutualism technique of SOS mainly focuses on the average of two non-numeric variables. Every individual calculation process is defined in Algorithm 3. This operation is represented pictorially in Figure 3. The mutualism technique of SOS mainly focuses on the average of two non-numeric variables. Every individual calculation process is defined in Algorithm 3. This operation is represented pictorially in Figure 3. Steps to Implement the Mutualism phase include Difference Operator and Addition Operator. To find the difference in Pq value to be changed, the calculation needs to be done to find the difference between the Mutual Vector (M) and the best architecture selected P Nbest. Differential operation is described in Figure 7. The main key point of this proposed novel methodology is dimensions of corresponding block types of two different candidate models are equal, then their difference is determined as 0. When both are different, then the optimal architecture P Nbest dimension is used. On the other hand, when the P Nbest architecture model block is empty, the architecture block difference's corresponding block dimension value will Examples of the Mutualism phase include difference operator and addition operator also be empty. Normal logical addition process is done among the candidate Pq and value diff, which is the difference between Pq and P Nbest . The addition operation of calculations done on non-numerical architectural blocks also retains the architectural block's dimension in Pq and Diff on corresponding blocks.

Algorithm 3. For calculating Mutual Vector
In this way, the diversity of candidate architecture is increased, which is very effective in selecting the optimal architectural model. Algorithm 4 explains the addition and difference operation optimally. To control the gain selector, a threshold value alpha α is chosen and set as 0.5 Figure 4 describes the above operations' addition and the difference clearly. To find the difference in Pq value to be changed, the calculation needs to be done to find the difference between the Mutual Vector (M) and the best architecture selected PNbest. Differential operation is described in Figure 7. The main key point of this proposed novel methodology is dimensions of corresponding block types of two different candidate models are equal, then their difference is determined as 0. When both are different, then the optimal architecture PNbest dimension is used. On the other hand, when the PNbest architecture model block is empty, the architecture block difference's corresponding block dimension value will also be empty. Normal logical addition process is done among the candidate Pq and value diff, which is the difference between Pq and PNbest. The addition operation of calculations done on non-numerical architectural blocks also retains the architectural block's dimension in Pq and Diff on corresponding blocks.

Figure 4
Examples of the Mutualism phase include difference operator and addition operator Algorithm 4. Implements the Mutualism phase, including the difference operator and addition operator. The difference between two optimal architectures is calculated by comparing the difference and the PBest architecture. The difference calculation is well defined in Figure 5 and Algorithm 5.

Results and Discussion
A Dataset Description 1 Neurosky Dataset From 30 subjects, raw signals from EEG were registered. It takes 5 seconds for data recording in 10 milliseconds duration and three trials for every person. A first-trial person should make a blinking movement, a second should be in focus, a third is to move the eye up, and a fourth movement is an eye down. The set of signals recorded in EEG is of 11 features. To classify the MI tasks following features are availed in our training model Signal Quality, Attention value, Meditation value, delta, theta, low-alpha, high-alpha, low-beta, high-beta, low-gamma, and mid-gamma.

MI BCI -IV 2a Dataset
BCI competition IV-2a dataset is one of the most popular motors imagery task data sets. The dataset consists of 4 classes: Right-hand movement, Left-hand movement, Feet, and Tongue movement. There a total of 9 subjects were used to collect the EEG signals. The dataset consists of 72 samples of training and test data in totally.
The algorithm generates the optimal architecture, which provides higher accuracy for the dataset, and it is shown in Table 2. The parameter in architecture is initialized by the value chosen from the range mentioned in Table 1.

Figure 6
Boxplot for the test accuracies of the Neurosky dataset obtained using the CNN architecture designed using the proposed WOAIMCNN Algorithm

Figure 7
Boxplot for the test accuracies of the MI BCI IV-2a dataset obtained using the CNN architecture designed using the proposed WOAIMCNN Algorithm

Figure 7
Boxplot for the test accuracies of the MI BCI IV-2a dataset obtained using the CNN architecture designed using the proposed WOAIMCNN Algorithm

Figure 8
Histogram for average and optimal classification accuracy for Neurosky and MI BCI IV-2a Dataset of runs and iterations increases, the probability of finding an optimal architecture increases. The optimal solution is reached at the early stage of iteration. The average and the best accuracy obtained for both dataset is provided in Figure 12.
The layers and their parameter values for each layer of the CNN architecture represented as the population in the proposed algorithm for both datasets is shown in Table 2. The algorithm generates architecture with a shallower network, and an optimal architecture that provides higher accuracy is shown. The proposed algorithm avoids deeper architectures at the initial stage for the population since it will increase the time taken for convergence.  Histogram for average and optimal classification accuracy for Neurosky and MI BCI IV-2a Dataset  Histogram for average and optimal classification accuracy for Neurosky and MI BCI IV-2a Dataset Table 2 CNN Architecture assigned for various populations of WOAIMCNN Algorithm after 5th run.  The accuracy with which identical data or instances are utilized for training and testing is called training accuracy. In contrast, test accuracy refers to the accuracy with which the trained model detects independent data or instances not used in training or training accuracy. Table 3 describes the training and testing accuracy and loss of the Proposed WOAIMCNN-generated architecture for the neuro sky dataset. The loss value of a model reveals how well or poorly it performs after each optimization cycle. The algorithm's total performance is evaluated in a standardized manner using an interpretable accuracy metric. Table 4 describes the training and testing accuracy and loss of the Proposed WOAIMCNN-generated architecture for the MI BCI IV 2a dataset. The following section compares the result obtained using the proposed architecture with other deep learning techniques. Table 5 presents the test accuracy obtained using the proposed architecture for BCI IV -2a dataset and compared with different architec-tures proposed in various papers. The result obtained using the proposed work provides the development equally with the competitors. It gives the best outcome for the Neurosky dataset.
Experiments reveal that the recommended strategy surpasses other competing methods in classification accuracy, making it appropriate for boosting the performance of MI-based BCIs.

Conclusion
This research paper aimed to improve classification accuracy in Motor Imagery-based tasks using a novel algorithm called WOAIMCNN. Motor Imagery-based Brain-Computer Interface (MI BCI) is a promising technology that enables people with motor disabilities to interact with their environment using robotic prostheses, wheelchairs, and other devices. EEG signal processing, including feature extraction and classification, is a crucial element of MI BCI technology. In this study, the focus was on Eye blinks and hand and leg movements.
The researchers employed a Convolutional Neural Network (CNN) to classify the MI task using the op-timized WOAIMCNN algorithm to achieve their goal. The suggested CNN architecture was compared with various other approaches to training and testing data accuracy. The findings showed that the recommended strategy outperformed other methods regarding classification accuracy. Therefore, it can be concluded that the proposed WOAIMCNN algorithm, coupled with the optimized CNN architecture, can significantly enhance the performance of MI-based BCIs. This improvement in classification accuracy will help make MI-based BCIs more practical and effective for individuals with motor disabilities, improving their quality of life.