## 1 Introduction
Numerous studies have demonstrated how the non-stationarity of EEG signals can lead to variations in the distribution of data collected in different recording sessions [36; 37; 38; 39]. This non-stationarity can be attributed to several factors, including not only fluctuations in user attention levels of fatigue but also electrode placement [36; 40]. Figure 1: Electrode locations of International 10–20 system for EEG recording (source: Wikipedia). Some solutions proposed in the literature require the labeling of new data before starting the classification process [36; 37; 41]. This requirement limits the applicability of such approaches in real-world contexts, where there may be multiple data that exhibit covariate shifts, and this would uncontrollably increase the number of models that need to be trained each time and thus the waiting time to correctly identify the new coming recorded data. Other approaches have focused on correcting covariate shifts using processed data samples via parallel processes. However, this methodology necessitates a substantial amount of new data and entails a temporal shift between the start of a new recording session and the identification of Covariate Shift [42; 43]. However, in the current literature, the most widely explored approach to addressing covariate shift primarily leans toward anomaly detection. Some studies [36; 37] relied on methods that use moving averages to identify anomalous records, i.e., those subject to covariate shift. These approaches prove effective in scenarios where the recorded trace remains relatively stable, with few anomalous values, compared to the EEG trace used for training. In the context of this work, we instead focus on scenarios where the presence of records with covariate shifts is assumed to be constant throughout the new EEG trace. For example, this might occur when the positioning of the recording headset is significantly different from the previous placement. The primary contribution of this work, on the other hand, centers on the timely detection of the covariate shift caused by the incorrect positioning of the headset at the beginning of the new passive BCI session. In this context, it is crucial to promptly identify covariate shifts to take corrective actions on the data or at least inform the user to fix the headset's position. Furthermore, with the aim of simplifying and making BCI applications more accessible beyond the labs, we seek to minimize model training time and make it compatible with online use, which is desirable for real-context use. This study has a twofold objective. On the one hand, to investigate to what extent variations in the sensor position of a commercial wearable EEG headset could induce a covariate shift in the recorded data, with an eventual decrease in the accuracy and reliability of the passive BCI system for mental workload evaluation. On the other hand, to develop and validate a methodology able to detect the occurrence of such covariate shift phenomenon in a timely manner, with the purpose of alerting the user about the issue, or ideally to automatically correct the shift. Finally, a covariate shift correction function has also been tested, appearing to be able to mitigate the covariate shift effect under certain conditions of use. In the following chapter, we will examine the two datasets used for our analysis. We will elaborate on the methodologies employed for data acquisition, the adopted protocol, and the various configurations used to simulate covariate shifts. The presentation of the Task, Setup, and Experimental Design will be distinct for both the Laboratory and Realistic datasets. Additionally, we will provide an overview of the methods used for signal processing, the Isolation Forest method, and describe the statistical approaches used to validate our analyses. The third chapter will be dedicated to presenting the achieved results, organized by the two datasets and each conducted test (e.g., detection or correction of covariate shift).