## 1 Introduction
Furthermore, functional activities detected by EEG are affected by volume conduction before being recorded in the scalp, leading to correlations between multiple EEG channels that affect competitive performance [17; 18]. Moreover, both between- and within-subject variability pose significant challenges to developing a universal EEG-based pain detection algorithm. Genetic, cognitive, and neurodevelopmental differences contribute to variability in neural responses to pain, making it difficult to generalize across individuals. Research has shown that inter- and intra-individual neural variability significantly affects the accuracy of decoding pain-related EEG signals, complicating the identification of universal neural pain markers [19]. Additionally, genetic variations, such as those related to serotonin regulation, have been linked to differences in pain perception and EEG-based biomarkers, further underscoring the complexity of subject-independent pain assessment [20]. Furthermore, EEG-based functional connectivity analyses have revealed substantial differences in pain-related neural activity in newborns, emphasizing the need for adaptive, personalized models for pain detection [21]. In the specific context of EEG-based pain assessment using Machine Learning (ML), traditional approaches such as Support Vector Machines (SVM), k-Nearest Neighbors (k-NN), Random Forests, and Linear Discriminant Analysis (LDA) have been widely applied [22]. These methods are popular due to their ability to handle high-dimensional data and provide interpretability, which is crucial to understanding the relationship between EEG signals and pain. Additionally, in [23], the authors underscored the potential of EEG and ML models such as SVM, LDA, k-NN, and Common Spatial Patterns (CSP) in pain biomarker research. Moreover, [PERSON]. [24] explored the potential of EEG to detect pain in adolescents, including those with chronic musculoskeletal pain and those without it, by using SVMs and logistic regression models to classify resting and pain conditions based on EEG signal features. Recently, authors in [8] introduce a ML strategy to distinguish between pain states and non-pain by extracting functional connectivity features and employing a combination of an SVM with a Radial Basis Function (RBF) kernel and a decision tree. Similarly, [PERSON]. [25] implemented a decision tree based on average brain maps to classify pain levels. In contrast, [PERSON]. [26] developed a hierarchical SVM classifier to categorize pain intensities. Each node within this classifier utilized a custom subset of features, selected using the sequential forward selection method, with the SVM parameters fine-tuned through Bayesian optimization. However, ML-based strategies rely on handcrafted features and struggles with capturing complex brain activity patterns, often lacking the generalization required for robust EEG-based analysis [27]. Deep learning (DL)-based EEG classification algorithms have demonstrated exceptional potential in overcoming the challenges associated with EEG signal analysis. Among these, convolutional neural networks (CNNs) have emerged as the most effective for feature extraction, as they can efficiently capture both spatial and temporal patterns [28]. Notable CNN architectures widely used for EEG classification include EEGNet, ShallowConvNet, and DeepConvNet, which have shown superior performance in decoding. Beyond CNNs, various DL models have been investigated for EEG analysis. Autoencoders, for example, transform EEG data into a lower-dimensional feature space while reducing noise, enabling the generation of more refined signal representations [29]. Meanwhile, Recurrent Neural Networks (RNNs) leverage the sequential nature of EEG signals, effectively capturing temporal dependencies essential for understanding signal dynamics [30]. Recently, Transformer-based models have gained prominence for their ability to capture long-range dependencies, effectively extracting both global and local features of EEG signals through attention mechanisms [31].