## 1 Introduction  
Pain is an important global health issue; according to the Global Burden of Disease Study, this condition affects approximately 20% of the worldwide population, with low back pain, neck pain, and migraines being the most common causes [1]. Chronic pain not only leads to physical suffering but also contributes to psychological issues like depression and anxiety [2]. Uncontrolled pain has also been linked to increased healthcare utilization, including hospitalizations, emergency department visits, and greater financial burden [3]. Nevertheless, pain is not merely a physical sensation; it also involves emotional and psychological components, making it a complex and multidimensional experience [4]. In particular, chronic pain is an experience that persists beyond the healing period, often without a clear cause. Such prolonged issues can alter how the brain processes information, leading to magnified sensitivity. Hence, it requires comprehensive detection and treatment approaches that address both the physical and psychological aspects [5]. Pain detection and assessment are crucial for effective management, allowing healthcare professionals to understand intensity, nature, and impact [6]. However, pain is subjective; thus, self-reporting is often the most reliable method of assessment by means of tools such as the Numeric Rating Scale (NRS) and Visual Analog Scale (VAS) [7]. Nevertheless, in cases where self-reporting is challenging--such as with young children, older adults with cognitive impairments, or non-verbal patients--observational scales and physiological approaches are not suitable [6]. Significant progress has been made in pain assessment, particularly in patients unable to communicate. However, current clinical methods still predominantly depend on subjective evaluations [7]. These tools are susceptible to external factors such as mood and lack of physiological bases, limiting their accuracy [8]. In contrast, electrical, pressure, and thermal stimulators have been created, as well as PainMatcher, to obtain a more accurate picture of pain. Nevertheless, these methods are invasive as they require the application of painful stimuli to record responses [9]. Since pain perception is deeply influenced by brain activity, as well as psychological factors such as expectations and emotions that shape conscious pain experience, neuroimaging techniques have been extensively studied for brain activity-based pain detection [10]. These techniques are broadly classified into invasive and non-invasive methods. Invasive methods, like Electrocorticography (ECoG) and intracranial Electroencephalography (iEEG), offer high spatial and temporal resolution but involve surgical risks. Magnetic Resonance Imaging (fMRI), Magnetoencephalography (MEG), Near-Infrared Spectroscopy (NIRS), and Electroencephalography (EEG) are some of the non-invasive techniques that are more commonly used because they are safe, cost-effective, and simple to use [11]. EEG, in particular, has gained popularity for studying brain connectivity and identifying dysfunctional areas [12]. Its ability to capture specific brain activity patterns makes it a valuable tool for understanding pain and enhancing applications in neurorehabilitation, including motor imagery and brain-computer interface (BCI) systems [13; 14]. Still, EEG-based pain detection is significantly hindered by inherent challenges, such as high noise levels and volume conduction issues [15]. The inherent noise in scalp-recorded signals significantly obscures the underlying neural activity. Also, EEG signals are less accurate when they are affected by things outside the brain, such as electromagnetic interference from lights, AC power lines, and electronics, and noise from things going on inside the body, such as digestion, skin resistance changes, heart activity, eye movements, muscle movements, and breathing [16].