Abstract
Electrodermal Activity (EDA), an indicator of sympathetic nervous system activation, has been widely examined in psychophysiological research but remains relatively underexplored in the context of substance use detection. This dissertation presents iEDA-LSTM, a real time substance use detection framework that integrates EDA-based biophysiological sensing, longitudinal signal modeling, and deep learning. The study systematically characterizes EDA signal dynamics associated with cocaine use and implements an end-to-end detection pipeline encompassing biosensor data acquisition, preprocessing, temporal feature extraction, and real-time event prediction using a Long Short-Term Memory (LSTM) network adapted for substance use data streams. Multiple labeling strategies are developed to define onset and event windows of cocaine use, with various smoothing techniques, Savitzky-Golay, Gaussian, and rolling-average filters, applied to construct stable event-window outcomes. To identify predictive relationships between candidate outcomes and multimodal predictors derived from EDA and temperature data, feature alignment and temporal similarity mapping are employed to optimize input-output pairing for model training. Across five-fold cross validation, iEDA-LSTM consistently outperforms baseline machine learning models based on generic evaluation metrics, demonstrate the best predictive performance and robustness, with iEDA-LSTM also achieving higher event detection accuracy. Additional analyses examine model extensions incorporating attention mechanisms, L1 Lambda regularization, L2 Ridge regularization to evaluate their effects on interpretability and generalization. Beyond algorithmic evaluation, this dissertation demonstrates a live emulated real-time deployment of iEDA-LSTM. Using a Samsung Galaxy Tab S7+ as a biosensor data interface and a Windows workstation with an NVIDIA RTX A4500 GPU for inference, the system performs continuous per-window prediction to identify potential cocaine use events from historical real-time data streams. This research contributes to both methodological and applied domains. Methodologically, it advances temporal deep learning approaches for physiological signal interpretation and introduces a validated real-time framework for event-based biosensing. From an application perspective, it supports the development of real-time substance use monitoring systems that may facilitate earlier detection and intervention. The iEDA-LSTM framework offers a scalable basis for future adaptive, sensor-driven technologies in mental and behavioral health monitoring.