## 1 Introduction  
Disabled patients who cannot communicate using their muscles benefit from the brain-computer interfaces (BCI) that control external devices by directly reading the electrical signals generated by the human brain [1]. For monitoring brain activity, BCIs typically use magnetoencephalography, electrocorticography, and functional magnetic resonance imaging, as well as electroencephalogram (EEG) [2], which is widely used due to its low cost, non-invasiveness, availability, and high temporal resolution [3]. Among the brain activities that can be recorded with EEG [4], P300 is a positive event-related potential (ERP) that occurs when the brain is stimulated by an unexpected stimulus [5]. The P300 is characterized by latency, which depends on the duration of the stimulus evaluation [6, 7], and by amplitude, which seems to reflect the amount of information transmitted by the stimulus. P300 occurs in the brain approximately 300 milliseconds after a person is presented with a rare and significant stimulus [6, 7]. It is typically elicited in the parietal and central regions of the brain, with the largest amplitude in the parietal cortex. P300-based ERP has been extensively researched and is widely considered to be a reliable and objective method for studying cognitive processes underlying various behaviors. In the medical sciences, the applications of P300 include the diagnosis of subclinical cognitive disorders. Thus, clinical practice in neurology shows that the latency and amplitude of P300 significantly degrade in patients with thyroid dysfunction, making this ERP in association with magnetic resonance spectroscopy suitable for diagnosis [8]. In addition,ERP, including P300, can be used to evaluate the influence of stress and emotions on the evolution of multiple sclerosis [9]. Besides its application in neurology, P300 is often used in BCI research as a signal to detect the user's intention or decision-making process. This is completed by presenting a series of stimuli to the subjects, whose brain activity is monitored, to determine if they are focusing on a specific stimulus that corresponds to a particular command or action. Thus, due to the aforementioned reasons and being user-friendly, P300-based tasks are typically used in BCI that helps people with neuro-motor disabilities. The Matrix Speller is the first BCI based on the P300, which can transmit 7.8 characters per minute [10,11]. Following its introduction, the performance of P300-based BCI was significantly improved using different paradigms and powerful algorithms [12,13]. This speller uses a 6 x 6 matrix of letters that are highlighted in a sequence while the subjects focus their attention on the letter they want to communicate. However, ERP signals are subject-specific and vary according to the individual, meaning samples from different subjects will not be similar. Cross-subject variability refers to the differences observed in the brain activity of different individuals, which can complicate the use of BCIs. So, each subject typically needs to undergo a personalized calibration session, which can be a laborious and infeasible process when aiming for real-time BCI implementation [14,15]. To tackle this problem, the transfer learning (TL) concept has been introduced, whereby pre-trained models or knowledge from other subjects (known as the source dataset) are utilized to improve the performance of a new subject (referred to as the target dataset) [16]. This approach can be helpful when limited data is available for a new subject (target domain) [17]. Various TL methods have been developed, such as domain adaptation and subspace learning [14]. Domain adaptation is the process of adapting a model trained on a source dataset to perform well on a target dataset. One common approach to domain adaptation is fine-tuning, which involves taking a pre-trained model and training it further on a target dataset [18].