OptEF-BCI: An Optimization-Based Hybrid EEG and fNIRS–Brain Computer Interface

Multimodal data fusion (electroencephalography (EEG) and functional near-infrared spectroscopy (fNIRS)) has been developed as an important neuroimaging research field in order to circumvent the inherent limitations of individual modalities by combining complementary information from other modalities. This study employed an optimization-based feature selection algorithm to systematically investigate the complementary nature of multimodal fused features. After preprocessing the acquired data of both modalities (i.e., EEG and fNIRS), the temporal statistical features were computed separately with a 10 s interval for each modality. The computed features were fused to create a training vector. A wrapper-based binary enhanced whale optimization algorithm (E-WOA) was used to select the optimal/efficient fused feature subset using the support-vector-machine-based cost function. An online dataset of 29 healthy individuals was used to evaluate the performance of the proposed methodology. The findings suggest that the proposed approach enhances the classification performance by evaluating the degree of complementarity between characteristics and selecting the most efficient fused subset. The binary E-WOA feature selection approach showed a high classification rate (94.22 ± 5.39%). The classification performance exhibited a 3.85% increase compared with the conventional whale optimization algorithm. The proposed hybrid classification framework outperformed both the individual modalities and traditional feature selection classification (p < 0.01). These findings indicate the potential efficacy of the proposed framework for several neuroclinical applications.


Introduction
Brain-computer interfaces (BCIs) enable interaction with the environment using brain signals, without the involvement of muscles or the peripheral nervous system [1][2][3]. BCI have flourished and developed over the past few years. One of the most widely used paradigms in BCI research is motor imagery (MI) [4], which involves having the subject imagine completing a task such as gripping [5] or lifting [6]. MI-BCIs are often used to assist patients with motor function issues [7,8], either for assistance with daily living or for rehabilitation training. utilized for feature extraction. According to the literature [31,32], selecting the right activity channels can help to improve the categorization ability. In addition, several studies have demonstrated the effectiveness of feature selection for BCIs [33][34][35]. Feature selection helps to reduce the dimensionality of the dataset, increase processing efficiency, and improve the classification accuracy. In a recent study, Zafar et al. [36] applied a graph convolutional network to determine the correlated activity channels in fNIRS data. A filter-based approach was employed to determine the optimal feature set for SVM training. The authors showed that their proposed method significantly improved the results compared to the full channel features. However, this methodology consists of two steps, channel selection and feature selection, making it less time-efficient.
The use of EEG-fNIRS multimodal techniques to enhance the classification ability has yielded encouraging results. However, powerful computational strategies for the successful incorporation of these modalities are still lacking. The techniques must consider the various feature properties that must be developed in order to maximize the integration of multimodalities. Such initiatives will likely result in significant breakthroughs in packages aimed at measuring brain activity, with an increased performance compared with a single modality. The following are the main highlights of the framework presented here: • First, the data acquired from both modalities were preprocessed to filter them and remove artifacts. • Second, the statistical temporal features of both modalities were extracted with a 10 s interval.

•
The features were fused, and the binary enhanced whale optimization algorithm (E-WOA) was used to select the optimal/efficient fused feature subset and to improve the efficiency of the multimodal characteristics by increasing their complementarity, redundancy, and significance in relation to classification labels. • The support-vector-machine-based cost function was used to classify the data. • An online MI dataset of 29 healthy individuals was used for validation. • Finally, the performance results of the proposed approach were compared with those of conventional WOA, other optimization algorithms, and the published literature using the same dataset. Figure 1 depicts the architecture for data acquisition, preprocessing, the extraction of temporal features, multimodal feature fusion, optimal feature selection, and model training for hybrid BCI applications. The following sections explain each step in detail. utilized for feature extraction. According to the literature [31,32], selecting the right activity channels can help to improve the categorization ability. In addition, several studies have demonstrated the effectiveness of feature selection for BCIs [33][34][35]. Feature selection helps to reduce the dimensionality of the dataset, increase processing efficiency, and improve the classification accuracy. In a recent study, Zafar et al. [36] applied a graph convolutional network to determine the correlated activity channels in fNIRS data. A filterbased approach was employed to determine the optimal feature set for SVM training. The authors showed that their proposed method significantly improved the results compared to the full channel features. However, this methodology consists of two steps, channel selection and feature selection, making it less time-efficient. The use of EEG-fNIRS multimodal techniques to enhance the classification ability has yielded encouraging results. However, powerful computational strategies for the successful incorporation of these modalities are still lacking. The techniques must consider the various feature properties that must be developed in order to maximize the integration of multimodalities. Such initiatives will likely result in significant breakthroughs in packages aimed at measuring brain activity, with an increased performance compared with a single modality. The following are the main highlights of the framework presented here:

•
First, the data acquired from both modalities were preprocessed to filter them and remove artifacts. • Second, the statistical temporal features of both modalities were extracted with a 10 s interval.

•
The features were fused, and the binary enhanced whale optimization algorithm (E-WOA) was used to select the optimal/efficient fused feature subset and to improve the efficiency of the multimodal characteristics by increasing their complementarity, redundancy, and significance in relation to classification labels.

•
The support-vector-machine-based cost function was used to classify the data.

•
An online MI dataset of 29 healthy individuals was used for validation.

•
Finally, the performance results of the proposed approach were compared with those of conventional WOA, other optimization algorithms, and the published literature using the same dataset. Figure 1 depicts the architecture for data acquisition, preprocessing, the extraction of temporal features, multimodal feature fusion, optimal feature selection, and model training for hybrid BCI applications. The following sections explain each step in detail.

Data Acquisition
This study used EEG and fNIRS datasets available online to validate the proposed framework [27]. The dataset contained EEG and fNIRS data from 29 healthy participants. The average age of the participants was 28.5 ± 3.7 years (14 men and 15 women). None of the participants reported having any mental, neurological, or other brain disorders. The dataset included LHMI, RHMI, MA, and baseline mental tasks. The data were collected

Data Acquisition
This study used EEG and fNIRS datasets available online to validate the proposed framework [27]. The dataset contained EEG and fNIRS data from 29 healthy participants. The average age of the participants was 28.5 ± 3.7 years (14 men and 15 women). None of the participants reported having any mental, neurological, or other brain disorders. The dataset included LHMI, RHMI, MA, and baseline mental tasks. The data were collected using EEG signals from the prefrontal, motor, parietal, and occipital brain areas, utilizing Fz as a ground electrode at a sampling rate of 1000 Hz. The 10-5 international system was used for the placement of the 30 EEG electrodes. Similarly, 36 fNIRS channels were set up around Fp1, Fpz, Fp2, C3, Oz, and C4, employing 14 sources and 16 detectors at a 3 cm distance using the 10-5 international system. fNIRS data were acquired at a frequency of 2.5 Hz. The dataset consisted of triggered, fNIRS, and EEG data from 6 sessions of each of 10 trials (i.e., 30 trials per task). At the start of each session, there was a 60 s rest time, followed by 20 trials (10 per task) and another 60 s rest interval. The experiment consisted of 2 s visual instructions, a 10 s activity phase, and a randomly allotted pre-rest period of 15-17 s. Figure 2 shows the experimental paradigm and the positions of the fNIRS and EEG optodes and electrodes, respectively [27].
Bioengineering 2023, 10, x FOR PEER REVIEW 4 of 16 using EEG signals from the prefrontal, motor, parietal, and occipital brain areas, utilizing Fz as a ground electrode at a sampling rate of 1000 Hz. The 10-5 international system was used for the placement of the 30 EEG electrodes. Similarly, 36 fNIRS channels were set up around Fp1, Fpz, Fp2, C3, Oz, and C4, employing 14 sources and 16 detectors at a 3 cm distance using the 10-5 international system. fNIRS data were acquired at a frequency of 2.5 Hz. The dataset consisted of triggered, fNIRS, and EEG data from 6 sessions of each of 10 trials (i.e., 30 trials per task). At the start of each session, there was a 60 s rest time, followed by 20 trials (10 per task) and another 60 s rest interval. The experiment consisted of 2 s visual instructions, a 10 s activity phase, and a randomly allotted pre-rest period of 15-17 s. Figure 2 shows the experimental paradigm and the positions of the fNIRS and EEG optodes and electrodes, respectively [27]. This study used EEG and fNIRS MI datasets to validate the proposed approach. For the MI-related activities, subjects were instructed to envision their hands opening and closing while grasping a ball. The EEG and fNIRS data were down-sampled to 200 Hz and 10 Hz, respectively, for further processing.

Preprocessing
In the preprocessing phase, the common average reference was used to re-reference the EEG data [37]. The EOG and EEG data were filtered between 0.5 and 5 Hz and between 0.5 and 50 Hz after re-referencing, respectively. The EOG artifacts were eliminated using a hybrid independent component analysis-regression [38]. A third-order Butterworth band-pass filter with an 8-30 Hz cutoff frequency was applied to filter the EEG data [39]. The fNIRS data were preprocessed to eliminate physiological noise such as breathing, heartbeats, and low-frequency drift. A third-order Butterworth low-pass filter with a cutoff frequency of 0.1 Hz and a Butterworth high-pass filter with a cutoff frequency of 0.01 Hz were used to preprocess the acquired fNIRS data [40,41]. This study used EEG and fNIRS MI datasets to validate the proposed approach. For the MI-related activities, subjects were instructed to envision their hands opening and closing while grasping a ball. The EEG and fNIRS data were down-sampled to 200 Hz and 10 Hz, respectively, for further processing.

Preprocessing
In the preprocessing phase, the common average reference was used to re-reference the EEG data [37]. The EOG and EEG data were filtered between 0.5 and 5 Hz and between 0.5 and 50 Hz after re-referencing, respectively. The EOG artifacts were eliminated using a hybrid independent component analysis-regression [38]. A third-order Butterworth band-pass filter with an 8-30 Hz cutoff frequency was applied to filter the EEG data [39]. The fNIRS data were preprocessed to eliminate physiological noise such as breathing, heartbeats, and low-frequency drift. A third-order Butterworth low-pass filter with a cutoff frequency of 0.1 Hz and a Butterworth high-pass filter with a cutoff frequency of 0.01 Hz were used to preprocess the acquired fNIRS data [40,41].

Feature Extraction
After EEG and fNIRS data preprocessing, the features for a 10 s interval were extracted. This study focused only on the most commonly used temporal statistical features, such as the slope, peak, mean, kurtosis, and skewness [42][43][44]. The peak was defined as the highest value, and curve fitting was used to determine the slope. The following equations were used to obtain the mean (µ, Equation (1)), skewness (S x , Equation (2)), and kurtosis (K x , Equation (3)): where Y corresponds to the input signal (EEG and fNIRS), σ to the standard deviation, and E x to the statistical expectation. The features were extracted using all EEG and fNIRS channels. In total, 180 features (36 channels × 5 features) were extracted from the fNIRS data, whereas the EEG data contained 150 features (30 channels × 5 features). Subsequently, all features were normalized separately for both modalities. Finally, all the features from both modalities were concatenated (f fNIRS :f EEG ). The final fused feature vector comprised 330 features (180 (f fNIRS ) + 150 (f EEG )). An optimal feature selection approach is required to obtain the most reliable information for a robust and highly accurate EEG-fNRIS-based BCI.

Optimal Feature Selection Approach
Feature selection is a crucial step in EEG-fNIRS-based BCI systems. External devices can be controlled and environmental communication can be performed through EEG and fNIRS by measuring the electrical or hemodynamic activity of the brain. Owing to the complexity, high dimensionality, noise, and abundance of redundant and irrelevant information present in EEG and fNIRS data, feature selection is crucial. The accuracy and speed of a BCI system can be improved using feature selection, which also helps to reduce computational complexity and improve the interpretability of the results.
Filter and wrapper methods are the two primary divisions of feature selection approaches. Filter methods rank features according to their relevance and redundancy using statistical or information-theoretic metrics and then select the top-ranked features for further analysis. Wrapper approaches analyze the performance of a BCI system using several feature subsets and select the feature subset that provides the best performance using machine learning algorithms. In this study, a binary E-WOA wrapper-based feature selection method was applied to enhance the efficiency of the hybrid BCI.

Whale Optimization Algorithm (WOA)
The WOA is a metaheuristic optimization technique that was introduced in 2016 by Mirjalili [45]. It is based on the hunting behavior of humpback whales and is intended to address various optimization challenges. The bubble net feeding technique employed by humpback whales, whereby they ascend near to the surface and swim in a spiral pattern to catch their prey in a net of bubbles, serves as the model for the WOA [45]. The WOA keeps track of a population of potential solutions, or "whales". The algorithm updates the whales' location using three forms of movement: encircling prey, spiral bubble net attack, and searching for prey. The encircling of prey refers to the act of traveling in a circle around the optimal solution so as to converge on it. Spiral bubble net attack entails traveling toward the best solution available in the given moment, and searching for prey involves random movement.
Assuming that X(t) = (x 1 (t), x 1 (t), . . . x m (t)) represents the population of whales in an N-dimensional search space, the position of each whale is represented by ). The matrix X(1) is randomly initialized for the first and subsequent iterations in the problem space. The vector X(t) values update themselves using the three previously defined WOA modeling methods. During optimization, WOA considers the rate of probability (ρ) that each X i (t) will alternate between encircling/searching for prey and spiral bubble net attacking strategies using the coefficient vector (A i (t)). The updated position of the whale can be computed using Equation (4): where a i (t) represents the linearly decreasing variable and can be computed using Equation (6): The mathematical model of the method of encircling prey is presented in the following equations: where D(t) represents the distance between the current and optimal positions of the whale, and C i (t) represents the coefficient vector at the t iteration. The search for prey can be modeled as follows: The spiral bubble net attacking method can be modeled in turn using Equation (9), where C represents the logarithmic spiral shape: Although the WOA is a well-known optimization method, it is still affected by early convergence, limited population diversity, and the misalignment of search strategies [46]. Therefore, Shahraki et al. [47] proposed enhanced WOA (E-WOA) and binary E-WOA variants for feature selection.

Enhanced WOA (E-WOA)
In E-WOA, a pooling technique and three effective search tactics-migration, preferential selection, and enriched surrounding prey-enhance the effectiveness of conventional WOAs [47]. The pooling mechanism maintains population diversity by fusing unsuccessful solutions from each iteration with a successful solution. Advanced search techniques are also included to strengthen the conventional WOA search techniques.
The E-WOA pool matrix (P(1), P(2), . . . , P(k)) with the members P i = P i (1), P i (2), . . . , P i (k) is computed using Equation (10) in the pooling mechanism at each iteration: where X brnd (t) represents a random position near the best whale X best (t), and X worst (t) represents the worst whale at a given iteration. B i (t) and B i (t) are the random and reverse vectors, meaning that the corresponding values of zero-valued elements in B i (t) have a value of one and the corresponding values of non-zero-valued elements in B i (t) have a value of zero in B i (t). The pooling technique uses a crossover operator to improve the diversity and combines the least viable solution with a promising solution. A new solution is updated using the existing pool member.
The migrating search technique randomly separates a proportion of the whales from the group using Equation (11) to cover previously unexplored areas and enhance exploration. Moreover, it is anticipated that the separated whales will boost population variety, which will help to reduce local optima trapping: where δ best_max and δ best_min represent the upper and lower boundaries of X best (t).
The encircling prey method from the conventional WOA is updated using the following equation: Using a matrix pool, P rnd3 (t) can be randomly selected. The flowchart corresponding to E-WOA is shown in Figure 3.  Shahraki et al. [47] also proposed the binary E-WOA for feature selection. The most significant/optimal features or variables associated with certain medical conditions can be successfully identified using binary optimization feature selection algorithms, making them useful for medical applications. Binary optimization feature selection algorithms assist in increasing the accuracy and efficacy of medical diagnoses and treatments by limiting the number of features or variables to those that are most important. The pseudo-code for the binary E-WOA is shown in Figure 4. Shahraki et al. [47] also proposed the binary E-WOA for feature selection. The most significant/optimal features or variables associated with certain medical conditions can be successfully identified using binary optimization feature selection algorithms, making them useful for medical applications. Binary optimization feature selection algorithms assist in increasing the accuracy and efficacy of medical diagnoses and treatments by limiting the number of features or variables to those that are most important. The pseudo-code for the binary E-WOA is shown in Figure 4.
Shahraki et al. [47] also proposed the binary E-WOA for feature selection. The most significant/optimal features or variables associated with certain medical conditions can be successfully identified using binary optimization feature selection algorithms, making them useful for medical applications. Binary optimization feature selection algorithms assist in increasing the accuracy and efficacy of medical diagnoses and treatments by limiting the number of features or variables to those that are most important. The pseudo-code for the binary E-WOA is shown in Figure 4.

Support-Vector-Machine-Based Classification
The supervised classifier SVM has been used in several studies [42,48,49]. The main goal of SVM is to identify the optimal discriminative hyperplane that maximizes the margin between two classes. The so-called support vectors, or vectors on the margin, can be utilized to describe the ideal hyperplane. The hyperplane for a 2D feature space can be defined as follows: where x denotes the input test data, w denotes the weight vector, and b denotes the bias factor. Projecting the test data from the input onto w, one can forecast the corresponding class output (i.e., response variable).

Results
As previously mentioned, this study used an open dataset of MI brain tasks to validate the proposed approach. Each trial was 10 s long and consisted of 30 trials for each task and each participant (30 in total). The performance of the temporal features of the unimodal data (EEG and ∆HbO-fNIRS) for all the channels using a 10 s interval is presented in Table 1. In total, 80% of the data were used for training, whereas the remaining 20% were reserved for the testing of the developed model. The number of features and the classification accuracy were used as comparison metrics. Equation (15) was used to compute the classification accuracy: Classification Accuracy (%) = Correctly classified trail Total no. of trails × 100 (15) After a critical evaluation of the findings, it was revealed that the EEG and fNIRS data showed the highest classification accuracies (68.33% and 82.5%) for Subjects 26 and 28, respectively. The average accuracies of EEG and fNIRS were 53.59 ± 7.88 and 58.33 ± 10.13, respectively. The average accuracies of the two modalities were very low. Therefore, we applied the conventional WOA and binary E-WOA approaches to check the performance of the fused dataset. The fused feature vector contained 330 features (150 (EEG) + 180 (fNIRS)). The population selected for both optimizations was 10, with a maximum of 50 iterations. The results of the 10 runs are reported in Table 2. As shown in Table 2, both optimization algorithms significantly enhanced the classification performance of the hybrid features from both modalities. Both wrapper-based optimization algorithms tested the effectiveness of the features by training a model with a subset of features. It is evident from Table 2 that the conventional WOA and binary E-WOA approaches enhanced the classification accuracy of Subject 1 using only 97 and 55 features, respectively. The binary E-WOA increased the classification accuracy by almost 9% compared to the conventional WOA. The classification accuracy of Subject 28 was 99.17 ± 2.64, nearly 16.5% higher than that obtained with fNIRS. Subject 28 used only 26.6 ± 13.06 optimal features from both modalities out of the total number of features (330). The box plot shown in Figure 5 summarizes the results in a simple manner. As shown in Table 2, both optimization algorithms significantly enhanced the classification performance of the hybrid features from both modalities. Both wrapper-based optimization algorithms tested the effectiveness of the features by training a model with a subset of features. It is evident from Table 2 that the conventional WOA and binary E-WOA approaches enhanced the classification accuracy of Subject 1 using only 97 and 55 features, respectively. The binary E-WOA increased the classification accuracy by almost 9% compared to the conventional WOA. The classification accuracy of Subject 28 was 99.17 ± 2.64, nearly 16.5% higher than that obtained with fNIRS. Subject 28 used only 26.6 ± 13.06 optimal features from both modalities out of the total number of features (330). The box plot shown in Figure 5 summarizes the results in a simple manner. As shown in Figure 5, the hybrid modalities outperformed the solo modalities using the conventional WOA and binary E-WOA. The conventional WOA and binary E-WOA demonstrated a high classification accuracy (90.37 ± 7.66% and 94.22 ± 5.39%, respectively). The proposed approach (binary E-WOA) only required 29.62 ± 20.78 features to train the model. In contrast, the conventional WOA required 70.81 ± 11.63 features, as depicted in Figure 5. Furthermore, the proposed approach (EEG-fNIRS-based binary E-WOA) was compared to other wrapper-based techniques [50][51][52][53][54][55]. These findings are shown in Figure 6. As shown in Figure 5, the hybrid modalities outperformed the solo modalities using the conventional WOA and binary E-WOA. The conventional WOA and binary E-WOA demonstrated a high classification accuracy (90.37 ± 7.66% and 94.22 ± 5.39%, respectively). The proposed approach (binary E-WOA) only required 29.62 ± 20.78 features to train the model. In contrast, the conventional WOA required 70.81 ± 11.63 features, as depicted in Figure 5. Furthermore, the proposed approach (EEG-fNIRS-based binary E-WOA) was compared to other wrapper-based techniques [50][51][52][53][54][55]. These findings are shown in Figure 6.
The comparison of the results revealed that the EEG-fNIRS-based binary E-WOA outperformed all the other optimization algorithms in terms of the classification rate. A two-sample t-test also proved the reliability and adaptability of the results, as shown in Figure 6. Compared with the outcomes of the other optimization techniques, the binary E-WOA findings were highly accurate (p < 0.01). The proposed approach was also compared with those previously described in the literature, and the results are listed in Table 3.  [50], ASO: atom search optimization [51]; GWO: grey wolf optimization [52], FA: firefly algorithm [53], and BA: bat algorithm [54]. * p < 0.01.
The comparison of the results revealed that the EEG-fNIRS-based binary E-WOA outperformed all the other optimization algorithms in terms of the classification rate. A two-sample t-test also proved the reliability and adaptability of the results, as shown in Figure 6. Compared with the outcomes of the other optimization techniques, the binary E-WOA findings were highly accurate (p < 0.01). The proposed approach was also compared with those previously described in the literature, and the results are listed in Table  3.

Discussion
Multimodal hybrid techniques outperform unimodal data in terms of classification performance using conventional machine learning or deep learning techniques [59]. Although there is variability between EEG and fNIRS data, it is not as significant as initially believed based on the signal sources. Moreover, the adoption of certain effective techniques for multimodal fusion improves BCI performance. Owing to the different acquisition methods, noise sensitivities, and temporal and spatial resolutions, information from several modalities is not directly compatible. One of the main challenges in the development of hybrid BCIs is finding methods to integrate complementary information, maximize its advantages, and overcome the limitations of a single model.

Discussion
Multimodal hybrid techniques outperform unimodal data in terms of classification performance using conventional machine learning or deep learning techniques [59]. Although there is variability between EEG and fNIRS data, it is not as significant as initially believed based on the signal sources. Moreover, the adoption of certain effective techniques for multimodal fusion improves BCI performance. Owing to the different acquisition methods, noise sensitivities, and temporal and spatial resolutions, information from several modalities is not directly compatible. One of the main challenges in the development of hybrid BCIs is finding methods to integrate complementary information, maximize its advantages, and overcome the limitations of a single model.
Shin et al. [27] computed common spatial patterns for EEG and two statistical features for fNIRS and utilized linear discriminant analysis for MI task classification. The reported accuracy for the hybrid BCI was only 67.5%. Similarly, in another study [56], the authors developed an independent decision path fusion approach. He et al. [58] developed a neural network for a hybrid BCI model. However, the computational complexity of the model was high.
In this study, the statistical features of the two modalities were merged. Wrapper-based and binary E-WOAs were applied to select the optimal features. The results show that the binary E-WOA outperformed the conventional WOA in terms of accuracy (Table 2 and Figure 5). The ability of the binary E-WOA to detect and select more appropriate features from the hybrid EEG and fNIRS data for the classification task can be attributed to its effective search strategy. Feature selection in the conventional WOA is entirely determined by the objective function, which cannot accurately reflect the complexity and variety of brain MI datasets. This may lead to the selection of irrelevant or less-than-ideal features, which may, in turn, lead to subpar classification results, as shown in Figure 5. On the other hand, the binary E-WOA utilizes a more complex feature selection technique that incorporates the objective function and a collection of three advanced search strategies to assist in the search for optimal features, as discussed in Section 2.4.2. The three effective search strategies allow the binary E-WOA to explore the feature set more effectively and discover a more diverse collection of optimal features. This results in an improved classification accuracy and a more robust classification model. Moreover, when the results of the proposed approach were compared with those of other feature selection approaches, the binary E-WOA outperformed them and provided more robust and accurate classification results, further validating the reliability of the proposed framework. Therefore, it can be concluded that the proposed binary E-WOA hybrid EEG-fNIRS framework can be used for BCI applications.

Conclusions
In this study, an enhanced binary variant of the WOA was applied to improve the performance of an EEG-fNIRS-based BCI. The binary E-WOA was used to select the optimal statistical features for both modalities. The three novel search strategies enhanced the classification performance of the conventional WOA. After extensive training and testing, the proposed framework classified the MI task with a 94.22 ± 5.39% accuracy using features from both modalities. The results also suggested that the improved binary variant increased the classification accuracy for MI tasks by more than 3.85% compared to the conventional WOA. Furthermore, the results were compared with those obtained using other metaheuristic algorithms, validating the high performance of the proposed framework for classification. To demonstrate the statistical significance of the results, a two-sample t-test was performed, which revealed that the differences in accuracy, as compared with all the other approaches, were significant (p < 0.01). Therefore, the framework presented here may be useful for hybrid EEG-fNIRS BCI applications. In summary, the present study indicates that the binary E-WOA hybrid EEG-fNIRS could be used as a potential tool for various applications, including brain-controlled devices, communication, and neurorehabilitation.