**5. Conclusions**

Although it is possible to regularize the spatiotemporal LCMV beamformer classifier for ERP detection through other methods, such as by employing feature selection, by adding regularizing penalties to the cost function beamforming problem, or by crafting a cleaner activation pattern, our work focused on estimation methods for spatiotemporal covariance. We introduced a covariance estimator using adaptive shrinkage and an estimator exploiting prior knowledge about the spatiotemporal nature of the EEG signal. We compared these estimators with the original spatiotemporal beamformer and a state-of-the-art method in an off-line P300 detection task. Our results show that the structured estimator performs better when training data are sparsely available and that results can be computed faster and with substantially less memory usage. Since these algorithms are not paradigm-specific, the conclusions can be generalized to other ERP-based BCI settings.

Future work should focus on introducing more robust regularization strategies using prior knowledge, such as shrinking the spatial covariance to a population mean or a previously known matrix based on sensor geometry or characterizing the temporal covariance as a wavelet or autoregressive model. More accurate results could be obtained by expressing the covariance as the sum of multiple Kronecker products to account for spatial variation in temporal covariance. It could also be interesting to explore the impact of covariance regularization on transfer learning of the STBF between subjects to alleviate calibration entirely. Finally, it could be insightful to evaluate the proposed algorithms in a real-world on-line BCI setting.

**Author Contributions:** Conceptualization, A.V.D.K.; methodology, A.V.D.K., A.L., B.W. and M.M.V.H.; software, A.V.D.K., validation, A.V.D.K.; formal analysis, A.V.D.K. and B.W.; investigation, A.V.D.K. and B.W.; resources, M.M.V.H. and B.W.; data curation, A.V.D.K.; writing—original draft preparation, A.V.D.K.; writing—review and editing, A.V.D.K., A.L., B.W. and M.M.V.H.; visualization, A.V.D.K.; supervision, M.M.V.H.; project administration, A.V.D.K. and M.M.V.H.; funding acquisition, M.M.V.H. All authors have read and agreed to the published version of the manuscript.

**Funding:** A.V.D.K. is supported by the special research fund of the KU Leuven (GPUDL/20/031). A.L. is supported by the Belgian Fund for Scientific Research—Flanders (1SC3419N). M.M.V.H. is supported by research grants received from the European Union's Horizon 2020 research and innovation programme under grant agreement No. 857375, the special research fund of the KU Leuven (C24/18/098), the Belgian Fund for Scientific Research—Flanders (G0A4118N, G0A4321N, G0C1522N), and the Hercules Foundation (AKUL 043).

**Institutional Review Board Statement:** The study was conducted according to the guidelines of the Declaration of Helsinki, and approved by the Ethics Committee of KU Leuven's university hospital (UZ Leuven) (S62547 approved 11 June 2019).

**Informed Consent Statement:** Informed consent was obtained from all subjects involved in the study.

**Data Availability Statement:** No new data were created or analyzed in this study. Data sharing is not applicable to this article. Source code is available at https://github.com/kul-compneuro/stbf-erp (accessed 7 March 2022).

**Acknowledgments:** The authors acknowledge François Cabestaing and Hakim Si-Mohammed for their valuable input in the development of this article.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or the interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

#### **Appendix A**

**Figure A1.** Accuracy of the different classifiers for all 21 subjects relative to the number of blocks available for training. One block consists of 135 epochs and corresponds to 27 s of stimulation. Accuracies are shown for the evaluation settings, averaging over different numbers of trials, ranging from 1 to 15.
