Imagine a world where technology bridges the gap between thought and action, translating the whispers of the mind into tangible commands. This idea no longer only exists in the realm of science fiction but is an emerging reality with Brain-Computer Interfaces (BCIs). These cutting-edge technologies capture and interpret brainwave signals, providing a direct line of communication between the human brain and external devices. With applications ranging from medical rehabilitation to gaming, BCIs represent the frontier in human-computer interaction, leading to a future where our thoughts can control our digital world.
This innovative technology, however, is not without its challenges. One significant hurdle in the effective implementation of BCIs is the presence of artifacts, unwanted disturbances that corrupt the purity of brainwave signals. These artifacts, often stemming from external sources (e.g., environmental noise), or internal factors (e.g., muscle movements and eye blinks), can significantly impair the accuracy of BCIs. In research environments, strategies such as controlling ambient light and sound or keeping the subject still are employed to mitigate these effects. Yet, in dynamic, real-world settings like hospitals, such controlled conditions are impractical, highlighting the need for more adaptable solutions.
In our research, we aim to tackle this challenge by utilizing dimensionality reduction techniques commonly used in statistics and machine learning. More specifically, we use these techniques to improve the P300-speller (Kamp et al., 2013), a digital interface that enables users to spell out characters by interpreting their brainwave activity. We implemented our proposed approach within the OpenViBE platform, specialized software for real-time neuroscience that allows for designing, testing, and using brain-computer interfaces with tools for creating custom applications and several ready-to-use demos.
The P300-speller operates by presenting a 6x6 matrix of letters and numbers to the user. To train the system, the users are instructed to concentrate on a specific character. The system then flashes rows and columns within the matrix in a random sequence. When the desired character is included in the flash, it constitutes a P300 response, a distinct, positive deflection in the electroencephalogram (EEG) signal 300 milliseconds after the stimulus. This response is part of the oddball paradigm (Farwell and Donchin, 1988), which involves presenting the user with a series of stimuli where one – known as the "oddball" – significantly differs from the rest, making it easier to detect specific brainwave patterns despite the presence of artifacts. In this case, a rare and unexpected flashing of the user's chosen character provokes this “target event” P300 response. Conversely, flashes that do not include the character of interest are labeled as “non-target events” and typically do not elicit the same P300 response.
Currently, the standard method employed by OpenViBE for interpreting these EEG signals is the Naive Bayes classifier (Hastie et al., 2009) without dimensionality reduction techniques for noise reduction. The Naive Bayes classifier is a simple probabilistic classifier based on applying Bayes' theorem with strong independence assumptions between the features. This method, while prevalent, has its limitations in the presence of artifacts. In contrast, Logistic Regression, which we explore as a replacement, is more flexible in handling a variety of relationships between the dependent and independent variables, allowing for a more robust prediction. Additionally, we aim to enhance the accuracy of the predictive models (Naive Bayes and Logistic Regression) by implementing dimensionality and noise reduction techniques such as Principal Component Analysis (PCA; Pearson, 1901) and Least Absolute Shrinkage and Selection Operator (LASSO; Tibshirani, 1996). PCA projects high-dimensional data into a lower-dimensional subspace while capturing most of the variation in the original data. LASSO is a feature selection technique through regularization, i.e., penalizing against complexity. It is commonly used in regression models, as it uses fewer features while maintaining a reasonably high predictive accuracy. We hypothesize that by refining the EEG signals and reducing the impact of artifacts through dimensionality reduction techniques, we could improve the reliability and accuracy of the P300-speller, making it a more viable tool for real-world applications.
We collected data from five subjects using an 8-channel EEG cap and the Cyton Board, a device used to import the brain signals into the OpenViBE software. The recorded signals for each event were segmented into 32 epochs. For each subject, we first averaged the observed data across all 32 epochs separately for target and non-target events, resulting in a total of 64 data points. This process enhanced the signal-to-noise ratio (SNR), which is crucial for improving data clarity. Next, we applied the Fast Fourier Transform (FFT; Cooley and Tukey, 1965) to transition our data from the time domain to the frequency domain. This transformation enabled the application of Naive Bayes and Logistic Regression classifiers to the datasets. For each classification model, we examined three alternative strategies: no dimensionality reduction, PCA, or LASSO. We evaluated each approach (i.e., a combination of a classifier and a dimensionality reduction strategy) using a 5-fold cross-validation method. Finally, we averaged the cross-validation accuracies across the subjects.
The baseline method from OpenViBE, with no dimensionality reduction, achieved an average cross-validation accuracy of 75.99%. Using the PCA method prior to Naive Bayes Classification yielded an average cross-validation accuracy of 88.46%. The LASSO Logistic Regression model exhibited the highest average cross-validation accuracy of 92.72%. Using the Wilcoxon rank-sum test (Bauer, 1972), we showed that this improvement is statistically significant (p-value = 0.009) compared to the baseline model.
While these results are promising, our study faces limitations due to the small sample size (n=5), potentially affecting the generalizability of our findings. A larger, more diverse dataset would help validate the effectiveness of dimensionality reduction techniques in BCIs for a broader population. Future research should also consider exploring other dimensionality and noise reduction methods, such as Denoising Autoencoders (DAE; Vincent et al., 2008), which removes noise from the input data, and Independent Component Analysis (ICA; Jutten and Herault, 1991), a computational method for separating a multivariate signal into additive, independent components. Additionally, future research could focus on examining other classifiers, such as Random Forest (Breiman, 2001), an ensemble learning method for classification that operates by constructing a multitude of decision trees; Support Vector Machines (Cortes and Vapnik, 1995), a supervised learning model that uses classification algorithms for two-group classification problems; and Neural Networks (Rumelhart et al., 1986; LeCun et al., 2015), computing systems inspired by the biological neural networks that constitute animal brains. These avenues of future research have the potential to make significant contributions to the advancement of human-computer interaction and provide valuable support for individuals with neurological conditions.
About the Author
Ryan Shahbaba is a high school junior at Sage Hill School with aspirations to study Computational Neuroscience. He is advised by Dr. Christine King in the Department of Biomedical Engineering, UC Irvine
References:
This innovative technology, however, is not without its challenges. One significant hurdle in the effective implementation of BCIs is the presence of artifacts, unwanted disturbances that corrupt the purity of brainwave signals. These artifacts, often stemming from external sources (e.g., environmental noise), or internal factors (e.g., muscle movements and eye blinks), can significantly impair the accuracy of BCIs. In research environments, strategies such as controlling ambient light and sound or keeping the subject still are employed to mitigate these effects. Yet, in dynamic, real-world settings like hospitals, such controlled conditions are impractical, highlighting the need for more adaptable solutions.
In our research, we aim to tackle this challenge by utilizing dimensionality reduction techniques commonly used in statistics and machine learning. More specifically, we use these techniques to improve the P300-speller (Kamp et al., 2013), a digital interface that enables users to spell out characters by interpreting their brainwave activity. We implemented our proposed approach within the OpenViBE platform, specialized software for real-time neuroscience that allows for designing, testing, and using brain-computer interfaces with tools for creating custom applications and several ready-to-use demos.
The P300-speller operates by presenting a 6x6 matrix of letters and numbers to the user. To train the system, the users are instructed to concentrate on a specific character. The system then flashes rows and columns within the matrix in a random sequence. When the desired character is included in the flash, it constitutes a P300 response, a distinct, positive deflection in the electroencephalogram (EEG) signal 300 milliseconds after the stimulus. This response is part of the oddball paradigm (Farwell and Donchin, 1988), which involves presenting the user with a series of stimuli where one – known as the "oddball" – significantly differs from the rest, making it easier to detect specific brainwave patterns despite the presence of artifacts. In this case, a rare and unexpected flashing of the user's chosen character provokes this “target event” P300 response. Conversely, flashes that do not include the character of interest are labeled as “non-target events” and typically do not elicit the same P300 response.
Currently, the standard method employed by OpenViBE for interpreting these EEG signals is the Naive Bayes classifier (Hastie et al., 2009) without dimensionality reduction techniques for noise reduction. The Naive Bayes classifier is a simple probabilistic classifier based on applying Bayes' theorem with strong independence assumptions between the features. This method, while prevalent, has its limitations in the presence of artifacts. In contrast, Logistic Regression, which we explore as a replacement, is more flexible in handling a variety of relationships between the dependent and independent variables, allowing for a more robust prediction. Additionally, we aim to enhance the accuracy of the predictive models (Naive Bayes and Logistic Regression) by implementing dimensionality and noise reduction techniques such as Principal Component Analysis (PCA; Pearson, 1901) and Least Absolute Shrinkage and Selection Operator (LASSO; Tibshirani, 1996). PCA projects high-dimensional data into a lower-dimensional subspace while capturing most of the variation in the original data. LASSO is a feature selection technique through regularization, i.e., penalizing against complexity. It is commonly used in regression models, as it uses fewer features while maintaining a reasonably high predictive accuracy. We hypothesize that by refining the EEG signals and reducing the impact of artifacts through dimensionality reduction techniques, we could improve the reliability and accuracy of the P300-speller, making it a more viable tool for real-world applications.
We collected data from five subjects using an 8-channel EEG cap and the Cyton Board, a device used to import the brain signals into the OpenViBE software. The recorded signals for each event were segmented into 32 epochs. For each subject, we first averaged the observed data across all 32 epochs separately for target and non-target events, resulting in a total of 64 data points. This process enhanced the signal-to-noise ratio (SNR), which is crucial for improving data clarity. Next, we applied the Fast Fourier Transform (FFT; Cooley and Tukey, 1965) to transition our data from the time domain to the frequency domain. This transformation enabled the application of Naive Bayes and Logistic Regression classifiers to the datasets. For each classification model, we examined three alternative strategies: no dimensionality reduction, PCA, or LASSO. We evaluated each approach (i.e., a combination of a classifier and a dimensionality reduction strategy) using a 5-fold cross-validation method. Finally, we averaged the cross-validation accuracies across the subjects.
The baseline method from OpenViBE, with no dimensionality reduction, achieved an average cross-validation accuracy of 75.99%. Using the PCA method prior to Naive Bayes Classification yielded an average cross-validation accuracy of 88.46%. The LASSO Logistic Regression model exhibited the highest average cross-validation accuracy of 92.72%. Using the Wilcoxon rank-sum test (Bauer, 1972), we showed that this improvement is statistically significant (p-value = 0.009) compared to the baseline model.
While these results are promising, our study faces limitations due to the small sample size (n=5), potentially affecting the generalizability of our findings. A larger, more diverse dataset would help validate the effectiveness of dimensionality reduction techniques in BCIs for a broader population. Future research should also consider exploring other dimensionality and noise reduction methods, such as Denoising Autoencoders (DAE; Vincent et al., 2008), which removes noise from the input data, and Independent Component Analysis (ICA; Jutten and Herault, 1991), a computational method for separating a multivariate signal into additive, independent components. Additionally, future research could focus on examining other classifiers, such as Random Forest (Breiman, 2001), an ensemble learning method for classification that operates by constructing a multitude of decision trees; Support Vector Machines (Cortes and Vapnik, 1995), a supervised learning model that uses classification algorithms for two-group classification problems; and Neural Networks (Rumelhart et al., 1986; LeCun et al., 2015), computing systems inspired by the biological neural networks that constitute animal brains. These avenues of future research have the potential to make significant contributions to the advancement of human-computer interaction and provide valuable support for individuals with neurological conditions.
About the Author
Ryan Shahbaba is a high school junior at Sage Hill School with aspirations to study Computational Neuroscience. He is advised by Dr. Christine King in the Department of Biomedical Engineering, UC Irvine
References:
- Bauer, D. F. (1972). Constructing confidence sets using rank statistics. Journal of the American Statistical Association, 67(339), 687–690. https://doi.org/10.1080/01621459.1972.10481279
- Breiman, L. (2001). Machine Learning, 45(1), 5–32. https://doi.org/10.1023/a:1010933404324
- Cooley, J. W., & Tukey, J. W. (1965). An algorithm for the machine calculation of complex Fourier series. Mathematics of Computation, 19(90), 297. https://doi.org/10.2307/2003354
- Cortes, C., & Vapnik, V. (1995). Support-Vector Networks. Machine Learning, 20(3), 273–297. https://doi.org/10.1007/bf00994018
- Farwell, L. A., & Donchin, E. (1988). Talking off the top of your head: Toward a mental prosthesis utilizing event-related brain potentials. Electroencephalography and Clinical Neurophysiology, 70(6), 510–523. https://doi.org/10.1016/0013-4694(88)90149-6
- Hastie, T., Tibshirani, R., & Friedman, J. (2009). The elements of Statistical Learning. Springer Series in Statistics. https://doi.org/10.1007/978-0-387-84858-7
- Jutten, C., & Herault, J. (1991). Blind separation of sources, part I: An adaptive algorithm based on neuromimetic architecture. Signal Processing, 24(1), 1–10. https://doi.org/10.1016/0165-1684(91)90079-x
- Kamp, S.-M., Murphy, A. R., & Donchin, E. (2013). The component structure of event-related potentials in the P300 speller paradigm. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 21(6), 897–907. https://doi.org/10.1109/tnsre.2013.2285398
- LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436–444. https://doi.org/10.1038/nature14539
- Pearson, K. (1901). LIII. on lines and planes of closest fit to systems of points in space. The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science, 2(11), 559–572. https://doi.org/10.1080/14786440109462720
- Rumelhart, D. E., Hinton, G. E., & Williams, R. J. (1986). Learning representations by back-propagating errors. Nature, 323(6088), 533–536. https://doi.org/10.1038/323533a0
- Tibshirani, R. (1996). Regression shrinkage and selection via the lasso. Journal of the Royal Statistical Society: Series B (Methodological), 58(1), 267–288. https://doi.org/10.1111/j.2517-6161.1996.tb02080.x
- Vincent, P., Larochelle, H., Bengio, Y., & Manzagol, P.-A. (2008). Extracting and composing robust features with denoising autoencoders. Proceedings of the 25th International Conference on Machine Learning - ICML ’08. https://doi.org/10.1145/1390156.1390294