Opioid overdoses remain a critical public health crisis in the United States, with roughly 105,000 drug overdose deaths recorded in 2023, nearly 80,000 of which involved opioids, according to the U.S. Centers for Disease Control and Prevention. Globally, opioids are responsible for the majority of drug-related deaths. Now, researchers at the University of California San Diego are exploring a novel approach to mitigating risk: leveraging the continuous data stream from commercially available smartwatches.
The core problem, as clinicians recognize, is that assessments of opioid misuse risk are often based on infrequent snapshots – clinic visits, questionnaires and periodic check-ins. These intermittent evaluations can miss crucial moments of escalating risk, the “in-between” periods where stress, pain, and craving intensify. The UC San Diego team’s research proposes a continuous monitoring system, utilizing the subtle changes in heart rhythm detectable by smartwatches, coupled with machine learning, to estimate when an individual may be entering a high-risk state.
The study, led by Professor Tauhidur Rahman and Ph.D. Student Yunfei Luo at the Halıcıoğlu Data Science Institute (HDSI) within UC San Diego’s School of Computing, Information and Data Sciences (SCIDS), and Eric Garland, PhD, professor of psychiatry at UC San Diego School of Medicine and Stanford Institute for Empathy and Compassion, focuses on heart rate variability (HRV). HRV, the variation in time intervals between heartbeats, is a physiological marker often affected by stress and nervous system strain. By analyzing these subtle fluctuations, the system aims to provide a window into an individual’s emotional and physiological state.
The system doesn’t simply track HRV; it seeks to identify patterns in stress, pain, and craving that are indicative of increased opioid misuse risk. The goal is to create a proactive “smoke alarm” for risk, operating without the need for constant self-reporting or clinical intervention.
Study Details and Methodology
The research involved analyzing over 10,140 hours of wearable data collected from 51 adults undergoing long-term opioid therapy for chronic pain. Participants wore a commercially available Garmin Vivosmart 4 smartwatch during their daily lives over an eight-week period. Data was categorized based on Current Opioid Misuse Measure (COMM) scores, a standard questionnaire used by clinicians to assess potential opioid misuse. The system generated predicted stress, pain, and craving levels over time, culminating in a final “misuse risk” classification informed by both the physiological data and clinical record text.
Yunfei Luo explained the technical approach: “We built a system that uses a wearable device to collect inter-beat interval data, the tiny timing differences between heartbeats. From these signals, the system estimates heart rate variability (HRV), a measure that often shifts when the body is under strain. In simple terms, HRV provides a window into how the nervous system is responding to stress.”
The process of mapping HRV to opioid misuse risk unfolded in two key steps. First, the system personalized predictions of stress, pain, and craving for each individual. Recognizing that HRV baselines vary significantly between people, the team avoided a “one-size-fits-all” predictor. Instead, they trained individualized models, accounting for each participant’s unique physiological profile. This personalization was achieved using a “learning-to-branch” technique, dynamically identifying clusters of participants with similar characteristics to improve data efficiency and prediction accuracy.
Second, the system focused on the shape of daily patterns, rather than isolated moments of stress, pain, or craving. Professor Rahman described how they employed nonlinear dynamical analysis to determine whether a person’s daily patterns were rigid and predictable or flexible and variable. Individuals at higher risk of opioid misuse exhibited more repetitive trajectories, becoming “stuck” in states of high stress, pain, or craving – a pattern characterized by lower entropy, or reduced flexibility. Conversely, those adhering to their opioid prescriptions demonstrated more fluctuation and rebound, reflected in higher entropy.
Integrating Clinical Context for Enhanced Accuracy
To further refine the system’s accuracy, the researchers incorporated information from existing medical records, including demographics, prescription history, symptoms, and related conditions. Rather than relying on large, cloud-based language models, they utilized smaller, clinically trained models to convert this textual data into compact numerical summaries. Combining these clinical insights with the smartwatch signals demonstrably improved performance. This integrated approach has the potential to enable clinicians to detect risk shifts between appointments, trigger timely check-ins, reduce the burden of self-reporting, and more effectively target preventative measures for chronic pain patients.
Future Directions and Potential Impact
The UC San Diego team is now exploring how this continuous monitoring system could support “just-in-time interventions” – delivering assistance precisely when it’s most needed. Professor Rahman expressed optimism that mobile and wearable sensors, combined with artificial intelligence and machine learning, could play a crucial role in reversing the rising tide of overdose deaths. “As overdose deaths remain high nationally, the long-term hope is that tools like this could help clinicians move from periodic snapshots to continuous, patient-friendly monitoring – and intervene earlier, before risk becomes tragedy,” he said.
The findings of this study were published in Nature Mental Health. A U.S. Utility patent application (US2025/016369) titled “System and Method for Personalized Closed-Loop Opioid Addiction Management with Mobile and Wearable Sensing of Administrations, Affective States and Misuse Risk Scores” has also been filed, indicating the potential for commercialization of this technology.
