Digital filters for low-latency quantification of brain rhythms in real-time
Objective. The rapidly developing paradigm of closed-loop neuroscience has extensively employed brain rhythms as the signal forming real-time neurofeedback, triggering brain stimulation, or governing stimulus selection. However, the efficacy of brain rhythm contingent paradigms suffers from significant delays related to the process of extraction of oscillatory parameters from broad-band neural signals with conventional methods. To this end, real-time algorithms are needed that would shorten the delay while maintaining an acceptable speed-accuracy trade-off. Approach. Here we evaluated a family of techniques based on the application of the least-squares complex-valued filter (LSCF) design to real-time quantification of brain rhythms. These techniques allow for explicit optimization of the speed-accuracy trade-off when quantifying oscillatory patterns. We used EEG data collected from 10 human participants to systematically compare LSCF approach to the other commonly used algorithms. Each method being evaluated was optimized by scanning through the grid of its hyperparameters using independent data samples. Main results. When applied to the task of estimating oscillatory envelope and phase, the LSCF techniques outperformed in speed and accuracy both conventional Fourier transform and rectification based methods as well as more advanced techniques such as those that exploit autoregressive extrapolation of narrow-band filtered signals. When operating at zero latency, the weighted LSCF approach yielded 75\% accuracy when detecting alpha-activity episodes, as defined by the amplitude crossing of the 95th-percentile threshold. Significance. The LSCF approaches are easily applicable to low-delay quantification of brain rhythms. As such, these methods are useful in a variety of neurofeedback, brain-computer-interface and other experimental paradigms that require rapid monitoring of brain rhythms.