The art of brain waves. How scientists visualize evoked potentials: survey results

My name is Vladimir Mikheev, I work in the laboratory Computational Cognitive Sciences University of Stuttgart, Germany. We develop libraries for analysis, simulation and visualization of EEG data in the Julia language under the umbrella brand Unfold. Our goal is to get brain signaling science out of its current crisis.

The social and psychological sciences have been plagued by a crisis of irreproducibility for ten years now: the results of many studies are not repeated. He also touched on neuroscience. There are various initiatives that are trying to improve the situation: some are focused on signal recording methodologyothers on data analysisthe third – on research recording.

We focused on data visualization. The question is not only about the aesthetic appeal of the graphs, but also about the correctness of the data presented. Our research shows that scientists often make serious mistakes when visualizing data, and analytics software developers are partly to blame.

There are two color schemes in the picture: jet (A) and plasma (B).  Which one is better for data visualization?  Answer in section 3.6.c

There are two color schemes in the picture: jet (A) and plasma (B). Which one is better for data visualization? Answer in section 3.6.c

This article may be useful to you if you:

  • Have you worked with EEG data and at least once drawn the evoked action potential?

  • Visualize time data.

  • You care about the reproducibility of scientific research.

  • You develop analytical software.

  • You make beautiful graphics and want them to be correct.

Is our study published in April 2024 in the magazine Aperture Neuro. Here is a simplified version of the article in Russian.

We are also developing our own data visualization library UnfoldMakie.jl and the research results help us make it more user-friendly.

Part 1. Everything you need to know about EEG to read this article

  • EEG (electroencephalography) – a method of recording electrical signals from the scalp. It is believed that brain activity can be recorded in this way. The method is poor at localizing signals, but very accurate at fixing the timing of signals. You can read more here.

  • The more you become familiar with this technology, the less miraculous it seems. But it records a couple of things well: 1) sleep disturbances; 2) epilepsy; 3) change in attention (P300); 4) perception of semantic errors (N400). A special merit of EEG is brain-computer interfaces. It was not possible to decipher the thoughts (as Hans Berger, the creator of the method, dreamed), but there are interesting researchwhich promise to reconstruct the images that the test subject sees.

  • Event related potential (hereinafter referred to as ERP, evoked potentials, event-related potentials). If during the experiment you influence the subject with some stimulus (showing a picture, sound, touch, etc.), this will change the electrical potential of his brain. Let's record signals from several electrodes, average them and get a line with time along the x-axis and voltage along the y-axis.

  • Some potentials are so popular that they are even given names. For example, if a signal goes up, we call it P (from the word positive), and if it goes down, we call it N (from the word negative). Adding to this the time of peak activity in milliseconds, we get potentials such as P300, N200 and others.

Part 2. Visualization of Evoked Action Potentials

EEG data is multidimensional. There can be five dimensions (but also more): current voltage, experimental test time, electrode number, electrode location, sample number and an unlimited number of experimental conditions.

If you are at the stage of intelligence analysis, then this number of measurements is excessive. It is almost impossible to meaningfully visualize more than three dimensions. The more dimensions there are in a drawing, the less clear what is happening in it. Therefore, we have to reduce the dimensionality: choose which dimension to show on the graph and which to hide by removing the dimension or averaging it.

There are different types of PSS charts, each for specific tasks. But they appeared spontaneously: each software manufacturer made them as best they could and saw them, and therefore the names and methods of their construction turned out to be different.

Types of PSS graphs and dimensions that they can show

Types of PSS graphs and dimensions that they can show

Each type of graph can only show part of the information.  The other part has to be aggregated.

Each type of graph can only show part of the information. The other part has to be aggregated.

Part 3. Research

We asked 213 EEG researchers how they visualize PSS. Here's what we learned.

  1. Visualization tools. According to the study EEMGanyPipelines Almost every lab will use a different data processing methodology to test the same hypothesis on the same data. And this methodology is highly dependent on the software that the scientific team uses.
    We asked, what software are respondents familiar with?, and also measured the annual number of software mentions in scientific articles. It turned out that the leaders are 4 libraries written in MATLAB (ERPLAB, FIeldtrip, EEGLAB, Brainstorm). The founder effect influenced – whoever started it first has the sneakers. But the trend for MNE-Python is positive; it has already begun to overtake its closest competitors in publications.

  2. Software properties. We asked, which property is most important for an EEG visualization program. The most important were flexibility, reproducibility and programmability. The graphical interface turned out to be completely unimportant. To our surprise, speed and interactivity also scored low.

  3. Recognizing the schedule. We showed the subjects 8 types of PSS visualization and asked them to choose those that they recognize, can name, and have ever drawn. Only 42% of respondents were able to recognize and name 7-8 graphs, which means more than half of the scientists do not know about all the possibilities for presenting PSS.

  4. Terminology. We asked in free form give names types of graphs. We found no common terminology even after very rough aggregation of responses. The only graph that 80% of the participants could name identically was the topoplot (topographic map of the brain).
    We believe that common terminology is important because: 1) diversity in names causes confusion; 2) it is easier to reproduce the study if you understand what kind of graph is shown, what it is called and what properties it has. Unfortunately It is unlikely that all software will switch to a single terminology. But we still developed it. The method was simple: we took the most popular version of the name of the chart, and if it was foulbrood, we offered our own version.
    Important: the survey was conducted in English. It would be extremely interesting to see the results of the survey in Russian or other languages. I give you a research idea!

    Based on aggregated user responses (the three most popular responses are shown), we have compiled new terminology for PSS charts.

    Based on aggregated user responses (the three most popular responses are shown), we have compiled new terminology for PSS charts.

  5. Difficulty with visualization. We asked what caused you the most difficulty in creating a graph. For each type of graph, we have identified its own difficulties. For example, when constructing PSS graphs, the most difficult thing was to determine the uncertainty intervals. Read more in our publication.

  6. Visual literacy. We asked several questions related to the correct visualization of EEG data.

    a. Did you indicate PSS with uncertainty intervals in your article? It turned out that 40% of respondents did not indicate them. This is very bad because errors are important for interpreting the results. Please DO NOT do this, indicate the error!

    b. What did the uncertainty parameter mean: standard error of the mean or confidence interval? 70% of respondents voted for the first option. This means that different people have different intuitions about statistical metrics, and therefore it is very important to indicate in the graph or in the description of the graph exactly what is depicted on it.

    Developers, pay attention to the default parameters in the visualization functions! Most users won't pay attention to them, so users should be encouraged to indicate on the graph which parameters they are using.

    c. Are you aware of the problem of colormap perception? We are talking about the color bar on the chart. Some diagrams are scientific and some are not.
    There are three criteria for the scientificity of a color scheme: accessibility for colorblind people, linear color change (1, 2, 3, not 1, 3, 4, 8), colors are in hue order (1, 2, 3, not 2, 1 , 3). It seems logical, but the color scheme (jet), also known as the rainbow scheme, is the default in the most popular library for EEG analysis, EEGLAB. Already in 2015 scientists explained why this color scheme is incorrect: it violates all three criteria of scientificity. According to our study, only 40% of participants were aware of this issue.

    I recently attended the MoBI 2024 conference where I noticed that half the speakers used a color scheme jet. In personal conversations, I found that many people could not accurately determine which of the two proposed color schemes was scientific, although they had heard of such a problem.

  7. Visualization practices. We also asked questions about some non-obvious aspects of graph visualization.

    1. How many electrodes do you record and how many analyze? It turned out that only 38% of respondents analyzed all electrodes. The more experienced the user, the more likely he will do this. We have few questions for those who analyze a small group of electrodes, but for those who are in the middle of the graph – don’t you throw out electrodes that are inconvenient for your hypothesis for an hour?

    2. How many milliseconds of the pre-stimulus period are you showing on the graph? The most common response was 250 ms (45%). This begs the question: can anyone methodologically justify this choice?

    3. Polarity. When I first became acquainted with the PSS, I was struck by the fact that for some reason the voltage axis on the graph is inverted: minus is up, and plus is below. Even the Wikipedia page shows such a graph.

    For the first time, epilepsy researchers began to do this. They observed bright negative peaks in the data and decided to flip the coordinate axis upside down for aesthetics. Great idea (not).

    80% of respondents answered that they are in favor of positive polarity (plus at the top). The exception is linguists, among whom the majority are lovers of negative polarity.

    4. What does each topographer in a series of topographers show? 61% answered that each topography shows the average of a time period, 39% – that a moment in time. We repeat: intuitions are different, without notations it’s impossible to figure it out.

8 types of graphs for visualizing PSS.  Made with UnfoldMakie.jl

8 types of graphs for visualizing PSS. Completed with UnfoldMakie.jl

Part 4. Recommendations

We have developed recommendations for users and developers of software for analyzing EEG data.

For users:

  • Label all axes, indicate all units of measurement. Preferably directly on the chart, but it can also be in the description.

  • Be sure to indicate errors (uncertainty) on the graph and their interpretation (CI, SD, etc.).

  • Use scientific color schemes (colorscheme, colormap): with linear and ordered color changes, adapted for colorblind people.

  • Color schemes can be divergent or sequential. Contrast is used when there is an important central value (such as temperature), and sequential is used for continuous variables.

  • For categorical data, use categorical color schemes with contrasting colors.

  • Use positive polarity.

  • For each topography in a topoplot time series, indicate whether it represents a point in time or an average interval. For example,[012–014)showstherangefrom012(including012)to014(excluding014)[012–014)показываетдиапазонот012(включая012)до014(исключая014)

  • In a series of topographers, use color schemes with the same range for each topographer.

  • Visualize the pre-stimulus period that was used for standardization (baseline correction).

For developers:

  • Use intuitive function names.

  • Use scientific color schemes by default.

  • Make it easier for users to indicate uncertainty (error) on a graph.

  • Encourage users to label anything that may have different interpretations.

  • Allow users to flexibly customize their schedule.

  • If users can edit the graph using a GUI, ensure that the graph can be made reproducible

PS If any sociologist of science or inequality has read this article, then here is the idea for the study: the same survey, but simplified and for all countries of the world where there is at least some kind of science. It will be very interesting to see how the answers will differ. The current survey covered mainly “Western countries”. Contact me if you wish!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *