Man with spinal cord injury that can grasp objects again thank to a brain-computer interface developed under the MoreGraso Project
Go back to blog
An introduction to brain-computer interface using EEG signals
10 Min.
Medium
Brain-computer interfaces (BCI) occupy an emerging field with the potential of changing the world, with diverse applications from rehabilitation to human augmentation. In this post, we will provide some insights into what BCIs are, how they are built, and what are the most promising applications that may be available in the near future.

What is a brain-computer interface?

A brain-computer interface (BCI), also referred to as a brain-machine interface (BMI) or neural interface, is a system that establishes a direct communication between the brain and an external device (Lebedev & Nicolelis, 2017; Millán et al., 2010; J. R. Wolpaw et al., 2002). This term was first proposed by Professor Jacques Vidal in 1973 (Vidal, 1973), and since then, the number of developments and research articles describing brain-to-computer communication has grown exponentially.

The basic setup of a BCI system includes three components:

  1. Specific electrodes to record electric, magnetic, or metabolic brain activity. 
  2. A processing pipeline to interpret those signals, extracting relevant features from them, decoding patterns of interest, and outputting commands.
  3. A computer or external device that operates via the generated commands.

There are a wide variety of devices that can be controlled using brain commands, and they can be used in five ways: to replace, restore, enhance, supplement or improve some human function (J. Wolpaw & Wolpaw, 2012).

infographic that explains how brain computer interfaces works and the bci applications

Techniques to measure brain activity 

The first component of BCI technology is a method to record the human brain signals. It could be considered the most relevant, since it determines aspects like the cost, the potential areas of application and the population that can use it. Brain activity can be measured with sensors implanted inside the body (invasive BCIs) or with external sensors (non-invasive BCIs).

  • Invasive recordings allow measuring the electrical activity of neural populations with very high temporal and spatial resolution, meaning that we can know very precisely when and where a certain pattern of activity occurred. However, they require very expensive equipment and a complex set-up that involves surgery, with non-negligible postsurgical risks associated. For this reason, most of the research in this field has been conducted with animals, although the number of research laboratories in the world using implantable BCIs with humans (mostly patients with motor impairment) is growing.
  • Non-invasive sensors allow recording electric activity (with electroencephalography, EEG), magnetic activity (with magnetoencephalography, MEG), or metabolic activity (with functional near-infrared spectroscopy, fNIRS). 

fNIRS measures changes in blood oxygenation. Increases in blood oxygenation indicate that a brain area is more active. This technique has the limitation of providing a very low temporal resolution and is, therefore, not frequently used for BCIs. EEG and MEG, in contrast, allow higher temporal resolution, despite their low spatial resolution. MEG requires a large and expensive magnetometer. Generally, for non-invasive BCIs, EEG is the preferred technology due to its lower cost and portability. For this reason, most of the information contained in this post refers to EEG-based brain-computer interfaces.

Neural processes for EEG-based brain-computer interfaces

Electroencephalographic activity is measured by placing electrodes at different locations over the scalp. The signals are measured as the difference in voltage between two electrodes (usually one is a reference for all other electrodes). Measuring the activation of a specific brain region requires placing electrodes as close as possible to that area, and therefore electrodes placed at different cortical positions allow measuring different neural processes.

There are different patterns of brain activation that can be measured with EEG. Spontaneous—or ongoing—brain activity is the activity measured in the absence of any explicit task or stimulus. In contrast, induced activity appears as a response to an event, such as a sensory stimulus or a specific action (e.g., a motor response or mental processing).

EEG-based BCI systems rely on detecting changes in the brain patterns produced as a response to some voluntary or involuntary mental command. One of these types of neural processes are event-related potentials (ERPs), which appear as a response to external sensory stimuli. Some of the most common ERPs used for brain-computer interaction are the following:

  • P300: the P300 response is reflected as a positive fluctuation in the EEG that occurs approximately 300 ms after perceiving a stimulus. In the context of BCIs, it is generally elicited through an oddball paradigm, which consists of receiving a series of stimuli of two classes, one of which is presented infrequently (e.g., 20% of the times) and generates the measured P300 potential (Fazel-Rezai et al., 2012). 
  • Steady-state evoked potentials: these are natural brain responses to repetitive stimuli, which vary with the specific frequency of presentation. They are usually elicited with visual stimuli (steady-state visually evoked potentials, SSVEP), although there are examples of BCI paradigms using somatosensory (SSSEP) or auditory (SSAEP) stimuli (Zhu et al., 2010).
  • Error-related potentials: these potentials appear as a pronounced negativity in the EEG (termed the error-related negativity, ERN) as a response to detecting an erroneous action, either committed by the own participant, by another participant, or even by a machine (Chavarriaga et al., 2014).

The other type of neural process commonly used in BCIs do not require explicit stimuli, but are associated with internal brain events and can even be measured asynchronously (i.e., without evident information of when they start). There are two common phenomena in this category:

  • Event-related desynchronization/synchronization (ERD/ERS): the ERD/ERS represent a decrease/increase in the amplitude of the ongoing EEG oscillations at a specific frequency as a response to a certain mental command. The most common is the sensorimotor ERD/ERS, which appears over the motor cortex during motor tasks (e.g., execution of a movement, motor imagery, or the attempt of movement by a patient with paralysis) (Pfurtscheller & Lopes da Silva, 1999).
  • Slow cortical potentials (SCP): this refers to EEG frequencies below 1 Hz, and generally represents planning or preparation for an action. Movement-related cortical potentials (MRCP), which are a slow decay of EEG voltage over the motor cortex before a voluntary movement, are also a very frequent source of activity used to control motor-related BCIs (Shibasaki & Hallett, 2006).

AI for brain-computer interfaces using EEG 

Progress in the field of artificial intelligence has prompted considerable improvements in how information is processed and decoded from EEG activity. Ultimately, an EEG-based BCI has to transform the voltage values measured through the electrodes into digital commands to control the corresponding device. In order to close-the-loop between the brain and the device, the BCI requires algorithms of signal processing, feature extraction, and pattern recognition.

  • The signal processing usually involves the use of spectral and spatial filtering to maximize the signal to noise ratio, as well as procedures to deal with contamination of EEG data (i.e., artifacts) and the changes in the characteristics of the signal in session-to-session recordings (i.e., nonstationarities). After all the signal processing steps, one usually needs to simplify this highly-dimensional sensor-space data into a feature vector that can be handled by a classifier/decoder. 
  • Feature extraction was traditionally based on previous knowledge of human electrophysiology, although some modern approaches relying on computers with high computational power exploit black-box methodologies to automatically extract relevant features without any prior assumptions.
  • With the feature vectors computed from training data, a classifier/decoder is trained to learn how to detect brain states that should be associated with control commands for the device. Once the classifier is trained, it can be used to evaluate new, unseen data to operate in closed-loop.

Different research laboratories worldwide work on improving these three computing steps (signal processing, feature extraction, and classification/decoding), and to adapt different methodologies from the AI field to the particularities of EEG data. The classification methods have received more attention since their output is normally used for assessing the BCI performance (e.g., classification accuracy). In this regard, there is an enormous variety of classifiers that have been evaluated in the field of BCIs, from very simple linear thresholding to complex deep neural networks (Lotte et al., 2018).

Different types of applications require diverse AI approaches to maximize the success of the BCI. For instance, in some contexts, we want the users to learn and adapt their brain patterns towards a desired state (e.g., in neurorehabilitation, where we want to change the brain to induce some behavioral changes as a consequence). In that case, a simple linear classifier can be enough to guide the user by indicating if the activation over a specific brain region should be higher or lower. In contrast, some other applications, like the brain-control of a wheelchair, require more complex algorithms to maximize the decoding accuracy, adapting to the specific patterns of activity of each participant, and trying to minimize errors.

Applications of EEG-based brain-computer interfaces  

A widely accepted definition of BCI is: “a system that measures the Central Nervous System (CNS) activity and converts it into artificial output that replaces, restores, enhances, supplements, or improves natural CNS output and thereby changes the ongoing interactions between the CNS and its external or internal environment” (J. Wolpaw & Wolpaw, 2012).

A BCI for replacing a natural function can be used by people who, due to an injury or disease, have lost that function. For instance, a person who cannot walk could control a robotic wheelchair, or a person who cannot speak could use a brain-controlled communication device (Fernández-Rodríguez et al., 2016; Rezeika et al., 2018). 

In 2009, the BCI team at the University of Zaragoza, founders of Bitbrain, presented a prototype of a wheelchair controlled with a BCI based on the P300 paradigm (Iturrate et al., 2009). The users had to focus their attention on specific targets in a 3-D representation of their environment, which were illuminated in a random order. After a few seconds, the system decoded where they wanted to go by analyzing the brain responses to each stimulus, and the wheelchair drove them to the desired location (see video with explanation).

A BCI can also be used to restore a lost function. For example, people with paralysis or limb weakness after a spinal cord injury can control exoskeletons or electrical stimulation to move their own limbs (AL-Quraishi et al., 2018). The MoreGrasp project, funded by the H2020 EU program and where Bitbrain was one of the partners, worked in this direction by developing a technology that allowed tetraplegic patients to control, with their brain waves, functional electrical stimulation of the muscles and nerves that move their paralyzed hand. The video below shows a brief description of the project.

While these two first fields of application refer to patients with motor impairment, BCIs have also been devised as a way to improve the capabilities of healthy people. However, BCIs for enhancing or supplementing human functions have received less attention until now. This is because improving the quality of life of impaired people needs little further justification, but augmenting human natural functions raises important ethical concerns and debates (Yuste et al., 2017). 

An example of supplementing functions could be, for example, controlling a third (e.g., robotic) arm with brain activity. A bit less extreme is the case of enhancing functions, which means that a natural brain output is processed to enhance our abilities. For instance, the natural brain response after observing a machine committing an error could be used to improve that machine; or measurements of attention/distraction during a long task like driving could be used to alert the driver when attention is lost. In 2018, Nissan in cooperation with Bitbrain presented the first prototype of Brain-to-Vehicle interface, in which the driving experience was enhanced by anticipating the driver decisions after detecting specific event-related potentials.

Finally, interventions based on BCI can be used to improve some functions. For example, people suffering a stroke can experience damage to the central nervous system that causes upper-limb paralysis. A BCI that links brain activation during movement intention with peripheral feedback on the paralyzed limb can exploit activity-dependent plasticity mechanisms to improve the function of the patient (López-Larraz et al., 2018). 

The first time that a BCI was scientifically demonstrated to have rehabilitative effects in stroke patients was in 2013 by a research team at the University of Tübingen (Ramos-Murguialday et al., 2013). The association of specific brain patterns with congruent feedback, also known as neurofeedback, has the potential to help reorganize brain circuits, leading to improvements in neuropsychiatric disorders like attention deficit and hyperactivity, but also for cognitive enhancement in healthy populations (Sitaram et al., 2017).

Open datasets for machine learning on brain-computer interfaces

Worldwide initiatives towards open science have favored that more and more research laboratories publish their datasets with their papers. It is, therefore, possible now to push the BCI field forward from a computational or machine learning point of view, without the need of having expensive equipment for recording EEG. The BNCI Horizon 2020 website hosts a database of open access BCI datasets, as well as links to other repositories, like the BCI competitions. The website of Prof. Fabien Lotte (Research Director at Inria Bordeaux) also contains a detailed list of links to publicly available BCI datasets for download.

Open scientific repositories like Figshare, Zenodo or Dryad are gaining attention and their use is recommended even by renowned journals like Nature. These repositories host a growing number of accessible EEG-BCI datasets, which can be accessed by their own search engine. Furthermore, specialized tools like the Dataset Search by Google find datasets stored across the Web, like those published in the previously mentioned repositories, as well as in open access journals or platforms like ResearchGate.

Conclusion

Communication between brains and machines sounded like science fiction until a few decades ago. Joint efforts by engineers, neuroscientists, and clinicians have led to impressive advances in the field of brain-computer interfaces, including the control of wheelchairs, robots, and even implantable stimulators. So far, most of the progress in this field has been done in research environments as proofs-of-concept, and some small-scale clinical trials have provided very promising results for patients with different neurological diseases. 

We foresee that in this decade, we will see actual BCI systems reaching the market for clinical and consumer applications. This will come as a result of R&D milestones that are expected to occur in the next few years: 1) improvement of portable EEG technologies in terms of usability and reliability to effectively take BCIs home (e.g., for video games, domotics, and even home-based rehabilitation); 2) development of more advanced implantable technologies to extend the application these systems to other populations of patients, and even to healthy people; and 3) exploitation of big data tools with many brain activity recordings for the optimization and personalization of the BCI algorithms so that they can work reliably in uncontrolled environments. 

Author

Eduardo López-Larraz, Ph.D. - Research Engineer at Bitbrain (Google ScholarLinkedIn)

References

  • AL-Quraishi, M., Elamvazuthi, I., Daud, S., Parasuraman, S., & Borboni, A. (2018). EEG-Based Control for Upper and Lower Limb Exoskeletons and Prostheses: A Systematic Review. Sensors, 18(10), 3342. https://doi.org/10.3390/s18103342
  • Chavarriaga, R., Sobolewski, A., & Millán, J. del R. (2014). Errare machinale est: The use of error-related potentials in brain-machine interfaces. Frontiers in Neuroscience, 8, 208. https://doi.org/10.3389/fnins.2014.00208
  • Fazel-Rezai, R., Allison, B. Z., Guger, C., Sellers, E. W., Kleih, S. C., & Kübler, A. (2012). P300 brain computer interface: current challenges and emerging trends. Frontiers in Neuroengineering, 5(July), 1–14. https://doi.org/10.3389/fneng.2012.00014
  • Fernández-Rodríguez, Velasco-Álvarez, F., & Ron-Angevin, R. (2016). Review of real brain-controlled wheelchairs. Journal of Neural Engineering, 13, 061001. https://doi.org/10.1088/1741-2560/13/6/061001
  • Iturrate, I., Antelis, J. M., Kübler, A., & Minguez, J. (2009). A noninvasive brain-actuated wheelchair based on a P300 neurophysiological protocol and automated navigation. IEEE Transactions on Robotics, 25(3), 614–627. https://doi.org/10.1109/TRO.2009.2020347
  • Lebedev, M. A., & Nicolelis, M. A. L. (2017). Brain-Machine Interfaces: From Basic Science to Neuroprostheses and Neurorehabilitation. Physiological Reviews, 97(2), 767–837. https://doi.org/10.1152/physrev.00027.2016
  • López-Larraz, E., Sarasola-Sanz, A., Irastorza-Landa, N., Birbaumer, N., & Ramos-Murguialday, A. (2018). Brain-machine interfaces for rehabilitation in stroke: a review. NeuroRehabilitation, 43(1), 77–97. https://doi.org/10.3233/NRE-172394
  • Lotte, F., Bougrain, L., Cichocki, A., Clerc, M., Congedo, M., Rakotomamonjy, A., & Yger, F. (2018). A Review of Classification Algorithms for EEG-based Brain-Computer Interfaces: A 10-year Update. Journal of Neural Engineering, 15(3), 031005. https://doi.org/10.1088/1741-2552/aab2f2
  • Millán, J. del R., Rupp, R., Müller-Putz, G. R., Murray-Smith, R., Giugliemma, C., Tangermann, M., Vidaurre, C., Cincotti, F., Kübler, A., Leeb, R., Neuper, C., Müller, K. R., & Mattia, D. (2010). Combining brain-computer interfaces and assistive technologies: state-of-the-art and challenges. Frontiers in Neuroscience, 4, 161. https://doi.org/10.3389/fnins.2010.00161
  • Pfurtscheller, G., & Lopes da Silva, F. H. (1999). Event-related EEG/MEG synchronization and desynchronization: basic principles. Clinical Neurophysiology, 110(11), 1842–1857. https://doi.org/10.1016/S1388-2457(99)00141-8
  • Ramos-Murguialday, A., Broetz, D., Rea, M., Läer, L., Yilmaz, O., Brasil, F. L., Liberati, G., Curado, M. R., Garcia-Cossio, E., Vyziotis, A., Cho, W., Agostini, M., Soares, E., Soekadar, S., Caria, A., Cohen, L. G., & Birbaumer, N. (2013). Brain-machine interface in chronic stroke rehabilitation: a controlled study. Annals of Neurology, 74(1), 100–108. https://doi.org/10.1002/ana.23879
  • Rezeika, A., Benda, M., Stawicki, P., Gembler, F., Saboor, A., & Volosyak, I. (2018). Brain-Computer Interface Spellers: A Review. Brain Sciences, 8(4), 57. https://doi.org/10.3390/brainsci8040057
  • Shibasaki, H., & Hallett, M. (2006). What is the Bereitschaftspotential? Clinical Neurophysiology, 117(11), 2341–2356. https://doi.org/10.1016/j.clinph.2006.04.025
  • Sitaram, R., Ros, T., Stoeckel, L., Haller, S., Scharnowski, F., Lewis-Peacock, J., Weiskopf, N., Blefari, M. L., Rana, M., Oblak, E., Birbaumer, N., & Sulzer, J. (2017). Closed-loop brain training: the science of neurofeedback. Nature Reviews Neuroscience, 18(2), 86–100. https://doi.org/10.1038/nrn.2016.164
  • Vidal, J. J. (1973). Toward direct brain-computer communication. Annual Review of Biophysics and Bioengineering, 2, 157–180. https://doi.org/10.1146/annurev.bb.02.060173.001105
  • Wolpaw, J. R., Birbaumer, N., McFarland, D. J., Pfurtscheller, G., & Vaughan, T. M. (2002). Brain-computer interfaces for communication and control. Clinical Neurophysiology, 113(6), 767–791. https://doi.org/10.1016/S1388-2457(02)00057-3
  • Wolpaw, J., & Wolpaw, E. W. (Eds.). (2012). Brain-computer interfaces: principles and practice. Oxford University Press. https://doi.org/10.1093/acprof:oso/9780195388855.001.0001
  • Yuste, R., Goering, S., Blaise Agüera y Arcas, Bi, G., Carmena, J. M., Carter, A., Fins, J. J., Friesen, P., Gallant, J., Huggins, J. E., Illes, J., Kellmeyer, P., Klein, E., Marblestone, A., Mitchell, C., Parens, E., Pham, M., Rubel, A., Sadato, N., … Wolpaw, J. (2017). Four ethical priorities for neurotechnologies and AI. Nature, 551, 159–163. https://doi.org/10.1038/551159a
  • Zhu, D., Bieger, J., Garcia Molina, G., & Aarts, R. M. (2010). A survey of stimulation methods used in SSVEP-based BCIs. Computational Intelligence and Neuroscience, 2010, 702357. https://doi.org/10.1155/2010/702357

You might also be interested in: