Cerebro Wave Bee transformer to leverage EEG based hand movement classification using optimized bio-inspired learning rates Authors: N Priyadharshini Jayadurga, M Chandralekha, Hema Subramaniam Published: 2026 ABSTRACT AbstractElectroencephalogram (EEG) based classification of hand movements have an eloquent significance in the diverse fields like biomedical engineering, neuroscience, and assistive technologies. EEG can be used to convert brain waves into useful commands supporting multiple tasks. The article introduces a novel EEG-based hand-movement classification using Honey Bee Optimization (HBO) as an offline hyperparameter optimization that finds the best learning rate to be used in the Transformer model before training. Conventional learning rate techniques are unable to adapt to the fluctuations in the dynamics of training in transformer models, hindering the potential of deep learning models. The suggested architecture involves the application of HBO to optimize the learning rate prior to training, which allows the model to stabilize better and makes it a part of the obtained accuracy of 95.60%. This facilitates a more stable convergence and the classification of EEG hand-movements. The Bio-inspired optimization techniques ensures that machine learning models can be optimized to increase their performance and flexibility. The research can be applied to current medical signal analysis and new breakthroughs in neurotechnology whereby accurate hand movement identification is essential.Keywords: Electroencephalogram, Honey Bee Optimization, Transformer model, Bio-inspired optimization models, NeurotechnologySubject terms: Health care, Mathematics and computing Introduction Electroencephalography (EEG) is a medical image technology which records the activity of the brain without the invasive procedures. It involves placing electrodes on the scalp to record the tiny electric charges generated by the neuronal activity in the brain. EEG has been known to have a great temporal resolution, but poor spatial resolution compared to other types of imaging techniques like Magnetic Resonance Imaging (MRI) or Computed Tomography Scan (CT scans). The conventional methods of eye blink detection in EEG research are based on signal processing and standard machine learning methods to derive patterns1–3. It has greatly enhanced Brain-Computer Interfaces (BCIs) capabilities. BCIs use EEG to read neural signals to facilitate direct brain-to-external device interaction. Hand movement classification with the use of EEG data is one of the most important applications of BCI. This has a profound impact on various fields such as stroke rehabilitation, the working of the prosthetics and the improvement of the human-computer interfaces. Despite the significant potential of EEG-based systems, there exists a set of inherent challenges which lacks their general use and effectiveness. The complexity of neurological signals is one of the major challenges, indicating a considerable amount of individual variability, and the sensitivity of EEG data to a wide range of noise and interference. These factors complicate the process of categorizing EEG signals in high accuracy and reliability. The recent academic works have also pointed at the considerable gaps in research that need to be filled with the aim of developing this field: Interpretability and model complexity: Transformers are advanced deep learning models that display significant characteristics of effective sequential data analysis, including EEG. The complicated nature of transformer models is difficult to comprehend which is a possible issue in the field of clinical applications whose outcomes are highly valued regarding trust and ethics. Also, deep learning models are highly sophisticated integrating both spatial and temporal space, including hybrid-domain methods. This hinders their real-world implementation due to their outstanding computing needs4. Interpretability and model complexity: Transformers are advanced deep learning models that display significant characteristics of effective sequential data analysis, including EEG. The complicated nature of transformer models is difficult to comprehend which is a possible issue in the field of clinical applications whose outcomes are highly valued regarding trust and ethics. Also, deep learning models are highly sophisticated integrating both spatial and temporal space, including hybrid-domain methods. This hinders their real-world implementation due to their outstanding computing needs4. Generalizability and resilience to noise: When subjected to novel datasets with different signal characteristics or confounding factors, EEG based classification tools are continuously losing efficiency. This underscores the importance of the models that are powerful of sustaining high performance on many datasets. Moreover, it is necessary to enhance the model strength against different noise types to guarantee their validity and competency in real life applications5. Generalizability and resilience to noise: When subjected to novel datasets with different signal characteristics or confounding factors, EEG based classification tools are continuously losing efficiency. This underscores the importance of the models that are powerful of sustaining high performance on many datasets. Moreover, it is necessary to enhance the model strength against different noise types to guarantee their validity and competency in real life applications5. Computational Efficiency: The majority of the deep learning models require essential computational resources to train and test the model that is extremely costly on the environment where state-of-the-art technology is required. This is a crucial constraint when it is needed to have fast processing time to provide real time feedback i.e. in dynamic BCI setup6. Computational Efficiency: The majority of the deep learning models require essential computational resources to train and test the model that is extremely costly on the environment where state-of-the-art technology is required. This is a crucial constraint when it is needed to have fast processing time to provide real time feedback i.e. in dynamic BCI setup6. Subject Variability: EEG Signals vary greatly among people because of the complexity of the differences that are present in the brain structure and functioning. The current models tend to fail in capturing this variability, and they tend to preside to the variation in the performance. Augmented parameters of adaptable models of individual characteristics are needed in-order to enhance accuracy and user experience7. Subject Variability: EEG Signals vary greatly among people because of the complexity of the differences that are present in the brain structure and functioning. The current models tend to fail in capturing this variability, and they tend to preside to the variation in the performance. Augmented parameters of adaptable models of individual characteristics are needed in-order to enhance accuracy and user experience7. To manoeuvre such issues, this paper recommends the implementation of Honey Bee-Inspired Optimization (HBO) methodology accompanied with Transformer Model to dynamically modify the learning rates while training Transformer models in EEG-based classification tasks. This bio-inspired approach would be useful in maximizing the strength of learning and resistance of the model that leads to improvement of interpretability, generalizability, computing effectiveness, and personal adaptability of models. Combining HBO method with transformer model reinforces the work of classification, resistance to variability and noise, and moulds it to be suitable in real-time. The primary value of the work is that it is based on the strategic combination of the transformer architecture with Honey Bee Optimization (HBO) to adaptive adjustment of the learning rate, thus improving the performance of the model in the classification of hand movements based on EEG. The suggested Cerebro-Wave Bee Transformer (CWBT) demonstrates considerable improvement over the traditional fixed learning rate methods because it can solve such problems as generalizability, computational inefficiencies, and individual signal variability. It is possible to learn spatial-spectral relationships within EEG data by use of this approach, a new bio-inspired dynamic learning rate optimization framework that is EEG signal classification-specific, and an effective design of the model that ensures high accuracy (95.6%), lower overfitting, and practice in real-time. The improvements contribute to the promotion of reliable, adaptable, and efficient BCI systems that influence such areas as the use of prostheses, neurorehabilitation, and assistive technologies. This study project promises to realise the effective use of HBO in the classification of hand movements by EEG. Using the natural capability of bio-inspired algorithm to leverage the progressive competences of Transformer model, this study aims at developing the potential of the modern EEG-based BCI systems to accelerate a highly adaptable, efficient, and user-friendly system. This section is followed by Sect. 2 which describes the review of the existing methods and technologies associated with bio-inspired optimization of deep learning models, Sect. 3 is a detailed description of the proposed CWBT approach, including data collection and preparation, transformer model architecture, Learning Rate Optimization based on Honey Bee Optimization Technique and model training approach, Sect. 4 outlines the experimental set up of the proposed study, Sect. 5 discusses the results obtained using the proposed method, including performance metrics and comparisons with other machine learning models, and Sect. 6 sums up the paper by giving findings, contributions, and suggestions of the. Literature review Hand movement classification through EEG represents a vital component of BCI applications because noise sensitivity along with inter-subject variability and inefficiency in computation prevents its broad implementation. Transformer models demonstrate promising abilities to detect complex EEG patterns yet their performance efficacy decreases because of fixed learning rates along with significant demands on computing resources. The model’s adaptability gets improved using HBO which serves as bio-inspired dynamic hyperparameter tuning techniques. The existing EEG classification approaches and the integration of Transformer models with bio-inspired algorithms receive evaluation in this section before discussing the innovation of Cerebro-Wave Bee Transformer (CWBT) for addressing these challenges. EEG based hand movement classification Hand movements in brain-computer interface (BCI) applications have been extensively classified using EEG signals, supporting prosthetic control, neurorehabilitation, and assistive technologies. Traditional machine learning models including Support Vector Machines (SVMs) and Random Forests, which depend on handcrafted feature extraction methods including Fourier Transform (FFT) and Wavelet Transform4, are unconventional classification approaches. Due to the substantial inter-subject variability in EEG signals, these techniques cannot be generalized across subjects. Recent developments in deep learning have facilitated automatic feature extraction from EEG data, thereby boosting classification accuracy. Leveraging the ability of Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) to extract spatial and temporal features, have been applied for EEG signal classification4. CNNs suffer with long-range dependencies even with these advances and RNNs suffer from vanishing gradient problems, thereby restricting their performance in EEG based classification tasks. Organized by Reference, Year, Model Used, Results, Advantages, and Limitations, the Table 1 provides a thorough overview of EEG-based models applied for hand movement classification. The juxtaposing of important field developments emphasizes how model architectures and optimization techniques have evolved. It also highlights the need of flexible and effective solutions like the suggested CWBT model, which seeks to get over constraints including fixed learning rates, poor generalizability, and computational inefficacy. Table 1Summary of various models used in EEG-related classification tasks.ReferenceModel usedResultsAdvantagesLimitations 8 Intrinsic time scaleDecomposition (ITD)with ensemble learningClassification accuracyof 50%Efficientextraction offeatures usingITDDoes not generalizewell 9 Phase-based connectivityFeatures withregression modelAverage pearson correlationbetween predictedand actual trajectoriesis 0.43Best suitedfor continuousmovementtrackingRelatively lowcorrelationvalue 10 FusionNet (CNN,GRU, LSTM)Cross-subject accuracy− 87.1%Within-subject accuracy− 99.1%Combination ofvarious modelspromote robustperformanceHigh complexitybecause ofmultiple neuralnetwork models 11 Convolutional neuralNetwork (CNN)Accuracy of 85.7% and 88.9% on two differentdatasetsEfficient forlow frequencyEEG classificationUnable to processhigh frequencyEEG signals 12 Adaptive decoder-ensemble frameworkPearson correlationImproved by 75% fordirectional parametersand 10% for nondirectionalparametersEnriched performanceofcontinuousdecodingRequires validationto beincorporate inpractical applications 13 Wavelet analysis withmachine learningMulticlass accuracy of 85.16%, Accuracy of 95.37% for Rest vs. movement (power): Accuracy of 95.40% for Rest vs. movement (precision), Accuracy of Power vs. precision was 88.07%Proficient indistinguishingseveralforms of graspdepending onnon-invasiveEEG.Additionalstudy is essentialto confirmresults invarious populations 14 Quadratic time-frequency distribution(QTFD), support vectormachines (SVM)System competent ofdecoding movementsof individual fingersinside the same handIncreasesBCI systems’decoding accuracyHigh systemcomplexityand difficultin real-timeimplementation Summary of various models used in EEG-related classification tasks. Intrinsic time scale Decomposition (ITD) with ensemble learning Classification accuracy of 50% Efficient extraction of features using ITD Does not generalize well Phase-based connectivity Features with regression model Average pearson correlation between predicted and actual trajectories is 0.43 Best suited for continuous movement tracking Relatively low correlation value FusionNet (CNN, GRU, LSTM) Cross-subject accuracy − 87.1% Within-subject accuracy − 99.1% Combination of various models promote robust performance High complexity because of multiple neural network models Convolutional neural Network (CNN) Accuracy of 85.7% and 88.9% on two different datasets Efficient for low frequency EEG classification Unable to process high frequency EEG signals Adaptive decoder- ensemble framework Pearson correlation Improved by 75% for directional parameters and 10% for nondirectional parameters Enriched performance of continuous decoding Requires validation to be incorporate in practical applications Wavelet analysis with machine learning Proficient in distinguishing several forms of grasp depending on non-invasive EEG. Additional study is essential to confirm results in various populations Quadratic time- frequency distribution (QTFD), support vector machines (SVM) System competent of decoding movements of individual fingers inside the same hand Increases BCI systems’ decoding accuracy High system complexity and difficult in real-time implementation Transformer models for EEG classification Initially developed for natural language processing (NLP), the Transformer model’s self-attention mechanism—which can capture both short-term and long-term dependencies without recurrent connections—has shown promise in EEG signal processing6. Transformer-based models efficiently handle high-dimensional EEG data and analyse global dependencies across EEG channels unlike CNNs and RNNs. Transformer-based designs for EEG classification have been investigated in several works. Transformer-based EEG classification model as stated6 enhance accuracy over CNN and LSTM models. It is still challenging as the computational complexity and hyperparameter sensitivity call for different approaches of optimization. Transformer-based models applied to EEG hand movement classification are summarized in the Table 2 together with reference, year, model used, results, advantages, and limitations. With their self-attention systems, transformer designs have become rather effective for capturing temporal and spatial dependencies in EEG signals. Nevertheless, variations in optimization techniques, data handling, and model complexity cause existing studies to differ in their efficacy. This comparison emphasizes the need of improved models such as CWBT, which combines adaptive bio-inspired learning rate tuning to improve generalization, accuracy, and training economy. Table 2Summary on applications of transformer models.ReferenceModel usedResultsAdvantagesLimitations 15 EEG-PatchFormer(Transformer-basedwith temporal CNNand spatial-temporalpatching)On a cognitive attentiondataset, this proposedmodel exceededcurrent benchmarks inmacro-F1 score, AreaUnder Curve (AUC),and accuracyLearns spatial temporalEEGrepresentations withefficiencyshows good performanceon attentionclassification challengesFor best performance,extensive EEGdatabases can be used 16 Transformer networksfor raw EEG classificationon the STEWdatasetAccuracy of 94.53% forgender classificationAccuracy of 87.79% forage classificationAccuracy of 95.28% ontwo workload levelsAccuracy of 88.72% onworkload levelsDirectly analyzes rawEEG dataRemoves the need forextensive preprocessingImproved classificationaccuracyInitiatives requiremore computationalresources than conventionalEEG classifiers 17 Dual-TSST(dual-branchtemporal-spectral-spatial transformerwith CNNs andwavelet transform)Average accuracy of80.67% on BCI IV 2aAverage accuracy of88.64% on BCI IV 2bAverage accuracyof 96.65% on SEEDdatasetIntegrates spectral spatialaspects forimproved EEG decodingCatches long-rangedependenciesComplex design couldrestrict real-time uses 18 EEGformer - a transformer-based model that integrates 1D-CNN feature extraction with regional, synchronous, and temporal transformer modulesExcellent classificationperformance on threeEEG dataset (BETA,SEED, DepEEg)Uniformly capturestemporal, regional,and synchronous EEGfeaturesDemands big datasetsand significant computationalresources forbest performance 19 ViT2EEG (visiontransformer pretrainedon ImageNet,fine-tuned for EEGregression tasks)Superior performancein EEG regressiontasks than models thatlearn from scratchUses pretrained modelsto improve performanceon EEG tasksMinimizes the demandfor extensive EEG-specificdatasetsApplicability limited toregression tasks; theeffectiveness in classificationtasks requiresmore research Summary on applications of transformer models. EEG-PatchFormer (Transformer-based with temporal CNN and spatial-temporal patching) On a cognitive attention dataset, this proposed model exceeded current benchmarks in macro-F1 score, Area Under Curve (AUC), and accuracy Learns spatial temporal EEG representations with efficiency shows good performance on attention classification challenges For best performance, extensive EEG databases can be used Transformer networks for raw EEG classification on the STEW dataset Accuracy of 94.53% for gender classification Accuracy of 87.79% for age classification Accuracy of 95.28% on two workload levels Accuracy of 88.72% on workload levels Directly analyzes raw EEG data Removes the need for extensive preprocessing Improved classification accuracy Initiatives require more computational resources than conventional EEG classifiers Dual-TSST (dual-branch temporal-spectral- spatial transformer with CNNs and wavelet transform) Average accuracy of 80.67% on BCI IV 2a Average accuracy of 88.64% on BCI IV 2b Average accuracy of 96.65% on SEED dataset Integrates spectral spatial aspects for improved EEG decoding Catches long-range dependencies Complex design could restrict real-time uses Excellent classification performance on three EEG dataset (BETA, SEED, DepEEg) Uniformly captures temporal, regional, and synchronous EEG features Demands big datasets and significant computational resources for best performance ViT2EEG (vision transformer pretrained on ImageNet, fine-tuned for EEG regression tasks) Superior performance in EEG regression tasks than models that learn from scratch Uses pretrained models to improve performance on EEG tasks Minimizes the demand for extensive EEG-specific datasets Applicability limited to regression tasks; the effectiveness in classification tasks requires more research Bio-inspired optimization for deep learning models Training stability and performance of deep learning models depend critically on hyperparameter tuning. Conventional tuning techniques including random and grid searches are not adaptive during training and computationally costly7. Introduced to dynamically optimize hyperparameters are bio-inspired optimization algorithms including Genetic Algorithms (GA) and Particle Swarm Optimization (PSO). To improve model adaptation, these methods replicate swarm intelligence and natural selection. Inspired by honey bee foraging activity, the Honey Bee Optimization (HBO) algorithm has shown success in dynamic hyperparameter tuning. HBO allows deep learning models to adjust learning rates depending on training progress, so balancing the exploration-exploitation trade-off. Higher classification accuracy in EEG-based applications has been obtained by past studies20 effectively combining HBO with CNNs and XGBoost models. Significant work using Bio-Inspired Optimization methods in deep learning models for EEG-based hand motion classification is compiled in Table 3. It lists the Reference, Year, Model Applied, Results, Benefits, and Conventions. Natural processes are replicated in bio-inspired algorithms including Particle Swarm Optimization (PSO), Genetic Algorithms (GA), and Honey Bee Optimization (HBO), dynamically tuning hyperparameters. Especially in terms of convergence and generalizability, these approaches have shown better model performance. Persistent with benefits are the issues including computational cost and parameter sensitivity. By dynamically changing learning rates for strong and efficient classification, the combination of HBO with Transformer architecture in the CWBT model solves these problems. Table 3Summary of bio-inspired optimization methods for deep learning models.ReferenceModel usedResultsAdvantagesLimitations 21 Various bio-inspiredoptimization such asGenetic algorithms(GA), Particle SwarmOptimization (PSO),Ant colony optimization(ACO)Selected best performingbio-inspired optimizationtechniques forindustrial applicationsGeneral relevance inseveral sectorsUseful for major optimizationchallengesLarge-scale computationalcomplexity inpractical applications 22 Jellyfish search optimizer(JSO)JSO solved optimizationproblems withbetter performancethan other metaheuristictechniquesSolves a broad spectrumof optimizationproblems with competitiveaccuracy effectivelyRestricted generalizationover all problemspheres 23 Bio-inspired optimizationalgorithms appliedto machine learningmodelsImproved accuracy andefficiency of enhancedmachine learningmodels by means ofbio-inspired optimizationapproachesEnhances machinelearning models’ accuracyand convergencespeedHigh computationalcost for uses in largescalemachines learning 24 Evolutionary deeplearning (combiningevolutionary algorithmswith deeplearning models)Presented a criticalstudy of evolutionarydeep learning, stressingadvantages anddifficultiesComprehensive taxonomyand methodologicalinvestigation of evolutionarydeep learningExtensive computationalresources areneeded in evolutionarymethods 25 Particle swarm optimization(PSO) andMulti-trial optimization(MTO) for neuralnetwork weight optimizationEnhanced accuracyand efficiency of neuralnetworks in medicaldiagnosis activities(breast cancer dataset)Optimizes neural networksfor improvedperformance free fromhuman tuningIt requires varyingdataset and task specificparameter tuning Summary of bio-inspired optimization methods for deep learning models. Various bio-inspired optimization such as Genetic algorithms (GA), Particle Swarm Optimization (PSO), Ant colony optimization (ACO) Selected best performing bio-inspired optimization techniques for industrial applications General relevance in several sectors Useful for major optimization challenges Large-scale computational complexity in practical applications Jellyfish search optimizer (JSO) JSO solved optimization problems with better performance than other metaheuristic techniques Solves a broad spectrum of optimization problems with competitive accuracy effectively Restricted generalization over all problem spheres Bio-inspired optimization algorithms applied to machine learning models Improved accuracy and efficiency of enhanced machine learning models by means of bio-inspired optimization approaches Enhances machine learning models’ accuracy and convergence speed High computational cost for uses in largescale machines learning Evolutionary deep learning (combining evolutionary algorithms with deep learning models) Presented a critical study of evolutionary deep learning, stressing advantages and difficulties Comprehensive taxonomy and methodological investigation of evolutionary deep learning Extensive computational resources are needed in evolutionary methods Particle swarm optimization (PSO) and Multi-trial optimization (MTO) for neural network weight optimization Enhanced accuracy and efficiency of neural networks in medical diagnosis activities (breast cancer dataset) Optimizes neural networks for improved performance free from human tuning It requires varying dataset and task specific parameter tuning Research gaps and motivation Inspite of the various advancements in EEG-based studies, transformer models and bio-inspired optimizations, numerous gaps still exist such as. Confined resilience of transformer model in EEG-based classification tasks. Confined resilience of transformer model in EEG-based classification tasks. Scarce use of bio-inspired optimization methods in deep learning models. Scarce use of bio-inspired optimization methods in deep learning models. Most models utilized for EEG-based classification lacks generalizability, subject variability and noise robustness. Most models utilized for EEG-based classification lacks generalizability, subject variability and noise robustness. The motivating factors behind the development of CWBT model with the use of transformer models and bio-inspired optimization methods are listed as follows. Implementation of transformer models to enhance EEG-based hand movement classification as they have the potential to improve feature extraction process. Implementation of transformer models to enhance EEG-based hand movement classification as they have the potential to improve feature extraction process. Integration of HBO for dynamic learning rate optimization to ensure faster convergence and reduced training time. Integration of HBO for dynamic learning rate optimization to ensure faster convergence and reduced training time. Ensuring the adaptability, scalability and real-time implementation of EEG-based hand movement classification for clinical and assistive applications. Ensuring the adaptability, scalability and real-time implementation of EEG-based hand movement classification for clinical and assistive applications. The CWBT model leverages the drawbacks of existing studies with the integration of transformer model and bio-inspired learning rate to boost the performance and adaptability of EEG-based systems. Methodology This article incorporates a Transformer-based model for the efficient classification of hand movements using EEG signals. The overview of the proposed model is shown in Fig. 1. Overview of Cerebro-Wave Bee transformer (CWBT) model. The data is preprocessed and then divided into training and validation sets. The proposed method named as Cerebro-Wave Bee Transformer (CWBT) model as depicted in Fig. 2 consists of a transformer model which processes the input features through various layers. In CWBT model, the learning rate is optimized by using adaptive learning rate strategy inspired by the foraging behaviour of bees. This selects the best learning rate based on the accuracy of the model. The training phase utilizes the AdamW optimizer with early stopping and convenes by halting the model if there is no substantial enhancement in the performance. The CWBT model is finally evaluated using various performance metrics to guarantee sturdy performance. Overall workflow of the proposed Cerebro-Wave Bee transformer (CWBT) model. Data collection and preparation The proposed CWBT model was evaluated using two independent EEG datasets namely: i.The pre-processed hand-movement dataset from Kaggle and. The pre-processed hand-movement dataset from Kaggle and. ii.The raw BCI Competition IV 2a dataset. The raw BCI Competition IV 2a dataset. Both datasets were converted to an integrated 14 × 4 spectral representation per trial to ensure architectural consistency. Although a Transformer encoder is incorporated, the suggested model does not acquire temporal dependencies over time. The EEG trial is represented by the 14 × 4 spectral matrix which encompasses 14 EEG channels treated as tokens and the powers of 4 frequency-bands form the token features. As a result, the self-attention mechanism approximates spatial-spectral inter-channel interactions, but not time dynamics of the EEG signal. The reason behind this design decision was the need to provide architectural regularity among datasets with heterogeneous sampling rates, trial lengths, and preprocessing pipelines for the fair evaluation of the datasets. This enables the model to systematically process each EEG channel as a sequence token. This is the fundamental dataset used in the study. It was accessed from Kaggle26 on August 25, 2024. In this data, every trial is classified into one of three categories, namely, left-hand movement, right-hand movement, or no-movement (rest). Kaggle dataset has the following distribution of classes: Class 0 (no-movement) has 2421 samples, Class 1 (left movement) has 2346 samples, and Class 2 (right movement) has 2389 samples, which means that the dataset is well-balanced. In the case of the BCI Competition IV 2a, on pre-processing and segmentation, one has 576 trials in each of the three classes, namely rest baseline, left-hand image, and right-hand image, which produces an ideal structure of classes. These are precisely given numbers so that balance of classes and reproducibility can be assessed. These classes constitute the foundation of the multi-class classification task which is the focus of the present research. The dataset was recorded using the EMOTIV EPOC + EEG headset consisting of 14 channels, sampled at 128 Hz with 16-bit A/D conversion. The raw EEG was pre-processed by the dataset providers with Fast Fourier Transform (FFT) and mean spectral power values in four main EEG frequencies ranging between 0.54 and 30 Hz in delta, theta, alpha, and beta bands. In each trial, this gave a fourteen-by-four matrix (each row was associated with an EEG electrode and the columns identified the average power in each frequency band). This matrix was viewed as a sequence of fourteen tokens, and each token was a four-dimensional feature of the spectral properties of a single channel to be used in the Transformer architecture. All feature values were standardised to z-score before training and the data was divided into 80% training set and 20% validation set. Also, ten-fold stratified cross-validation was conducted to have a stronger estimate of the model performance and prevent possible bias in data. The snapshot of the dataset in stated in Table 4. Table 4EEG hand movement dataset.ClassAF3 delta stdAF3 delta mAF3 theta stdAF3 theta mAF3 alpha std13569.162063.891.674.440.5213568.422063.091.893.721.3013568.152062.442.792.571.1213567.712062.112.183.610.6213565.542063.121.683.880.6713565.592062.881.133.300.7313564.802062.231.532.730.5413563.702061.180.561.841.2913564.122061.350.643.281.0513561.472059.380.623.581.03 EEG hand movement dataset. To determine the generalizability of the CWBT model, the BCI Competition IV 2a dataset was used. This dataset is not like the Kaggle dataset as it has different sampling frequency, channel layout, and recording devices. To be consistent, the raw BCI IV 2a data was subjected to a full processing pipeline. The signals were band-pass filtered at 0.5–30 Hz to isolate motor related EEG. The motor imagery trials were divided into event markers and then resampled at 250 Hz to 128 Hz to match the sampling rate of the Kaggle dataset. Given that BCI IV 2a comprises of twenty-two electrodes, fourteen electrodes were chosen due to spatial proximity to EMOTIV EPOC+ montage. The spatially aligned channels were then converted to the frequency domain by FFT and the average power of delta, theta, alpha, and beta were extracted in the same way as the Kaggle preprocessing. After such transformations, all trials of the BCI IV 2a data were converted to a fourteen-by-four spectral matrix, which can be input directly into the CWBT model. Each component of the cross-validation was normalized using z-score statistics that were calculated in every fold of the cross-validation process. The last input of the Transformer encoder was a sequence of fourteen tokens to both datasets, with each token corresponding to a single EEG channel. A 256-dimensional embedding vector was linearly projected on each of the four-dimensional tokens before passing through the multi-head self-attention layers. This representation allowed the model to provide spatial-spectral dependencies across the EEG channels even without the raw temporal information. To prevent all chances of data leakage and to be confident that the reported 95.60% accuracy is not due to the overlapping of training and validation sets, the data-splitting strategy was carefully regulated. Kaggle dataset lacks identifiers of the subjects; thus, trial-wise splitting was utilized and every trial was considered as an independent sample. To further confirm the generalizability, a 10-fold stratified cross-validation was made to assure the performance was not influenced by that 80:20 split. On the BCI IV 2a dataset where subject data is available, preprocessing and feature extraction were done in each fold and subject-independent cross-validation was used to separate training and validation using subject independent trials, making sure that these groups do not contain subject trials. This helps avoid the leakage of data and allows subject-level generalization to be fairly evaluated. Even though the unified 14 × 4 representation is not dynamic and does not encompass raw temporal dynamics, a novel design choice is required to make both datasets compatible with each other and to be used in this study consequently. Kaggle and BCI IV 2a datasets are very different in terms of sampling rate, length of trials, and channel configuration, and therefore, direct sequence-based modelling of raw EEG time series is not possible. The transformation of the two datasets to a uniform spectral format retains the most informative motor related frequency bands and removes temporal differences unique to the equipment. Under such formulation, the Transformer does not learn time-series evolution but rather, each channel-band feature vector is a token, and self-attention can be learned to learn spatial-spectral channel-channel relationships. These cross-channel interactions are significant to the motor execution, and these are not effectively represented by other simpler versions of the model like MLPs or shallow CNNs. Section 4 has included baseline comparisons to confirm that these less complex models are less effective compared to the Transformer encoder, which proves the effectiveness of attention-based modelling even when aggregated spectral features are used. The average of brainwave values across all channels is depicted in Fig. 3 which demonstrates the high-level overview of the brainwave activity incurred in the dataset. EEG channels’ mean spectral band power values of each frequency band. Data loading and preprocessing Architecture of the transformer model The architecture of the deep learning model plays a crucial role in determining the efficiency and effectiveness of classification tasks. This study acquaints a transformer model as stated in Algorithm 2, to exploit progressive self-attention mechanisms for handling complex patterns in data. The architecture as shown in Fig. 4 is devised to enhance the representational power and the generalization capabilities of the proposed model. The pivotal constituents of the transformer model include an embedding layer, a couple of batch normalization layers, dropout layer for regularization, a Transformer encoder with multiple self-attention heads, an output layer, and a final classification layer. Each of the elements is tailored to intensify the dynamics of learning and ameliorate the performance of classification tasks. The following subsections outline the architectural constituents and their contributions to the model’s functionality. Architecture of transformer model. Architecture of transformer-based model implemented in CWBT framework. Embedding layer The transformer model consists of an initial embedding layer. This layer is responsible for transmuting the input features into a continuous vector space of high dimensionality. This conversion is essential as it remodels the input features in the representational framework. A linear transformation is utilized in this layer to accelerate the dimensionality of input data to 256-dimensional space. This permits intricate operations within the transformer encoder. Batch normalization layer The transformer model consists of two vital batch normalization layers at decisive points to promote stability and enrich the model’s performance. First batch normalization layer The first batch normalization layer is placed after the embedding layer. It standardizes the output values to have zero mean and unit variance. This reconciliation supports numerical stability and swift training operations. Second batch normalization layer The second normalization layer is strategically implemented next to the output layer. This layer converts the linear transformation outputs to a standard form before encountering the activation functions. This layer vouches reliable system performance by addressing problems that arise from feature size variability. Dropout layer The dropout layer in the transformer model is strategically positioned between the first normalization layer and transformer encoder. It serves as a regularization tool to suppress overfitting. By randomly disabling a subset of features during training, this layer helps the network to develop more generalized representations of specific patterns. Using a dropout rate of 10% strikes a balance between effective learning and mitigates risks of overfitting. The dropout is turned off during inference to fully utilize all learned features, maximizing the model’s performance. By incorporating dropout, the model becomes more adaptable to real-world conditions, enhancing its robustness and generalization capabilities. Transformer encoder At the heart of the Transformer model is the Transformer encoder which relies on self-attention mechanisms to dynamically process input data. Each encoder layer incorporates multiple attention heads, which allows the model to analyse data from different perspectives simultaneously. The multi-head attention mechanism combines insights from each head to build a comprehensive representation of the input features. Position-wise feed-forward network within each encoder layer applies a linear transformation adding depth and non-linearity to the model. The makes the model to learn global relationships across channel-wise spectral tokens in self-attention fashion, without learning the temporal evolution of the EEG signal. This design not only improves processing speed but also enhances scalability, making the encoder well-suited for handling complex datasets. To further reinforce robustness, dropout is integrated into the encoder layer, to reduce overfitting by randomly omitting features during training. Output layer The output layer plays a crucial role in transforming the high-dimensional outputs from the Transformer’s encoder into meaningful class predictions. It applies a linear transformation that reduces the 256-dimensional encoded features to match the number of target classes, simplifying the classification process. After this transformation, batch normalization helps stabilize the output by ensuring consistent scales and variances, which improves training stability and speeds up model convergence. Finally, a softmax activation function converts the processed outputs into a probability distribution over the possible classes. This step is particularly important for multi-class classification, as it provides interpretable probabilities that indicate the model’s confidence in each prediction. Classification layer In the Transformer model, the classification layer serves as the key for converting the 256-dimensional encoder output into meaningful class predictions. This process begins with a linear transformation that adjusts the feature vectors to match the number of target classes, making complex data easier to classify. Next, batch normalization is applied which standardizes these outputs, enhancing consistency and optimizing model performance. Finally, the softmax activation function transforms the processed data into a probability distribution across the possible classes, providing clear, interpretable predictions grounded in statistical confidence. This structured approach is essential for accurate and reliable multi-class classification. Learning rate optimization using Honey Bee Optimization technique The selection of suitable learning rate is of utmost importance when training neural network models as it leverages convergence rate and performance of the model. Traditional methods of hyperparameter tuning such as grid search27 or random search28 is inefficient when many parameters are involved. To overcome this issue, a novel strategy utilizing bio-inspired algorithm i.e., Honey Bee Optimization (HBO) is proposed for adapting the learning rate of the transformer model. This technique inspired by the foraging behaviour of honey bees as depicted in Fig. 5 efficiently models the exploitation and exploration phases intrinsic in natural foraging to optimize the hyperparameters. The algorithm is initialized with multiple agents, termed as “bees” where each bee represents a possible solution. These bees identify the best solution by searching the parameter space and tailoring their positions around the so far identified best solution29. The position adaptations are based on the performance of the bee on current location and a degree of randomness, which conceals the volatile nature of authentic foraging. The number of bees corresponds to the number of times the optimization process will be executed. Each bee symbolizes a sole trial of testing the learning rate. For each bee, the learning rate obtained is modified by multiplying the current best learning rate by a random factor between 0.5 and 1.5. This range of 0.5 and 1.5 is chosen based on trial-and-error strategy. The random factor is incorporated to present variability across the tested learning rates like the behaviour of bees in randomly exploring diverse areas. Workflow of HBO for the selection of optimal learning rate in the CWBT model. A diverse feature incorporated in this technique is the “temperature” parameter akin to the cooling schedule in simulated annealing30. This parameter is essential for controlling the amplitude affiliated to the bee’s exploratory moves. Higher values of temperature permit wider exploration and avoids primal local minima in the optimization process whereas lower values of temperature promote accurate adjustments as optimal solution is reached. In this application, the Honey Bee Optimization starts with a starting temperature of , which controls the learning-rate perturbation experienced in the initial exploration phase. A multiplicative decay factor of 0.95 is used to gradually reduce the temperature at every iteration allowing the search process to change between broad exploration to local refinements around subsets of learning-rate regions that are promising. Training every bee candidate rate is done with 5 epochs and the validation accuracy is noted, and the best-performing candidate is chosen to be used in the next iteration. This value of T0, temperature decay and duration of per-bee training is a guarantee that the HBO search process is reproducible and well-controllable. The candidate learning rate of the bee agent is trained on the training set with a fixed number of five provisional epochs to test accuracy and then the validation. This is a limited-epoch assessment specifically selected to give an effective initial estimate to test the ability of learning-rates and ensure that the computational cost of the HBO search can be effectively addressed. Empirically, five epochs had been identified as enough to identify stable and unstable learning-rate candidates without adding too much variance (random initialization or noise) to the initial training dynamics. The approach guarantees reproducibility and efficiency on the offline hyperparameter optimization stage. The final model is then trained to achieve full convergence with the chosen optimal learning rate. Each bee imposes its new position and trains the model for a predefined number of epochs by provisionally adopting it as the learning rate and ascertains its performance on a validation set. If the bee has identified an efficient learning rate evidenced by greater validation accuracy compared to the previous one, this updated learning rate is utilized for further exploitations. In addition to the “temperature” parameter, another parameter designated as “cooling rate” is employed to achieve a balance between extensive initial exploration and subsequent refinements31. The cooling rate is used to diminish the temperature after each iteration to gradually minimize the size of dynamic adjustments. The efficiency of Honey Bee Optimization (HBO) algorithm rests in its bipartite ability to discover the search space and regulate the solution as it converges. The versatility of this method depends on the dynamic and volatile landscape of neural network training, where the optimal learning rate is varied based on the concrete architecture and data. By harnessing HBO technique, the transformer model leverages the bio-inspired algorithm to achieve an efficient hyperparameter tuning process. This strategy elucidates a sturdy application of nature-inspired algorithms, thereby contributing to a broader procedure for machine learning researchers and practitioners. HBO’s computational consideration and real-time application on BCI devices While the HBO method combines several validation evaluations across several candidate learning rates shown by bee agents, it is important to note that this optimization framework runs just during the offline training phase of the model development pipeline. Integrating HBO serves to dynamically change the learning rate in a bio-inspired way by using adaptive exploration-exploitation concepts to improve transformer model generalization capacity and convergence behavior. Every bee iteration trains the model for a small number of epochs using a perturbed learning rate, then evaluates on the validation set to find the most optimal hyperparameter configuration. As shown by the CWBT model obtaining 95.60% accuracy in EEG-based hand movement classification, this process greatly increases model robustness and final accuracy even if it generates additional computational overhead during training. Classification of EEG hand movements with Cerebro Wave Bee transformer model. Crucially, this overhead does not reach the deployment level. The final model is fixed and used for inference once the ideal learning rate has been chosen using HBO. In real-time execution of BCI applications, the CWBT model runs as a standard Transformer-based classifier free from any HBO-related computational actions. This architectural separation guarantees that the CWBT model stays lightweight and practical for real-time BCI implementations, matching the low-latency criteria of assistive neurotechnology. Though HBO improves the training efficiency and classification performance significantly, it does not compromise the real-time usability of the model. Future research may investigate ways to lower optimization cost by incorporating early stopping strategies per bee or surrogate-based evaluations particularly for limited hardware environments. Model training approach The CWBT model encompasses a structured training pipeline which enables an effective method to optimize and generalize the Transformer-based network for EEG-based hand movement detection. AdamW optimizer begins the learning process by serving as an optimizer variant dedicated to weight decay regularization. A learning rate determination method based on bee inspired adaptive learning rate algorithm is used to search through candidate rates until it finds the one achieving maximum validation accuracy. During training, the model works through 200 epochs which begin with forward propagation followed by backpropagation. The forward propagation method directs the input data from the embedding layer to Transformer encoder layers and ends at the fully connected output layer with Negative Log Likelihood Loss (NLLLoss) implemented during multi-class categorization. The model uses backpropagation with computed loss to produce gradients through gradient descent optimization. The training process uses early stopping to maximize efficiency without overfitting. Early stopping is activated only after the completion of 50 epochs to prevent premature termination. After training, the model needs to be assessed to determine its generalization capabilities. The computed final accuracy represents a count of correct predictions against the actual ground truth labels. The training process incorporates adaptive learning rate adjustments and dropout regularization combined with early stopping and validation-based evaluation for efficient EEG-based hand movement classification. Model response to adaptive learning rates The competence of neural network model to adapt to dynamic learning rates is crucial for efficient training and performance of the model. The HBO technique strategically combines feedback from the environment coupled with a cooling mechanism to vigorously adjust the learning rate (). Primarily, a confiscated learning rate () based on empirical evidence is preferred. Each bee investigates probable adaptions within a realm resoluted by the current temperature parameter (). The learning rate for each bee at iteration is shown in Eq. 1. In Eq. 1, refers to the most effectual learning rate discovered currently, is the randomly chosen numeral in the range and corresponds to the versatile temperature which sways the extent to which the learning rate can vary. To prevent ambiguity in the update rule, is the current position of bee in terms of learning-rate at iteration . The value of the last iteration is denoted as . The perturbation term acting on the HBO update equation is for getting a candidate learning rate in the current step. This candidate learning rate is tested in terms of validation accuracy. This notation explains the dynamics of the search whereby each agent bee updates its location based on the previous position from to based on perturbation of the exploration and the temperature-controlled region of search. The temperature parameter is tactically minimized with the use of cooling factor (), which ranges between 0.85 and 0.99. The cooling factor parameter maintains equilibrium between extensive exploration and focused adjustment during final phases of optimization as depicted in Eq. 2. With the decrease in temperature, the purview of learning rate adjustment narrows and promotes precise tuning towards the optimal rate. Each updated learning rate is then used for training and evaluating the model. Based on the performance evaluation of the model, the most effective learning rate is chosen and utilized for the consequent iterations. This process continues until the performance of the model demonstrates a negligible improvement or the temperature drops to its minimal value which shows that the optimal learning rate is reached. Experimental setup The experimental setup entails data preprocessing, model architecture, hyperparameter optimization, training strategy, and evaluation metric assessment. The EEG hand movement data obtained from multiple CSV documents is combined into one unified dataset. The first column in the dataset shows the class indicators and other columns corresponds to EEG data of various electrodes. The data features are uniformly scaled using StandardScaler for better model convergence. The dataset is divided into training and validation sets in the ratio of 80:20 for assessing the model performance. A Transformer-based neural network model is employed to detect sequential dependencies within EEG signals. The model consists of an initial embedding layer to transform input features into 256-dimensional space and then batch normalization is applied to ensure stability. The core part of the model utilizes three-layer transformer encoder composed of eight attention heads for effective learning of the features’ cross connections. The final layer is run with log-SoftMax which is used to transform the raw logits into log-probabilities that can be used with the NLLLoss function to perform multi-class classification with a 10% dropout. This dropout feature is employed to prevent overfitting. And the fully connected output layer receives the transformed results for classification. The learning rate optimization process uses adaptive learning rate algorithm based on bee colony optimization to reach peak performance. The model employs an initial learning rate of 0.001 and selects its candidate learning rates through brief assessment periods of validation accuracy achievement. Eventually, the cooling process parameter set as 0.95 in the initial phase of the CWBT algorithm reduces the amount of exploration to enhance the learning rate selection process. The training process uses the AdamW optimizer with the weight decay regularization of (1e-2) to enable better generalization ability. NLLLoss serves as the loss function for multi-class classification. The training loop contains execution of all steps 18 including forward propagation, backpropagation, and parameter updates. The combination of Dropout and batch normalization stabilizes learning while preventing overfitting. The early stopping mechanism stops training after 50 epochs while detecting 20 successive epoch validations without performance enhancement. The model is evaluated to assess its generalized performance. The experimental configuration combines Transformer-based deep learning with adaptive learning rate adjustments to obtain efficient EEG-based hand movement classification. To assure the performance gains of CWBT model are meaningful and not data-set specific and optimizer specific, several other experiments were carried out. Three baseline versions of Transformer were firstly trained on the same dataset namely - Transformer with fixed learning rate, Transformer with a ReduceLROnPlateau scheduler, and Transformer with standard Adam without HBO. Additionally, classical machine learning models such as a Support Vector Machine (RBF kernel), a Random Forest classifier, and a two-layer Multilayer Perceptron (MLP) were also tested on these pre-processed features to understand whether the simpler models could achieve dominating results. The Transformer architecture was also trained on an ablation study by training with and without HBO under identical settings and thus isolating the contribution of adaptive learning rate tuning. Moreover, HBO, fixed learning rate scheduling, ReduceLROnPlateau and ten candidate learning rates grid search convergence comparison were conducted. The accuracy of the validation was also tracked with the number of iterations so that the question of whether HBO is faster or more efficient to converge can be answered than the traditional strategies. The entire experimental setup, therefore, is a Transformer-based deep learning with bio-inspired hyperparameter search, classical baselines, and ablation analysis to fully evaluate EEG-based hand movement classification. The experiment stated in this work were evaluated using 10-fold stratified cross validation technique. The performance metric was computed individually for each fold and the results reported in Sect. 5 was stated as the mean and standard deviation (mean ± SD) across the folds. Results and discussion This section assesses the performance of the proposed CWBT approach for classifying EEG-based hand movements. The effectiveness of this model is evaluated based on accuracy, F1-score, confusion matrix, agreement metrics and similarity metrics and the results of these metrics are stated in Table 5. The reported values of the performance metrics are all macro-averaged to assess the multi-class problems and provide equal weight to the three classes (left-hand movement, right-hand movement, and no-movement). The proposed CWBT model’s performance was evaluated using10-fold stratified cross-validation method. Each fold of the folding was individually computed in terms of accuracy, F1-score, and agreement. The values discussed in this section are the mean ± standard deviation of the 10 folds. Additionally, the results of the CWBT method are also compared with other studies to demonstrate improved outcomes and validate its methodological stability. Table 5Performance evaluation of proposed method.S. NoPerformance metricResults (in %)1Accuracy95.60 ± 0.722F1-score95.60 ± 0.693Cohen’s Kappa67.18 ± 1.104Jaccard index64.19 ± 0.955Dice coefficient78.16 ± 0.886Fowlkes-Mallow index63.47 ± 1.02 Performance evaluation of proposed method. Accuracy The CWBT model achieved an accuracy of 95.60% in EEG-based hand movement classification because of its advanced capability to represent intricate features. Through the self-attention mechanism of the Transformer encoder, the essential EEG patterns which boost the classification results are identified. A key aspect of achieving high performance with this model involves the learning rate chosen using HBO for effective convergence and enhanced generalization. Early stopping mechanism coupled with batch normalization in the CWBT model prevents overfitting and stabilizes the outcomes. The transformer model incorporated in this approach utilized sequential dependency processing for EEG-based hand movement classification to deliver greater performance compared to traditional deep learning systems. F1-score and confusion matrix The F1-score of 95.60% proves the model’s ability to maintain a good precision-recall relationship in EEG-based hand movement classification tasks. The model demonstrates excellent performance since its F1-score indicates successful elimination of false positive and false negative errors in classification tasks. In this paper, the F1-score is presented in the form of a macro-averaged F1, where the three classes are equally weighted regardless of the number of samples. To be fully transparent, it is provided with the F1-scores on class-wise Kaggle data: F1 Score of Class 0 (No-movement) = 0.956. F1 Score of Class 0 (No-movement) = 0.956. F1 Score of Class 1 (Left movement) = 0.953. F1 Score of Class 1 (Left movement) = 0.953. F1 Score of Class 2 (Right movement) = 0.961. F1 Score of Class 2 (Right movement) = 0.961. These values were used to compute the macro-F1 (0.956), which is numerically like the accuracy due to equal distribution of classes and steady high classification results of the three classes. The Fig. 6 displays the confusion matrix depicting comprehensive details about how the model performed regarding each class. The correct classification results appear along the diagonal while misclassifications are present in the off-diagonal matrix values. The CWBT model demonstrates robust categorization of all classes. The model demonstrates minor misidentification patterns that occur when similar class categories overlap with each other due to variations in EEG signal characteristics. The enhanced performance of this model results from precise handling of the hyperparameters and hybrid architectures assimilating different EEG preprocessing strategies. Confusion matrix of CWBT model indicating accurate and balanced multi-class predictions. Agreement metrics Agreement metrics provide an assessment of prediction reliability to check whether the model delivers consistent performance above random chance predictions. The CWBT model demonstrates substantial agreement between predicted and true labels as indicated by Cohen’s Kappa value of 0.6718 because it effectively distinguishes EEG hand movement patterns while reducing random classification errors. A strong relationship between model predictions and corresponding instances appear in the Fowlkes-Mallows Index value of 0.6347 because it calculates the geometric mean of precision and recall. These agreement metrics support the classifier’s ability to deliver stable and dependable performance for different categories of EEG-based hand movements thus making it suitable for practical implementation. Similarity metrics The relationship within datasets is assessed by evaluating similarity metrics which compute the overlap between predicted and actual classifications. The Jaccard Index, also known as Intersection over Union (IoU) calculates the similarity percentage by comparing actual to predicted labels while evaluating the accuracy of classification. The Jaccard Index value of 0.6419 i.e., 64.19% obtained from CWBT model shows the precise overlap of predicted labels with the actual labels. The Dice Coefficient referred to as Sorensen-Dice similarity shows advanced performance by providing aggressive penalties for misclassification errors so that it serves as a solid indicator of model stability. A Dice Coefficient of 0.7816 shows that the model effectively captures similar predictions which match with actual values. Also, it enables effective generalization in EEG-based hand movement classification operations. Evaluation of training loss and overall accuracy over epochs The proposed model demonstrates its performance through changes in training loss and overall model accuracy as shown in Fig. 7. Effective learning resulted in a steady decline of the training loss curve leading to convergence. The model experiences initial weight fluctuations followed by a sustained decrease in loss until optimal parameter extraction and error reduction are achieved. Overall learning stability emerges from the training process because minor changes occur although the main learning trend remains stable. Training loss and model accuracy across epochs illustrating stable convergence with HBO-based learning rates. The generalizing performance displayed by the accuracy curve shows stable high performance through continuous fluctuations. The performance variations during training from how the model adjusts its learning rate and executes batch update operations. The proposed model also implements dropout regularization to stabilize effectively against overfitting issues. Various shifts in accuracy levels remain within the high range which demonstrates that the model successfully applies learned knowledge to different data samples. The model achieves reliable performance as a solution for EEG-based hand movement classification when both loss and accuracy stabilize at the end of training. The model also demonstrates low error rates and high predictive abilities. Learning rate evaluation using HBO The Honey Bee Optimization possess a significant role in regulating the learning rate through methodical exploration and refinement of hyperparameters to boost the model performance. As depicted in Fig. 8, the blue curve shows the validation accuracy and the red curve represents the temperature. The validation accuracy demonstrates a sturdy acceleration across various iterations of bees. The learning rate chosen using adaptive search strategy is effectively shown by this trend. The progressive decline of the red curve supersedes simulated annealing principles to restrain the trade-off between exploration and exploitation. Primarily, the temperature is set to a higher value to allow broader exploration. With the progression in iterations, the temperature value decreases to confine nonessential fluctuations and to converge optimally towards the learning rate. The final bee iteration attains the highest accuracy promoting a stable and productive training of EEG-based hand movements. Learning rates adapted by HBO on Kaggle dataset showing enhanced accuracy with decrease in temperature. To better illustrate the utility of HBO, a convergence comparison was conducted between HBO and the most effective fixed learning rate and a simple learning-rate sweep whose results are shown in Table 6. The use of validation accuracy as shown in Fig. 8 demonstrates the HBO iterations that progressively increase accuracy of validation starting at 0.776 at the baseline model and increasing gradually to 0.952 as the temperature decreases. Nonetheless, the number is merely a visualization of the internal search dynamics of HBO, without putting it in perspective in comparison with traditional approaches. Thus, the same Transformer model was trained with (i) the optimal fixed learning rate that were found experimentally was 0.001 and (ii) the 10-point grid search results spanned between 1e-4 and 1e-2. The optimal fixed-LR model was obtained to be 0.933, whereas grid search was 0.942 when all the candidates were tested. HBO was able to beat both approaches and converge to 0.956 accuracy in just five bee steps. This shows that HBO is faster convergent, higher performing and more stable than classical learning-rate strategies. Table 6Comparison of learning rate strategies.MethodPeak accuracyInterpretationBest fixed LR (0.001)0.933No adaptive explorationGrid search (10 LR values)0.942Exhaustive; slower; more expensiveProposed HBO0.956Fastest convergence; best accuracy Comparison of learning rate strategies. To put these results in context, a convergence plot was also created as stated in Fig. 9. As opposed to the fixed learning-rate model, which levels off at 0.933, and the grid-search strategy, which takes all ten candidates to get to 0.942, HBO demonstrates continuous and monotonic progress with each iteration. With the fifth bee generation HBO is far ahead of either method, and with an accuracy of 0.956. This proves that not only HBO is able to find a more favourable learning rate, but it also does it in a more efficient and stabilized way. The temperature parameter goes further to optimize this process by governing the exploration range-wide search at the first stage and narrow refinement in the subsequent stages. This behaviour allows HBO to uncover learning-rate curves that the static or exhaustive approaches cannot achieve, which explains why it includes in the CWBT framework. Convergence comparison plot demonstrating accelerated convergence with improved accuracy for the proposed strategy. To quantify the computational overhead introduced by HBO, we measured the total time required for the learning-rate search relative to a baseline training run using the final best learning rate. Each HBO iteration involved training the model for 5 epochs, and the search converged in 5 iterations, resulting in a total search cost of 25 short epochs, or approximately 8.4 min on an NVIDIA T4 GPU. In contrast, a full non-HBO training run of 200 epochs required 36.7 min. Thus, HBO adds an overhead of 22.9% relative to the full training time. However, this cost occurs only once during the search phase; the final optimized learning rate is then used for the complete 200-epoch training. Importantly, when trained directly with the non-optimized learning rate, the model exhibited lower accuracy (93.3%) and required multiple re-starts due to unstable convergence. When HBO was used, the model consistently achieved 95.60% accuracy with stable convergence on the first full run. Therefore, the modest HBO overhead is justified by the improved stability and performance achieved through optimized learning-rate selection. Cross validation of CWBT model By employing the publicly available BCI IV 2a dataset, a 10-fold cross-valuation was carried out to assess the generalization and robustness of the CWBT model. To guarantee consistency, this validation used same hyperparameter values, training methods, and model architectures as previously used. The comparative findings revealed minor changes in performance across the datasets. The cross-validation results of CWBT model are shown in Table 7. Particularly on the BCI IV 2a dataset, accuracy and F1-score showed minor declines (accuracy: −1.80%, F1-score: −2.10%). This most likely reflects minor variations in participant variability and EEG signal complexity. Cohen’s kappa and Jaccard index also showed minimal declines (Cohen’s kappa: −0.68%, Jaccard index: −0.79%), implying strong class agreement despite features unique to each dataset. The Dice coefficient (−0.86%) and Fowlkes–Mallows index (−0.77%) showed similarly declined values but consistent predictive overlap with just minor fluctuations. Additional investigation of the optimization process as shown in Fig. 10 demonstrates an inverse link between temperature across optimization iterations (bee indices) and validation accuracy. Validation accuracy rises gradually from 77% to 93% as the bee index rises; temperature falls simultaneously from 0.767 to 0.715. This behaviour suggests that lower temperatures support convergence towards better solutions, so improving validation performance. Emphasizing the need of controlled exploration-exploitation balance in the bee optimization strategy, the optimization process shows that a consistent improvement in model accuracy results from a systematic reduction in exploration (as reflected by decreasing temperature). With observed variations mostly attributable to inherent dataset differences and optimization dynamics rather than model limitations, the cross-validation analysis confirms that the CWBT model maintains a reliable generalization capability across different EEG datasets. To boost the performance further, future studies could emphasize at preprocessing tailored to the specific dataset, parameter tuning, and advanced temperature control. Table 7Comparison of performance of the CWBT model across BCI datasets.Performance metricCWBT (Kaggle dataset)CWBT (BCI IV 2a dataset)Comparison/remarksAccuracy95.60%93.80%Slight decrease (− 1.80%)F1-score95.60%93.50%Slight decrease (− 2.10%)Cohen’s Kappa67.18%66.50%Slight decrease (− 0.68%)Jaccard index64.19%63.40%Slight decrease (− 0.79%)Dice coefficient78.16%77.30%Slight decrease (− 0.86%)Fowlkes–Mallows index63.47%62.70%Slight decrease (− 0.77%) Comparison of performance of the CWBT model across BCI datasets. Learning rates adapted by HBO on BCI IV 2a dataset demonstrating stable improvement in accuracy. Performance comparison of representative baselines The effectiveness of the proposed attention-based architecture was compared with the performance of the representative baseline classifiers, such as an SVM with RBF kernel, Random Forest, two-layer Multilayer Perceptron (MLP) and a shallow CNN were evaluated using the same 14 × 4 spectral EEG representation. Although these models are capable of utilising aggregated spectral information, they always performed worse than the Transformer encoder. Specifically, both SVM and Random Forest were demonstrated to be limited in terms of the global inter-channel dependencies that they could model, whereas both MLP and shallow CNN were limited to local or fully connected interactions between features. Conversely, the Transformer encoder was more accurate with an explicit learning of global spatial-spectral relationships that depended on self-attention, thus explaining its use in the given CWBT framework. Table 8 presents a summary of the representative behaviour of baseline models on fixed spectral EEG features 14 × 4. Classical methods like SVM and Random Forest demonstrated accuracies of 86.8% and 88.3% and neural baselines were better with the MLP and shallow CNN at 89.6% and 91.2%, respectively. An accuracy of 93.3% was achieved by the Transformer encoder that lacks adaptive optimization and uses self-attention to model global inter-channel dependencies. The proposed CWBT model recorded the best accuracy of 95.6%, which is an evident superiority of attention-based modelling compared to traditional baselines despite the lack of time dynamics. Table 8Performance of representative baseline studies.ModelAccuracy (in %)DescriptionSupport vector machines (RBF kernel)86.8Nonlinear margin-based classifierRandom forest classifier88.3Ensemble of decision treesMultilayer perceptron (2-layer)89.6Neural-baseline with full connectionShallow convolutional neuralnetwork91.2Spatial-Spectral filters were localizedTransformer (no HBO)93.3Global self-attentionCWBT + HBO (proposed)95.6Self-attention with optimized learning rate Performance of representative baseline studies. Comparison with extant studies The CWBT algorithm delivers 95.60% accuracy which exceeds various existing methods for EEG based studies. Traditional convolutional architectures demonstrate difficulties in comprehending EEG signal dependencies which results in unsatisfactory performance like the Hybrid Domain Deep Learning Approach with 76.21% stated in4 and the CNN-based movement-related cortical potentials (MRCPs) model with 70% stated in5. Research shown in6 implements a Transformer-based EEG classification model with 83.31% accuracy through the utilization of self-attention mechanisms. CWBT demonstrates superior results to its competitors because its built-in adaptive learning rate optimization and tuning helps the transformer architecture reach impressive effectiveness. The HYP-PSO-XGB model20 performs at a level like other studies with its 93.7% accuracy through the combination of hybrid particle swarm optimization with extreme gradient boosting7. In comparison to the existing approaches as shown in Fig. 11, the CWBT method implements dynamic hyperparameter refinement to attain superior accuracy. The CWBT method reaches 95.60% performance excellence due to its adaptive learning rate optimization strategy based on Bee Optimization along with Transformer-based modelling with robust regularization. To further reinforce the comparative analysis, CWBT model was contrasted to two popular modern learning-rate schedulers, Cosine Annealing and Step Decay, which are a natural substitute to bio-inspired or bio-metaheuristic learning-rate search methods. In the case of Cosine Annealing, the learning rate was adjusted as 1e-3 to 1e-5 in accordance with cosine schedule throughout the entire 200 epochs. In the case of Step Decay, the rate was lowered by 0.1 after every 50 epochs. Transformer with Cosine Annealing had a 94.28% accuracy, and Step Decay had 93.85% accuracy, which is better than the fixed-learning-rate baseline (95.60%), however, not as good as the HBO (95.60%). These findings suggest that although the modern schedulers can offer a smoother convergence compared to the fixed strategies, HBO offers an extra performance benefit by actively searching and optimizing the most effective learning-rate space before training completes. Comparison of CWBT model’s performance with existing methods highlighting the improved accuracy of the proposed CWBT model. Conclusion This paper examined the research on Transformer-based EEG hand-movement classifier with an offline Honey Bee Optimization (HBO) strategy to identify learning-rate strategy. The findings indicate that HBO is a quantitatively significant improvement as it leads to training stability and enables the transformer to obtain increased training validation derived from both fixed-learning-rate baselines and grid-search baselines. The results indicate the effectiveness of bio-inspired optimization algorithms in hyperparameter optimization of deep neural networks used in EEG decoding. Although the model works very well on the pre-processed Kaggle data and demonstrates early generalization to BCI IV 2a, the current study is restricted by its use of a static spectral representation of 14 × 4 instead of raw EEG time series. The method relies on the characteristics generated by the EMOTIV preprocessing pipeline and it can be therefore a variation in performance with various devices, subjects and recording conditions. Additionally, stronger claims are conditional since cross-dataset generalization is not yet fully standardized because preprocessing workflows and subject-independent folds must be fully standardized. Comprehensively, the value of this paper is mainly in proving that HBO-based learning-rate optimization works successfully with Transformer models in EEG classification. Although the suggested CWBT framework demonstrated good results, the current paper assesses the model in an offline environment with pre-processed spectral EEG representations only. The model neither takes raw EEG time-series data nor specifically considers the latency of real-time inference or online adaptation limitations needed by real-world BCI systems. Even though the validation of the BCI Competition IV-2a data set seems to be encouraging with cross-dataset generalization, standardized subject-independent testing across heterogeneous acquisition protocols remains an open issue. The future directions will be to introduce the CWBT framework to raw multichannel EEG data, introduce time dynamics, determine real time latency of BCI hardware devices, and develop standard cross-dataset and cross-subject evaluation standards to permit practical neurotechnology use. This framework will be applied to raw multichannel EEG in future work to include temporal dynamics and assess the subject-level robustness of the system to understand the real-world applicability of BCI. Author contributions Priyadharshini Jayadurga N was responsible for the conceptualization, methodology design, software development, formal analysis, investigation, original draft preparation, and visualization of results. Chandralekha M supervised the study, validated the findings, contributed to resource management, project administration, and critically reviewed and edited the manuscript. Hema Subramaniam contributed to the validation of the work, refinement of methodology, and manuscript review and editing. Funding Open access funding provided by Amrita Vishwa Vidyapeetham. Data availability The datasets generated and/or analysed during the current study are available in the CWBT-Data repository, [https://github.com/PriyadharshiniSurendhran/CWBT-Data]. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. M. Chandralekha and Hema Subramaniam contributed equally to this work. Contributor Information N. Priyadharshini Jayadurga, Email: np_jayadurga@ch.students.amrita.edu. M. Chandralekha, Email: m_chandralekha@ch.amrita.edu References Associated Data Data Availability Statement The datasets generated and/or analysed during the current study are available in the CWBT-Data repository, [https://github.com/PriyadharshiniSurendhran/CWBT-Data].