Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2023 Jun:273:120092.
doi: 10.1016/j.neuroimage.2023.120092. Epub 2023 Apr 5.

EEG-LLAMAS: A low-latency neurofeedback platform for artifact reduction in EEG-fMRI

Affiliations

EEG-LLAMAS: A low-latency neurofeedback platform for artifact reduction in EEG-fMRI

Joshua Levitt et al. Neuroimage. 2023 Jun.

Abstract

Simultaneous EEG-fMRI is a powerful multimodal technique for imaging the brain, but its use in neurofeedback experiments has been limited by EEG noise caused by the MRI environment. Neurofeedback studies typically require analysis of EEG in real time, but EEG acquired inside the scanner is heavily contaminated with ballistocardiogram (BCG) artifact, a high-amplitude artifact locked to the cardiac cycle. Although techniques for removing BCG artifacts do exist, they are either not suited to real-time, low-latency applications, such as neurofeedback, or have limited efficacy. We propose and validate a new open-source artifact removal software called EEG-LLAMAS (Low Latency Artifact Mitigation Acquisition Software), which adapts and advances existing artifact removal techniques for low-latency experiments. We first used simulations to validate LLAMAS in data with known ground truth. We found that LLAMAS performed better than the best publicly-available real-time BCG removal technique, optimal basis sets (OBS), in terms of its ability to recover EEG waveforms, power spectra, and slow wave phase. To determine whether LLAMAS would be effective in practice, we then used it to conduct real-time EEG-fMRI recordings in healthy adults, using a steady state visual evoked potential (SSVEP) task. We found that LLAMAS was able to recover the SSVEP in real time, and recovered the power spectra collected outside the scanner better than OBS. We also measured the latency of LLAMAS during live recordings, and found that it introduced a lag of less than 50 ms on average. The low latency of LLAMAS, coupled with its improved artifact reduction, can thus be effectively used for EEG-fMRI neurofeedback. A limitation of the method is its use of a reference layer, a piece of EEG equipment which is not commercially available, but can be assembled in-house. This platform enables closed-loop experiments which previously would have been prohibitively difficult, such as those that target short-duration EEG events, and is shared openly with the neuroscience community.

Keywords: Closed-loop; Denoising; Eeg-fmri; Real-time; Toolbox.

PubMed Disclaimer

Conflict of interest statement

Declaration of Competing Interest The authors have no conflicts of interest to report.

Figures

Fig. 1.
Fig. 1.
Schematic representation of LLAMAS and experimental protocol. A) Closed-loop equipment configuration for LLAMAS. EEG signals are relayed from the hardware to the computer running LLAMAS via an intermediate computer running LabStreamingLayer. The LLAMAS computer controls the stimulus delivered to the subject via PsychToolbox. B) The signal processing pipeline. Raw signals were received from LabStreamingLayer, and gradient artifact correction was performed online. Then an anti-aliasing lowpass FIR filter was applied, and the signals were downsampled from 5000 Hz to 200 Hz. Finally, LLAMAS was used to remove BCG artifact online, and RLAS and OBS were used offline. C) The SSVEP stimulus block design: subjects were shown a visual stimulus that alternated between 16s of gray background, and 16s of a flickering checkerboard, to induce an SSVEP. D) The experimental protocol. Outside the scanner, baseline eyes open/eyes closed data was collected, followed by four SSVEP runs, at four frequencies in randomized order. This was repeated inside the scanner, with a 12 Hz SSVEP calibration run preceding the four experimental SSVEP runs.
Fig. 2.
Fig. 2.
LLAMAS improves recovery of ground truth EEG in a simulated dataset. A-C) Schematic representation of how the simulated dataset was created. An EEG channel collected outside the scanner was added to a reference (noise) channel recorded inside the scanner to create a simulated signal with known ground truth. The remaining reference channels and the simulated signal were then used to perform BCG artifact removal. D) Example signals showing the ground truth signal, the uncorrected simulated signal, and the three BCG removal methods. E) Root mean squared error (RMSE) of the waveform relative to the ground truth across all channels (n = 15 simulated recordings). Circles and gray lines show the means of individual subjects; black line shows the mean, error bars show SEM, and red lines show significance (p<0.05) using paired t-test with Bonferroni correction. F) Slow wave phase error between the ground truth signals and the corrected and uncorrected signals across all channels (n = 15). Markers and lines are as in E). G) PSD of ground truth, uncorrected, and corrected signals at channel Oz. Error bars show SEM (n = 15). H) The error between the ground truth PSDs and the corrected and uncorrected PSDs across all channels. Markers and lines are as in E).
Fig. 3.
Fig. 3.
LLAMAS qualitatively improves noise reduction compared to OBS. A) An EEG signal from channel Oz collected outside the scanner. B) A raw signal from the same channel and subject, collected inside the scanner. C) The same signal from B), after gradient artifact correction, lowpass filtering, and downsampling have been applied. D) The same signal after online LLAMAS artifact removal. E) The same signal after offline RLAS. F) The same signal after offline OBS. G-L) Spectrograms of the signals from A-F). Black bars show timing of 12 Hz visual stimulus.
Fig. 4.
Fig. 4.
Real-time EEG signals acquired with LLAMAS show improved signal quality. A-E) Mean spectrograms from uncorrected, corrected, and outside-the-scanner signals at channel Oz (n = 10 subjects). Black bars indicate presentation of the 12 Hz visual stimulus. F-J) Mean PSDs from uncorrected, corrected, and outside-the-scanner signals at channel Oz during stimulus-on (blue) and stimulus-off (orange) epochs (n = 10). K) Magnitude of the power difference between the stim-on and stim-off epochs at the flicker frequency in channel Oz, across all four flicker frequencies. Circles and gray lines show individual subjects; black line shows the mean, and red lines above show significance (p<0.05) using repeated measures ANOVA and post-hoc paired t-tests with Bonferroni correction. L) Error in power spectral density relative to the outside-the-scanner signals across all four flicker frequencies during stim-on epochs. Lines and markers are as in K). M) Same as K), but for stim-off epochs.
Fig. 5.
Fig. 5.
LLAMAS provides sub-100 ms latency. A) Histogram of intervals between sample receipt and the completion of sample processing during a 30-minute LLAMAS recording using minimally demanding visual settings (no graphical display of signals) B) Same latency histogram when using intermediate visual settings (1 frame per second) C) Same latency histogram when using with high visual settings (10 frames per second).

Similar articles

Cited by

References

    1. Abdelnour AF, Huppert T, 2009. Real-time imaging of human brain function by near-infrared spectroscopy using an adaptive general linear model. Neuroimage 46, 133–143. doi:10.1016/j.neuroimage.2009.01.033. - DOI - PMC - PubMed
    1. Abreu R, Jorge J, Figueiredo P, Mulert C, Lemieux L, 2022. EEG quality: the pulse artifact. In: EEG - FMRI: Physiological Basis, Technique, and Applications. Springer International Publishing, Cham, pp. 167–188. doi:10.1007/978-3-031-07121-8_8. - DOI
    1. Abreu R, Leite M, Jorge J, Grouiller F, van der Zwaag W, Leal A, Figueiredo P, 2016. Ballistocardiogram artifact correction taking into account physiological signal preservation in simultaneous EEG-fMRI. Neuroimage 135, 45–63. doi:10.1016/j.neuroimage.2016.03.034. - DOI - PubMed
    1. Agrawal U, Brown EN, Lewis LD, 2020. Model-based physiological noise removal in fast fMRI. Neuroimage 205, 116231. doi:10.1016/j.neuroimage.2019.116231. - DOI - PMC - PubMed
    1. Allen PJ, Josephs O, Turner R, 2000. A method for removing imaging artifact from continuous EEG recorded during functional MRI. Neuroimage 12, 230–239. doi:10.1006/nimg.2000.0599. - DOI - PubMed

Publication types