Brain Waves Characteristics in Individuals with Obsessive-Compulsive Disorder: A Preliminary Study

rosmina@ukm.edu.my Abstract — Obsessive-Compulsive Disorder (OCD) is a mental illness caus-ing patients to suffer from recurring undesirable thoughts (obsessions) conduct-ing to do affairs repetitively (compulsions). Brain signals recorded by Electro-encephalogram (EEG) can be analyzed in order to present a diagnostic procedure considering the localization approach. In this study, the signals acquired by EEG have been recorded from three groups; two case groups; patients with severe obsessive symptoms and patients with severe compulsive symptoms, and one healthy control group. Brain signal processing techniques have been applied on the signals emitted from frontal and parieto-occipital regions to discover the features leading to the best discrimination between case groups and healthy controls. In this regard, after preprocessing, the features of time and frequency domains presenting the significant meaningful relation were nominated for classification by linear discrimination analysis (LDA). Although the parieto-occipital region performed better in the diagnosis for both obsessive and compulsive groups, the features gained from the frontal cortex resulted in better discrimination for only the compulsive group. In addition, time domain features had a more significant influence in diagnosis rather than frequency domain for both case groups. The study presented particular characteristics of brain signals in two dimensions of OCD in specific brain regions leading to more accurate presurgical assessments in the studies between the affected brain regions and


Introduction
Obsessive compulsive disorder (OCD) is a mental health condition accompanied by the presence of obsessions such as intrusive and unwanted thoughts, and compulsions such as repetitive and intentional rituals [1]. The disorder is associated with significant disruption in functioning across multiple settings including work, home, and social life [2]. The disorder is ranked by the World Health organization (WHO) as one of the ten most handicapping conditions leading to losing income and decreased quality of life [3]. Furthermore, it is the fourth most common mental disorder after depression, alcohol/substance misuse, and social phobia [4]. Furthermore, the prevalence of OCD lifetime is estimated 1.3% to 1.6 times to be more likely to experience for women comparing to men [5].
OCD is diagnosed using various types of methods such as diagnostic interviews, clinician-rated instruments, family-report questionnaires, and self-report questionnaires [6]. While the administration of relevant diagnostic modules can assist with diagnostic clarification, these interviews typically increase patient and clinician burden as they require extensive training and are time-consuming [7] and [8]. Moreover, although clinician-rated instruments provide supplementary information [9], the usage of them is costly and establishes additional requirements on clinicians' training and consultation times [10]. Besides, to improve prognosis and achieve better outcomes, early diagnosis leading to appropriate treatment is essential [9]. Yale-Brown Obsessive-Compulsive Scale (YBOCS), is one of the most common questionnaires for OCD identifies different dimensions of OCD and divides it in two main categories; 1) obsessive criteria with symptoms such as fear, religious, unwanted thoughts and etc. 2) compulsive criteria with obsessive thinking, leading, checking, counting, washing, and etc. [11].
EEG is a noninvasive technique illustrating a consecutive result of neural activity which is vastly applied in the diagnosis step of a medical procedures. Tan et. al in 2019 recorded EEG signals of patients with OCD in resting time condition; with both close and open eyes, discovered abnormal attributes in EEG signals. The result was associated with an altered topological structure during resting time, in alpha and beta bands [12]. In another study by Kamaradova et al. investigated 19 OCD patients and 15 healthy controls during resting condition and showed an increase of delta activity in the frontal, limbic, and temporal cortex in OCD patients. In addition, the results approved general anxiety in OCD subjects with increased Delta, Theta, and Alpha-1 in the parietal, temporal, occipital, frontal, limbic lobes, and sub-lobal areas; in the temporal, parietal and occipital lobes; and in the parietal lobe, respectively. Furthermore, exposure to the autobiographic scenario led to an elevated activity of Beta-3 in OCD subjects [9]. Akan et al., found that the concentration of the frontal region demonstrated a growth of theta and alpha bands in OCD subjects compared to healthy controls [13]. Investigation in the aspect of differences between hemispheres, research in 2017, studied on a large number of OCD subjects (n = 113) and focused on OCD symptoms and frontal asymmetry. Although there was no specific difference in alpha asymmetry between the case and control groups was reported, an increased in the left frontal activity was observed [14]. Smith et al., measured alpha asymmetry and the power-adjusted metric of alpha power in OCD subjects during resting condition synched with the OCD symptoms [15]. Frontal hypoactivity as a possible marker of OCD was claimed by Wong et al. in 2015 based on the resulting decreased of the overall activity in the frontal region in severe OCD subjects [16]. Frontal and parietal lobes were investigated by Ischebeck et al. via quantifying the frequency bands and their results showed altered asymmetry in the left hemisphere with power of lower Alpha (8)(9)(10) in the frontal region, no significant changes were discovered neither in the upper alpha, theta and beta frequency bands nor in the parietal lobe [17].
In the present paper, EEG signals obtained from specific dimensions of OCD were analyzed to speed up the process of clinical diagnosis and to discover the brain possible involved regions associated with OCD. In this regard, patients with obsessive symptoms and patients with compulsive symptoms were considered as two case groups. Healthy control groups were considered for comparison. Brain signal processing techniques were applied to obtain the significant signal differentiation in time and frequency domain. Inaccessibility to OCD dataset with pure obsessive and pure compulsive symptoms led to investigate on limited number of subjects presenting as preliminary study.
In this paper, after introduction in the first section, materials and methods will be described in section two. In this section, EEG and brain signal processing techniques, LDA in mathematical point of view, the manner of OCD diagnosis, the details of dataset and at the end the proposed approach will be described. The third section contains results and discussion where conclusion refers to section four. Acknowledgement and references are introduced at the end of the paper.

2
Methods and materials

EEG and brain signal processing
Brain wave is a signal that is emitted electronically due to neural activities. The signals are calculated based on the potential difference in the millivolt scale between two specific points on the head surface. These points are determined according to international standards such as 10-10 system and 10-20 system and introduced under various montages [18]. EEG is a noninvasive device which monitors the potential differences in the microvolt scale by amplifying the signals. EEG signal can be analyzed under two main domains; the time and frequency domains. The frequencies of brain signals are divided in five bandwidths; Delta (1-4 Hz), Theta (4-8 Hz), Alpha (8-12 Hz), Beta (12)(13)(14)(15)(16)(17)(18)(19)(20)(21)(22)(23)(24)(25)(26)(27)(28)(29)(30) and Gamma (>30 Hz). Depending on what knowledge of signal behavior is under investigation, the algorithms and methods in each step of signal processing are different. The usage of this technique in the biomedical field aims to enhance the speed and performance in different steps of medical procedures such as diagnosis, treatment, and prediction [19]- [23]. The general steps of brain signal processing based on EEG is summarized in five steps includes acquisition, preprocessing, feature extraction, feature dimension reduction, and classification [24].

Linear discriminant analysis (LDA)
LDA emphasizes on minimizing the variance of within classes simultaneously the variance of between classes is the essential part of it. Equation (1) shows that is the array of inputs, belongs to real numbers with the dimensions of × ; where is the number of classes and p is the number of elements in each class. (1) According to the equation (2) all elements of each class are subtracted from the mean of the same class in order to be added together presenting as .
The amount of is calculated for each class individually. The sum of all will result referring to equation (3).
In equation (4), as distance calculator is measured to be maximized.
where the mean of each class ( ); as indicator of that class, is subtracted from the mean of all classes to result the distance between classes. As the number of elements affects the result, as the number of elements in each corresponding class multiply to the subtraction term.
Referring to term (5), from data domain is transferred to feature domain ( ) through a linear unitary matrix rotating data domain to the direction which is more suitable for making independency among data.
This term leads LDA to maximize the fraction (6) which is trying to solve generalized eigen problem.
According to the term and fraction above, the transfer equation from data to feature domain with a glance to dimension reduction is quantified by equation (7).
where belongs to the matrix presenting eigenvectors. The values are ordered based on the level of discrimination. Thus, selecting one or more dimension (1 to ) aiming the best discrimination results dimension reduction in addition to classification. Equation (8) illustrates the target function of LDA.
where is an independent value achieved by multiplying data from data domain to eigenvectors with less selected dimensions (a). The fittest decision boundaries resulted by LDA determines the thresholds in feature domain.

Brain waves characteristics in OCD
In this study after pre-processing with artifact removal, de-noising and montage calculation, specific features in the frequency and time domain were extracted from each segment of EEG signals from the compulsive group, obsessive group and control groups, separately. The reliable features nominated by significant t-test were transferred to LDA for discrimination between 1) healthy control versus compulsive group and 2) healthy control versus obsessive group. In this study, LDA was used only for its ability to classify signals of certain characteristic. Therefore, the study aims to obtain the feature(s) that can lead to the best discrimination. Figure 1 illustrates the general steps of the proposed approach. Dataset. In the present paper, three subjects with compulsive symptoms, three subjects with obsessive symptoms and three healthy subjects (age range: 19-45 years, mean: 29 years, SD: 8.4 years) were included in the study. Informed written consent was obtained from all subjects. The OCD patients were selected by a psychiatrist based on structured clinical interview according to the diagnostic criteria of Yale-Brown questionnaire, from Tolou subspecialty clinic, Rasht, Iran in 2020-2021. The severity resulted by questionnaire was required for study inclusion. Although patients with obsessive and compulsive criteria cannot be divided purely, the inclusion criteria require single case with obsessive symptoms and not with compulsive symptoms and vice versa. The exclusion criteria are defined as pregnancy and consuming anticonvulsant medication in the past six months. Table 1 demonstrates the details of patients and summary of the clinical sheet of each case. The table categorized the two main groups of OCD; obsessive and compulsive with the sub-branches. With a countable ignorance regarding aggressive symptom; which is in common in both groups, obsessive group can be divided from compulsive group.
The EEG signals were recorded during resting time with open eyes from the electrodes located on anterior longitudinal; Fp1, Fp2, F3, F4, P3, P4, O1 and O2 referring to Cz. In this regard, ten seconds of EEG signals with 500 Hz of sample rate for both case and control groups were considered. According to the significant difference between frontal cortex versus area of parieto-occipital in the aspect of activity reported by medical society, the investigation was done on the left hemisphere and for Fp1-F3 and P3-O1 [14], [15], [16] and [17]. Figure 2 shows the difference between one second of the raw signals emitted from Fp1-F3 and P3-O1 channels in obsessive group, compulsive group and healthy control. The figure displays a remarkable difference in parietal region specifically in compulsive group.  Pre-processing. In pre-processing step, the artifacts caused by subconscious activities such as muscular movement, blinking and swallowing were removed manually from raw EEG signals resulting ten seconds of no-artifact signals. Low pass filter (LPF) and high pass filter (HPF) as well as notch filter were applied on the recorded EEG signals with cutoff frequencies at 30 Hz and 0.5 Hz and 50 Hz, respectively. In order to eliminate the white Gaussian noise and power line noise, signals were decomposed by discrete wavelet transform (DWT) using Symlet and Coiflet families; where Sym7 and Coif3 were selected [25]. The reconstructed approximation obtained from two levels of decomposition; each level for each wavelet, was considered towards channel-preparation in anterior longitudinal montage. The potential difference recorded by Fp1 referred to Cz was subtracted from the same item of F3-Cz to compose the first channel of anterior longitudinal montage Fp1-F3. Simultaneously, the calculation was applied for the electrodes P3 and O1 producing P3-O1 channel. Eventually, after segmentation procedure; ten segments were obtained for each case where each segment contains EEG data of one second (500 samples). Thus, each case has thirty segments (from three subjects) for each channel to be transferred to the next step of signal processing. Figure 3 presents the process of montaging and segmentation.

Fig. 3. Segmentation of two calculated channels in longitudinal montage
Feature extraction. Describing a signal can be done in various aspects such as investigating in frequency domain and time domain. The brain signal can be characterized based on its potential difference, frequency, location, morphology, polarity, state, reactivity, symmetry and artifact. In the present study, EEG signals were analyzed in time and frequency domains to identify the significant features of the abovementioned characteristics.
─ Frequency domain. In the frequency domain, fast Fourier transform (FFT) was applied on each segment of each group. Then, the average of magnitude for five standard brainwaves bandwidth; Delta, Theta, Alpha, Beta and Gamma, was calculated. ─ Time domain. Statistical analysis was performed on the segments of channels; Fp1-F3 and P3-O1 obtained from the case groups and control group in order to present the features in the time domain. The time domain features, which were investigated for potential difference, were performed by calculating the average, median, standard deviation (STD), root mean square (RMS), peak to RMS to present the largest absolute value in signal to RMS value and root sum of squares (RSS) to indicate signal tolerance. Minimum and maximum calculation for measuring the distance between peak to peak of signal (PtoP) to describe EEG signals in the aspect of polarity. Kurtosis and skewness were measured to attribute signal symmetrically. Altogether, there were 11 features of the time domain analyzed.
Feature selection and classification. Combining the features from both frequency and time domains, sixteen features were exported from each segment of the study groups and were normalized. It was necessary to check the reliability of each of the features to exhibit the significant presence in each case group versus control group. In this regard, all features achieved by the segments of compulsive group and the same features obtained from control segments; both from Fp1-F3 and P3-O1, were individually considered as the inputs of t-test. The same process was done for obsessive group segments and the segment of control group. Significant features were considered for t-test p-value < 0.05 and the features were nominated for the next step of brain signal analysis. Although these features confirmed by t-test were statistically significant, they were not adequate to discriminate case from control efficiently. Linear discriminant analysis (LDA) was selected as a strong classifier to present the fea-tures with the ability of making a high discrimination between case and control groups leading to the best condition for diagnosis.

3
Result and discussion EEG signals obtained from obsessive group, compulsive group and healthy control were investigated in the frequency and time domains. Figure 4 presents the magnitude of each frequency (0-30 Hz for better presentation) in one segment of all groups for the frontal and parieto-occipital regions. As it is obvious in Figure 4a, the average magnitude of Delta band in the frontal region differentiates significantly between the compulsive group and healthy control. Whilst the same frequency range for the obsessive group versus healthy control does not show big difference as the compulsive group. Similarly in Figure 4b, the difference between compulsive group and healthy control in parieto-occipital region is observed but approximately in all frequency bandwidths specially in Beta range. The brain waves exhibit low magnitude of frequency in the healthy control and obsessive groups in contrast to the compulsive group. This means that frequency domain features are not able to present significant discrimination between obsessive group and healthy control. FFT and statistical analysis in frequency and time domains were done in all segments of signals. Five features of the frequency band magnitude average for the frequency domain and eleven features of time domain obtained from obsessive group, compulsive group and healthy control were considered as the inputs of t-test to confirm the features significant different. Table 2 and Table 3 depict the result of t-test focused on the amount of p-value for the features in the frequency domain and time domain, respectively. Significant features are indicated by shaded cells. From Table 2, only Beta wave is the significant frequency domain feature that are different between the case and control group (both compressive and obsessive subjects). However, from Table 3, only five of the 11 time domain features comprising the STD, Min, max, peak to peak, RMS and RSS are significant features for both frontal and parietooccipital regions of the compulsive subjects but these five features are only significant for the parieto-occipital regions for the obsessive subjects.  These significant features were chosen for the next step of brain signal processing. The nominated features transferred from data domain to feature domain using LDA. Figure 5 demonstrates the ability of one frequency domain feature, Beta wave ( Figure  5a) and one time domain feature, the RSS (Figure 5b) in parieto-occipital region resulted by LDA for all segments of all case and control groups. As it is obvious, the discrimination between healthy control and compulsive group is significant in all subjects in both features. Frequency feature was not able to present proper discrimination in obsessive versus healthy control while time domain features could present proper discrimination between obsessive and healthy control particularly for subjects 2 and 3.  Fig. 5. The amount of (a) Beta waves and (b) RSS in feature domain calculated by LDA presenting the ability of discrimination between compulsive group and healthy control, and obsessive group and healthy control in parieto-occipital region. X axis represents sample, y axis represents the amount of feature in feature domain

Validity of proposed approach
The quantification of each feature ability for discrimination has been done based on discrimination sensitivity, specificity and accuracy. The sensitivity presents the percentage of detecting patient while specificity emphasis on the ability of detecting healthy control. The accuracy is percentage of total detection for both patient and healthy controls for the study population. The equations (9), (10) and (11) show the equations for the validation factors, respectively.
where TP is true positive presenting patients that were correctly diagnosed among the patients group. TN is true negative indicating the number of healthy subjects that were correctly diagnosed among healthy group. FN is false negative showing the number of subjects wrongly diagnosed as healthy among the patients group. FP is false positive presenting the number of subjects wrongly diagnosed as patients among the healthy group. Table 4 and 5 present the percentage of validity features obtained by LDA leading to select the best features in discriminiantion procedure. The cells with the sensitivity more than 90% and specificity more than 60% are candidated for the best features in discrimination process. Table 4 shows that Alpha frequency band was the frequency domain feature resulted the best discrimination between healthy control and both obsessive group and compulsive group in parieto-occipital region. Additionally, it is shown that besides Beta, Alpha frequency is another frequency domain feature that is having remarkable difference between healthy control and compulsive groups. Table  5 displays that the majority of nominated time features were able to discriminate control group from both case groups properly. Accurately, it can be found that the diagnosis of obsessive group and compulsive group can be done based on selected frequency and time domain features but in parieto-occipital region.  Briefly, the OCD patients with compulsive symptoms could be realized from healthy control focusing on parieto-occipital and limitedly frontal cortex. Conversely, the obsessive group was able to be diagnosed only based on parieto-occipital region. This result would is acceptable and confirmed as [26] reported that OCD is originated from cingulate gyrus [27], which explained the connection between cingulate gyrus to parietal lobe and anterior occipital region.
Features were selected due to presenting the best discrimination in recognizing case groups from healthy control in frontal and parieto-occipital regions. Table 6 shows the thresholds of discrimination resulted by classifier for each feature in each area for particular dimension of OCD. It shows that the result of LDA over 0.1148 in the aspect of standard deviation belongs to compulsive group while it covers healthy control group lower than the same amount. The limitation of this study was the limited number of OCD patients suffering from exclusively each OCD sub-branch; obsession or compulsion, enforced to do the analysis on a limited EEG data. For further investigation, concentrating on significant number of EEG recordings with few correlations in symptoms considering medical profiles will lead to reliability and extended discussion in the aspect of medical sciences.

Conclusion
This study was performed with focus on realizing obsessive group and compulsive group in spite of the strong correlation between these types of behavioral disorder. Conceptually the study was conducted to discover the differentiations between each dimension compared to healthy control. In this regard, patients with obsessive symptoms without compulsive symptoms, and the subjects with compulsive symptoms without obsessive symptoms were indicated as obsessive group and compulsive group, respectively. EEG signals obtained from the frontal and parieto-occipital regions, in both of the study groups were compared to the healthy control group. Sixteen extracted EEG signal features from both the frequency and time domains were checked by t-test for significant differences between case and healthy control group. The features in data domain which resulted in a meaningful relation between relevant groups were separately transferred to feature domain using LDA. It was discovered that frontal region was proper to diagnose only compulsive group using time domain features, while both case groups were recognized from healthy control mostly referring to parieto-occipital region using both time and frequency domains features. It can be concluded that parieto-occipital region can be considered as elite region to diagnose both these case groups from healthy control. The result from this study provides the basis of investigation condition between behavior and intracranial state leading to better cognition of neuronal activity. The advantage of this study is utilization of signal processing by computing can eliminate human mistakes and speed up the diagnostic procedure. Moreover, localizing the responsible brain region for each dimension of OCD is an important presurgical assessment following analysis of the relation between the affected brain regions and behavioral issues. Nevertheless, further studies are required to answer the question if the significant features discovered from this study are adequate for other brain regions to describe the compulsive and obsessive disorders.