Open Access Paper
11 September 2024 Multifeature attention detection algorithm based on power spectral density and differential entropy
Author Affiliations +
Proceedings Volume 13270, International Conference on Future of Medicine and Biological Information Engineering (MBIE 2024); 132700K (2024) https://doi.org/10.1117/12.3039982
Event: 2024 International Conference on Future of Medicine and Biological Information Engineering (MBIE 2024), 2024, Shenyang, China
Abstract
Attention is closely related to human life. To detect attention states quickly and accurately with fewer resources, this research proposes a method for attention state detection, it is based on differential entropy (DE) and power spectral density (PSD). Electroencephalogram (EEG) data is from 15 participants. It was processed using the Fast Fourier Transform (FFT) to extract DE and PSD features, which was normalized. These features were input into a Support Vector Machine (SVM). After optimizing the model parameters, it achieved a well-performing attention state detection model. The proposed method achieved a maximum classification accuracy of 85% and an average accuracy of 67%, The model described in the statement surpasses traditional SVM models that are trained solely on DE or PSD features, as well as single-channel or multi-channel SVM models. The new method can be used to learn additional features for attention verification and generalizes well for the task of developing a robust deep learning system.

1.

INTRODUCTION

One of the most frequent neurodevelopmental disorders of childhood, affecting children and adults. Attention-deficit hyperactivity disorder (ADHD) is a chronic condition that can have lasting effects on well-being. Approximately 2%-5% of adults, and as many as 5% to over than half (7%) of the kids around the globe meet criteria for at any rate one ADHD[1]

The conventional methods in the domain of attention detection based on EEG analysis and extract features from these signals that are correlated with different levels of attention such as energy[2]. Power spectrum at various frequency bands, etc. The usage of only a few frequency band energy features for attention determination can also increases error due to small differences in EEG energy levels among variety brain states[3]. That has only really changed in recent years with machine learning and deep learning in attention classification. Some studies use k-nearest neighbor (KNN) classifiers[4]. SVM is used with students’ EEG signals to classify the focused and unfocused states during teaching[5]. Studies show an HHT+SVM method. It based on α and β band power and spectral entropy to classify concentrated and relaxed states[6].

In 2008, Janelle introduced deep learning-based EEG attention detection methods. They classified features by extracting from EEG signals[7]. In 2011, Li applied the K-nearest neighbor algorithm to classify EEG attention into three categories. It achieved an average accuracy of 57.03%. In 2013, Lu used wavelet transform to analyze obtained EEG signals and utilized SVM for binary classification. It achieved a classification accuracy of 72.5% for attention[8]. However, it is important that these studies involved relatively small sample sizes.

The studies show that analyzing EEG signals features and applying machine learning can be useful to detect and attention levels. However, using too many electrodes increases complexity and preparation time. it raises costs and reduces the usability of classification algorithms. At the same time,using a small number of electrodes, the accuracy of single-feature classification is lower than that of multi-feature classification.

To address these problems, this paper proposes a multi-feature attention classification algorithm. It bases on SVM. This algorithm uses PSD and DE features. They are extracted from three-channel EEG data to classify different attention states. By using a limited number of electrodes and multiple features, the algorithm improves both usability and accuracy in the classification of attention states. It only uses a small number of electrodes. Normalization is employed to address overfitting.

This research shows that our way keeps high classification accuracy when reducing the number of electrodes needed. It simplifies the data collection process. It offers a practical solution to detect attention.

2.

EXPERIMENT

2.1

Participants

We choose fifteen healthy graduate students. Their ages are between 18 and 26. They are recruited for the data collection in the experiment. Before taking the experiment, each participant is given sufficient rest. It includes enough sleep and relaxation to ensure they were in a well-rested. They are also instructed to abstain from eating any substances or foods that could potentially affect the experimental results. During the experiment, participants strictly follow the established protocols to ensure the accuracy of the data and the repeatability of the experiment. Adequate care and monitoring are provided to all participants after the experiment. We could ensure their physical and mental well-being.

2.2

Experimental procedure

The experimental design, as shown in Figure 1, requires each participant to perform a series of 5-second mental arithmetic tasks, followed by 5 seconds of rest. This sequence is repeated 100 times throughout the experiment. This structured task design allows the researchers to systematically collect EEG data corresponding to periods of focused attention and relaxation for each participant. The initial 5 seconds of each cycle represent the focused state, while the subsequent 5 seconds represent the relaxed state. We mark them accordingly. Throughout the experiment, participants alternate between tasks and rest periods to explore the patterns of EEG signals across different attentional states.

Figure 1.

Experimental Procedure Diagram.

00180_PSISDG13270_132700K_page_2_1.jpg

Before the experiment begins, participants are required to wear an EEG cap with conductive gel applied at the electrode sites to reduce impedance. Earlobe electrodes are used as reference points to ensure smooth and accurate signal transmission. Additionally, participants are told the experimental procedures and instructions to understand the tasks.

The experiment is set to sample data at a rate of 1000 Hz. It captures EEG signals of participants in two attention states (focused and relaxed). This aims to study the changes in EEG activity under different attentional states. Rigorous experimental design and procedures are implemented to guarantee the reliability and effectiveness of the experimental data.

NeuroScan EEG data collection equipment is used to get the experimental data. The experiment takes place in a relatively quiet, undisturbed enclosed space with appropriate lighting conditions. It can ensure the participants focus their attention during the experiment. Previous research indicates that attention-related signal features are more pronounced in electrodes located in the frontal region[9]. To capture these signals, EEG data from the FP1, FPZ, and FP2 electrodes of participants are included in the experiment. Additionally, to compare the classification effectiveness between few and many electrodes, EEG data from ten electrodes (AF3, F7, F3, F4, F8, AF4, FC6, FC5, P7, P8)[10] are also included in the experiment. The electrode arrangement is in the experiment adhered. It can recognize 10-20 electrode placement standard. Figure 2 provides this electrode placement for reference. Researchers could measure brain activity across different participants. They can get reliable and comparable data analysis.

Figure 2.

Electrode Placement Diagram

00180_PSISDG13270_132700K_page_2_2.jpg

At last, the collected data will be stored in the experimental equipment for further research. This experimental design gets a comprehensive understanding of brain activity variations and related features. It is during focused or relaxed states while performing mathematical tasks. It supports for further research.

2.3

Preprocessing

This paper uses a frequency range limitation of 0.5Hz-30Hz to extract the power spectral density features. They are the theta (4~7Hz), alpha (8~13Hz), and beta (14~30Hz) frequency bands from the raw EEG signals. This is necessary to filter out useless frequency bands. They may interfere with the EEG signals.

Finite Impulse Response (FIR) filters are used for band-pass filtering across all channels of the EEG data. Following the placement of electrodes on the participant’s scalp, the data is segmented. It is based on tags indicating the participant’s attentional state (1 for focused state and 2 for relaxed state). This way allows to isolate EEG data specific to each attention state for further analysis.

This preprocessing step plays a big role in isolating and preparing the EEG data. It makes us to concentrate on the frequency bands of interest. They are relevant to the attentional states. Because this paper applies these filters and segments the data, the experiment makes sure that the subsequent analysis can focus on the targeted frequency bands. It also ensures that investigate the relationship between attention and EEG signals more effectively.

3.

EXPERIMENTAL METHOD

3.1

Feature extraction

3.1.1

Power Spectral Density (PSD) features

PSD is a method to measure the energy distribution of a signal in the frequency domain. It is used to show the power distribution of signals and time series that is in different frequencies. To obtain spectral energy features, this study first maps EEG signals from the time domain to the frequency domain using FFT. Since EEG signals are non-stationary, their spectral characteristics can reflect changes in brain activity. To efficiently compute the Discrete Fourier Transform, this study employs FFT method to extract frequency domain features. A Hanning window is applied as the window function for FFT. Subsequently, PSD is computed using the Short-Time Fourier Transform to derive frequency domain sequences. The calculation formula is:

00180_PSISDG13270_132700K_page_3_1.jpg

where fftDatai represents the signal value corresponding to the ith point in the frequency domain, EndN is the end point of a frequency band, and StartN is the start point of the frequency band.

PSD values are calculated separately for the theta (4-7Hz), alpha (8-13Hz), and beta (14-30Hz) frequency bands as Pθ, Pα and Pβ respectively. Additionally, attention-related features are defined as 00180_PSISDG13270_132700K_page_3_2.jpg for further analysis.

We average the signal energy within each frequency band to estimate PSD. Using the starting and ending indices of each band, we extract the amplitude spectrum from the FFT results corresponding to the frequency range. The amplitude spectrum is squared and divided by the frequency domain sampling rate to estimate PSD for each band.

3.1.2

Differential Entropy (DE) feature

Differential Entropy extends from Shannon entropy and measures the complexity of continuous random variables. It is particularly effective in distinguishing between low and high frequency components in EEG signals. Based on observations of EEG data in common frequency bands, it is noted that the time series X of the signal largely follows a Gaussian distribution N(μ, σ2). Thus, for a fixed frequency band I, DE can be defined by integrating the probability density function p(x):

00180_PSISDG13270_132700K_page_3_3.jpg

where p(x) represents the probability density function of the signal. Through this approach, DE feature values for EEG signals in the three frequency bands can be computed.

We derive the probability density function for each frequency band based on the amplitude spectrum. Normalizing the amplitude spectrum involves dividing each element by the total sum. Then, taking the natural logarithm of each element, summing the results, and taking the negative value yields the DE value for each band.

3.2

Classification method

Support Vector Machine (SVM) is a commonly used supervised machine learning algorithm for pattern classification and regression analysis. Our experimental classification requires binary classification. Given a moderate sample size, to enhance computational efficiency, we opted to use SVM for classification.

Its fundamental idea is to map data into a high-dimensional feature space and find an optimal hyperplane within that space to maximize the margin between different classes, thereby achieving classification. It is frequently employed in binary classification problems, as depicted in Figure 3.

Figure 3.

SVM Diagram

00180_PSISDG13270_132700K_page_4_1.jpg

SVM is a typical supervised binary classification algorithm based on statistical VC theory and the principle of structural risk minimization[11]. It constructs an optimal hyperplane defined in the feature space, transforming the problem into solving a convex quadratic programming problem.

Given a sample dataset D = {(xi, yi); xiRn, yi ∈ (1, − 1)m}, where x represents the vector corresponding to the sample data, xi is the ith traffic feature represented by the sample data, and yi is the class corresponding to xi. The process of classifying multidimensional feature data involves finding an n-dimensional hyperplane such that the data on either side of the plane belongs to different types. This optimal hyperplane (w, b)can be represented as:

00180_PSISDG13270_132700K_page_4_2.jpg

for all sample data(xi, yi) ∈ D, the condition yi(wTx + b)≥1 holds.

4.

RESULTS

Combining the feature values from each channel of the participant data and adding attention states (focused 1, relaxed 2) labels, we ultimately obtain a feature value classification matrix containing power spectra and feature entropy from various channels. Firstly, normalize the values of each feature in each channel of each subject within the interval [0,1], using the following formula:

00180_PSISDG13270_132700K_page_4_3.jpg

where y represents the feature value of the normalized sample data, x denotes the original feature value of the sample data, x1 indicates the first feature of the sample data, and ymax, ymin are the maximum and minimum values within the normalization interval, respectively, while xmax, xmin are the maximum and minimum values of the feature values. After normalizing the data, divide the dataset into training and testing sets, with an 8:2 split between the experimental set and the testing set. Use SVM to classify the two states of attention to establish a suitable general model.

This study recorded participants’ attention levels using electroencephalogram while performing cognitive tasks. We conducted feature extraction on preprocessed experimental data and employed Support Vector Machine for classification, resulting in the attention classification outcomes.

This paper proposes a multi-feature attention detection algorithm based on DE and PSD, achieving a maximum classification accuracy of 85% (See in Table 1). This result is significantly better than using only PSD features 00180_PSISDG13270_132700K_page_5_1.jpg00180_PSISDG13270_132700K_page_5_2.jpg for Support Vector Machine classification, which achieved 80% accuracy, as well as using only DE features (62.5% accuracy). Moreover, it outperforms the highest accuracies obtained by using PSD1, PSD2 alone, and their combinations with DE features (75%, 68%, 83%, and 78% respectively).

Table 1.

Classification accuracy results of three channels

ParticipantsPSDDEPSD-DE
S165%52.50%65%
S277.50%45%72.50%
S375%47.50%65%
S457.50%62.50%75%
S567.50%32.50%70%
S645%57.50%72.50%
S717.50%42.50%52.50%
S872.50%52.50%70%
S955%50%52.50%
S1052.50%47.50%55%
S1180%47.50%85%
S1260%67.50%82.50%
S1345%52.50%57.50%
S1470%52.50%70%
S1570%52.50%60%
Ave ± Var60.70%±2.65%50.80%±0.68%67.00%±1.02%

Further comparison was made on the classification accuracy using different numbers of EEG channels: the average accuracies for single-channel (FP1) and ten-channel (AF3, F7, F3, F4, F8, AF4, FC6, FC5, P7, P8) configurations were 60.2% and 63.0% (See in Table 2), respectively. In contrast, the average accuracy using three channels (FP1, FPZ, FP2) for attention classification was 67%. This result is significantly higher than the average accuracies of single-channel and ten-channel configurations, as well as those of using solely PSD and DE features. These results demonstrate that our proposed algorithm maintains high accuracy while offering greater usability, effectively performing attention classification. It opens possibilities for reducing the number of EEG channels. It ensures classification accuracy in practical applications.

Table 2.

Comparison of Classification Accuracy for Single Channel, Ten Channels, and Three Channels

Participants1 Channel10 Channels3 Channels
S147.50%62.50%65.00%
S245.00%57.50%72.50%
S350.00%52.50%65.00%
S460.00%57.50%75.00%
S552.50%85.00%70.00%
S687.50%75.00%72.50%
S757.50%60.00%52.50%
S857.50%62.50%70.00%
S955.00%55.00%52.50%
S1050.00%62.50%55.00%
S1180.00%82.50%85.00%
S1272.50%57.50%82.50%
S1370.00%57.50%57.50%
S1472.50%70.00%70.00%
S1545.00%47.50%60.00%
Ave ± Var60.20%±1.76%63.00%±1.15%67.00%±1.02%

5.

CONCLUSIONS

This paper proposes a multi-feature SVM classification method. It uses PSD and DE features to improve the recognition accuracy of EEG signals in the assessment of attention levels. The experimental results show that this method use the energy density and probability distribution characteristics of EEG signals across frequency bands. The results also provide a better basis for attention classification. It can use this approach to achieve a maximum classification accuracy of 85% and an average accuracy of 67% within a dataset of 15 subjects. The approach is significantly superior to the use of PSD and DE features alone and to the use of single-channel or ten-channel. In the comparison to the attention classification experiment, which used the same frontal channels and got a classification accuracy of only 50% for the relaxed state, our research with the same frontal channels resulted in a significant improvement.

This finding suggests that combining PSD and DE features in a multi-feature classification method can capture a broader range of information from EEG signals. As a result, this approach improves the accuracy of attention classification. Furthermore, by optimizing the extraction and selection of features, we have successfully maintained and enhanced the classification performance while using fewer channels. This not only simplifies the process but also opens up possibilities for practical applications with a reduced number of electrodes.

ACKNOWLEDGEMENTS

This work was supported by the Research Initiation Project of Tianjin University of Technology and Education (Grant Nos.KYQD202358).

REFERENCES

[1] 

Camp, A., Pastrano, A., Gomez, V., Stephenson, K., Delatte, W., Perez, B., Syas, H., and Guiseppi-Elie, A., “Understanding ADHD: Toward an Innovative Therapeutic Intervention,” Bioengineering, 8 (5), 56 (2021). https://doi.org/10.3390/bioengineering8050056 Google Scholar

[2] 

Peng, C.J., Chen, Y.C., Chen, C.C., Chen, S.J., Cagneau, B., and Chassagne, L., “An EEG-Based attentiveness recognition system using Hilbert–Huang Transform and support Vector machine,” Journal of Medical and Biological Engineering, 40 (2), 230 –238 (2019). https://doi.org/10.1007/s40846-019-00500-y Google Scholar

[3] 

Liu, N.-H., Chiang, C.-Y., and Chu, H.-C., “Recognizing the Degree of Human Attention Using EEG Signals from Mobile Sensors,” Sensors, 13 (8), 10273 –10286 (2013). https://doi.org/10.3390/s130810273 Google Scholar

[4] 

Li, Y., Li, X., Ratcliffe, M., Liu, L., Qi, Y., and Liu, Q., “A real-time EEG-based BCI system for attention recognition in ubiquitous environment,” UAAII ’11, (2011). https://doi.org/10.1145/2030092 Google Scholar

[5] 

Hu, B., Li, X., Sun, S., and Ratcliffe, M., “Attention recognition in EEG-Based Affective Learning research using CFS+KNN algorithm,” IEEE/ACM Transactions on Computational Biology and Bioinformatics, 15 (1), 38 –45 (2018). https://doi.org/10.1109/TCBB.2016.2616395 Google Scholar

[6] 

Shapiai, M.I., Aziz, F.A.A., Setiawan, N.A., and Mitsukura, Y., “Classification of human concentration in EEG signals using Hilbert Huang Transform,” International Journal of Simulation: Systems, Science & Technology, (2017). Google Scholar

[7] 

Janelle, C.M., and Hatfield, B.D., “Visual attention and brain processes that underlie expert performance: Implications for sport and military psychology,” Military Psychology, 20 (sup1), S39 –S69 (2008). https://doi.org/10.1080/08995600701804798 Google Scholar

[8] 

Lu, R., Huang, L., and Jin, L., “Real-time recognition of attention states using Wavelet packet decomposition of EEG complexity features,” Medical Equipment & Clinical Equipment, 34 (02), 1 –4 (2013). Google Scholar

[9] 

Qiu, L., Wu, Q., Yao, J., Ye, X., Qiu, Y., Zheng, Y., Huang, M., and Pan, J., “Attention detection based on symmetrical dual-channel EEG signals,” Computer Systems & Applications, 32 (05), 1 –10 (2023). Google Scholar

[10] 

Aldayel, M., and Al-Nafjan, A., “A comprehensive exploration of machine learning techniques for EEG-based anxiety detection,” PeerJ. Computer Science, 10 (2024). https://doi.org/10.7717/peerj-cs.1829 Google Scholar

[11] 

Guo, L., and Sun, H., “Power Data Communication Network Traffic Classification Method based on K-Means and Support Vector Machine,” Network Security Technology & Applications, 04 64 –66 (2024). Google Scholar
(2024) Published by SPIE. Downloading of the abstract is permitted for personal use only.
Peng Yuan, Yan Bian, Yanli Liu, Shanshan Li, and Chunxiao Han "Multifeature attention detection algorithm based on power spectral density and differential entropy", Proc. SPIE 13270, International Conference on Future of Medicine and Biological Information Engineering (MBIE 2024), 132700K (11 September 2024); https://doi.org/10.1117/12.3039982
Advertisement
Advertisement
RIGHTS & PERMISSIONS
Get copyright permission  Get copyright permission on Copyright Marketplace
KEYWORDS
Electroencephalography

Electrodes

Feature extraction

Spectral density

Detection and tracking algorithms

Deep learning

Support vector machines

Back to Top