An EEG-based attention recognition method: fusion of time domain, frequency domain, and non-linear dynamics features

Introduction Attention is a complex cognitive function of human brain that plays a vital role in our daily lives. Electroencephalogram (EEG) is used to measure and analyze attention due to its high temporal resolution. Although several attention recognition brain-computer interfaces (BCIs) have been proposed, there is a scarcity of studies with a sufficient number of subjects, valid paradigms, and reliable recognition analysis across subjects. Methods In this study, we proposed a novel attention paradigm and feature fusion method to extract features, which fused time domain features, frequency domain features and nonlinear dynamics features. We then constructed an attention recognition framework for 85 subjects. Results and discussion We achieved an intra-subject average classification accuracy of 85.05% ± 6.87% and an inter-subject average classification accuracy of 81.60% ± 9.93%, respectively. We further explored the neural patterns in attention recognition, where attention states showed less activation than non-attention states in the prefrontal and occipital areas in α, β and θ bands. The research explores, for the first time, the fusion of time domain features, frequency domain features and nonlinear dynamics features for attention recognition, providing a new understanding of attention recognition.


. Introduction
Attention is a crucial cognitive process that allows individuals to selectively focus on specific aspects of their environment while filtering out irrelevant information, thereby enabling effective adaptation to their surroundings (Petersen and Posner, 2012). Poor attention and concentration skills can contribute to mental health problems such as anxiety and depression. If left unaddressed, these difficulties can develop into more severe conditions such as attention deficit hyperactivity disorder (ADHD) (Chen et al., 2019). Attention recognition is an emerging research area that provides a window to monitor and understand people's attention states. It shows significant potential application value in the fields of medicine (Moghaddari et al., 2020), military operations (Berka et al., 2004), and preventing fatigue while driving (Luo et al., 2019). Existing research methods for attention recognition have focused on psychological behavior scale tests, such as digital cancelation task (D-CAT) (Fliege et al., 2009) and simple reaction time (SRT) Krupski and Boyle (1978), Combined Raven's Test (CRT) (Wang et al., 1989), Shure grid test scale, and Conners et al. (1998). However, these methods are limited in their ability to provide real-time results of a user's attention states. Therefore, researchers turned to explore attention recognition .
based on neurophysiological signals with temporal information, such as heart rate, skin electricity, electroencephalogram (EEG), functional magnetic resonance imaging (fMRI), or multimodal methods, which captured physiological changes related to attention states. Compared to other peripheral physiological signals, EEG signal, with their high temporal resolution, provided more information about attention and showed great potential in the field of attention recognition (Andrillon et al., 2021).
Research on attention recognition based on EEG signal is of significant practical importance in brain-computer interface (BCI) applications. In a study by Hamadicharef Hamadicharef et al. (2009), they used a combination of temporal filters, spatial filters, and Fisher linear discriminant to classify attention states within five subjects and achieved an accuracy of 89.4%. Mohammadpour built an EEG-based BCI, which successfully recognized four levels of attention in five individuals with an accuracy of 63.5% (Mohammadpour and Mozaffari, 2017). Ac achieved an accuracy of 91.72% within subjects using time-frequency features and SVM in 2019 (Acı et al., 2019), while in 2021, Wang wan obtained an accuracy of 95.36% ± 2.31% for two attention levels within subjects using dynamical complexity (Wan et al., 2021). In light of the preceding information, studies in EEG-based attention recognition typically have fewer subjects than studies in other EEG fields (Zheng et al., 2017;Gao et al., 2021), which results in insufficient generalizablation on unseen data and obstacles in inter-subject studies.
Attention recognition paradigms based on EEG commonly involve the use of cues to prompt subjects to enter a state of attention or relaxation. The state of attention is typically associated with a task state, while the state of relaxation is considered a task-independent state. Tasks used to induce a state of attention include breath counting Braboszcz and Delorme (2011); Hosseini and Guo (2019), reading comprehension (Li et al., 2011), mental arithmetic (Hamadicharef et al., 2009), imagination (Ke et al., 2014), and Stroop test (Kawashima et al., 2023). However, how to induce participants under specific cognitive load and enhance their attention is still a challenging work.
Brain waves can be divided into different frequency bands, including δ (0.5-4Hz), θ (4-8Hz), α (8-13Hz), β (13-30Hz), and γ (30-50Hz), each of which is associated with specific physiological functions. Previous research showed that these frequency bands can reflect attention needs, emotional states, and cognitive processes (Rao, 2013). For example, studies by Ray demonstrated that EEG activities are related to attention (Ray and Cole, 1985). Klimesch and other researchers found that α wave amplitudes are smaller when individuals focused on mental arithmetic tasks Klimesch et al. (1993). Despite these findings, the specific neural patterns underlying attention-related EEG activities still require further investigation.
The application of EEG-based BCI in attention recognition is currently in its nascent stages. Researchers attempted to employ feature extraction methods such as power spectrum or nonlinear dynamics (including approximate entropy and sample entropy) to identify attention levels. However, the application of attention recognition across subjects is hindered due to the lack of significant datasets, effective paradigms, and comprehensive feature analysis.
In this study, we first proposed a novel attention paradigm based on mental arithmetic tasks and built an EEG dataset of 85 subjects for attention recognition. Second, we proposed a composite EEG-based feature that took time domain, frequency domain, and non-linear dynamic features into consideration and constructed an attention recognition framework both across and within subjects. The best intra-subject accuracy and inter-subject accuracy are 85.05% ± 6.87% and 81.60% ± 9.93%, respectively. Furthermore, we explored neural patterns within attention and non-attention states and found that attention states showed less activation than non-attention states in the prefrontal and occipital areas across α, β, and θ bands.
This study is organized into five sections. Materials and Methods are presented in Section 2. Experimental results are presented in Section 3. Discussion is available in Section 4. Conclusion is presented in Section 5.

. Materials and methods
In this section, we collected EEG data, conducted a preprocessing of raw EEG data, fused three types of features, and classified features for both intra-and inter-subject attention recognition. Additionally, we analyzed common neural patterns between attention and non-attention across subjects. Figure 1 depicts the attention recognition analysis framework, which encompasses EEG acquisition, data preprocessing, feature extraction, and classification.
. . Data acquisition . . . Equipment Our study collected EEG signals using a 32-channel Neuroscan amplifier in accordance with the international 10-20 system . The signals were sampled at a rate of 250Hz and band-pass filtered between 0.1 and 50 Hz. Figure 2 displays the layout of EEG electrodes on the cap. To obtain high-quality data, we ensured that the impedance of each electrode was below 5 k . The experiment employed a 22inch external screen as a monitor and utilized the computer with a 32-bit Windows 7 system to store EEG data and run interface programs.

. . . Subjects
Eighty-five subjects with healthy visual and cognitive abilities were recruited from various universities in Guangzhou for this experiment. The subjects had an average age of 25.3 ± 2.4, with 45 male subjects and 40 female subjects. According to the Edinburgh Handedness Inventory (Robinson, 2021), all of these subjects were right-handed, and none had prior experience with attention-related BCI experiments. Moreover, all subjects were informed about the content and purpose of the study, and informed consent was obtained.

FIGURE
Attention recognition framework is comprised of four integral components, namely data acquisition, data preprocessing, feature extraction, and classification.

. . . Paradigm
In the absence of a standard experimental paradigm for attention recognition, we proposed our own based on mental arithmetic and resting tasks for our study. Mental arithmetic tasks in our experiment were able to induce cognitive load on participants and improved their attention (Chin et al., 2018). Mental arithmetic tasks require cognitive resources such as working memory, attention control, and executive function (Hester and Garavan, 2005). When performing mental arithmetic, individuals need to retrieve numerical information from long-term memory, hold that information in working memory, manipulate that information to perform calculations, and monitor their progress toward a solution (Grabner and De Smedt, 2011).
The subjects were seated in a quiet room, and their brain activity was measured using an EEG acquisition device during the experiment. Figure 3 depicts the experimental paradigm, which contains 20 trials. Each trial includes a 3s cue, a 60s task, and a 10s rest period. Subjects were asked to prepare to enter the attention or non-attention state based on the screen cue during the cue period. The attention cue is depicted in Figure 3b, while the non-attention cue is depicted in Figure 3c. During the attention target state, subjects were instructed to keep doing mental arithmetic, which followed the rhythm of the screen, while a random number (possibly positive or negative) appeared on the screen and were continuously subtracted by 3 over time, as shown in Figure 3d. During the non-attention state, a fixed plus sign appeared on the screen as shown in Figure 3e; meanwhile, the subjects were asked to rest quietly with their eyes open. At the end of each trial, the subjects would be given 10 seconds to rest, called rest period. Each experimental session contained 10 attention states and 10 non-attention states, with the order randomized.

. . Data preprocessing
The raw EEG signals were first filtered by a finite impulse response (FIR) band-pass filter between 0.5 Hz and 50 Hz to reduce noise and extract relevant information. Next, 15,000-point data (60s) for each trial in each channel were equally cut into 6 epochs of equal length, each containing 2,500-point data (10 . /fnins. . s), as illustrated in Figure 3f. By the above operations, the data of each subject containing 20 trials were transformed into 120 epochs, of which 60 epochs corresponded to the labels of attention states and the other 60 epochs corresponded to the labels of nonattention states. To ensure the quality of the data, epochs with high amplitude or significant myoelectricity were removed from the dataset. After preprocessing, a total of 10,188 epochs were obtained from 85 subjects.

. . Feature extraction
It is now generally accepted that advanced cognition in the brain is often associated with time-frequency and non-linear dynamic features of EEG (Klimesch et al., 1993(Klimesch et al., , 1998Chun et al., 2011). To comprehensively investigate the relationship between these features and attention states, we exhaustively enumerated and extracted time domain features, frequency domain features, and non-linear dynamic features from the preprocessed EEG data, as described in Table 1. To simplify notation, we utilized T l , F l , and D l to represent a time domain feature, a frequency domain feature, and a non-linear dynamics feature, respectively, with the subscript l denoting the order of the feature in Table 1. Additionally, we used T m l , F m l , and D m l to signify the m-th dimension of the time domain feature T l , frequency doamin feature F l , and non-linear dynamic features D l , respectively. For example, F 3 4 denotes the third dimension of power spectrum for frequency bands F 4 .

. . . Time domain features
As EEG signals are time-series signals, time domain features (such as mean T 2 , skewness T 4 , root-mean squared value T 6 , standard deviation T 10 , and number of zero-crossings T 12 ) have great advantages in expressing the amplitude, time scale, and complexity of signals. Numerous studies have shown that these features can distinguish different mental states (Vourkas et al., 2000;Wang and Guan, 2008). Furthermore, time domain features have the added advantage of low computational complexity and real-time calculation capability (Hu et al., 2016). Therefore, it is worth exploring time domain features for attention recognition based on EEG. Specifically, some time domain features used in this study are defined as follows.
The formulas of Hjorth parameter (activity (h 1 ), mobility (h 2 ), and complexity (h 3 )) are defined as follows: Frontiers in Neuroscience frontiersin.org . /fnins. . where σ 2 x is the variance of the signal, σ d is the standard deviation of the first derivative of the signal, and σ dd is the standard deviation of the second derivative of the signal.

. . . Frequency domain features
Frequency domain features are commonly used in EEG research and have shown great potential in advanced cognitive recognition, such as emotion recognition (Huang W. et al., 2021). In this study, we selected the common EEG rhythms of δ, θ , α, β, and γ as the target frequency bands for analysis. Several frequency domain features were employed in this study, and their partial definitions are presented below.
The power spectrum density (PSD) of these bands F 4 , along with their respective ratios, was utilized as features in the upcoming study. Assuming that X k represents the Fourier transform of the time series x[n], the relevant PSD P is defined as follows: Median frequency F 9 represents the frequency point that divides the power spectrum band of a signal into two equal parts (Thongpanja et al., 2013). This can be expressed by the following equation: where P j denotes the power spectrum at frequency bin j, and MF denotes median frequency. The frequency band is from 1 to M, where 1 < MF < M. According to a previous study on the application of median frequency to EEG (Gudmundsson et al., 2005), median frequency of 10 frequency bands (0.5-2 Hz, 2-4 Hz, 4-5 Hz, 5-7 Hz, 7-10 Hz, 10-13 Hz, 13-15 Hz, 15-20 Hz, 20-30 Hz, and 30-40 Hz) were calculated in our study. Discrete wavelet transform can be defined as follows (Blanco et al., 1998): where 2 j k and 2 j represent the time positioning and scale coefficients respectively, and ψ(t) represents the mother wavelet . /fnins. . function. The energy of each resolution level j = 1, · · · , J by wavelet coefficients can be (Candra et al., 2015) defined as follows: where N is the number of wavelet coefficients in each decomposition layer. E j can also be called Wavelet Coef Energy F 9 . In this study, we used the mother wavelet Daubechies with a decomposition level of 6, which means J = 6.

. . . Non-linear dynamic features
The theory of non-linear dynamics opened up a new window for understanding EEG. One of the non-linear estimates of dynamic EEG activity is complexity analysis. Among all complexity analysis methods, entropy proved to be a useful and robust estimation method for evaluating the regularity or predictability of EEG. The 17 features presented in Table 1 for each channel were calculated in preparation for the next step. Here are some definitions for non-linear dynamic features.
Teager-Kaiser energy D 14 is a non-linear energy tracking method can calculate the instantaneous energy of non-stationary signals (Solnik et al., 2010). For the case of the discrete signals x[n], the Teager-Kaiser energy ψ can be expressed as (O'Toole et al., 2014;Badani et al., 2017): We used the mean and standard deviation of Teager-Kaiser energy as features for the wavelet transform coefficients of decomposition level 6, which contained seven sets coefficients. This resulted in 14 (2 × 7) dimensional features.
To normalize the energy E j of resolution level j, as calculated from Equation 7, the energy of the fixed resolution level j is compared with the total energy of the signal E t : where E t represents the sum of all frequency bands energy, E j represents the energy of the fixed resolution level j, and p j represents the proportion of E j to E t . According to Rosso et al. (2001), wavelet entropy (D 13 ) H j can be defined as follows: . . . Feature fusion Feature-level fusion involves integrating low-level or intermediate-level features extracted from different sources or modalities into a single representation before further analysis or decision-making (Cai et al., 2020). It aims to capture comprehensive and discriminative information provided by multiple features to enhance the overall representation and improve subsequent processing tasks (Chin et al., 2014).
We directly concatenated and fused the features extracted from time domain, frequency domain, and non-linear dynamics analysis methods. Considering that time domain features, frequencydomain features, and non-linear features can be represented as T ∈ R T d , F ∈ R F d , and D ∈ R D d respectively, the fusion features after concatenation can be represented as follows:

. . Classification
To valid the effectiveness of these extracted features, we used three common classification methods, including random forest (RF), decision tree (DT), and support vector machine (SVM) to build our attention recognition framework.
RF classifiers have been shown to be highly effective in small EEG data sets as demonstrated by the studies conducted by Amin et al. (2017), Lotte et al. (2018). In this study, the random forest classifier held 100 evaluators and used Gini impurity to measure the quality of a split as criterion. For DT, the criterion and splitter were set to information entropy and best. Linear kernel with a penalty parameter C of 2 and the kernel function coefficients of 0.2 was used for constructing the SVM classifiers.
We employed 5-fold cross-validation (CV) for intra-subject classification, dividing the training set and testing set strictly in the order of time. For inter-subject classification, leave-one-subject-out (LOSO) CV was employed.

. . Performance of intra-subject attention recognition
In this section, we compared four types of features, namely time domain features, frequency domain features, non-linear dynamic features, and fusion features, in three different classifiers: RF, DT, and SVM. It should be noted that fusion features involve time domain, frequency domain, and non-linear dynamic features.
For each type of feature and each classifier, we calculated the mean accuracy based on a 5-fold CV approach, resulting in 85 mean accuracies in total. We then performed paired-sample t-tests to compare the accuracies of fusion features with those of the other types of features. Figure 4 displays the mean and standard deviation of intra-subject accuracies for four types of features and three classifiers among 85 subjects. Fusion features demonstrate excellent performance, achieving accuracies (%) of 85.1, 78.7, and 79.8 using RF, DT, and SVM, respectively. For all classifiers (RF, DT, and SVM), the accuracies of fusion features are significantly greater than time domain features, frequency domain features, and nonlinear dynamic features. RF performs the best among the three classifiers with different features, which is consistent with previous research findings that RF performs well on small datasets (Amin et al., 2017

. . Performance of inter-subject attention recognition
In terms of inter-subject analysis, we fixed features and classifiers as those in the intra-subject analysis. For each Frontiers in Neuroscience frontiersin.org . /fnins. .

FIGURE
Average intra-subject accuracies using di erent types of features and di erent classifiers. The * and * * indicate that the intra-subject accuracies of fusion features are significantly higher than those of the compared type of features with p < . and p < . , respectively.
feature type and each classifier, we obtained 85 accuracies using LOSO CV and performed paired-sample t-tests to compare the accuracies of fusion features with those of other types of features. Figure 5 presents

. . Assessment of our methods against baseline methods
Our study demonstrates the superior performance of our proposed method for the attention task, as compared to three baseline methods: PSD-SVM (Huang H. et al., 2021), Dynamical Complexity-XGBoost (Wan et al., 2021), and STFT-SVM (Acı et al., 2019). While PSD-SVM uses PSD features in the δ, θ , α, β, and γ bands and applies SVM for classification, Dynamical Complexity-XGBoost employs Multiscale Approximate Entropy, Sample Entropy, and Fuzzy Entropy as features and uses Extreme Gradient Boosting (XGBoost) for classification. Additionally, .

FIGURE
Average inter-subject accuracies using di erent types of features and di erent classifiers. The * and * * indicate that the inter-subject accuracies of fusion features are significantly higher than those of the compared types of features with p < . and p < . , respectively.
STFT-SVM utilizes the short-time Fourier transform (STFT) with a Blackman window to calculate smoothed time-dependent power spectra as features, which are then classified using SVM. Our methods surpass the performance of baseline methods in both intra-subject and inter-subject classification, as evidenced by the results presented in Table 2. These findings demonstrate that our methods outperform the baseline methods.

. . Individual feature analysis and classification performance evaluation
To determine the effectiveness of features, we conducted an individual feature analysis by evaluating the classification performance. The results were calculated for intra-subject classification by RF and inter-subject classification by SVM, as depicted in Figure 6.
In the intra-subject experiment, numerous time domain, frequency domain, and non-linear dynamic features demonstrate an accuracy exceeding 70%. This finding suggests that the majority of the features calculated in Section 2 are effective within subjects. In the inter-subject experiment, only a few features exhibit a accuracy exceeding 70%, such as power spectrum for frequency bands F 4 , wavelet entropy D 13 , and Teagerkaiser energy D 14 . These features demonstrate robustness across subjects, indicating their effectiveness as more reliable features. The highest inter-subject accuracy (%) achieved by an individual feature is 75.24 ± 11.53. However, our proposed fusion feature .

TABLE Average intra-subject and inter-subject accuracies using our methods (Fusion Feature-RF and Fusion Feature-SVM), PSD-SVM, Dynamical
Complexity-XGBoost, and STFT-SVM. The * and * * indicate that the accuracies of our methods are significantly higher than baseline methods in intra-subject or inter-subject classification with p < 0.05 and p < 0.01, respectively. Bold values indicate the superiority of our method over the basic method.

Intra-subject Fusion feature-RF PSD-SVM Dynamical complexity-XGBoost STFT-SVM
demonstrates a significantly higher accuracy (%) of 81.60 ± 9.93. This result further confirms the effectiveness of our fusion feature method.
Additionally, time-frequency analysis with Morlet wavelets Cohen (2019) was employed in electrode position Fz in an experiment, as depicted in Figure 7. This figure illustrates the distinct patterns observed for different attention states. Notably, the analysis reveals that frequencies below 30 Hz exhibit significantly lower response energy during the attention state compared to the non-attention state. These findings further support the relationship between attention states and frequency bands such as α, β, and θ .
To further explore neural patterns associated with attention and non-attention states across all participants, we calculated the topographical maps of power features by averaging the power features over all epochs in all subjects for each frequency band between attention states and non-attention states. We then normalized the features by Z-Score for all epochs within each frequency band for each subject. Figure 8 depicts the topographical maps of the power features corresponding to the attention state an the non-attention state. The results demonstrate the existence of neural patterns associated with attention and non-attention states.
Although the neural patterns of attention states and nonattention states are similar, greater activation iobserved in the prefrontal areas for both. In the α, β, and θ bands, the lateral prefrontal and occipital areas exhibit less activation during attention states than non-attention states. During non-attention states, there are significant higher β responses in both prefrontal and occipital regions. The existing studies (Klimesch et al., 1998;Egner and Gruzelier, 2004) have showed that the changes in EEG features are closely related to the degree of attention, with varying degrees of amplitude and power of individual rhythmic brain waves. For instance, when participants were in the state of attention, their EEG signals exhibited a significant decrease in α and β waves (Prinzel et al., 2001). Conversely, during non-attention processing, the energy of β and α responses was increased. These findings on neural patterns are consistent with previous attention studies (Ray and Cole, 1985;Klimesch, 1999;Kelly et al., 2003;Swartwood et al., 2003;K Binienda et al., 2011).

. Discussion
In this study, we first designed a novel attention experiment paradigm and collected a dataset consisting of 85 subjects. Next, we extracted and fused time domain, frequency domain, and non-linear dynamic features. These features were then classified to construct a complete attention recognition framework. Additionally, we suggested that conducting a separate analysis of the differences in features and channels at the group level may be useful in distinguishing between attention and non-attention states.
The following discussions will be divided into six parts. First, we compared and analyzed the different features in different channels of attention and non-attention states, which is useful in the construction of our attention recognition framework. Second, we conducted a group level analysis on connectivity estimators of the attention and non-attention states. Third, we also discussed the neural patterns of attention and non-attention states. Fourth, we analyzed and compared different paradigms for attention recognition. Fifth, we conducted an advantages analysis on our method. Last, we described the limitations of this study and future research perspectives.

. . A group level analysis on the features of the attention and non-attention states
In our study, we conducted an analysis of the differences in the different types of features across channels between attention and non-attention states at the group level. Specifically, we collected features extracted from each channel of different epochs for each subject. We then divided the features into two parts for attention and non-attention states, respectively. After removing outliers, we averaged each part to obtain the average features, which represented the average level of a specific feature for a given channel and subject for attention and non-attention states.
To analyze whether there were significant differences in the average features between attention and non-attention states at the group level, paired t-tests were implemented on the average features in the time domain, frequency domain, and non-linear dynamic features, respectively. It is assumed that the average Frontiers in Neuroscience frontiersin.org . /fnins. .

FIGURE
Average intra-subject accuracies by RF and inter-subject accuracies by SVM in di erent features. The horizontal axis represents accuracy, while the vertical axis represents di erent features.
features of attention and non-attention do not significantly differ at the group level. The p-value of 0.05 is used as a significance level. This means that if the p > 0.05, the null hypothesis is true; otherwise false. The results of the t-tests in terms of time domain features, frequency domain features, and non-linear dynamic features are, respectively, shown in Figures 9-11. Regarding the average features of time domain features, it was found that for most of the channels corresponding to the feature skewness T 4 and decorrelation time T 11 , the p-values were much less than 0.05, indicating a relatively significant difference. This finding is consistent with the results of previous studies that have investigated the relationship between skewness and cognition in EEG signals Davis et al. (2020). Additionally, Figure 9 shows that prefrontal channels such as Fp1, Fp2, F7, F3, Fz, and F4 exhibit more significant features relative to other channels.  spectrum density) of θ , α, β, and power spectral density ratio δ/γ , δ/θ, δ/α, δ/β, δ/γ , θ/α, θ/β, θ/γ , α/β, and α/γ were less than 0.05 in frontal, occipital, and temporal brain regions, as shown in Figure 10. These significant differences at the group level explain the superior performance of frequency domain features compared to time domain features in Figures 4, 5. This finding is consistent with previous studies that cognitive tasks can enhance the power of eeg, particularly in visual cortex Fitzgibbon et al. (2004). As indicated in Figure 11, the average features of non-linear dynamic features are very special, and most of the non-linear features are significant for part of the channels. This finding is consistent with previous attention studies that have found that the value of entropy decreases with a decrease of attention states (Li et al., 2012). For instance, the features D 14 (Teager-kaiser energy) exhibit a highly significant difference between attention and nonattention states, as shown in Figure 11, which indicates that Teagerkaiser energy D 14 is an excellent feature. Furthermore, the first eight dimensions of Teager-kaiser energy exhibit more significant channels and a deeper degree than the last six dimensions. According to the content in Section 2, the first eight dimensions correspond to Teager-kaiser energy of the low-frequency portion of wavelet decomposition, while the last six dimensions correspond to Teager-kaiser energy of the high-frequency portion of wavelet decomposition. This highlights that the contrast between attention and non-attention states in low-frequency portion is much more pronounced than in high-frequency portion, which is consistent with previous research (Fiebelkorn and Kastner, 2019).
Taken together, some average features from time domain, frequency domain, and non-linear dynamics exhibit significant differences at the group level, which further validates the effectiveness of our framework for attention recognition based on EEG.

. . A group level analysis on connectivity estimators of the attention and non-attention states
Brain functional connectivity (FC) elucidating the statistical dependencies and directed information flows unveils the functions and intricate interactions of diverse brain regions (Cao et al., 2022). We estimated correlations between different channels for each epoch of each participant to construct FC matrices and separately averaged the FC matrices of attention and non-attention states for each participant. This allowed us to obtain the average FC matrices for attention and non-attention states. We then conducted pairedsample t-tests and corrected using the false discovery rate (FDR) method for the average FC matrices corresponding to the two states. Figure 12 shows significant differences in brain FCs between attention and non-attention states across different frequency bands at the group level.
From Figure 12, it is evident that the significant differences in brain FCs between attention and non-attention states are primarily concentrated in the low-frequency bands, including δ, θ , lower α, and upper α (Zoefel et al., 2011) frequency bands. Within δ and θ frequency bands, there are significantly different connectivities distributed in various brain regions, including the left and right temporal lobes, parietal lobes, prefrontal regions, and occipital lobes. Within lower α and upper α frequency bands, the connectivities are mainly concentrated in the left and right temporal lobes. Overall, as the frequency range increases, there is a decrease in the number of significant connectivities, which further demonstrates that lower frequencies are more capable of characterizing changes in attention states. This is consistent with our discussion in section 4.1.
Furthermore, by comparing the differences in relatively lowfrequency connectivities between the left and right hemispheres, we found that the number of significant connectivities in the right hemisphere at the group level was significantly higher than that in the left hemisphere. This indicates that the right hemisphere interacts more closely with information during attention changes, which is consistent with previous studies showing significant hemispheric asymmetry and lateralization toward the right hemisphere in the attention process of individuals (Bartolomeo and Malkinson, 2019).

. . Neural patterns analysis on the attention and non-attention states
In Section 3, we observed that neural patterns for attention and non-attention states exist according to Tables 3, 4, Figure 8. In this section, we analyzed these neural patterns of attention and non-attention states in greater detail. Figure 13 shows the time-frequency analysis using Morlet wavelets for all epochs recorded from electrodes Fp1, Fp2, Fz, F3, F4, T3, T4, FT7, FT8, O1, Oz, and O2 in an experiment. As demonstrated by Figures 7 and 13, the time-frequency analysis reveals different patterns for different attention states. Specifically, the responses of low-frequency oscillations during attention states are lower than during non-attention states, especially in the temporal lobes and prefrontal regions. Additionally, the neural patterns remain relatively stable over time for each epoch within the experiment.
As shown in Figure 8, the average PSD in the θ , α, and β bands across all subjects exhibits distinct differences between attention and non-attention states, whereas this in the δ do not. This implies that the 4-30 Hz frequency bands are more closely associated with attention than the other frequency bands in EEG signals, which is consistent with prior research (Prinzel et al., 2001). For the δ band, compared with non-attention states, the neural patterns of attention states have a significantly lower response in the prefrontal. For the θ , β, and α bands, compared with non-attention states, .

. . A comparative analysis on paradigms
As described in Section 1, the tasks in paradigms of attention recognition include the Stroop test, breath counting, and reading comprehension. The Stroop test is inherently short in duration (Kawashima et al., 2023), which makes it difficult for participants to sustain their attention over time. The task of counting the number of breaths can easily lead to mental wandering (Braboszcz and Delorme, 2011). Additionally, reading tasks are influenced by different materials, leading to variations in attention and concentration levels among individuals (Li et al., 2011). To address these limitations, we proposed mental arithmetic tasks as an attention task in our paradigm. Mental arithmetic tasks have a longer duration and are not affected by different materials. Our framework's results provide strong evidence for the effective characterization of attention and non-attention states under our proposed paradigm. First, the excellent classification results in Figures 4, 5 demonstrate that attention states and non-attention states can be distinguished accurately with our paradigm. Second, different activation maps in Figure 8 between attention and nonattention states further support the efficacy of our proposed paradigm in characterizing attention and non-attention states. Together, these findings highlight the potential value .
/fnins. .  Table . of our paradigm in advancing research and understanding of attention states.
. . An advantages analysis on our method First, our method can not only be used for intra-subject attention recognition but also for inter-subject attention recognition, making the application more convenient. Second, we can see that our proposed fusion feature method achieves the accuracy (%) of 85.05 ± 6.87 in intra-subject attention recognition and 81.60 ± 9.93 in inter-subject attention recognition. Compared with other attention classification methods, it achieves better classification results both within and across subjects, making the results of attention recognition more accurate.

. . Limitations and future study
There are three limitations to this study. First, this study analyzed the EEG features between attention states and nonattention states offline and did not perform some online validation. Thus, we will perform online validation for the framework presented in this study in future article. Second, in this study, all EEG channels (30 channels) were used to calculate the features, and it is difficult to collect 30 channels of EEG data for the complex variety of application scenarios of attention recognition (such as . /fnins. . The horizontal axis represents the -dimensional frequency domain features, which is consistent with Table . The -dimensional PSD features F represent δ, θ, α, β, γ , δ/θ, δ/α, δ/β, δ/γ , θ/α, θ/β, θ/γ , α/β, α/γ , and β/γ from left to right.  Figure . The horizontal axis represents the dimensional non-linear dynamic features, which are consistent with Table . hospitals and schools). Therefore, reducing the number of channels for attention recognition is also an important direction for our future study. Third, in this study, for attention and non-attention states, we analyzed and classified the manual features based on EEG wthin and across subjects, and it is necessary to design an end-to-end network framework on large dataset in future study.

. Conclusion
Attention recognition is of great importance in various fields such as medicine and industry. However, a reliable inter-subject attention recognition framework that can be effective is still missing. This study proposed a novel attention experiment paradigm, built a dataset of 85 subjects, fused three types of features, and classified features for attention recognition based on EEG. Eighty-five subjects participated in our experiment, and the experimental results demonstrated the validity of our paradigm and analysis methods with an average intra-subject attention recognition accuracy of 85.05% and an average inter-subject attention recognition accuracy of 81.60%. Additionally, our frequency band features analysis revealed neural patterns of attention and non-attention states, where attention states showed less activation than non-attention Frontiers in Neuroscience frontiersin.org . /fnins. . states in the prefrontal and occipital areas in α, β, and θ bands. Furthermore, we identified the features that exhibited signification corresponding channels between attention and non-attention states. These findings may be useful for understanding attention recognition based on EEG and may guide future study in this area.

Data availability statement
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.

Ethics statement
The studies involving human participants were reviewed and approved by Ethics Committee of Affiliated Brain Hospital of Guangzhou Medical University, Guangzhou, China. The patients/participants provided their written informed consent to participate in this study. Written informed consent was obtained from the individual(s) for the publication of any potentially identifiable images or data included in this article.

Author contributions
HH and YL built the attention paradigm and did the experiment in this study. DC did the study analysis and wrote the study with help from HH, XB, JP, and YL. All authors contributed to the article and approved the submitted version.