RETRACE: Resilience-Guided Trait-Conditioned Craving Estimation from Wearable Physiology in Opioid Use Disorder
Organizations: Arizona State University, Tempe, USA · Syracuse University, Syracuse, New York, USA
Abstract
Detecting opioid craving from wearable physiological signals is critical yet difficult, with the potential to support proactive interventions for individuals with opioid use disorder (OUD). This challenge is especially pronounced under subject-independent evaluation because craving is subjective, heterogeneous, and often physiologically entangled with stress. Our empirical analysis shows that stress elicits strong and reproducible autonomic responses, while craving-related signals are weaker, sparse, and largely embedded within stress-related physiology. We further show that psychological resilience, which shapes stress regulation and craving vulnerability, is not reliably observable from short-term wearable windows, but can be captured through reusable subject-level proxies, including post-stress heart-rate recovery and autobiographical memory recall. Motivated by these findings, we introduce RETRACE, a resilience-guided trait-conditioned framework for subject-independent craving estimation from wearable physiology. RETRACE reframes craving detection as trait-conditioned physiological interpretation: rather than assuming the same physiological pattern has the same meaning across individuals, it uses resilience-related subject context to guide inference. Technically, RETRACE introduces a novel dual-encoder design that separates generalizable stress physiology from subject-specific craving interpretation. It combines a frozen stress-pretrained encoder with resilience-conditioned craving encoder, using feature-level gating and representation-level fusion to enable lightweight personalization without target-user craving labels or per-user retraining. We evaluate RETRACE on a novel multimodal OUD dataset containing wearable physiology, stress and craving annotations, and autobiographical narratives. Under LOSO setup, RETRACE achieves up to 7% absolute improvement over the strongest baseline.
Figures & tables
| Group | Age | Gender | Race/Ethnicity |
| Control (n=50) | 30.80 9.60 [22–65] | Female: 35 (70.0%) Male: 15 (30.0%) | White: 30 (60.0%) Asian: 16 (32.0%) Black or African American: 3 (6.0%) Other: 1 (2.0%) |
| OUD (n=24) | 35.67 4.15 [29–47] | Female: 18 (75.0%) Male: 5 (20.8%) Non-binary: 1 (4.2%) | White: 14 (58.3%) Black or African American: 7 (29.2%) Other: 2 (8.3%) American Indian or Alaska Native: 1 (4.2%) |
| Physiological System | Stress | Craving | Resilience |
| Cardiovascular | , SE=0.284, | , SE=0.685, | , SE=1.173, |
| Electrodermal | , SE=0.673, | , SE=1.816, | , SE=2.164, |
| Movement | , SE=0.471, | , SE=1.462, | , SE=1.497, |
| Thermoregulation | , SE=0.289, | , SE=0.484, | , SE=0.650, |
| Language Condition | Spearman | (Spearman) | (Permutation) |
| Autobiographical Language | 0.843 | ||
| Context-neutral Speech | 0.132 | 0.313 | 0.316 |
| Model | Guidance | Acc | Macro-F1 | Mean Std | Acc | p-value | CI |
| MLP | – | 0.581 | 0.578 | 0.139 | 0.010 | [0.063, 0.215] | |
| RBF-SVM | – | 0.630 | 0.624 | 0.094 | 0.105 | [0.009, 0.195] | |
| XGBoost | – | 0.638 | 0.632 | 0.088 | 0.160 | [0.003, 0.174] | |
| IRM | – | 0.619 | 0.616 | 0.099 | 0.051 | [0.015, 0.188] | |
| GroupDRO | – | 0.609 | 0.607 | 0.108 | 0.050 | [-0.0226, 0.1903] | |
| V-REx | – | 0.623 | 0.622 | 0.094 | 0.066 | [0.015, 0.173] |
| Variant | HR dynamics Guidance | Semantic Guidance | ||||
| Acc | F1 | Acc Mean Std | Acc | F1 | Acc Mean Std | |
| (1) Component Ablations | ||||||
| Remove fusion gate | 0.619 | 0.617 | 0.636 | 0.630 | ||
| Remove input gate | 0.658 | 0.658 | 0.654 | 0.649 | ||
| Remove frozen stress encoder | 0.660 | 0.656 | 0.623 | 0.620 | ||
| Remove learnable encoder | 0.674 | 0.663 | 0.654 | 0.645 | ||
| Model | Neutral Video | Arithmetic | QA Baseline | Counting | Calm | Song Preparation | Stroop |
| HR dynamics Acc | 0.707 | 0.714 | 0.923 | 0.714 | 0.768 | 0.600 | 0.658 |
| Semantic Acc | 0.724 | 0.684 | 1.000 | 0.633 | 0.659 | 0.800 | 0.763 |
| Model | HR dynamics Guidance | Semantic Guidance | ||
| BAcc | AUC | BAcc | AUC | |
| Cross-Attn | 0.635 | 0.635 | 0.500 | 0.599 |
| MoE | 0.635 | 0.635 | 0.583 | 0.583 |
| FiLM | 0.625 | 0.448 | 0.562 | 0.410 |
| RETRACE | 0.660 | 0.679 | 0.686 | 0.564 |
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
| Component | Layers | Input Output | Notes |
| Stress Encoder | 4 | 303 384 | Frozen, dropout = 0.2 |
| Physiology Branch | 2 | 303 384 | Dropout = 0.193 |
| Gate Projection | 2 | 32 303 | Sigmoid output (feature gating) |
| Fusion Projection | 1 | 32 384 | Subject-conditioned |
| Fusion Gate | 2 | 3*384 1 | Sample-wise scalar weight |
| Classifier | 3 | 384 2 | Binary logits |