Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2022 Nov 1.
Published in final edited form as: Drug Alcohol Depend. 2021 Sep 4;228:108972. doi: 10.1016/j.drugalcdep.2021.108972

Mobile Phone Sensor-Based Detection of Subjective Cannabis Intoxication in Young Adults: A Feasibility Study in Real-World Settings

Sang Won Bae 1, Tammy Chung 2, Rahul Islam 3, Brian Suffoletto 4, Jiameng Du 5, Serim Jang 6, Yuuki Nishiyama 7, Raghu Mulukutla 8, Anind Dey 9
PMCID: PMC8595824  NIHMSID: NIHMS1738100  PMID: 34530315

Abstract

Background :

Given possible impairment in psychomotor functioning related to acute cannabis intoxication, we explored whether smartphone-based sensors (e.g., accelerometer) can detect self-reported episodes of acute cannabis intoxication (subjective “ high” state) in the natural environment.

Methods:

Young adults (ages 18-25) in Pittsburgh, PA, who reported cannabis use at least twice per week, completed up to 30 days of daily data collection: phone surveys (3 times/day), self-initiated reports of cannabis use (start/stop time, subjective cannabis intoxication rating: 0-10, 10 = very high), and continuous phone sensor data. We tested multiple models with Light Gradient Boosting Machine (LGBM) in distinguishing “not intoxicated” (rating = 0) vs subjective cannabis “low-intoxication” (rating =1-3) vs “moderate-intensive intoxication” (rating = 4-10). We tested the importance of time features (i.e., day of the week, time of day) relative to smartphone sensor data only on model performance, since time features alone might predict “routines” in cannabis intoxication.

Results:

Young adults (N = 57; 58% female) reported 451 cannabis use episodes, mean subjective intoxication rating = 3.77 (SD = 2.64). LGBM, the best performing classifier, had 60% accuracy using time features to detect subjective “high” (Area Under the Curve [AUC] = 0.82). Combining smartphone sensor data with time features improved model performance: 90% accuracy (AUC = 0.98). Important smartphone features to detect subjective cannabis intoxication included travel (GPS) and movement (accelerometer).

Conclusions:

This proof-of-concept study indicates the feasibility of using phone sensors to detect subjective cannabis intoxication in the natural environment, with potential implications for triggering just-in-time interventions.

Keywords: cannabis smoking, acute intoxication, Mobile phone sensors, Light Gradient Boosting Machine model

1. Introduction

Acute cannabis intoxication can impair psychomotor functioning (Conroy et al., 2015; National Academies of Sciences, 2017). Adverse effects of acute cannabis intoxication have been reported by young adults (Conroy et al., 2015), with associated consequences such as poor academic and work performance, and injuries and fatalities due to driving while “high” on cannabis (Phillips et al., 2015). However, existing objective measures (e.g., blood, urine, saliva tests) have limitations as indicators of acute cannabis intoxication and cannabis-related impairment (Huestis & Smith, 2017). In the absence of tools to accurately detect acute cannabis intoxication in daily life, this study examined the feasibility of passive sensing using smartphone-based sensors to identify episodes of acute cannabis intoxication in the natural environment, given the ubiquity of smartphones and low burden of passive sensing (Mohr et al., 2017; Marsch, 2020).

Prior research has used smartphone-based sensors to detect heavy drinking episodes in young adults in the natural environment (Bae et al., 2017; 2018). Specifically, a Random Forest (RF) model using a 30-minute window with 1 day of historical data had 90.9% accuracy in detecting high-risk drinking (i.e., consuming 4+/5+ drinks per occasion for women/men) (Bae et al., 2018). In the RF model used to detect high-risk drinking among young adults, the most informative phone sensor features, in addition to time (i.e., day of the week, time of day), included movement (e.g., change in activities), device use (e.g., screen-on duration), and communication (e.g., typing speed) (Bae et al., 2018). There are few studies using smartphone sensors to detect acute cannabis consumption. A lab study collected accelerometer and gyroscope data to detect acute cannabis use (3% or 7% THC vs placebo) in 10 participants to perform analysis of gait, resulting in 92% accuracy (Li et al., 2019). Existing passive sensing studies to detect episodes of substance use support the potential for smartphone sensors to detect cannabis-related intoxication, but highlight the need for research conducted using a wider range of smartphone sensors with individuals who use cannabis in naturalistic settings to increase ecological validity.

This exploratory study examined whether smartphone-based sensors (e.g., GPS, accelerometer, text/phone logs) can be used to detect self-reported episodes of acute cannabis intoxication (subjective “high” state) in the natural environment among young adults, given possible impairment in functioning related to acute cannabis effects. No prior work has explored the use of smartphone sensors to detect subjective cannabis "high", nor studied real-time detection of cannabis use with passive sensing in the natural environment. Since time features alone might predict “routines” in cannabis use (Shrier et al., 2012; 2013; Emery et al., 2020), we first tested the importance on model performance of just the two time features (day of the week, time of day), relative to smartphone sensor data. We hypothesized that smartphone sensor data would improve detection of subjective cannabis intoxication, after accounting for the two time features.

2. Methods

2.1. Study population

Young adults (n=57, ages 18-25), who reported cannabis use at least twice per week, were recruited by research registry and Craigslist to participate in a smartphone data collection study (up to 30 days) in Pittsburgh, PA (2017-2019) (Chung et al., 2020). Participants (57.8% female; mean age=19.82 [SD = 1.76]; 71.92% White, 15.78% Black, 12.28% Asian and other ethnicity) provided informed consent for participation, and were compensated for participation. This naturalistic, observational follow-along study obtained a Certificate of Confidentiality. The university’s Institutional Review Board approved the study protocol.

2.2. Measurements

2.2.1. Phone surveys

Participants responded to fixed time phone surveys 3 times per day (10am, 3pm, 8pm) with a 5-hour time window for completion, and were trained to complete self-initiated reports of cannabis use within 15 minutes of starting to use cannabis. Self-initiated reports obtained start/stop time, quantity consumed (hits, grams), and rating of subjective high, "How high are you feeling right now?", rated: 0-10, 10 = very high (for details, see Chung et al., 2020). The fixed time phone surveys, similar to the self-initiated reports, included items on time of last cannabis use, and quantity consumed. Participants completed 52.98% (2119/4000) of fixed time surveys (Chung et al., 2020).

2.2.2. Passive sensing

Our AWARE app (Ferreira et al., 2015) for Android and iOS continuously collected data on 102 smartphone sensor features (e.g., GPS, accelerometer, number of outgoing calls, mean distance travelled) analyzed in this study.

2.3. Machine learning modeling in identifying “low”-, and “moderate-intensive” cannabis intoxication versus “not-intoxicated”

2.3.1. Pre-processing

During pre-processing, phone sensor data were extracted and segmented into 5-minute windows for analysis (Bae et al., 2017; 2018). The phone sensor dataset included 1,648 data points representing subjective cannabis "high” reports, and 293 data points representing "not high" reports. To minimize the influence of imbalanced data on model performance in the training dataset, we used both over-sampling with Synthetic Minority Over-sampling Technique (SMOTE) and random under-sampling of the majority class, so that three classes (“not-intoxicated”, “low-intoxication”, and “moderate-intensive intoxication”) had the same number of training samples.

2.3.2. Training, validating and testing

We evaluated multiple machine learning classifiers (e.g., Light Gradient Boosting Machine [LGBM]) with 10-fold cross-validation on training (80%), and test (or “holdout”, 20%) datasets to determine which classifier performed best in distinguishing “not intoxicated” (rating = 0) vs subjective cannabis “low-intoxication” (rating =1-3) vs “moderate-intensive intoxication” (rating = 4-10). We tested the importance of two time features (day of the week: Monday to Sunday and time of day: 1-24 hours from morning to evening) relative to smartphone sensor data only on model performance, since time features alone have been associated with routines in cannabis use (Shrier et al., 2012, 2013; Emery et al., 2020).

To explore whether smartphone-based sensors can be used to identify subjective cannabis intoxication behaviors in the natural environment, we compared the following three machine learning models: (a) time features (day of the week and time of day [DT]), (b) smartphone-based sensors only [S], (c) smartphone-based sensors and time features combined model [DTS]. The best performing model was determined by considering accuracy, precision, recall, F1-score, Kappa, and Area Under the Curve (AUC). Details of the metrics are in supplementary materials.

3. Results

3.1. Performance of time features only

Participants reported 451 episodes of cannabis use in phone surveys, with a mean subjective high rating = 3.77 (SD = 2.64). The LGBM performed best. Table 1 shows the overall performance (using the holdout (20%) dataset) of the model with two time features (LGBM-DT: Accuracy = 0.60, F1-score = 0.64, precision = 0.72 and recall = 0.60).

Table 1.

LGBM model comparison in detecting subjective cannabis intoxication (not-intoxicated vs low-intoxication vs. moderate-intensive (MI) intoxication)

LGBM Model Accuracy Precision Recall F1-Score Moderate-Intensive Intox
AUC
LGBM-DT 0.60 0.72 0.60 0.64 0.82
LGBM-S 0.67 0.83 0.66 0.73 0.90
LGBM-DTS 0.90 0.92 0.90 0.90 0.98

Three Light Gradient Boosting Machine (LGBM) model performance on the test or “holdout” (20%) dataset. Intox: Intoxication LGBM-DT: Day of the week and time of day combined model, LGBM-S: Smartphone-based sensors only model, and LGBM-DTS: Smartphone-based sensors combined with the two time features (day of the week and time of day) in identifying three classes: not-intoxicated (0), low-intoxication (1-3) and moderate-intensive intoxication (4-10), the cutoff between 3 and 4 is defined based on the median value (= 3.0 out of 10.0) of subjective intoxication episodes.

3.2. Performance of phone sensor and time features

The phone sensors only model (LGBM-S) had 67% accuracy in detecting “low” and “moderate-intensive” subjective cannabis intoxication (vs “not-intoxicated”) in the holdout dataset (AUC = 0.90; Table 1). Combining smartphone sensor data with the two time-based features (LGBM-DTS; Table 1) improved model performance (e.g., increased recall and precision), relative to the phone sensor only model (LGBM-S), resulting in 90% accuracy (moderate-intensive intoxication, AUC = 0.98) and F1-score = 0.90 in detecting subjective cannabis intoxication. Thus, smartphone-based sensor features (e.g., accelerometer) contributed unique information, relative to the two time-based features (day of the week, time of day) in detecting subjective cannabis "intoxication". Importantly, the combined model (LGBM-DTS) had the best overall performance of the three models in detecting subjective cannabis intoxication (Figure 1). These results suggest the potential use of specific phone sensors (e.g., GPS; accelerometer) to detect the effects of cannabis use in the natural environment (over and above features of time) in a population-based machine learning model.

Figure 1.

Figure 1.

The three Light Gradient Boosting Machine (LGBM) models in the test or “holdout” (20%) dataset: (a) day of the week and time of day (LGBM-DT), (b) smartphone-based sensors model (LGBM-S) and (c) smartphone-based sensors with the two time features (LGBM-DTS) in identifying three classes: not-intoxicated, low-intoxication and moderate-intensive intoxication

Importantly, the addition of time features to smartphone sensor data improved the LGBM model’s sensitivity (True Positive rate in Figure 1) in identifying subjective low-, and moderate-intensive intoxication (versus "not-intoxicated"), which means that the algorithm was more likely to correctly classify samples labelled "intoxicated" among "intoxicated" samples that are actually labelled "intoxicated". Time features (i.e., time of day, day of the week) appear to be among the most important features contributing to model performance (Table 1).

3.3. Top ranked mobile phone sensors and time features

Of the 102 phone sensor features analyzed, the top ranked features for detecting subjective cannabis "intoxication" (LGBM-DTS) were (1) time features (top two): time of day and day of the week, (2) travel (GPS): smaller travel boundary at times when reported feeling “high”, (3) motion (activity and accelerometer): smaller number of activity changes, and stronger body movement when “high”.

4. Discussion

This proof-of-concept study indicated the feasibility of using smartphone-based sensors to detect subjective cannabis intoxication in the natural environment in a population-based machine learning model among young adults. A model that combined smartphone-based sensors with time features (day of the week, time of day; LGBM-DTS) had the best performance in detecting subjective cannabis intoxication. Results supported the hypothesis that smartphone sensor data would improve detection of subjective cannabis intoxication, after accounting for two time-based features. Time-based features were among the most important for detecting subjective cannabis intoxication in this young adult sample. Phone sensors, combined with time-based features, show promise for automated and continuous detection of cannabis intoxication in daily life in a sample of young adults, with potential implications for triggering delivery of just-in-time interventions.

Time-based features were important contributors to model performance in this non-treatment seeking community-based sample of young adults. Thus, knowing at what time of day, and on what days of the week a young adult tends to use cannabis would likely have an important impact on being able to detect cannabis use, as reported in some prior work (e.g., Shrier et al., 2012, 2013; Emery et al., 2020). However, other research, examining relapse to cannabis use, found that time-based features have limited utility as a predictor of future use (Shrier et al., 2018). Since continuing to use cannabis and relapse appear to involve different processes, it is important to consider the conditions under which time-based features may or may not be useful for detecting subjective cannabis intoxication.

Some of the most important phone sensor features for detecting subjective cannabis "high" included GPS data (e.g., smaller travel boundary when feeling "intoxicated") and motion sensor data including accelerometer (e.g., fewer activity changes when "intoxicated"). Similar to prior work using the accelerometer in a lab setting to examine changes in gait associated with acute cannabis-related intoxication (Li et al., 2019), results from phone sensor data collected in daily life indicate the utility of the accelerometer (e.g., stronger body movements) to detect subjective cannabis intoxication. Notably, prior phone sensor work to detect high-risk drinking episodes found motion sensor data (e.g., magnitude of acceleration and activity changes) to be of value. Other research used GPS data to predict heroin or cocaine craving with high accuracy among outpatients treated for opioid use disorder (Epstein et al., 2020). The micro- and macro-movements captured by accelerometer and GPS, respectively, appear to be promising digital markers for detection of addictive behaviors and related states (e.g., craving).

Study limitations warrant comment. Subjective rating of cannabis intoxication, which might be biased, was used as the outcome, although such ratings have good psychometric properties (Okey & Meier, 2020; Chung et al., 2020). Further, history of cannabis use (i.e., tolerance), drug dose, and factors such as route of administration can affect report of subjective intoxication. Compliance with the phone surveys could be improved, and some reported episodes did not meet criteria for inclusion in analyses. There were relatively few data points for which participants reported not being under the influence of cannabis. Replication of the algorithm's performance (e.g., sensitivity, specificity) in classifying "intoxicated" vs "not intoxicated" reports in individuals who report less frequent cannabis use is needed. Subjective report of "intoxication" needs to be studied with tools that law enforcement might use (e.g., oral fluid collection and analysis), which might show stronger correlation with self-reported cannabis use. The sample included young adults, consisting of a majority of White individuals, suggesting limits to generalizability, and need for replication.

5. Conclusion

This exploratory study demonstrated the feasibility of using smartphone sensor data to detect subjective cannabis intoxication in the natural environment among young adults. Smartphone sensor data contributed unique information, over and above time features, to detect subjective cannabis intoxication.

Supplementary Material

1

Highlights.

  • Time features plus phone sensor data had 90% accuracy in detecting cannabis "high"

  • Top ranked features to detect subjective cannabis "high" included time and travel

  • Detection model has potential implications for triggering just-in-time intervention

Acknowledgements

This work was supported by the National Institute on Drug Abuse [1R21DA043181-01A1].

Footnotes

Conflict of Interest

No conflict declared.

Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

Contributor Information

Sang Won Bae, School of Systems and Enterprises, Stevens Institute of Technology, USA

Tammy Chung, Institute for Health, Healthcare Policy and Aging Research, Rutgers University, USA

Rahul Islam, School of Systems and Enterprises, Stevens Institute of Technology, USA.

Brian Suffoletto, Department of Emergency Medicine, Stanford University, USA.

Jiameng Du, Computer Science Department, Carnegie Mellon University, USA.

Serim Jang, Computer Science Department, Carnegie Mellon University, USA.

Yuuki Nishiyama, Institute of Industrial Science, University of Tokyo, Japan.

Raghu Mulukutla, Computer Science Department, Carnegie Mellon University, USA.

Anind Dey, Information School, University of Washington, Seattle, USA

References

  1. Bae S, Ferreira D, Suffoletto B, Puyana JC, Kurtz R, Chung T and Dey AK, 2017. Detecting drinking episodes in young adults using smartphone-based sensors. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies, 1(2), pp.1–36. 10.1145/3090051. [DOI] [PMC free article] [PubMed] [Google Scholar]
  2. Bae S, Chung T, Ferreira D, Dey AK and Suffoletto B, 2018. Mobile phone sensors and supervised machine learning to identify alcohol use events in young adults: Implications for just-in-time adaptive interventions. Addictive behaviors, 83, pp.42–47. 10.1016/j.addbeh.2017.11.039. [DOI] [PMC free article] [PubMed] [Google Scholar]
  3. Chung T, Bae SW, Mun EY, Suffoletto B, Nishiyama Y, Jang S and Dey AK, 2020. Mobile assessment of acute effects of marijuana on cognitive functioning in young adults: observational study. JMIR mHealth and uHealth, 8(3), p.e16240. 10.2196/16240 [DOI] [PMC free article] [PubMed] [Google Scholar]
  4. Conroy DA, Kurth ME, Brower KJ, Strong DR, Stein MD. Impact of marijuana use on self-rated cognition in young adult men and women. Am J Addict. 2015;24(2):160–165 10.1111/ajad.12157. [DOI] [PMC free article] [PubMed] [Google Scholar]
  5. Emery NN, Carpenter RW, Treloar Padovano H and Miranda R Jr, 2020. Why don't they stop? Understanding unplanned marijuana use among adolescents and young adults. Psychology of Addictive Behaviors. 10.1037/adb0000561 [DOI] [PMC free article] [PubMed] [Google Scholar]
  6. Epstein DH, Tyburski M, Kowalczyk WJ, Burgess-Hull AJ, Phillips KA, Curtis BL, Preston KL. Prediction of stress and drug craving ninety minutes in the future with passively collected GPS data. npj Digital Medicine. 2020;3(1):26. 10.1038/s41746-020-0234-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  7. Ferreira D, Kostakos V, Dey AK. AWARE: Mobile Context Instrumentation Framework. Frontiers in ICT. 2015;2(6). 10.3389/fict.2015.00006. [DOI] [Google Scholar]
  8. Li R, Agu E, Balakrishnan G, Herman D, Abrantes A, Stein M and Metrik J, 2019, November. WeedGait: Unobtrusive Smartphone Sensing of Marijuana-Induced Gait impairment By Fusing Gait Cycle Segmentation and Neural Networks. In 2019 IEEE Healthcare Innovations and Point of Care Technologies,(HI-POCT) (pp. 91–94). IEEE. 10.1109/HI-POCT45284.2019.8962787 [DOI] [Google Scholar]
  9. Marsch LA, 2020. Digital Health and Addiction. Current Opinion in Systems Biology. 20:1–7. 10.1016/j.coisb.2020.07.004. [DOI] [PMC free article] [PubMed] [Google Scholar]
  10. Mohr DC, Zhang M, Schueller SM. Personal Sensing: Understanding Mental Health Using Ubiquitous Sensors and Machine Learning. Annu Rev Clin Psychol. 2017. May 8;13:23–47. Epub 2017 Mar 17. PMID: 28375728; PMCID: PMC6902121. 10.1146/annurev-clinpsy-032816-044949. [DOI] [PMC free article] [PubMed] [Google Scholar]
  11. National Academies of Sciences, Engineering, and Medicine, 2017. The health effects of cannabis and cannabinoids: the current state of evidence and recommendations for research. National Academies Press. 10.17226/24625. [DOI] [PubMed] [Google Scholar]
  12. Okey SA, Meier MH. A within-person comparison of the subjective effects of higher vs. lower-potency cannabis. Drug Alcohol Depend. 2020. November 1;216:108225. Epub 2020 Aug 19. PMID: 32858319. 10.1016/j.drugalcdep.2020.108225. [DOI] [PubMed] [Google Scholar]
  13. Phillips KT, Phillips MM, Lalonde TL, Tormohlen KN. Marijuana use, craving, and academic motivation and performance among college students: An in-the moment study. Addictive behaviors. 2015;47:42–47. 10.1016/j.addbeh.2015.03.020 [DOI] [PubMed] [Google Scholar]
  14. Shrier LA, Walls CE, Kendall AD and Blood EA, 2012. The context of desire to use marijuana: Momentary assessment of young people who frequently use marijuana. Psychology of Addictive Behaviors, 26(4), p. 821. 10.1037/a0029197. [DOI] [PubMed] [Google Scholar]
  15. Shrier LA, Walls C, Rhoads A and Blood EA, 2013. Individual and contextual predictors of severity of marijuana use events among young frequent users. Addictive Behaviors, 38(1), pp.1448–1456. 10.1016/j.addbeh.2012.05.026. [DOI] [PMC free article] [PubMed] [Google Scholar]
  16. Shrier LA, Sarda V, Jonestrask C and Harris SK, 2018. Momentary factors during marijuana use as predictors of lapse during attempted abstinence in young adults. Addictive behaviors, 83, pp.167–174. 10.1016/j.addbeh.2017.12.032. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

1

RESOURCES