What is EEG and what is it useful for

Impulse Neiry
Impulse Neiry
Published in
13 min readJan 22, 2020

Scientists love to look for the first-ever mention of their field of study. For example, I once read an article where it was unironically claimed that the first experiments on electrical stimulation of the brain were carried out in ancient Rome when someone was shocked by an electric ray. However, the history of modern electrophysiology is commonly thought to begin from Luigi Galvani’s experiments (XVIII century). In this series of articles, we will try to cover a small part of what science has discovered over the past 300 years about the electrical activity of the human brain, as well as about the profits that can be drawn from this.

Where does the electrical activity of the brain come from

The brain consists of neurons and glial cells. Neurons show electrical activity, glia can also do that, but in a different way [1], [2], and today we are going to ignore it.

The electrical activity of neuron consists of pumping sodium, potassium and chloride ions between the cell and the environment. Chemical neurotransmitters transmit signals between neurons. When a neurotransmitter secreted by one neuron binds to a specific receptor of another neuron, it can open chemically gated ion channels, which let a small amount of ions into the cell, as a result of which the cell slightly changes its charge. If enough ions have entered the cell (for example, if a signal has reached several synapses at the same time), voltage-gated ion channels open and the cell is activated in a matter of milliseconds using the “all or none law”, and then it returns to the previous condition. This is called the action potential.

How can we register brain cells activity

The best way to record the activity of individual cells is to stick an electrode into the cortex. It can be: single wire, a matrix with several dozens of electrodes, a pin with several hundreds of channels, or a flexible board with several thousands of channels.

All this methods are well-established in researching brain activity in animals. Sometimes, for health reasons (epilepsy, Parkinson’s disease, complete paralysis), the electrodes are implanted in humans. Patients with implants are able to print text with the power of thought, control exoskeletons, and even control all degrees of freedom of the industrial manipulator.

It sounds impressive, but in the near future, such methods won’t become standards in every clinic, let alone reach healthy people. The reason for that is firstly, it is very expensive — the cost of the procedure for each patient is measured in hundreds of thousands of dollars. Secondly, this is still a serious neurosurgical surgery with all possible complications and damage to the nervous tissue around the implant. Thirdly, the technology itself is imperfect — it is not clear what to do with tissue compatibility of implants, and how to prevent their fouling with glia, as a result of which the implant may stop working in several years. Besides, teaching each patient how to use an implant can take more than a year of daily training.

If something less invasive is needed, no need to stick the wires deep into the cortex, just gently place them on it — this way you get an electrocorticogram. Here the signal of individual neurons can no longer be registered, but you can see the activity of very small areas (the general rule is, the farther away from the neurons, the worse is the spatial resolution of the method). The invasiveness level is lower, but it still requires us to open up a skull, so this method is mainly used for monitoring during surgeries.

One can put wires not even on the cortex, but on the dura (the thin but hard layer between the brain and the skull). Here the level of invasiveness and possible complications is even lower, but the signal is still quite high quality. This is called epidural EEG. The method is good, however, surgery is still required to perform it.

Finally, the least invasive method for studying the electrical activity of the brain is an electroencephalogram, namely, recording using electrodes that are located on the surface of the head. This method is widespread, relatively cheap (top-tier devices cost no more than several tens of thousands of dollars, and most are ten times cheaper, consumables are almost free), and it has the highest time resolution of non-invasive methods — you can study the perception processes that takes a few milliseconds. Disadvantages are low spatial resolution and noisy signal, which, however, contains enough information for some medical and neuro-interface purposes.

In the image with the action potential, you can see that the curve has two main parts — the action potential itself (large peak) and the synaptic potential (small amplitude change in before the large peak). It seems safe to assume that the signal we register on the surface of the head is the sum of the action potentials of individual neurons. However, it’s actually the other way around — the action potential takes about 1 millisecond and, despite its high amplitude, it does not pass through the skull and soft tissues, but synaptic potentials due to their longer duration get summed up and can be recorded from the surface of the skull. This has been proven by simultaneous recording by invasive and non-invasive methods. It is also important that not every neuron can add to EEG (more details here).

It is important to know there are about 86 billion nerve cells in the brain (read here all about how this number was calculated with such accuracy), and it is impossible to record the activity of single neuron among such noise. However, some information can still be pulled out of it. Imagine that you are standing in the center of a football stadium. While the fans are just making noise and talking to each other, you hear a background noise, but as soon as even a small group of those present begin to chant, you can hear it quite clearly. Similarly, with neurons — on the surface of the skull you can see a meaningful signal only if a large number of neurons show synchronous activity. For non-invasive EEG, this is approximately 50 thousand synchronously working neurons.

Voltage fluctuations on a person’s scalp was recorded for the very first time in 1924 by Hans Berger. The first EEG record looked like this:

It is difficult to understand what this signal means, but it is immediately obvious that it does not look like white noise — spindles of high-amplitude oscillations and different frequencies are noticeable. This alpha rhythm is the most noticeable brain rhythm that can be spotted by the naked eye.

Nowadays, of course, EEG rhythms are analyzed not by naked eye, but by mathematical methods, among which the simplest ones are spectral.

Fourier spectrum of the electroencephalogram broken (divided) into bands (source)

In total there are several bands in which the rhythmic activity of the EEG is usually analyzed, here are the most popular ones:

8–14 Hz — Alpha rhythm. Presented mainly in the occipital areas. Increases greatly when eyes are closed, it gets suppressed by mental strain and increases with relaxation. This rhythm is produced when arousal circulates between the cortex and the thalamus. The thalamus is a kind of router that decides how to redirect incoming information to the cortex. When a person closes his eyes, he has nothing to do, he begins to generate background activity, which causes an alpha rhythm in the cortex. Also, the default mode network plays an important role — a network of structures that are active during wakeful rest, but this is a topic for another article.

A breed of alpha rhythm with which it is easy to confuse with is mu rhythm. It has similar characteristics, but is recorded in the central areas of the head, where the motor cortex is located.

14–30 Hz — Beta-rhythm is ore pronounced in the frontal lobes of the brain, and increases with mental strain.

30+ Hz — Gamma rhythm. Maybe it does exist somewhere inside the brain, but most of what can be recorded from the surface, comes from the muscles. This is how it was proven:

It is necessary to somehow remove muscle activity from the head to record EEG with and without muscles. Unfortunately, there is no easy way to disable the muscles in the head without disabling them throughout the body. You should take a scientist (because no one else would agree to do this) drug him up with muscle relaxant. As a result, all muscles in his body are now disconnected. The problem is if you turn off all the muscles, including the diaphragm and intercostal ones, he will not be able to breathe. Solution — put him on a ventilator. The problem is without muscles, the subject can not signal if something goes wrong. Solution — you should put a tourniquet on his arm so that the muscle relaxant does not get there, this way he can give us signals with this arm. The problem is if we the experiment will take too long, the subject will suffer irreparable tissue damage. Solution — the experiment should be stopped when the scientist stops feeling his hand.

The result of this rather humane experiment is dramatic reduction in gamma-rhythm when the muscles are not operating. EEG spectrum in 20+Hz band becomes 10–200 times less; the higher the frequency, the higher the drop.

1–4 Hz — Delta rhythm. Present during the deepest sleep phase, also increases with stress.

In addition to rhythmic activity in EEG, there is also an evoked one. If we know for sure at what moment we show a person a stimulus (it can be a picture, sound, tactile sensation or even smell), we can see what reaction it produces. The signal-to-noise ratio of such reaction to the background EEG is rather low, but if we show the stimulus, for example, 10 times, then cut the EEG relative to the moment of presenting the stimulus and average the result, we can get quite detailed curves, which are called evoked potentials (not to be confused with Action potential).

Here we can see the evoked potential for sound. We’ll leave the details to psychophysiologists — right now it’s enough for us to understand that each extremum means something. With sufficient averaging, the responses of the structures will be visible, starting from the auditory nerve (I) and ending with the associative cortex (P2).

What can we do with this

Today we will focus on neurocomputer interfaces. These are real-time EEG analysis systems that allow you to give commands to a computer or robot without the help of your muscles — the closest thing to telekinesis that modern science can provide.

The most obvious thing that comes to mind is to create an interface on rhythmic activity. We do remember that the alpha rhythm is low when a person is tense, and high when he is relaxed, right? So relax. We’d write the EEG, do the Fourier transform, and when the power in the window around 10 Hz has become above a certain threshold, we turn on the light bulb — and here it is — a computer controlled by the power of thought. The same principle may allow you to control other rhythms. Due to the simplicity and little requirements for the equipment, a lot of toys have appeared that work on this principle — Neurosky, Emotiv, etc. In principle, if a person will try hard, they can learn to come to the right state, which will be correctly classified. The problem with consumer devices is that they often do not write a very high-quality signal, and they are unable to subtract artifacts from the eye and facial muscle movements. As a result, there is a real opportunity to learn how to control with muscles and eyes, and not with the brain (and the way the subconscious works means that the more you try not to do this, the worse it will become). In addition, the signal-to-noise ratio in the rhythms is quite low, and the interface is slow and inaccurate (if you can correctly guess the state with an accuracy of more than 70% — it would be considered an achievement). In addition to that, the scientific base on the EEG correlates of the mental states states, except for relaxation and concentration, is, to put it mildly, is not well established (see this great article for more). However, with proper implementation, the method may have its limited application.

An important type of rhythm-based BCI is the mental imagery BCI. Here the person is asked to imagine the movement of, say, the right hand instead of imagining something abstract and relaxing. If you do it right (and learning the correct way of imagining movements is difficult), you can detect a decrease in mu rhythm in the left hemisphere. The accuracy of such interfaces also is something around 70%, but they value is in ability to use mental imagery BCI in rehabilitation devices for recovery from strokes and injuries, including using various exoskeletons.

Another type of EEG BCIs is based on the use of the evoked activity of all sorts. These interfaces are very reliable, with accuracy approaching 100%.

The most popular technology includes the P300 event-related potential (it’s something like the evoked potential, but it’s greatly modulated by higher attentional processes — maybe too many potentials for a single article? :-)). It is generated when a person tries to attend one stimulus he needs among many unnecessary ones.

Here, for example, if we try to calculate how many times the letter “A” lights up, and at the same time try to not pay attention to all the other letters, in response to target stimulus, when averaging, we will see a red line, and when averaging all the others, a blue line. The difference between them is noticeable with the naked eye, and it’s not difficult to train the classifier that will distinguish them, which is what we will do in the following articles.

Such interfaces are usually not very beautiful, and not very fast (printing a single letter will take about 10 seconds), but can be useful for fully paralyzed patients.

In addition, there is a cognitive component to P300 BCI — just looking at the letter is not enough, you need to actively pay attention to it. This allows, under certain conditions, to create quite interesting games based on this technology (but that will be a topic for a whole another article).

Since P300 is a cognitive potential, it is not very important what exactly is shown to a person, as long as it can be reacted to. As a result, the interface will work even if the letters continuously replace each other on the same spot — this can be useful for patients who cannot move their eyes.

There are other interesting evoked potentials, in particular SSVEP — stable-state visual evoked potentials. If you look for analogies in the field of communications, the P300 works like a walkie-talkie — signals from different stimuli are separated by time, and SSVEP is a classic FDMA — separation by carrier frequency, as in GSM-communication.

Seizure warning: flashing lights

We present a person with several stimuli flashing at different frequencies. When choosing a stimulus, it is enough to carefully look at it, and after a few seconds, its frequency will magically appear in the visual cortex, from where it can be pulled out by correlation analysis or spectral methods. It is faster and easier to do that typing letters using P300, but it’s hard to look at the the flashing stimuli for a long period of time.

Where there is FDMA, one may find a good place of CDMA:

Seizure warning: even more intense flashing lights

Gray is the binary sequence, colour is the activity caused by it in all channels, the map is the distribution of the potential in the EEG. It is clear that the maximum is located on the back of the head in the visual areas

It is possible to modulate the flashing of stimuli by orthogonal binary sequences rather than by frequencies and phases, which likewise end up in the visual cortex and are classified using correlation analysis. This can help to optimize the classifier training and speed up the work of the interface — one letter can take less than 2 seconds. While being fast and easy to master, this type of interfaces lacks real-life applications, since has almost no cognitive component to it — eye tracking can deliver comparable results, with less effort.

Brain-computer interfaces is an actively developing technology, which may look like magic, especially for an unprepared user. However, in reality, this methods has many difficulties, which we will talk about later. The secret to success, as with any technology, is to take into account all the limitations and to find the areas of its application were these limitations would not prevent the achievement of goals.

Author: Rafael Grigoryan

--

--