Article Text

Using machine learning to identify factors related to nitrous oxide (laughing gas) relapse among adolescents
  1. Jie Xu1,2,3,
  2. Yi Zhang4,
  3. Chang Lei5,6,
  4. Pei Sun2,
  5. Runsen Chen5,6 and
  6. Tifei Yuan4,7
  1. 1 Beijing Gaoxin Hospital, Beijing, China
  2. 2 Department of Psychology, Tsinghua University, Beijing, China
  3. 3 Department of Psychiatry and Psychology, Tianjin Medical University, Tianjin, China
  4. 4 Shanghai Key Laboratory of Psychotic Disorders, Brain Health Institute, National Center for Mental Disorders, Shanghai Mental Health Center, Shanghai Jiao Tong University School of Medicine, Shanghai, China
  5. 5 Vanke School of Public Health, Tsinghua University, Beijing, China
  6. 6 Institute for Healthy China, Tsinghua University, Beijing, China
  7. 7 Co-innovation Center of Neuroregeneration, Nantong University, Nantong, Jiangsu, China
  1. Correspondence to Dr Tifei Yuan; tifei.yuan{at}; Dr Runsen Chen; runsenchen{at}

Statistics from

Request Permissions

If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.


  • Nitrous oxide (N2O), also known as laughing gas, has been used in medical practice for more than 150 years. However, it is causing severe abuse epidemic now worldwide (Ranked 7 in common use substances in the world, just after cannabis).


  • We first reported the biochemical markers and relapse trajectory from 430 individuals (the largest sample size in the current literature) with N2O use disorder using the Machine Learning approach. The results indicated that the relapse rate is very high and comparable to any other illegal substances (eg, heroin, cocaine), and The neurological symptoms and mood disturbances are reliable features for predicting the long-term survival of N2O use disorder.


  • The current study provides new insights into the targeting treatments.


Nitrous oxide (N2O /laughing gas) has been used in medical practice as an inhalational anaesthetic and analgesic for more than 150 years.1 In the past decades, N2O exhibited increasing popularity among recreational drug users for its euphoric effects, potentially through its interaction with the endogenous opioid system.2 Recreational use of N2O emerged as the seventh most used drug globally in the past decade.3 The use of N2O can cause myelopathy, myocardial injury, anaemia, severe mood disorders, sensory and motor neuropathy, and psychotic symptoms.4 5 Prolonged N2O intake results in vitamin B12 deficiency and inhibits methionine synthetase, folate and DNA production, leading to plasma homocysteine (HCY) level elevation and bone marrow haematopoietic dysfunction.6 This study aimed to investigate the neurological symptoms of nitrous oxide use and then explore the relapse trajectory and risk factors for relapse.


We retrospectively analysed 430 subjects with N2O use disorder (averaged 23.90-year-old; 244 men) admitted to a drug rehabilitation programme in Beijing Gaoxin Hospital, with follow-up at 3 and 6 months (from May 2016 to January 2020). The subjects joined a 1-month drug abstinence programme involving psychological consultation and a daily 0.5 mg vitamin B12 supplement.

The relapse status was obtained from self-report and by confirmation of family members. The basic demographic information (age, gender) and drug use characteristics (total years of regular intake of N2O, daily intake dosage of N2O) were recorded. Mood disturbances and sleep quality were measured by the Self-Rating Anxiety Scale and the Pittsburgh Sleep Quality Index, respectively. Craving was measured by Visual Analogue Scales: a line was presented on paper, with the score ‘0’ representing ‘do not want to take N2O at all’ and the score ‘100’ representing ‘extreme desire to take N2O’. The participants were asked to mark a point on the line which could best represent their craving intensity. A higher score meant higher craving intensity. Peripheral blood samples were obtained at three time points: baseline, 3-month and 6-month follow-up. The biochemical analyses were conducted on the following molecules: aspartic acid transaminase (AST), lactate dehydrogenase (LDH), creatine kinase (CK), α-hydroxybutyrate dehydrogenase (α-HBDH), HCY, vitamin B12, folic acid (FA) and mean corpuscular volume (MCV).

The sample sizes of the relapsed and non-relapsed groups were imbalanced to avoid the potential for impairing the classification accuracy. In addition, machine learning provided more accurate alternatives to traditional methods, such as Cox regression, in the presence of high-dimensional data.7 Therefore, we conducted the balanced random forest (BRF) model with the downsampled method to identify factors related to the risks of relapse. The model applied 59 features at baseline to classify relapse conditions at 6 months. We separated the data into the training dataset (70%) and the testing dataset (30%) and tuned the BRF parameters using a 10-fold cross-validation. After any particular feature was permuted across the dataset, the decrease in classification ability was applied to quantify model variable importance. The importance score was scaled between 0 and 100 by subtracting the smallest importance from all observations and dividing it by the most significant importance.

The statistical analyses were conducted in SPSS (IBM SPSS Statistics, V.21) and R Studio ( (‘randomForest’ packages) V.7. Student’s independent t-test was applied to compare the baseline differences between the relapsed and non-relapsed groups. Then, Pearson correlation was applied to explore the relationship between biochemical indexes and drug use history. The multiple comparisons were corrected by Bonferroni adjustment.


Of the 430 participants, the mean (sd) years of use were 2.23 (0.64) and the average dosage was 1 796.88±453.92 mL/day. The biochemical indicators AST and HCY suggested myocardial impairment and anaemia (myocardial infarction excluded) in these subjects (online supplemental table 1). Around 55% of individuals had relapsed at 6 months (figure 1M). The anaemia indexes (FA and MCV) and mood disturbances (anxiety and depression), but not myocardial enzymes, showed significant differences between the relapsed group and the non-relapsed group at baseline (FA: t428=−3.410, p<0.001; MCV: t428=2.117, p=0.035; anxiety: t428=4.091, p<0.001; depression: t428=−2.194, p=0.029) (figure 1A–D; more details can be found in online supplemental table 2). However, after multiple comparisons correction, the MCV and depression did not display significant differences. The myocardial enzymes (AST, LDH, CK and α-HBDH) and HCY, but not anaemia indexes, were positively related to drug use history (dosage and years of addiction) (figure 1E–L), suggesting that the more serious the addiction, the more severe was the myocardial damage. Non-linear regression was applied to fit the individuals’ days to relapse; the data showed log-normal distribution and the number of relapsed individuals peaked at about 40 days (figure 1B).

Supplemental material

Figure 1

The relapse pattern and risk factors for individuals with N2O use disorder. (A–D) Comparison between the relapsed group and non-relapsed group at baseline; (E–L) correlation between biochemical indexes and drug use history; (M) survival curve for time to relapse; (N) non-linear fitting curve for relapse trajectory. * p<0.05; *** p<0.001. α-HBDH, α-hydroxybutyrate dehydrogenase; AST, aspartic acid transaminase; CK, creatine kinase; FA, folic acid; HCY, homocysteine; LDH, lactate dehydrogenase; MCV, mean corpuscular volume; N2O, nitrous oxide.

The model showed medium classification accuracy (area under the curve (receiver operating characteristic curve): 0.685, p=0.009; sensitivity: 0.332; specificity: 0.870), which is reasonable with the limited biochemical indicators and neuropsychological questionnaires included in the model. The model-calculated risk scores for all individuals were obtained (figure 2A,B). The average scores for relapsed and non-relapsed individuals were 0.643 3 and 0.384 9, respectively. Additionally, according to the days to relapse, the risk score for individuals who relapsed before 30 days was higher than for later-relapsed individuals (<30 days: 0.651 7; 30–90 days: 0.630 4; >90 days: 0.618 9).

Figure 2

The outcomes of the Balanced Random Forest model. (A) Kernal Density Estimation (KDE) curve for model-calculated risk scores for all individuals; (B) KDE curves for model-calculated risk scores for the non-relapsed group (left) and relapsed group (right); (C) the association between model-calculated risk scores and top 10 most important variables; the black numbers represent insignificant correlation and the red numbers represent significant correlation; (D) scaled importance score for all features. The dark orange indicated the most important variables and the light orange indicated the less important variables. α-HBDH, α-hydroxybutyrate dehydrogenase; AST, aspartic acid transaminase; CK, creatine kinase; FA, folic acid; HCY, homocysteine; LDH, lactate dehydrogenase; MCV, mean corpuscular volume; N2O, nitrous oxide.

After any particular feature was permuted across the dataset, the decrease in classification ability was applied to quantify model variable importance. The biochemical and neuropsychological indicators were the most important variables, especially FA, MCV, α-HBDH and anxiety (figure 2D). Individuals with higher FA had less probability of relapse, while individuals with higher LDH, CK, MCV and anxiety scores had a higher probability of relapse (figure 2C). As CK, LDH, α-HBDH and AST constitute the myocardial enzyme spectrum, this suggests that the treatment of myocardial impairment may be of great significance in N2O use disorder recovery.


To our knowledge, this is the first report to investigate N2O relapse tendencies and risk factors for relapse. The individuals using N2O demonstrated clear signs of myocardial injury and anaemia; a similar susceptibility to relapse was found when compared with alcohol and opiate patients.8 The biochemical indicators and mood disturbances at admission are the most important factors in predicting relapse. These findings implicate identifying the clinical population at high risk of relapse and developing effective therapies against N2O use disorder.

Previous studies reported relapse rates of around 50% and 60% for alcohol and opiate patients in 6 months of follow-up, respectively.8 Our results reported a similar susceptibility to relapse in N2O patients. The relapse distribution is similar to the trend of the incubation of craving: craving increased at 1–3 months and decreased at the later stage of abstinence,9 suggesting that 1–3 months is a high-risk period for relapse and when more prevention efforts are required.

The results showed that the extent of myocardial injury and anaemia correlated with the years of N2O use and daily dosage, consistent with the previous study that N2O exposure-induced impairment was dose-related.6 It is believed that a deficiency of the essential FA and serum vitamin B12 can both result in hyperhomocysteinemia, which is associated with an increased risk of cardiovascular diseases.10 However, in the current study, the individuals with N2O use did not show serum vitamin B12 deficiency, which may be due to self-supplementation of vitamin B12. Moreover, measured serum vitamin B12 levels correspond to extracellular, unbound vitamin B12, which does not reliably reflect intracellular levels.11 The severity and duration of neurological damage could influence the speed of recovery after treatment and the final prognosis.12 According to the results of the BRF model, FA is the most important factor in relapse prediction, which implies that except for the serum vitamin B12 deficiency, the N2O-caused FA deficiency should get more attention in clinical intervention and relapse prevention.

Mood disturbance is a common comorbidity with substance use disorder.13 Previous studies reported that individuals with N2O use also commonly have psychiatric symptoms, such as depression, hallucinations and suicidal ideation.1 However, due to the neurological complaints of N2O use, psychiatric symptoms are often overlooked.1 Moreover, substance use disorders are commonly associated with poor treatment outcomes, such as higher rates of treatment dropout and relapse.14 15 In the current study, in line with previous findings on substance use disorders, we found that mood disturbance is a vital predictor of relapse in individuals with N2O use, especially anxiety. These findings suggest that in addition to the regular treatment of neurological disorders caused by N2O use, providing appropriate medications and psychotherapy may reduce the relapse rate.

Currently, it remains difficult to recognise N2O use with a urine test or peripheral biomarkers, and a uniform treatment protocol for N2O patients is lacking. This pilot study reported the relapse trajectory of N2O. It indicated that N2O use accompanies myocardial damage and anaemia—clinically relevant biomarkers of relapse. This finding provides new insights into how to target treatments.

Ethics statements

Patient consent for publication

Ethics approval

This study involves human participants and was approved by the Ethics Committee of Beijing Gaoxin Hospital (BJGX2019112501), with written informed consent obtained from all participants.


We thank laboratory members for their help during the study. We also thank the Innovative Research Team of high-level local universities in Shanghai for their support.


Jie Xu majored in clinical medicine and graduated from Anhui University of Science and Technology, China in 2008. He obtained a master's degree in the Department of Psychiatry and Psychology from Tianjin Medical University in China in 2021. He currently is working as an attending physician at the Beijing Gaoxin Hospital (beginning in 2016), a professor at the department of Psychology at Tsinghua University (beginning in 2019), and a visiting professor at the Department of Psychiatry and Psychology at Tianjin Medical University, China (beginning in 2021). His main research interests include addiction medicine and forensic psychiatry.

Embedded Image

Supplementary materials

  • Supplementary Data

    This web only file has been produced by the BMJ Publishing Group from an electronic file supplied by the author(s) and has not been edited for content.


  • JX and YZ are joint first authors.

  • JX and YZ contributed equally.

  • Correction notice This article has been corrected since it was first published. In the article, the average age of the subjects should be 23.90 years old instead of the "age range 23–90 years".

  • Contributors JX—conceptualisation, validation, investigation, resources, data collection, supervision, project administration. TY—conceptualisation, supervision, methodology, writing (review and editing), funding acquisition. YZ—methodology, software, formal analysis, writing (original draft), visualisation. PS—conceptualisation, writing (review and editing). CL—methodology, resources. RC—conceptualisation, supervision, methodology, writing (review and editing).

  • Funding National Natural Science Foundation of China grant (32241015, 81822017), the Lingang Laboratory (LG-QS-202203-10), the Shanghai Municipal Education Commission-Gaofeng Clinical Medicine Grant Support (20181715) and the Shanghai Municipal Commission of Health (2022JC016).

  • Competing interests None declared.

  • Provenance and peer review Not commissioned; externally peer reviewed.

  • Supplemental material This content has been supplied by the author(s). It has not been vetted by BMJ Publishing Group Limited (BMJ) and may not have been peer-reviewed. Any opinions or recommendations discussed are solely those of the author(s) and are not endorsed by BMJ. BMJ disclaims all liability and responsibility arising from any reliance placed on the content. Where the content includes any translated material, BMJ does not warrant the accuracy and reliability of the translations (including but not limited to local regulations, clinical guidelines, terminology, drug names and drug dosages), and is not responsible for any error and/or omissions arising from translation and adaptation or otherwise.