Using machine‐learning approach to distinguish patients with methamphetamine dependence from healthy subjects in a virtual reality environment

Abstract Background The aim of this study was to evaluate whether machine learning (ML) can be used to distinguish patients with methamphetamine dependence from healthy controls by using their surface electroencephalography (EEG) and galvanic skin response (GSR) in a drug‐simulated virtual reality (VR) environment. Methods A total of 333 participants with methamphetamine (METH) dependence and 332 healthy control subjects were recruited between January 2018 and January 2019. EEG (five electrodes) and GSR signals were collected under four VR environments: one neutral scenario and three METH‐simulated scenarios. Three ML classification techniques were evaluated: random forest (RF), support vector machine (SVM), and logistic regression (LR). Results The MANOVA showed no interaction effects among the two subject groups and the 4 VR scenarios. Taking patient groups as the main effect, the METH user group had significantly lower GSR, lower EEG power in delta (p < .001), and alpha bands (p < .001) than healthy subjects. The EEG power of beta band (p < .001) and gamma band (p < .001) was significantly higher in METH group than the control group. Taking the VR scenarios (Neutral versus METH‐VR) as the main effects, the GSR, EEG power in delta, theta, and alpha bands in neutral scenario were significantly higher than in the METH‐VR scenario (p < .001). The LR algorithm showed the highest specificity and sensitivity in distinguishing methamphetamine‐dependent patients from healthy controls. Conclusion The study shows the potential of using machine learning to distinguish methamphetamine‐dependent patients from healthy subjects by using EEG and GSR data. The LR algorithm shows the best performance comparing with SVM and RF algorithm.


| INTRODUC TI ON
Substance dependence brings serious problems to the society, including disease, crime, accidents, domestic violence, homelessness, etc. One in four deaths and almost 80% of domestic violence crimes were caused by alcohol abuse, smoking, and illegal drug use (Horgan & Strickler, 2001). Among all types of drugs, methamphetamine (METH) is considered as one of the biggest threats. According to the 2017 China Drug Use Report (Commission O of CNNC, 2017), an estimated 2.55 million Chinese people had used drugs illegally, 80 percent of which were male (Cai, Gao, & Wang, 2017). Substance dependence disorders are chronically relapsing disorders and a chronic health condition. Cognitive processing of drug-related cues (e.g., glass pipe, medical tubing) and the subsequent dysregulation of behavior play a critical role in the relapse. Therefore, it is important to identify the neural correlate pattern of drug-related cues in the patients with substance dependence. It has been proved that the brain of patients with substance dependence disorders presents altered structure and neurophysiological abnormalities (Cai et al., 2017;Coullaut-Valera et al., 2014;Prichep et al., 1999;Turnip et al., 2017).
Electroencephalography (EEG) is one of the available tools for examining the effects of drugs on brain function. Some investigations indicated that drug-dependent individuals had more significant responses to drug-related stimuli than control group by examining EEG responses evoked by cocaine-relevant and cocaine-irrelevant stimuli (Van De Laar, Licht, Franken, & Hendriks, 2004); some researchers found that the high craving group showed a larger positive slow wave compared to the low craving group following the presentation of cocaine-related pictures (Franken, Hulstijn, Stam, Hendriks, & Van Den Brink, 2004). With the development of modern computational techniques, machine learning (ML) has been applied in various fields, which mainly serves two purposes: classifying and predicting and are divided into supervised and unsupervised algorithms (Sakr et al., 2017). Distinguishing normal and patients with methamphetamine dependence through EEG using ML has the advantage of wide availability, relatively low-cost, easy implementation, and noninvasiveness. In the present study, we evaluated and compared the accuracy of distinguishing patients with methamphetamine dependence and healthy control subjects of three popular supervised ML algorithms based on their EEG and galvanic skin response (GSR) data.
In particular, we conducted experiments under a virtual reality (VR) environment as suggested by Culbertson et al. (2010). Three ML techniques were compared: support vector machine (SVM), random forest (RF), and logistic regression (LR).

| Participants
Three hundred and thirty-three participants with methamphetamine (METH) dependence were recruited between January 2018 and January 2019 admitted to Jidong drug rehabilitation center located in Shandong, China. This rehabilitation institution is for males only, which accommodates over 1,000 drug users and patients inside the institution stay completely abstinent from drugs. The center provides medical treatment for physical problems; however, no medical or psychological interventions that target drug abuse are provided.
The METH users are arranged to do some daily activities (e.g., reading books, handcraft, etc.) when they were in the institution. Written consent forms were obtained from all the participants. The data analysis was approved by the local review board (IRB). Personal data and history of drug use were recorded by the experimenter. The inclusion criteria were as follows: (a) diagnosed with drug dependence; (b) only used METH before they were incarcerated; (c) have been living a sober life for more than 1 month in the compulsory rehabilitation center; and (d) aged ≥18 years old. Exclusion criteria included the following: (a) history of mania, schizophrenia, or psychosis; (b) language difficulties; (c) vision or hearing impairments; (d) illicit drug use other than METH in the past; (e) any severe medical condition that may significantly affect brain and cardiovascular function; and 6) inability to tolerate the virtual reality helmet/environment. Current and lifetime diagnoses were determined by two experienced psychiatrists according to DSM-V when the METH users were sent to the rehabilitation center. Besides, according to the Chinese law, the METH users need to be arrested by police at least twice before sending to the rehabilitation center. Those who were arrested the first time were sent to different institutions. The average length of METH use was 65.58 months (SD = 42.25). The average length since admitted to the rehabilitation center is 11.15 months (SD = 6.65).
The healthy control group included 332 male participants that matched the METH user group on age. All the healthy participants were recruited in Shandong and Beijing province through an online advertisement. They had no history of drug dependence or any mental problems. The exclusion criteria were the same as METH user group.

| Virtual reality environment
The virtual reality (VR) environment included two parts: neutral-VR environment and METH-VR environment. The neutral-VR part was a 3-min neutral grassland scenario, with clouds in the sky (Figure 1a).
In this session, participants were required to be relaxed and look around in order to adapt to the VR environment. The METH-VR environment included animate and auditory cues under three circumstances: in karaoke, in bedroom, and in a car. Each scenario lasted for 4 min (Figure 1b-d), with avatars using METH and drug paraphernalia (e.g., glass pipe, medical tubing, and small plastic bags containing METH) in side (Culbertson et al., 2010). The participants were able to pick the drug paraphernalia in the VR environment by their hands and virtually use them. Auditory cues (e.g., snorting, smoking) appeared when they took the drugs in VR. The VR environment was presented by a VR helmet, with 2,560 × 1,440 pixels resolutions and 92 degrees field of view. The helmet was equipped with a custombuilt head tracker using a triaxial gyroscope, an accelerometer, and a compass sensor tracked at 1 MHz update rate. All participants were able to explore each VR scenario freely.

| Data recording
EEG data were collected via a low-cost, portable EEG headband (Adai-jd-001; Adai-tech Co., Ltd.) at a sampling rate of 200 Hz with five electrodes located at Fpz, AF7, AF8, TP9, and TP10. Electrode Fpz was utilized as the reference electrode. EEG data on AF7, AF8, TP9, and TP10 were transmitted to a local server through Bluetooth. The raw data were filtered and processed by Brain Vision Analyzer software (Brain Products; GmbH) with a bandpass filter of 0.1 Hz-60 Hz.
Galvanic skin response (GSR) was recorded by a biofeedback unit (Grove-GSR monitor; Mindfield Biosystem). Two sensors were affixed to the index and middle fingers of the participants' nondominant hand. Data were transmitted to a local server by Bluetooth.

| Feature selection
A classification analysis was conducted using the two input data modalities as input: EEG data (the absolute power values in 5 standard frequency bands) and GSR data. All the input data of the whole recording period were firstly mean-centered and normalized prior to the data analysis. In order to explore the quick and convenient ways in classifying MEHT users from healthy controls, only the basic and common-used features were selected in the present study. Mean Three machine-learning algorithms including random forest, logistic regression, and support vector machine (SVM) were used to build classification model. Random Forests is an ensemble model with a lot of decision trees. Each decision tree is trained with a dataset random sampled from the whole training set. The output of the method is the mode of the classification (Liaw & Wiener, 2002).
Logistic regression aims at predicting a binary output value based on input variables. All input values are combined linearly. The coefficients of each input are optimized using gradient descent with cross-entropy cost function (Fan, Chang, Hsieh, Wang, & Lin, 2008). SVM is also a common method to deal with linear and nonlinear classification issues in machine learning (Hearst, Dumais, Osman, Platt, & Scholkopf, 1998). Each input case was assigned to one category or the other in the SVM algorithm. The SVM training model is a representation of the input cases as points in space, mapped so that the two categories can be divided by a clear gap that is as wide as possible. New input cases are then predicted to belong to a category based on the side of the gap on which they fall.
To avoid overfitting, 80% of the total sample was included in the training process and the other 20% was included to test the accuracy, precision, sensitivity, and f1 score of each model. The f1 score is the harmonic average of the precision and sensitivity of a binary classification analysis. It ranges from 0 to 1, with higher scores indicating better performance of the machine-learning F I G U R E 1 Screenshots of neutral-VR cue and METH-VR cue environment. (a) A 3-min neutral scenario; (b) METH-VR cue in karaoke; (c) METH-VR cue in a bedroom; (d) METH-VR cue in a car. METH, methamphetamine; VR, virtual reality model (Powers, 2011;Sakr et al., 2017). Furthermore, parameters for each algorithm were tested prior to finalize the machine-learning models. The performance validation was then generated using 10-fold cross-validation and the accuracy, precision, sensitivity, and f1 score of the ten runs were averaged. Following previous studies (e.g., Ding et al., 2019;Friedrichs & Igel, 2005), the most commonly used tuning parameters were selected, including number of trees, minim samples at leaf, maximum depth of each tree, minimum samples at each node to split, and maximum features considered at each node for RF; regularization parameter C, tolerance to stop criteria, solver, and maximum iterations for LR; regularization parameter C, tolerance to stop criteria, and kernel for SVM. Feature importance analysis was done following information gain criterion.

| Statistical analysis
Independent t test and chi-square test were used to test whether there is a significant difference in age and educational background between METH user group and the healthy control group. A multivariate analysis of variance (MANOVA) was conducted to examine the differences in GSR and EEG power of 5 bands between METH user group and control group. A paired-sample t test was conducted to test the differences in GSR and EEG power of 5 bands between neutral and METH-VR scenarios.
All the machine-learning analyses including classification and feature importance analysis were done by Jupyter Notebook (Project Jupyter). It supports scientific computing using Python.

| RE SULTS
The demographic and clinical characteristics of the recruited group are displayed in Table 1. Independent t test showed no significant differences in age between the healthy control group (mean age ± SD: 33.63 ± 7.92) and METH user group (mean age 33.75 ± 6.49, p = .82).
And chi-square test showed that the two groups had no significant differences regarding educational background (χ2 = 0.15, p > .05). No significant differences were found in EEG power in theta band (p = .087).

| Comparison of the METH user group and healthy comparison group
While we test the differences between the VR scenarios (Neutral

| Results of classification
The indices of the two modalities (EEG and GSR) were combined and used as input to the classifiers. Table 3 shows the results of each classifier using testing dataset. Figure 2 showed the area under the receiver operating characteristic curve (AUC/ROC) for the three classifiers. The LR algorithm showed highest accuracy (90.68%) and F1 Score (90.80%). The parameters we used in each classifier are described here: • For RF, number of trees = 100, minim samples at leaf = 1, maximum depth of each tree = 100, minimum samples at each node to split = 2, maximum features considered at each node = 65.

| D ISCUSS I ON
Drug-associated cues have been shown to elicit behavioral and physiological responses in patients with drug dependence (Ehrman, Robbins, Childress, & O'Brien, 1992;Franken et al., 2004). Reactivity to drug cues has been investigated as a possible indication of vulnerability to relapse (Drummond & Glautier, 1994). In this study, we proposed a method to distinguish patients with methamphetamine dependence from normal healthy subjects by comparing their reactions to drug-associated cues. Culbertson et al demonstrated the usefulness of VR cues for eliciting subjective craving in METH abusers and showed its advantages versus. video cues (Culbertson et al., 2010). Therefore, we employed METH-VR cues in this study.
The skin gives away lots of information on how we feel when we are exposed to emotionally loaded images, videos, events, or other stimulus. The galvanic skin response reflects the activity of sweat glands and the autonomous nervous system (ANS) as a whole. It generally reflects the skin's ability to transmit sweat enhanced electrical current. Fatseas et al. found a significant decrease of the galvanic skin response after drug-related stimuli in drug relapsers (Fatseas et al., 2011). Our data also showed decreased galvanic skin response in METH-abused group. Skin response decreases when skin conductance increases in more stressful and excited state. In a more relaxed state, skin response increases. The result of this study supports the excited state induced by METH (Ohme, Reykowska, Wiener, & Choromanska, 2009).
Prolonged drug use can have profound effects upon normal brain activity which can be recorded and measured through the use of quantitative EEG (qEEG) techniques. For example, previous studies have found that a majority of the conventional EEGs of the METH users were abnormal and METH users showed increased EEG power in the delta bands (Newton et al., 2003), increased theta quantitative EEG power on tasks that were more difficult (Newton et al., 2004), TA B L E 2 Mean value and standard deviation of physiological data METH (n = 333) HC (n = 332)

Interaction effects F(p) Main effects F (p)
Neutral Note: The range between the brackets is the confidence interval with 95%.
Bold numbers are indicates the classifier with the best performance.

TA B L E 3
The results of classifiers with EEG and GSR data as input decreased cortical complexity of METH users (Yun et al., 2012), and higher clustering coefficient at the gamma band (Ahmadlou, Ahmadi, Rezazade, & Azad-Marzabadi, 2013). In our study, the patients with methamphetamine dependence showed higher EEG power in gamma band and smaller EEG power in lower frequency bands, including delta (p < .001) and alpha (p < .001) frequency bands. These findings are very interesting. Gamma oscillations (>30 Hz) in the brain are involved in attention, perception, and memory. They are altered in various pathological states, as well as by neuropharmaceuticals. The changes of EEG power in different bands might suggest that methamphetamine abuse is associated with brain function deficits.
Machine-learning methods have been widely tried in medical fields to predict different outcomes. This study is designed to take advantage of the unique database of patients with methamphetamine dependence, collected in a drug rehabilitation center to investigate the relative performance of various machine-learning classification method for distinguishing normal subjects and patients with methamphetamine dependence by using EEG and GSR. To our knowledge, this is the first study using machine-learning method in patients with methamphetamine dependence. We evaluated three machine-learning methods, that is, SVM, RF, and LR, and there was not huge difference between their accuracy. In previous studies, Vomlet used five machine-learning techniques (i.e., LR, Decision Tree, Naïve Bayes classifier, Artificial Neural Network, and Bayesian Network classifier) to predict mortality in patients with ST elevation myocardial infarction and he found the LR achieved the highest area under curve (Vomlel, Kruzık, Tuma, Precek, & Hutyra, 2012). In the present study, we achieved the highest f1 score by LR with a combination of EEG and GSR data (accuracy: 90.68%, precision: 89.22%, sensitivity: 92.44%, f1 score 90.08%). Previous studies that used machine-learning models to classify patients (e.g., major depression patients) from healthy controls with EEG and GSR data achieved an average f1 score around 75%-85% (e.g., Ding et al., 2019). The high f1 score in the present study indicates that the model would be useful clinically and has good potential in predicting METH users.
One of the common problems in machine learning is overfitting, which occurs when the model fits the peculiarities of the training dataset too much and does not find a general predictive rule (Dietterich, 1995). In order to avoid this problem, the present study used 80% of the total sample to train the models and used the other 20% of the total sample to test the accuracy, precision, sensitivity, and f1 score of each model. Therefore, the 20% of the sample that were used to test the performance of the models is independent from the training dataset. The high f1 score indicated a good gener-

| CON CLUS ION
The study shows the potential of machine-learning methods for distinguishing methamphetamine-dependent patients from healthy subjects by using EEG and GSR data. The linear regression algorithm shows the best performance comparing with SVM and Forest Random.

CO N FLI C T O F I NTE R E S T
Dai Li and Yuanhui Li are working in Adai-tech Company, which provides us with the equipment for data collection.

AUTH O R CO NTR I B UTI O N S
The concept and study design were formed by XF.D., D.L., and XY.L..

PE E R R E V I E W
The peer review history for this article is available at https://publo ns.com/publo n/10.1002/brb3.1814.

DATA AVA I L A B I L I T Y S TAT E M E N T
The data are available on reasonable request to corresponding author, Dr. Xiuyun Liu (liuxiuyun1@gmail.com).