<?xml version="1.0" encoding="UTF-8"?>
<article xmlns:xlink="http://www.w3.org/1999/xlink">
<front><article-meta>
<title-group><article-title>A World Hyper-Heuristic Reinforcement Learning Algorithm for Feature Selection in EEG Motor Imagery-Based BCI Systems</article-title></title-group>
<contrib-group>
<contrib contrib-type="author"><name><surname>Ghasemabadi</surname><given-names>Nadia</given-names></name><xref ref-type="aff" rid="aff1"/></contrib>
<aff id="aff1">Department of Computer Engineering, Institute of Higher Education, Tonekabon, Iran.</aff>
</contrib-group>
<abstract><p>Motor Imagery–based Brain–Computer Interface (MI BCI) systems rely heavily on the extraction and selection of discriminative features from Electroencephalography (EEG) signals. However, EEG data are inherently noisy, high-dimensional, and non-stationary, making feature selection a challenging optimization problem. This paper introduces a novel reinforcement learning–driven optimization framework called the World Hyper Heuristic (WHH) algorithm. Unlike traditional metaheuristics that depend on fixed operators, WHH dynamically selects among multiple Low-Level Heuristics (LLHs) based on environmental feedback, enabling a more effective balance between exploration and exploitation. The algorithm is evaluated on benchmark MI datasets from the BCI Competition series and compared with five widely used optimization algorithms: Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Differential Evolution (DE), Grey Wolf Optimizer (GWO), and Random Search (RS). Results demonstrate that WHH consistently outperforms all baselines in classification accuracy, F1 score, kappa coefficient, feature reduction rate, convergence speed, and cross-session stability. WHH achieves up to 12.4% higher accuracy, reduces feature dimensionality by 43–57%, and improves stability by 18% compared to the best competing method. These findings highlight the potential of reinforcement learning–based hyperheuristics as a powerful and adaptive optimization paradigm for next-generation BCI systems.</p></abstract>
<kwd-group kwd-group-type="author"><kwd>Imagery–based brain–computer interface</kwd><kwd>World hyper-heuristic</kwd><kwd>Electroencephalography</kwd><kwd>Genetic algorithm</kwd></kwd-group>
</article-meta></front>
<body>
<sec id="sec-1"><label>1</label><title>Introduction</title>
<p>Motor Imagery–based Brain–Computer Interfaces (MI‑BCIs) enable users to interact with external devices solely through the mental rehearsal of limb movements, without requiring any physical muscular activity. This unique capability has positioned MI‑BCIs as a transformative technology in a wide range of applications, including neurorehabilitation for stroke survivors, assistive robotics for individuals with severe motor impairments, and alternative communication systems for patients with conditions such as Amyotrophic Lateral Sclerosis (ALS) or spinal cord injuries. By translating neural activity into actionable commands, MI‑BCIs offer a direct communication pathway between the brain and external devices, bypassing damaged or non‑functional neuromuscular pathways <xref ref-type="bibr" rid="ref-1">[1]</xref>, <xref ref-type="bibr" rid="ref-2">[2]</xref>.</p>
<p>Electroencephalography (EEG) remains the most widely used modality for MI‑BCI systems due to its non‑invasive nature, affordability, portability, and excellent temporal resolution. EEG captures electrical activity of the brain via electrodes placed on the scalp, enabling researchers to observe oscillatory patterns associated with motor imagery tasks. Despite these advantages, EEG signals present substantial challenges for reliable decoding. They are characterized by low signal‑to‑noise ratios, making them highly susceptible to contamination from ocular movements, muscle contractions, and environmental interference. Moreover, EEG signals exhibit significant inter‑subject variability, meaning that patterns associated with motor imagery differ widely across individuals. Even within the same subject, EEG characteristics can drift over time due to changes in cognitive state, fatigue, electrode impedance, or subtle variations in electrode placement. These factors collectively complicate the extraction of stable and discriminative features necessary for accurate MI classification <xref ref-type="bibr" rid="ref-3">[3]</xref>, <xref ref-type="bibr" rid="ref-4">[4]</xref>.</p>
<p>Feature selection plays a central role in addressing these challenges. EEG‑based MI datasets often contain hundreds or even thousands of features derived from time‑domain, frequency‑domain, spatial, and time– frequency representations. Many of these features are redundant, irrelevant, or dominated by noise. Selecting a compact subset of informative features not only reduces computational complexity but also enhances classifier performance, improves generalization, and increases the interpretability of the resulting models. Traditional feature selection approaches, such as filter‑based ranking methods or wrapper‑based search strategies, have been widely used in MI‑BCI research. However, these methods often struggle to capture the highly non‑linear, dynamic, and non‑stationary nature of EEG signals. Filter methods typically evaluate features independently of the classifier, ignoring interactions between features. Wrapper methods, while more accurate, are computationally expensive and prone to overfitting, especially in high‑dimensional spaces <xref ref-type="bibr" rid="ref-5">[5–7]</xref>. To overcome these limitations, metaheuristic algorithms have been extensively explored for EEG feature selection. Algorithms such as Genetic Algorithm (GA), Particle Swarm Optimization (PSO), Differential Evolution (DE), and Grey Wolf Optimizer (GWO) have demonstrated strong global search capabilities and robustness in complex optimization landscapes. Nevertheless, these algorithms rely on fixed search operators and predefined update rules. Their performance is highly sensitive to parameter settings, and they often suffer from premature convergence, stagnation, or an inability to adapt to the evolving structure of the search space. In the context of EEG feature selection, where the search landscape is rugged, multi‑modal, and subject to non‑stationary fluctuations, these limitations can significantly hinder performance <xref ref-type="bibr" rid="ref-8">[8]</xref>.</p>
<p>Hyper‑heuristics have emerged as a promising alternative to traditional metaheuristics. Rather than directly manipulating candidate solutions, hyper‑heuristics operate at a higher level of abstraction by selecting or generating heuristics that guide the search process. This paradigm shifts the focus from designing a single powerful heuristic to designing a mechanism that intelligently chooses among multiple heuristics. Reinforcement learning–based hyper‑heuristics are particularly appealing for EEG feature selection because they can adaptively modify their behavior based on real‑time performance feedback. By learning which heuristics are most effective under different conditions, reinforcement learning enables the search process to dynamically balance exploration of new regions in the feature space with exploitation of promising areas. This adaptability is crucial for handling the non‑stationary and highly variable nature of EEG signals <xref ref-type="bibr" rid="ref-9">[9–12]</xref>.</p>
<p>In this paper, we introduce the World Hyper‑Heuristic (WHH) algorithm, a novel reinforcement learning– driven optimization framework inspired by global environmental dynamics. The WHH algorithm conceptualizes the search process as an evolving “world” in which environmental conditions such as population diversity, fitness variance, and stagnation change over time. Based on these conditions, WHH adaptively selects Low‑Level Heuristics (LLHs) to maintain an optimal balance between exploration and exploitation. This dynamic selection mechanism allows WHH to escape local optima, avoid premature convergence, and navigate complex feature spaces more effectively than traditional metaheuristics <xref ref-type="bibr" rid="ref-13">[13]</xref>, <xref ref-type="bibr" rid="ref-14">[14]</xref>. To evaluate the effectiveness of the proposed approach, WHH is compared against five widely used metaheuristic algorithms across multiple performance metrics, including classification accuracy, F1‑score, kappa coefficient, feature reduction rate, convergence speed, and cross‑session stability. The results demonstrate that WHH consistently outperforms all baseline methods, highlighting its potential as a powerful and adaptive optimization strategy for feature selection in EEG‑based MI‑BCI systems <xref ref-type="bibr" rid="ref-15">[15]</xref>.</p>
<p>To address these challenges, this paper proposes the WHH algorithm, a reinforcement learning–driven optimization framework designed to adaptively select LLHs and maintain an effective balance between exploration and exploitation during feature selection. The main contributions of this work include: 1) introducing a dynamic, environment‑aware hyper‑heuristic tailored for the non‑stationary nature of EEG signals, 2) demonstrating its superiority over five widely used metaheuristic algorithms across multiple performance metrics, and 3) providing a comprehensive evaluation on two benchmark motor imagery datasets. The remainder of this paper is organized as follows. Section 3 describes the datasets, preprocessing procedures, feature extraction methods, and the operational principles of the proposed WHH algorithm. Section 4 outlines the experimental setup, including classifiers, evaluation metrics, and baseline algorithms. Section 5 presents the results and comparative analyses. Section 6 discusses the implications of the findings, while Section 7 concludes the study, and finally, Section 8 highlights the limitations of the current work and outlines directions for future research.</p>
</sec>
<sec id="sec-2"><label>2</label><title>Related Work</title>
<p>Feature selection in EEG‑based Motor Imagery Brain–Computer Interface (MI‑BCI) systems has been the focus of extensive research for more than two decades, driven by the need to extract meaningful information from highly complex and noisy neural signals. A wide range of methods has been proposed, each with its own strengths and limitations. Traditional approaches can be broadly categorized into filter‑based, wrapper‑based, and embedded methods, each addressing the feature selection problem from a different perspective <xref ref-type="bibr" rid="ref-2">[2]</xref>, <xref ref-type="bibr" rid="ref-9">[9]</xref>, <xref ref-type="bibr" rid="ref-11">[11]</xref>.</p>
<p>Filter‑based methods such as mutual information, ReliefF, and Minimum Redundancy Maximum Relevance (MRMR) evaluate features independently of the classifier. These methods are computationally efficient and scalable to high‑dimensional EEG data, making them attractive for real‑time applications. However, their major limitation lies in the fact that they treat each feature in isolation, ignoring potential interactions or dependencies between features. EEG signals often exhibit complex spatial and temporal correlations, and filter‑based methods may fail to capture these relationships, leading to suboptimal feature subsets <xref ref-type="bibr" rid="ref-4">[4]</xref>, <xref ref-type="bibr" rid="ref-12">[12]</xref>, <xref ref-type="bibr" rid="ref-16">[16]</xref>.</p>
<p>Wrapper‑based methods attempt to overcome this limitation by evaluating feature subsets directly using a classifier. Techniques such as Sequential Forward Selection (SFS) and Sequential Backward Elimination (SBE) iteratively add or remove features based on their contribution to classification performance. While these methods generally achieve better accuracy than filter‑based approaches, they are computationally expensive, especially when dealing with large feature spaces typical of EEG data. Their reliance on repeated classifier training also increases the risk of overfitting, particularly when the number of samples is limited <xref ref-type="bibr" rid="ref-17">[17–19]</xref>.</p>
<p>Embedded methods, including LASSO, Elastic Net, and tree‑based models, integrate feature selection into the model training process. These methods offer a compromise between computational efficiency and classification performance. For example, LASSO performs feature selection by imposing an L1 penalty on model coefficients, effectively shrinking irrelevant features to zero. Tree‑based models, such as Random Forests, provide feature importance measures that can guide selection. However, embedded methods often introduce bias due to their reliance on specific model assumptions. In the context of EEG, where signal characteristics vary widely across subjects and sessions, such assumptions may not hold consistently, limiting the generalizability of the selected features <xref ref-type="bibr" rid="ref-20">[20]</xref>.</p>
<p>To address the limitations of traditional methods, researchers have increasingly turned to metaheuristic algorithms, which are inspired by natural processes and capable of performing global search in complex, high‑dimensional spaces. Algorithms such as GA, PSO, DE, and GWO have been widely applied to EEG feature selection. These methods explore the search space using stochastic operators that mimic biological evolution, swarm intelligence, or predator–prey dynamics. Their ability to escape local optima and explore diverse regions of the search space makes them well‑suited for EEG data, which often exhibit multi‑modal and non‑convex characteristics <xref ref-type="bibr" rid="ref-21">[21–23]</xref>.</p>
<p>Despite their advantages, metaheuristic algorithms suffer from several inherent limitations. Most rely on fixed search operators, meaning that their exploration and exploitation behaviors are predetermined and cannot adapt to changes in the search landscape. As a result, they are prone to premature convergence, where the population collapses around suboptimal solutions, or stagnation, where progress halts due to insufficient diversity. These issues are particularly problematic in EEG feature selection, where the search space is not only large but also highly irregular and subject to non‑stationary fluctuations across sessions <xref ref-type="bibr" rid="ref-1">[1]</xref>, <xref ref-type="bibr" rid="ref-13">[13]</xref>.</p>
<p>Hyper‑heuristics have emerged as a promising paradigm to overcome these limitations. Unlike traditional metaheuristics, which operate directly on candidate solutions, hyper‑heuristics operate at a higher level by selecting or generating heuristics that guide the search process. This abstraction enables hyper‑heuristics to adaptively select among multiple LLHs, resulting in a more flexible and dynamic search strategy. Reinforcement learning–based hyper‑heuristics, in particular, have demonstrated strong potential in domains such as scheduling, routing, and combinatorial optimization. These methods learn from experience which heuristics are most effective under different conditions, allowing them to adjust their behavior in real time based on performance feedback <xref ref-type="bibr" rid="ref-24">[24]</xref>.</p>
<p>However, despite their success in other fields, the application of reinforcement learning–based hyper‑heuristics to EEG feature selection remains limited. Existing studies have not fully explored the potential of combining reinforcement learning, dynamic heuristic selection, and world‑inspired exploration– exploitation mechanisms within the context of MI‑BCI. The unique challenges posed by EEG signals, including non‑stationarity, high dimensionality, and inter‑subject variability, make this an ideal domain for hyper‑heuristic approaches. Yet, to date, no comprehensive framework has been proposed that integrates these elements into a unified optimization strategy <xref ref-type="bibr" rid="ref-10">[10]</xref>.</p>
<p>The gap in the literature underscores the need for a more adaptive, intelligent feature selection method that can respond to the dynamic nature of EEG data. The WHH algorithm introduced in this study addresses this gap by leveraging reinforcement learning to dynamically select LLHs based on environmental feedback, offering a novel and powerful approach to feature selection in MI‑BCI systems <xref ref-type="bibr" rid="ref-19">[19]</xref>.</p>
</sec>
<sec id="sec-3"><label>3</label><title>Materials and Methods</title>
<p>A rigorous and well-structured methodological framework is essential for evaluating the effectiveness of any feature selection algorithm in EEG-based motor imagery classification. Because EEG signals are inherently noisy, high-dimensional, and subject to substantial inter- and intra-subject variability, each stage of the processing pipeline from data acquisition to optimization must be carefully designed to ensure reliability, reproducibility, and meaningful comparison with existing approaches. In this study, the proposed World Hyper Heuristic (WHH) algorithm is assessed using standardized benchmark datasets, a comprehensive preprocessing pipeline, a diverse set of feature extraction techniques, and a reinforcement learning–driven optimization strategy. The following subsections describe each component of the methodology in detail, outlining the datasets used, the signal conditioning procedures applied, the feature representations extracted, and the operational principles of the proposed optimization framework.</p>
<sec id="sec-4"><label>3.1</label><title>Datasets</title>
<p>To rigorously evaluate the effectiveness and generalizability of the proposed WHH algorithm, experiments were conducted on two widely recognized benchmark datasets from the BCI Competition series. These datasets are considered gold standards in the Motor Imagery–based Brain–Computer Interface (MI BCI) community due to their high quality, standardized protocols, and extensive use in comparative studies. The first dataset, BCI Competition IV 2a, contains EEG recordings from 22 active channels, sampled at 250 Hz, collected from nine subjects performing four motor imagery tasks: left hand, right hand, both feet, and tongue. Each trial consists of a cue-based paradigm in which subjects are instructed to imagine a specific movement following a visual cue. The dataset includes multiple sessions recorded on different days, making it particularly suitable for evaluating robustness against session-to-session variability.</p>
<p>The second dataset, BCI Competition III IIIa, provides EEG recordings from 60 channels, sampled at 250 Hz, collected from three subjects performing three motor imagery tasks: left hand, right hand, and foot. This dataset is known for its high spatial resolution and rich signal content, offering a more challenging feature selection scenario due to the larger number of channels and increased dimensionality.</p>
<p>Both datasets include raw EEG signals, event markers, and detailed experimental protocols, enabling reproducible evaluation. Their widespread use in MI BCI research ensures that performance comparisons are meaningful and directly comparable to existing literature.</p>
</sec>
<sec id="sec-5"><label>3.2</label><title>Preprocessing</title>
<p>EEG preprocessing is a critical step in MI BCI pipelines, as raw EEG signals are highly susceptible to noise and artifacts originating from eye blinks, muscle contractions, power-line interference, and electrode impedance fluctuations. To ensure that the extracted features reflect genuine neural activity associated with motor imagery, a multi-stage preprocessing pipeline was applied.</p>
<p>First, a bandpass filter between 8 and 30 Hz was used to isolate the mu (8–12 Hz) and beta (13–30 Hz) rhythms, which are known to exhibit Event-Related Desynchronization (ERD) and Event-Related Synchronization (ERS) during motor imagery tasks. These frequency bands contain the most discriminative information for MI classification.</p>
<p>Next, Independent Component Analysis (ICA) was employed to remove ocular, muscular, and cardiac artifacts. ICA decomposes the EEG into statistically independent components, allowing the identification and removal of components associated with non-neural activity. This step significantly improves the signal-to-noise ratio.</p>
<p>Following artifact removal, the continuous EEG signals were segmented into epochs corresponding to the motor imagery tasks. Each epoch typically spans several seconds after the cue, capturing the temporal evolution of neural patterns associated with motor imagery.</p>
<p>Finally, z-score normalization was applied to each channel to standardize the amplitude distribution across trials and subjects. This normalization step reduces inter-subject variability and ensures that subsequent feature extraction and optimization processes are not biased by amplitude differences.</p>
</sec>
<sec id="sec-6"><label>3.3</label><title>Feature Extraction</title>
<p>Given the complexity and non-stationary nature of EEG signals, a diverse set of features was extracted to capture complementary aspects of the underlying neural activity. The goal was to construct a rich feature space that includes spectral, spatial, temporal, and time–frequency information.</p>
<p>Bandpower features were computed to quantify the energy distribution within the mu and beta frequency bands. These features are widely used in MI BCI due to their strong association with ERD/ERS phenomena. To capture spatial patterns, Common Spatial Pattern (CSP) and Filter Bank Common Spatial Pattern (FBCSP) were applied. CSP identifies spatial filters that maximize variance differences between motor imagery classes, while FBCSP extends this approach by applying CSP across multiple frequency sub-bands, enhancing discriminability.</p>
<p>Wavelet packet decomposition was used to extract time–frequency features, providing a detailed representation of how spectral content evolves over time. It is particularly useful for capturing transient neural dynamics associated with motor imagery.</p>
<p>Additionally, Riemannian covariance features were computed to model the spatial covariance structure of EEG channels. These features leverage the geometry of symmetric positive-definite matrices and are highly effective in MI classification.</p>
<p>The combination of these feature types resulted in high-dimensional feature vectors ranging from 200 to 800 dimensions, depending on the dataset and subject. This high dimensionality underscores the need for an effective feature selection algorithm that identifies the most informative subset.</p>
</sec>
<sec id="sec-7"><label>3.4</label><title>World Hyper Heuristic Algorithm</title>
<p>The proposed WHH algorithm introduces a reinforcement learning–driven approach to feature selection, designed to overcome the limitations of traditional metaheuristics. Instead of relying on a single fixed search operator, WHH maintains a pool of low LLHs, each representing a different search behavior. These LLHs include mutation operators, crossover strategies, local search procedures, and perturbation mechanisms, enabling a diverse and flexible search process.</p>
<p>At each iteration, WHH evaluates the state of the search environment, which includes metrics such as population diversity, fitness variance, and stagnation level. These metrics provide insight into whether the search is exploring new regions or becoming trapped in local optima.</p>
<p>A reinforcement learning agent then selects the most appropriate LLH based on the current state. The agent receives a reward whenever the selected heuristic leads to an improvement in classification accuracy or a reduction in the number of selected features. Over time, the agent learns a policy that maps environmental states to effective heuristics, enabling the algorithm to adapt dynamically to different phases of the search. The fitness function used in WHH balances two competing objectives: maximizing classification accuracy and minimizing the number of selected features. This argument ensures that the algorithm does not simply select large feature subsets that overfit the data, but instead identifies compact and discriminative subsets suitable for real-time MI BCI applications.</p>
<p>Through this adaptive mechanism, WHH maintains a strong balance between exploration and exploitation, avoids premature convergence, and navigates the complex, high-dimensional feature space of EEG signals more effectively than traditional metaheuristics.</p>
</sec>
</sec>
<sec id="sec-8"><label>4</label><title>Experimental Setup</title>
<p>A comprehensive experimental framework was designed to rigorously evaluate the performance of the proposed WHH algorithm. Because feature selection directly influences the quality of downstream classification, it was essential to assess the selected features using classifiers that represent both traditional machine learning and modern deep learning paradigms. This dual‑classifier approach ensures that the evaluation is not biased toward a specific modeling technique and that the selected features generalize well across different types of decision boundaries.</p>
<p>The first classifier employed was a Convolutional Neural Network (CNN) specifically adapted for motor imagery decoding. CNNs have become increasingly popular in EEG‑based BCI research due to their ability to automatically learn hierarchical spatial–temporal representations from multichannel EEG data. The CNN architecture used in this study included temporal convolution layers to extract frequency‑specific patterns, spatial convolution layers to capture inter‑channel relationships, and fully connected layers for final classification. This architecture provides a strong benchmark for evaluating the discriminative power of the selected features.</p>
<p>The second classifier was a Support Vector Machine (SVM) with a Radial Basis Function (RBF) kernel. SVMs are widely used in MI‑BCI research because of their robustness to high‑dimensional feature spaces and their ability to model non‑linear decision boundaries. The RBF kernel is particularly effective for EEG data, which often exhibits complex, non‑linear separability. Using both CNN and SVM allowed us to assess whether the selected features were universally informative or tailored to a specific classifier.</p>
<p>To provide a comprehensive evaluation, six performance metrics were used. Accuracy is measured by the proportion of correctly classified trials, serving as the primary indicator of classification performance. F1‑score provided a balanced measure of precision and recall, particularly important for datasets with class imbalance. Cohen’s kappa coefficient quantified agreement beyond chance, offering a more robust assessment of classifier reliability. The feature reduction rate measured the percentage of features eliminated by the selection algorithm, reflecting the algorithm’s ability to produce compact and efficient feature subsets. Convergence speed, measured in iterations, assessed the computational efficiency of each optimization method. Finally, cross‑session stability evaluated how consistently the selected features performed across different recording sessions, addressing the critical challenge of EEG non‑stationarity.</p>
<p>The WHH algorithm was compared against five widely used baseline optimization algorithms: Random Search (RS), GA, PSO, DE, and GWO. These algorithms were chosen because they represent diverse optimization paradigms, including stochastic search, evolutionary computation, swarm intelligence, and nature‑inspired heuristics. All algorithms were executed under identical experimental conditions, including population size, maximum iterations, and stopping criteria, ensuring a fair and unbiased comparison.</p>
</sec>
<sec id="sec-9"><label>5</label><title>Results</title>
<p>The experimental results demonstrate that the proposed WHH algorithm consistently outperforms all baseline methods across both datasets and all evaluation metrics. The following tables summarize the performance of each algorithm.</p>
<table-wrap id="tab1"><label>Table 1</label><caption><p>Classification accuracy (%).</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:6:66,46,537.1,267.1"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<table-wrap id="tab2"><label>Table 2</label><caption><p>F1‑score. GWO 0.78 0.86</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:7:66,730.2,537.1,755.5"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<table-wrap id="tab3"><label>Table 3</label><caption><p>Kappa coefficient.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:7:66,526.4,537.1,635.5"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<table-wrap id="tab4"><label>Table 4</label><caption><p>Feature reduction rate (%).</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:7:66,392.6,537.1,502.5"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<table-wrap id="tab5"><label>Table 5</label><caption><p>Convergence speed (iterations).</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:7:66,260,537.1,369.4"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<table-wrap id="tab6"><label>Table 6</label><caption><p>Cross‑session stability.</p></caption><graphic content-type="pdf-region" xlink:href="pdf-region:7:66,126.4,537.1,235.4"/><p content-type="note">This table is shown in the PDF version of the article.</p></table-wrap>
<sec id="sec-10"><label>5.1</label><title>Analysis of Results</title>
<p>The results clearly demonstrate the superiority of the WHH algorithm across all evaluation metrics. The most striking improvement is observed in classification accuracy, where WHH achieves 84.7% on the IV‑2a dataset and 91.2% on the III‑IIIa dataset. These values represent substantial gains over the Best-Performing Baseline (GWO), which achieved 78.9% and 87.1% respectively. The improvement of 5.8% on IV‑2a and 4.1% on III‑IIIa highlights WHH’s ability to identify highly discriminative feature subsets.</p>
<p>The F1‑score and kappa coefficient further reinforce this conclusion. WHH achieves the highest F1‑scores on both datasets, indicating balanced performance across all classes. The kappa values of 0.76 and 0.87 reflect strong agreement beyond chance, demonstrating that WHH produces reliable and consistent classifications even in the presence of class imbalance and noisy EEG signals.</p>
<p>One of the most significant advantages of WHH is its ability to achieve substantial feature reduction while improving performance. Eliminating 43–57% of the original features not only reduces computational complexity but also enhances interpretability and robustness. This level of reduction is considerably higher than that achieved by traditional metaheuristics, which typically range between 28% and 39%.</p>
<p>The convergence speed results reveal that WHH is highly efficient. By converging in approximately 85 iterations, WHH demonstrates faster learning and better adaptation than all baseline algorithms. This efficiency is attributed to the reinforcement learning mechanism, which dynamically selects the most effective heuristics based on real‑time feedback.</p>
<p>Finally, the cross‑session stability results highlight WHH’s robustness to EEG non‑stationarity. With a stability index of 0.76, WHH significantly outperforms all baselines, indicating that the selected features generalize well across different recording sessions. It is a critical requirement for practical MI‑BCI systems, where signal characteristics can vary substantially over time.</p>
<p>Overall, the results confirm that the WHH algorithm provides a powerful and adaptive solution to the feature selection problem in EEG‑based motor imagery classification. Its dynamic heuristic selection mechanism enables it to navigate complex search spaces more effectively than traditional metaheuristics, leading to superior accuracy, efficiency, and robustness.</p>
</sec>
</sec>
<sec id="sec-11"><label>6</label><title>Discussion</title>
<p>The findings of this study clearly demonstrate that the WHH algorithm provides a powerful, flexible, and highly adaptive approach to feature selection in EEG‑based motor imagery Brain–Computer Interface systems. One of the most significant strengths of WHH lies in its reinforcement learning–driven mechanism, which enables the algorithm to continuously adapt to the evolving structure of the search landscape. Unlike traditional metaheuristics that rely on fixed operators and static search strategies, WHH dynamically selects LLHs based on real‑time environmental feedback. This adaptability allows the algorithm to avoid common pitfalls such as premature convergence, stagnation, and loss of population diversity issues that frequently limit the performance of classical optimization methods in high‑dimensional EEG feature spaces.</p>
<p>The balance between exploration and exploitation is a critical factor in optimization, particularly in EEG feature selection, where the search space is rugged, multi‑modal, and highly non‑stationary. WHH’s ability to modulate this balance dynamically is a key contributor to its superior performance. During early stages of the search, the algorithm tends to favor exploratory heuristics that promote diversity and broad coverage of the feature space. As the search progresses and promising regions are identified, WHH gradually shifts toward exploitative heuristics that refine and optimize candidate solutions. This adaptive behavior mirrors natural learning processes and allows WHH to discover high‑quality feature subsets that might otherwise remain inaccessible to static algorithms.</p>
<p>Another important outcome of this study is the substantial feature reduction achieved by WHH. By eliminating 43%-57% of the original features while simultaneously improving classification performance, the algorithm demonstrates a remarkable ability to identify and retain only the most informative and discriminative features. This reduction is particularly valuable for real‑time BCI applications, where computational efficiency and low latency are essential. Reducing the dimensionality of the feature space not only accelerates classification but also enhances system robustness by minimizing the influence of noisy or redundant features.</p>
<p>The improved cross‑session stability observed with WHH further underscores its practical value. EEG signals are inherently variable across sessions due to changes in electrode placement, user fatigue, cognitive state, and environmental conditions. Many feature selection algorithms perform well within a single session but fail to generalize across sessions. WHH’s stability index of 0.76 is significantly higher than all baseline methods, indicating that the selected features remain discriminative even when signal characteristics shift. This robustness is crucial for real‑world BCI deployment, where recalibration time must be minimized, and long‑term usability is a key requirement.</p>
<p>Overall, the results highlight WHH as a promising and versatile optimization framework capable of addressing the unique challenges posed by EEG‑based motor imagery classification. Its dynamic heuristic selection, strong generalization ability, and computational efficiency make it a compelling candidate for next‑generation adaptive BCI systems.</p>
</sec>
<sec id="sec-12"><label>7</label><title>Conclusion</title>
<p>This paper presented the WHH algorithm, a novel reinforcement learning–based optimization framework for addressing the complex problem of feature selection in EEG motor imagery classification. By operating at a higher level of abstraction and dynamically selecting LLHs based on environmental feedback, WHH effectively balances exploration and exploitation throughout the optimization process. This adaptive capability allows the algorithm to navigate the high‑dimensional, noisy, and non‑stationary feature space of EEG signals more efficiently than traditional metaheuristics.</p>
<p>Extensive experiments conducted on two benchmark datasets, BCI Competition IV‑2a and III‑IIIa, demonstrated that WHH consistently outperforms five widely used optimization algorithms across all evaluation metrics. WHH achieved higher classification accuracy, superior F1‑scores, stronger kappa coefficients, and significantly greater feature reduction rates. Additionally, the algorithm exhibited faster convergence and improved cross‑session stability, highlighting its robustness and suitability for real‑time BCI applications.</p>
<p>The results confirm that reinforcement learning–driven hyper‑heuristics represent a powerful and flexible approach to EEG feature selection. WHH’s ability to adapt its search strategy dynamically makes it particularly well‑suited for the challenges of motor imagery classification, where signal variability and high dimensionality often hinder the performance of conventional methods. The contributions of this work lay the foundation for more intelligent, adaptive, and efficient optimization strategies in the broader field of brain–computer interfaces.</p>
</sec>
<sec id="sec-13"><label>8</label><title>Limitations and Future Work</title>
<p>Although the WHH algorithm demonstrates strong performance across multiple metrics, several limitations must be acknowledged. First, while WHH achieves substantial feature reduction and improved classification accuracy, its reinforcement learning component introduces additional computational overhead. Although this overhead is manageable in offline analysis, real‑time BCI applications may require further optimization or hardware acceleration to ensure low‑latency performance.</p>
<p>Second, the current implementation of WHH relies on a relatively simple reinforcement learning model. More advanced techniques such as deep reinforcement learning, actor–critic architectures, or meta‑reinforcement learning may further enhance the algorithm’s ability to model complex relationships between environmental states and heuristic effectiveness. Incorporating these techniques could enable WHH to scale more effectively to even larger feature spaces or more complex BCI paradigms.</p>
<p>Third, the algorithm has been evaluated exclusively on motor imagery datasets. While MI‑BCI is a widely studied domain, EEG‑based BCIs encompass a broader range of tasks, including speech imagery, affective state recognition, cognitive workload estimation, and hybrid multimodal systems. The generalizability of WHH to these domains remains an open question and represents an important direction for future research. Future work will focus on several key areas. One promising direction is the development of an online version of WHH that adapts to session‑to‑session drift in real time, reducing the need for frequent recalibration. Another avenue involves integrating WHH with deep learning architectures, enabling joint optimization of feature selection and model parameters. Additionally, applying WHH to multimodal BCI systems combining EEG with EMG, fNIRS, or eye‑tracking may further enhance system robustness and performance. Finally, exploring the interpretability of the selected features could provide valuable insights into the neural mechanisms underlying motor imagery and improve user trust in BCI systems.</p>
</sec>
<sec id="sec-14"><title>Authors&apos; Contributions</title>
<p>All aspects of the research and manuscript preparation were carried out by the author. The author has read and approved the final version of the manuscript.</p>
</sec>
<sec id="sec-15"><title>Data Availability</title>
<p>All data supporting the reported findings in this research paper are provided within the manuscript.</p>
</sec>
<sec id="sec-16"><title>Funding</title>
<p>Not applicable.</p>
</sec>
<sec id="sec-17"><title>Conflict of Interest</title>
<p>The author declares that they do not have any conflict of interest.</p>
</sec>
<sec id="sec-18"><title>Consent for Publication</title>
<p>The author confirms consent for the publication of this work</p>
</sec>
<sec id="sec-19"><title>Ethics Approval and Consent to Participate</title>
<p>This article does not contain any studies with human participants performed by the author.</p>
</sec>
</body>
<back><ref-list><title>References</title>
<ref id="ref-1"><label>1</label><mixed-citation>Santhanam, G., Ryu, S. I., Yu, B. M., Afshar, A., &amp; Shenoy, K. V. (2006). A high-performance brain– computer interface. Nature, 442(7099), 195–198. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1038/nature04968">https://doi.org/10.1038/nature04968</ext-link></mixed-citation></ref>
<ref id="ref-2"><label>2</label><mixed-citation>Pires, G., Cruz, A., Jesus, D., Yasemin, M., Nunes, U. J., Sousa, T., &amp; Castelo-Branco, M. (2022). A new error-monitoring brain–computer interface based on reinforcement learning for people with autism spectrum disorders. Journal of neural engineering, 19(6), 66032. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1088/1741-2552/aca798">https://doi.org/10.1088/1741-2552/aca798</ext-link></mixed-citation></ref>
<ref id="ref-3"><label>3</label><mixed-citation>Drigas, A., &amp; Sideraki, A. (2024). Brain neuroplasticity leveraging virtual reality and brain–computer interface technologies. Sensors, 24(17), 5725. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/s24175725">https://doi.org/10.3390/s24175725</ext-link></mixed-citation></ref>
<ref id="ref-4"><label>4</label><mixed-citation>Cong, F. (2019). Blind source separation. In EEG signal processing and feature extraction (pp. 117–140). Singapore: Springer Singapore. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1007/978-981-13-9113-2_7">https://doi.org/10.1007/978-981-13-9113-2_7</ext-link></mixed-citation></ref>
<ref id="ref-5"><label>5</label><mixed-citation>Wu, D. (2017). Online and offline domain adaptation for reducing BCI calibration effort. IEEE transactions on human-machine systems, 47(4), 550–563. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/THMS.2016.2608931">https://doi.org/10.1109/THMS.2016.2608931</ext-link></mixed-citation></ref>
<ref id="ref-6"><label>6</label><mixed-citation>Bai, Y., Li, X., &amp; Liang, Z. (2019). Nonlinear neural dynamics. In EEG signal processing and feature extraction (pp. 215–240). Singapore: Springer Singapore. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1007/978-981-13-9113-2_11">https://doi.org/10.1007/978-981-13-9113-2_11</ext-link></mixed-citation></ref>
<ref id="ref-7"><label>7</label><mixed-citation>Alhassan, B., Bala, N., &amp; Musa, H. (2025). Numerical solution of systems of first order stiff oscillatory differential equations using diagonally implicit super class of block backward differentiation formula. Computational algorithms and numerical dimensions, 4(2), 157–179. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.22105/cand.2025.503444.1182">https://doi.org/10.22105/cand.2025.503444.1182</ext-link></mixed-citation></ref>
<ref id="ref-8"><label>8</label><mixed-citation>SFakheri, S., Alimoradi, M., &amp; Yamaghani, M. R. (2026). Colour image multilevel thresholding segmentation using trees social relationship algorithm. International journal of computer information systems and industrial management applications, 18, 34-34. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.21203/rs.3.rs-4479475/v1">https://doi.org/10.21203/rs.3.rs-4479475/v1</ext-link></mixed-citation></ref>
<ref id="ref-9"><label>9</label><mixed-citation>Kaongoen, N., Choi, J., &amp; Jo, S. (2022). A novel online BCI system using speech imagery and ear-EEG for home appliances control. Computer methods and programs in biomedicine, 224, 107022. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.cmpb.2022.107022">https://doi.org/10.1016/j.cmpb.2022.107022</ext-link></mixed-citation></ref>
<ref id="ref-10"><label>10</label><mixed-citation>Tremmel, C., Fernandez-Vargas, J., Stamos, D., Cinel, C., Pontil, M., Citi, L., &amp; Poli, R. (2022). A meta-learning BCI for estimating decision confidence. Journal of neural engineering, 19(4), 046009. 10.1088/1741- 2552/ac7ba8</mixed-citation></ref>
<ref id="ref-11"><label>11</label><mixed-citation>Rahman, N., Khan, D. M., Masroor, K., Arshad, M., Rafiq, A., &amp; Fahim, S. M. (2024). Advances in brain-computer interface for decoding speech imagery from EEG signals: A systematic review. Cognitive neurodynamics, 18(6), 3565–3583. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1007/s11571-024-10167-0">https://doi.org/10.1007/s11571-024-10167-0</ext-link></mixed-citation></ref>
<ref id="ref-12"><label>12</label><mixed-citation>Nicolas-Alonso, L. F., &amp; Gomez-Gil, J. (2012). Brain computer interfaces, a review. Sensors, 12(2), 1211– 1279. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/s120201211">https://doi.org/10.3390/s120201211</ext-link></mixed-citation></ref>
<ref id="ref-13"><label>13</label><mixed-citation>Lamtar Gholipoor, M. , Alimoradi, M., &amp; Fakheri, S. (2024). A novel metaheuristic approach inspired by trees social relationships and models for fermentation medium. Metaheuristic algorithms with applications, 1(1), 1–11. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.22105/maa.v1i1.17">https://doi.org/10.22105/maa.v1i1.17</ext-link></mixed-citation></ref>
<ref id="ref-14"><label>14</label><mixed-citation>Lamtar-Gholipoor, M., Fakheri, S., &amp; Alimoradi, M. (2024). Artificial neural network TSR for optimization of actinomycin production. Big data and computing visions, 4(1), 57–66. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.22105/bdcv.2024.474793.1184">https://doi.org/10.22105/bdcv.2024.474793.1184</ext-link></mixed-citation></ref>
<ref id="ref-15"><label>15</label><mixed-citation>Daliri, A., Alimoradi, M., Zabihimayvan, M., &amp; Sadeghi, R. (2024). World hyper-heuristic: A novel reinforcement learning approach for dynamic exploration and exploitation. Expert systems with applications, 244, 122931. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.eswa.2023.122931">https://doi.org/10.1016/j.eswa.2023.122931</ext-link></mixed-citation></ref>
<ref id="ref-16"><label>16</label><mixed-citation>Chaudhary, U., Birbaumer, N., &amp; Curado, M. R. (2015). Brain-machine interface (BMI) in paralysis. Annals of physical and rehabilitation medicine, 58(1), 9–13. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.rehab.2014.11.002">https://doi.org/10.1016/j.rehab.2014.11.002</ext-link></mixed-citation></ref>
<ref id="ref-17"><label>17</label><mixed-citation>Krzywanski, J., Sosnowski, M., Grabowska, K., Zylka, A., Lasek, L., &amp; Kijo-Kleczkowska, A. (2024). Advanced computational methods for modeling, prediction and optimization, a review. Materials, 17(14), 3521. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3390/ma17143521">https://doi.org/10.3390/ma17143521</ext-link></mixed-citation></ref>
<ref id="ref-18"><label>18</label><mixed-citation>Hill, N. J., &amp; Schölkopf, B. (2012). An online brain–computer interface based on shifting attention to concurrent streams of auditory stimuli. Journal of neural engineering, 9(2), 26011. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1088/1741-2560/9/2/026011">https://doi.org/10.1088/1741-2560/9/2/026011</ext-link></mixed-citation></ref>
<ref id="ref-19"><label>19</label><mixed-citation>Amin, S. U., Altaheri, H., Muhammad, G., Abdul, W., &amp; Alsulaiman, M. (2021). Attention-inception and long-short-term memory-based electroencephalography classification for motor imagery tasks in rehabilitation. IEEE transactions on industrial informatics, 18(8), 5412–5421. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/TII.2021.3132340">https://doi.org/10.1109/TII.2021.3132340</ext-link></mixed-citation></ref>
<ref id="ref-20"><label>20</label><mixed-citation>Gao, Z., Yuan, T., Zhou, X., Ma, C., Ma, K., &amp; Hui, P. (2020). A deep learning method for improving the classification accuracy of SSMVEP-based BCI. IEEE transactions on circuits and systems II: Express briefs, 67(12), 3447–3451. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1109/TCSII.2020.2983389">https://doi.org/10.1109/TCSII.2020.2983389</ext-link></mixed-citation></ref>
<ref id="ref-21"><label>21</label><mixed-citation>Grizou, J., Iturrate, I., Montesano, L., Oudeyer, P. Y., &amp; Lopes, M. (2014). Calibration-free BCI based control. Proceedings of the AAAI conference on artificial intelligence (pp. 1-8). Association for the Advancement of Artificial Intelligence (AAAI). <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1609/aaai.v28i1.8923">https://doi.org/10.1609/aaai.v28i1.8923</ext-link>.</mixed-citation></ref>
<ref id="ref-22"><label>22</label><mixed-citation>Friehs, G. M., Zerris, V. A., Ojakangas, C. L., Fellows, M. R., &amp; Donoghue, J. P. (2004). Brain–Machine and brain–computer interfaces. Stroke, 35(11_suppl_1), 2702–2705. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1161/01.STR.0000143235.93497.03">https://doi.org/10.1161/01.STR.0000143235.93497.03</ext-link></mixed-citation></ref>
<ref id="ref-23"><label>23</label><mixed-citation>Daly, J. J., &amp; Wolpaw, J. R. (2008). Brain-computer interfaces in neurological rehabilitation. The lancet neurology, 7(11), 1032–1043. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/S1474-4422(08)70223-0">https://doi.org/10.1016/S1474-4422(08)70223-0</ext-link></mixed-citation></ref>
<ref id="ref-24"><label>24</label><mixed-citation>Alimoradi, M., Azgomi, H., &amp; Asghari, A. (2022). Trees social relations optimization algorithm: A new swarm-based metaheuristic technique to solve continuous and discrete optimization problems. Mathematics and computers in simulation, 194, 629–664. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.matcom.2021.12.010">https://doi.org/10.1016/j.matcom.2021.12.010</ext-link></mixed-citation></ref>
</ref-list></back>
</article>