Abstract
Medication for neurological diseases such as Parkinson's disease usually happens remotely away from hospitals. Such out-of-lab environments pose challenges in collecting timely and accurate health status data. Individual differences in behavioral signals collected from wearable sensors also lead to difficulties in adopting current general machine learning analysis pipelines. To address these challenges, we present a method for predicting the medication status of Parkinson's disease patients using the public mPower dataset, which contains 62,182 remote multi-modal test records collected on smartphones from 487 patients. The proposed method shows promising results in predicting three medication statuses objectively: Before Medication (AUC=0.95), After Medication (AUC=0.958), and Another Time (AUC=0.976) by examining patient-wise historical records with the attention weights learned through a Transformer model. Our method provides an innovative way for personalized remote health sensing in a timely and objective fashion which could benefit a broad range of similar applications.
Introduction
Managing Parkinson’s Disease (PD) relies heavily on precise medication adherence and timing. However, symptoms fluctuate significantly throughout the day—often referred to as "on" and "off" states—and these fluctuations are highly idiosyncratic. Currently, clinicians often rely on patient self-reporting or infrequent in-clinic assessments, both of which are prone to bias and the "white-coat effect."
While smartphone-based health sensing offers a solution for remote monitoring, the data is notoriously noisy. Individual differences in how people walk, tap, or move make it difficult for "one-size-fits-all" machine learning models to accurately detect medication status across a diverse population. This research bridges this gap by creating a model that learns what "medicated" looks like specifically for each individual by leveraging historical context.
Methodology
The proposed framework consists of a personalized, sequence-based approach that moves away from patient-agnostic modeling. The end-to-end pipeline is illustrated below:
1. Patient-level Sequence Construction
Instead of treating every test record as an independent data point, the model groups records by patient and sorts them chronologically. It uses a "query-key" matching strategy: to predict the status of a new test (the query), the model looks at a small sample of the patient's historical records (the keys) where the status is already known.
2. Tokenization and Attribute Encoding
Raw signals, such as 3-axis accelerometer data, are broken into discrete chunks or "tokens." The model then adds "Attribute Encodings" to inject vital context, including the time of day, the specific test modality (e.g., walking vs. tapping), and the known medication status of historical records.
3. Shuffle-and-Merge Transformer
The core architectural innovation is the Shuffle-and-Merge Transformer. Unlike standard Transformers that process tokens linearly, this model randomly shuffles tokens and merges neighboring pairs to create "second-order" tokens. This allows the network to exchange information across different time scales and modalities, capturing both fine-grained tremors and broader behavioral patterns.
Datasets
The model was primarily evaluated on the mPower Dataset, a massive public dataset containing 62,182 multi-modal records from 487 PD patients, including walking, tapping, and memory tests. To demonstrate generalizability, the authors also tested the framework on the PhysioNet-2019 dataset, which contains 34 time-dependent physiological features from ICU sepsis patients.
Key Results
The proposed method significantly outperformed standard machine learning baselines (like XGBoost and LSTMs) and recent domain-specific PD models. Key performance metrics on the mPower dataset include:
- Before Medication Prediction: 0.950 AUC
- After Medication Prediction: 0.958 AUC
- Another Time (Other) Prediction: 0.976 AUC
- Overall Accuracy: 91.8%
This represents a nearly 2% improvement over previous state-of-the-art Transformer models. Visualization of attention weights confirmed that the model correctly assigns higher importance to historical records that share the same medication status as the current query record, proving it learns personalized behavioral shifts.
Discussion and Conclusion
The primary insight of this work is that personalization is paramount. By allowing the model to "remember" a patient's past, it learns the relative change in behavior rather than searching for a universal, and often non-existent, "Parkinson's signal."
While the model shows robustness even with as few as four historical records, limitations remain regarding data sparsity and the reliability of participant-reported ground truth labels. Future work will explore integrating Ordinary Differential Equation (ODE) methods to handle irregular time intervals between tests and expanding the model to include voice and sleep data for a more holistic health assessment.
Summary updated