Scaling clinical wearable foundation models for the detection of in-hospital deterioration - This project supports a Research Software Engineer (RSE) to significantly advance in-hospital patient care by developing and disseminating cutting-edge, AI-driven software tools for the early prediction of clinical deterioration. The broad, long-term objective is to transform patient monitoring by enabling timely interventions, thereby improving patient outcomes and reducing healthcare costs associated with acute deterioration events in non-critical care settings. This work directly supports Aim 2 of NIH grant R01NR020774. A primary specific aim is to develop next-generation, personalized deterioration prediction models leveraging an extensive clinical wearable dataset. The research design involves employing generative foundation models and multimodal learning. Key methods include self-supervised pre-training on unlabeled physiological time series data using frameworks such as SimCLR and BYOL, followed by fine-tuning on labeled deterioration events. Multimodal foundation models will be developed to integrate continuous vital signs from wearables with Electronic Health Record (EHR) data, utilizing novel fusion techniques to capture complex interactions. To address data scarcity for rare clinical events, cross-location data synthesis techniques, including Generative Adversarial Networks (GANs) and optimal transport-based methods, will be investigated to generate realistic synthetic physiological data. These models will be rigorously validated using 10-fold cross-validation for both short-term (4-hour) and mid-term (24-hour) prediction windows, aiming for superior accuracy, timeliness, and generalizability. The models' capabilities will also be assessed for predicting missing continuous vital values and demographic features based solely on recorded vitals. A second major aim, directly aligning with the RSE's short-term career goal, is the creation and public release of a robust, open-source Python package for comprehensive validation of wearable sensor data against multiple ground truth sources. This package will incorporate time alignment algorithms, visualization tools (e.g., scatterplots, Bland-Altman plots), and automated statistical tests. Its development will adhere to research software engineering best practices, including a modular architecture for interoperability, extensive unit and integration testing for robustness, comprehensive documentation for user adoption and tools for distributed computing to handle large datasets. The RSE's long-term career objective involves building a platform to operationalize the developed deterioration foundation model, specifically the Continuous Clinical Alert System (CCAS). This platform will provide secure, scalable infrastructure for real-time data streaming, EHR integration, and seamless deployment of CCAS outputs into clinical workflows, supporting the entire AI/ML Software as a Medical Device (SaMD) lifecycle and eventual FDA submission. These RSE activities are critical for translating advanced AI research into clinically impactful tools, enhancing patient safety, and establishing sustainable research software.