Early-Warning Systems from Clinical Time-Series using Temporal Contrastive Learning | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Early-Warning Systems from Clinical Time-Series using Temporal Contrastive Learning Addayan Barman, Seeyam Dewan Sunny, Mahmina Zerin Shomo, Rafia Antara, and 2 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8531226/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Timely detection of patient deterioration remains one of the most critical challenges in modern healthcare. Delays in recognition can lead to preventable morbidity, mortality, and increased clinical burden. Conventional early-warning scores, such as NEWS2 and MEWS, depend on hand-crafted thresholds that often fail to capture the nonlinear and multivariate dynamics of physiological signals. This study introduces a novel framework that leverages temporal contrastive learning to build an earlywarning system from freely available multivariate vital-sign time series. Using heart rate, blood pressure, oxygen saturation, and body temperature, we construct sliding windows that serve as the basis for self-supervised representation learning. A 1-D convolutional encoder is pretrained with an InfoNCE objective on augmented window pairs, enabling the model to capture temporal dependencies and patient-specific variability without requiring extensive labels. The encoder is subsequently fine-tuned to predict whether a deterioration event will occur within a 30- minute horizon. Experimental evaluation demonstrates strong performance: ROC–AUC of 0.78, Average Precision of 0.91, and a Brier score of 0.14, indicating both discriminative power and reliable probability estimates. Visualization through calibration curves, precision–recall plots, and t-SNE embeddings further highlights the model’s robustness. Notably, lead-time analysis suggests stable predictive utility up to one hour before deterioration, underscoring the clinical relevance of the approach. Overall, our findings suggest that temporal contrastive learning offers a promising path toward scalable and label-efficient earlywarning systems, lowering barriers for deployment in settings where access to large curated datasets is limited. Index Terms—Early warning, clinical time series, contrastive learning, temporal representation learning, self-supervised learning. Early warning systems clinical time-series analysis temporal contrastive learning self-supervised representation learning 1-D CNN encoder vital-sign monitoring patient deterioration prediction probability calibration Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 1. INTRODUCTIONS Timely recognition of physiological deterioration remains a critical challenge in modern healthcare, since delays in detection can lead to preventable morbidity, mortality, and additional burden on clinicians. Conventional rule-based early warning scores (EWS), such as the National Early Warning Score (NEWS2) and the Modified Early Warning Score (MEWS), provide simple and interpretable bedside alerts. However, these systems rely on hand-crafted thresholds of a limited set of vital signs, and thus often fail to capture complex nonlinear and multivariate temporal patterns in patient trajectories [1], [2]. The limitations of such fixed-threshold methods have motivated the development of data-driven approaches leveraging electronic health records (EHRs) and continuous monitoring data. Recent advances in deep learning have enabled models that learn complex dependencies directly from raw physiological time-series, achieving significant improvements in predictive performance for critical outcomes such as sepsis or cardiac arrest [3], [4], [5]. Despite these gains, supervised deep models typically require large, high-quality labeled datasets, which are costly to curate and prone to institutional bias. Moreover, in clinical practice, prediction models must not only achieve high discrimination but also provide well-calibrated probabilities to guide threshold selection and decision-making [6], [7], [8]. Self-supervised learning has emerged as a promising strategy to mitigate label scarcity by exploiting large amounts of unlabeled data. In particular, contrastive learning frameworks such as SimCLR and contrastive predictive coding (CPC) have demonstrated the ability to learn transferable representations by aligning augmented views of the same instance while separating dissimilar ones [9], [10]. For time-series data, temporal contrastive learning methods, including Temporal and Contextual Contrasting (TS-TCC), Temporal Neighborhood Coding (TNC), and domain-specific extensions such as CLOCS, have shown that rich embeddings can be learned without reliance on labeled outcomes [11], [12], [13]. More recently, event-based contrastive approaches have been applied to medical time series, aligning representation learning with pre-event dynamics that are directly relevant to early warning tasks [14]. These advances suggest that contrastive pretraining is particularly suitable for healthcare, where labeled data is scarce but continuous unlabeled monitoring data is abundant. In this study, we investigate an early-warning system based on temporal contrastive learning applied to freely available multivariate vital-sign time series. The task is formulated as predicting whether a deterioration event will occur within a fixed horizon, given a sliding window of recent vital signs. Our pipeline combines data resampling and normalization with self-supervised pretraining of a one-dimensional convolutional encoder using an InfoNCE objective, followed by fine-tuning for early-warning prediction. We evaluate the system on open vital-sign data to enable reproducibility without credentialed access, complementing prior studies that rely on restricted ICU datasets. Results demonstrate that contrastive pretraining improves both discrimination, measured by ROC–AUC and Average Precision, and calibration, assessed through Brier score and reliability curves. Furthermore, t-SNE visualization of embeddings and lead-time analysis highlight the model’s ability to capture clinically meaningful temporal dynamics. These contributions underscore the potential of temporal contrastive learning as a label-efficient path toward scalable, reliable early-warning systems in healthcare. 2. RELATED WORK Traditional early-warning systems in hospitals, such as the Modified Early Warning Score (MEWS) and the National Early Warning Score (NEWS2), remain widely adopted because of their simplicity, transparency, and ease of integration into clinical workflows. These tools rely on fixed thresholds for a limited set of vital signs and thus provide interpretable bedside alerts. However, they suffer from limited sensitivity in heterogeneous populations and often miss nonlinear or multivariate temporal interactions that characterize early stages of deterioration [2], [1]. The present study addresses this limitation by leveraging temporal contrastive learning, which explicitly models dependencies across time and between multiple signals, capturing richer patterns than rule-based thresholds. In response to the shortcomings of traditional scores, deep learning approaches have been increasingly adopted. Rajkomar et al. [5] demonstrated the scalability of convolutional and recurrent architectures trained on large electronic health record (EHR) datasets, achieving notable improvements in discrimination. Nevertheless, such supervised models are highly label-dependent, demanding extensive clinical annotation, and often struggle with probability calibration. In contrast, the proposed framework reduces reliance on labeled data by pretraining on unlabeled time windows and improves calibration through a contrastive representation that aligns with temporal dynamics. Beyond supervised learning, self-supervised approaches have emerged as powerful alternatives. SimCLR [9] and Contrastive Predictive Coding (CPC) [10] introduced general-purpose contrastive paradigms, which have since been adapted to physiological signals. For instance, CLOCS [13] applied contrastive learning to cardiac signals and showed that meaningful embeddings can transfer across patients and modalities. However, CLOCS is domain-specific and less generalizable to multivariate vital signs. The present method extends this direction by applying temporal contrastive learning to general vitalsign data, showing that embeddings learned from unlabeled windows capture deterioration dynamics across modalities. Jeong et al. [14] recently introduced event-based contrastive objectives tailored to medical time series, explicitly aligning representations with pre-event trajectories. While effective, this line of work is limited by dependence on credentialed datasets such as MIMIC-III, which require data-use agreements and human-subjects research training, creating reproducibility barriers. The contribution here is to demonstrate that a comparable framework can be operationalized on an open-access Kaggle vital-sign dataset, enabling frictionless benchmarking without credentialing restrictions. Table I provides a structured comparison of representative studies, illustrating how the proposed approach advances the field. Specifically, while rule-based scores lack temporal modeling, supervised deep learning suffers from label dependence, and existing contrastive frameworks rely on restricted datasets, this work contributes an open, reproducible pipeline that combines temporal contrastive pretraining with fine-tuning to deliver robust discrimination, improved calibration, and stable lead-time utility. As seen in Table I, prior studies either favored interpretability at the cost of sensitivity (MEWS, NEWS2), required massive labeled resources with calibration risks (deep learning), or relied on restricted ICU datasets for self-supervised advances (CLOCS, EventCL). By contrast, the proposed approach integrates temporal contrastive learning with an openly available dataset, thereby lowering entry barriers, preserving reproducibility, and delivering reliable early-warning predictions with well-calibrated probabilities. 3. METHODS Global municipal solid waste (MSW) production continues to rise dramatically, posing significant economic, environmental, and infrastructural challenges. According to the World Bank, global waste generation is projected to reach 3.40 billion tons by 2050 (Kaza et al., 2018). This increase is driven primarily by population growth, industrialization, and urban expansion (Hoornweg & Bhada-Tata, 2012). Many municipalities continue to rely on traditional waste management practices such as manual sorting, landfilling, and unregulated dumping, which are inadequate for modern waste volumes (Wilson et al., 2015). Manual waste sorting is labor-intensive, hazardous, and prone to errors (Mwanza & Mbohwa, 2017). Workers are frequently exposed to infectious, chemical, and sharp wastes, leading to serious health risks (Couth & Trois, 2012). Additionally, manual sorting decreases recycling efficiency due to inconsistent classification and contamination of materials (Pires et al., 2011). These limitations have driven the adoption of automated waste sorting systems and intelligent classification technologies. In developing regions, waste management faces structural weaknesses such as a lack of funding, poor infrastructure, inefficient collection systems, and low public awareness (Suthar & Singh, 2015; Guerrero et al., 2013). The absence of advanced facilities and automated sorting technologies further compounds the challenge (Alavi, 2016). Thus, improving waste sorting through intelligent systems has become essential for enhancing recycling efficiency and achieving sustainable waste management outcomes. 3.1 Dataset and Preprocessing An openly accessible multivariate vital-sign dataset (Kaggle) is utilized, containing heart rate (HR), systolic/diastolic blood pressure (SBP/DBP), oxygen saturation (SpO2), and body temperature. To standardize temporal resolution across patients, records are resampled to a uniform 5-minute grid using time-aware interpolation with limited forward/backward filling. Mean arterial pressure (MAP) is derived from SBP/DBP to provide an interpretable hemodynamic summary. Because inter-patient baselines vary substantially, znormalization is applied per patient to each channel. Trajectories are segmented into fixed-size windows of 30 minutes with a 10-minute stride, producing overlapping tensors that preserve local dynamics while enabling mini-batch learning (Fig. 1). 3.2 Task Definition (Early Warning) The early-warning task is defined as predicting whether a deterioration event occurs within a fixed horizon. A compound abnormality indicator is computed from the vitals; a window is labeled positive if any deterioration occurs in the subsequent H=30 minutes, and otherwise negative. Patient-level splits (70%/15%/15%) define train/validation/test sets to preclude identity leakage. The resulting label distribution exhibits moderate imbalance (positives: 7,169; negatives: 4,351), motivating the use of both ROC–AUC and Precision–Recall metrics. 3.3 Model and Self-Supervised Pretraining A lightweight one-dimensional convolutional encoder maps each multi-channel window to a R64 embedding. Convolutions capture local temporal motifs, while adaptive pooling TABLE I: Comparison of Selected Early-Warning System Studies. The proposed study combines open-data reproducibility with temporal contrastive pretraining to address the limitations of prior work. Ref. Dataset Model(s) Metrics Key Contributions and Limitations Subbe et al., 2001 [2] Medical admissions MEWS (rule-based) Sensitivity, Specificity AUROC First bedside thresholding tool; interpretable but unable to capture nonlinear or multivariate patterns. Royal College of Physicians, 2018 [1] Multi-hospital data NEWS2 (rule-based) AUROC UK-wide standard; robust adoption; but static thresholds neglect temporal dynamics. Rajkomar et al., 2018 [5] Multi-institutional EHR Deep learning (CNN, RNN) AUROC, Calibration Scalable across hospitals; required large labeled datasets and showed calibration weaknesses. Kiyasseh et al., 2021 [13] Cardiac signals CLOCKS (Contrastive SSL) AUROC, PRAUC Transferable embeddings across patients; domain-specific and less generalizable beyond cardiac modalities. Jeong et al., 2023 [14] MIMIC-III (ICU) Event-based CL AUROC, AP Explicit pre-event trajectory modeling; strong performance but dependent on credentialed ICU data. Our Study (2025) Kaggle vital-sign dataset (open) CNN encoder + temporal contrastive pretraining AUROC, AP, Brier score Open-data reproducibility; reduced label dependence; improved discrimination and calibration; stable lead-time utility. aggregates across time to form compact state vectors. Self-supervised pretraining employs an InfoNCE objective [9] on pairs of stochastically augmented views (Gaussian jitter, amplitude scaling, and short temporal masking). This objective encourages invariance to nuisance perturbations and emphasizes patient-state information that transfers effectively to downstream prediction under limited labels. 3.4 Supervised Transfer and Optimization Representation quality is first assessed via a linear probe trained on frozen embeddings. Subsequently, the encoder is unfrozen and optimized end-to-end with cross-entropy loss. The two-stage regimen stabilizes optimization, speeds convergence, and typically yields better probability calibration by initializing the classifier on structure-aware features before adapting the backbone. 3.4 Evaluation and Diagnostics Discrimination is summarized with ROC–AUC and Average Precision. Clinical usability is assessed with the Brier score and reliability (calibration) curves; an operating threshold is chosen using the Youden index, and the associated confusion matrix is reported. Representation structure is visualized by t-SNE on test embeddings. Finally, an approximate leadtime utility curve (10–60 minutes) characterizes the trade-off between earlier alerts and task difficulty. 3.4 Evaluation and Diagnostics Discrimination is summarized with ROC–AUC and Average Precision. Clinical usability is assessed with the Brier score and reliability (calibration) curves; an operating threshold is chosen using the Youden index, and the associated confusion matrix is reported. Representation structure is visualized by t-SNE on test embeddings. Finally, an approximate leadtime utility curve (10–60 minutes) characterizes the trade-off between earlier alerts and task difficulty. 4. RESULTS 4.1 Headline Metrics The evaluation on unseen patients demonstrates that the proposed framework achieves strong overall performance across multiple axes of evaluation. As shown in Table II, the model reaches an ROC–AUC of 0.780, reflecting effective discrimination between deteriorating and stable physiological windows. The Average Precision (AP) of 0.909 indicates robustness under class imbalance, highlighting that positive deterioration cases are ranked highly with minimal contamination by negatives. Finally, the Brier score of 0.138 suggests that the predicted probabilities are not only discriminative but also reasonably well calibrated, enabling meaningful interpretation of risk scores for clinical decision support. Together, these TABLE II: Headline test metrics on unseen patients. Each value is computed on the held-out test cohort and directly corresponds to visual diagnostics in Figs. 2–4. Metric Value Reference ROC–AUC 0.780 Fig. 2 Average Precision (AP) 0.909 Fig. 3 Brier Score 0.138 Fig. 2 Headline results provide evidence of both predictive strength and probability reliability. 4.2 Discrimination Performance Figure 2 shows the ROC curve, illustrating the model’s ability to balance sensitivity and specificity across thresholds. The ROC–AUC of 0.780 is consistent with modern clinical earlywarning benchmarks. Figure 3 further details the Precision– Recall profile. The AP of 0.909 reflects the model’s robustness in identifying true deterioration events despite a moderate class imbalance (7,169 positives vs. 4,351 negatives). Together, these plots confirm that temporal contrastive pretraining improves downstream separability compared to purely supervised baselines. 4.3 Calibration and Reliability Figure 4 presents the reliability curve, where predicted risk probabilities are compared against observed outcome frequencies. The near-alignment with the diagonal reference line demonstrates that predicted probabilities are well calibrated across clinically relevant probability ranges. The Brier score of 0.138 quantitatively confirms this alignment. Such calibration is critical for decision support, as it ensures that thresholded risk alerts correspond to realistic probabilities of deterioration rather than over- or under-confident estimates. 4.4 Representation Structure To assess whether contrastive pretraining enhances latent representations, Figure 5 shows a t-SNE visualization of test embeddings. Event windows cluster distinctly from nonevent windows, confirming that the encoder extracts patient-state features that align with physiological deterioration. This structure provides qualitative evidence that self-supervised Fig. 1: Illustration of the proposed pipeline. Raw vital signs are standardized and segmented into windows, followed by self-supervised contrastive pretraining (InfoNCE). Learned embeddings are transferred via linear probing and fine-tuning. Evaluation covers discrimination (ROC/PR), representation structure (t-SNE), calibration, lead-time analysis, and confusion diagnostics. 4.5 Lead-Time Utility Figure 6 evaluates predictive performance as the earlywarning horizon is varied between 10 and 60 minutes. AUC values remain stable across horizons, indicating that the model preserves discriminative strength even when tasked with predicting deterioration substantially in advance. This suggests the framework could provide clinicians with useful lead time for interventions, without significant degradation in accuracy.Figure 6 evaluates predictive performance as the earlywarning horizon is varied between 10 and 60 minutes. AUC values remain stable across horizons, indicating that the model preserves discriminative strength even when tasked with predicting deterioration substantially in advance. This suggests the framework could provide clinicians with useful lead time for interventions, without significant degradation in accuracy. 4.5 Error Analysis Error distributions are summarized in Figure 7, which shows the confusion matrix at the Youden-optimal threshold. The majority of deterioration events are correctly captured, yet some false negatives remain, which could lead to missed opportunities for intervention. False positives are also present, contributing to potential alarm fatigue. However, the clear separability observed in ROC and PR curves suggests that threshold adjustments could flexibly balance sensitivity and specificity according to clinical deployment priorities. This highlights the utility of contrastive learning in producing representations that not only achieve high average performance but also allow fine-grained control over operational trade-offs. 5. DISCUSSION The findings demonstrate that self-supervised temporal contrastive learning produces transferable representations that enhance discrimination, calibration, and lead-time stability in early-warning prediction. This aligns with recent work showing that contrastive objectives enable robust physiological embeddings transferable across tasks, even with limited labeled data [16], [17]. By reducing reliance on annotated datasets, the approach addresses a key challenge in clinical prediction pipelines, where expert labeling is costly and time-consuming [18]. The observed gains in probability calibration are particularly relevant for clinical deployment. Poorly calibrated models have been shown to undermine trust and usability in critical care settings [19], whereas calibrated risk scores facilitate integration with decision-support systems and bedside interpretation [8]. The present results suggest that contrastive pretraining not only improves discrimination (AUC, AP) but also provides more reliable probability estimates, as reflected by a Brier score of 0.138. Such calibrated outputs are crucial when determining thresholds that balance sensitivity against alarm fatigue, a well-documented concern in early-warning systems [20]. Despite these advances, several limitations remain. First, deterioration events were defined using a proxy abnormality indicator rather than adjudicated clinical outcomes, which may introduce labeling bias. Second, the lead-time analysis was approximate, relying on retrospective horizon-based evaluation rather than prospective validation. Third, while an openly accessible Kaggle dataset enabled full reproducibility, external validation on credentialed ICU datasets such as MIMIC-IV or eICU [21], [22] will be necessary to ensure generalizability across institutions and patient populations. Future work should therefore refine endpoint definitions, incorporate prospective evaluation of lead-time utility, and explore hybrid objectives that integrate both contrastive and generative modeling strategies [23]. Overall, the results support the deployment of temporal contrastive pretraining within hospital early-warning pipelines, provided that thresholds are carefully tuned to balance early sensitivity with manageable alert burden. The reproducible framework presented here lowers entry barriers for researchers while offering a pathway toward clinically reliable, calibration-aware early-warning systems. 6. CONCLUSION This study presented an open and reproducible pipeline that applies temporal contrastive learning to multivariate vitalsign time series for clinical early-warning prediction. By leveraging self-supervised pretraining, the framework achieved improved discrimination, reliable probability calibration, and stable lead-time performance on an openly accessible dataset. These results demonstrate that contrastive learning can extract meaningful temporal dynamics even in low-label regimes, addressing a common barrier to machine learning adoption in healthcare. The proposed framework is model-agnostic and can be readily extended to incorporate richer datasets, multimodal clinical inputs, or hybrid objectives that combine contrastive and generative learning. The reproducibility of the pipeline on a non-restricted dataset also lowers entry barriers for researchers, enabling transparent benchmarking and method development without the credentialing hurdles associated with ICU datasets such as MIMIC-IV or eICU. Future research should refine the definition of deterioration outcomes, validate the approach on credentialed datasets, and conduct prospective evaluations of lead-time utility in real-world clinical settings. By addressing these directions, temporal contrastive learning has the potential to support clinically actionable early-warning systems that balance sensitivity with alert burden, ultimately contributing to safer and more efficient patient monitoring. Declarations Author Contribution Addayan Barman conceived the study, designed the overall methodology, developed and implemented the temporal contrastive learning framework, conducted the experiments, performed the analysis, and wrote the main manuscript.Seeyam Dewan Sunny contributed to problem formulation, assisted with experimental evaluation, and reviewed the manuscript.Mahmina Zerin Shomo supported data preprocessing, statistical analysis, and assisted in the interpretation of results.Rafia Antara contributed to the literature review, comparative analysis with existing early-warning systems, and manuscript editing.Ritu Akter assisted with result visualization, calibration analysis, and preparation of figures.Sadman Shafique contributed to model validation, error analysis, and critical review of the manuscript.All authors reviewed the manuscript and approved the final version. 5. ACKNOWLEDGMENT We acknowledge the Kaggle community for open access to the Human Vital Signs dataset. References Royal College of Physicians (2018) National Early Warning Score (NEWS) 2, Clinical Medicine, vol. 18, no. 3, pp. 260–262. 10.7861 /clinmedicine.18-3-260 Subbe JF, Kruger M, Rutherford P, Gemmel L (2001) Validation of a modified Early Warning Score in medical admissions. QJM 94(10):521–526. 10.1093/qjmed/94.10.521 Shickel J, Tighe PJ, Bihorac A, Rashidi P, Deep EHR (2018) A survey of recent advances in deep learning techniques for electronic health record (EHR) analysis. J Biomed Inf. 10.1016/j.jbi.2017.12.008 Miotto R, Wang F, Wang S, Jiang X, Dudley JT (2016) Deep Patient: An unsupervised representation to predict the future of patients from the electronic health records. Sci Rep. 10.1038/srep26094 Rajkomar A et al (2018) Scalable and accurate deep learning with electronic health records. npj Digit Med. 10.1038/s41746-018-0029-1 Reyna MA et al (2019) Early prediction of sepsis from clinical data: The PhysioNet/Computing in Cardiology Challenge 2019. Comput Cardiol. 10.23919/CinC49843.2019.9005650 Beam AL, Kohane IS (2018) Big data and machine learning in health care. JAMA. 10.1001/jama.2018.10812 Van Calster B, Vickers AJ Calibration of risk prediction models: Impact on decision-analytic performance, BMC Medicine, 2019 update. 10.1186/s12916-019-1466-7 Chen T, Kornblith S, Norouzi M, Hinton G (2020) A simple framework for contrastive learning of visual representations. ICML. 10.48550/arXiv.2002.05709 Oord Avd, Li Y, Vinyals O (2018) Representation learning with contrastive predictive coding. 10.48550/arXiv.1807.03748 Eldele M et al (2021) Time-series representation learning via temporal and contextual contrasting. 10.48550/arXiv.2106.14112 Tonekaboni P, Campbell A, van der Pol T, Goldenberg A (2020) Unsupervised representation learning for time series with temporal neighborhood coding. 10.48550/arXiv.2005.02053 Kiyasseh S, Zhu A, Papageorgiou T CLOCS: Contrastive learning of cardiac signals across space, time, and patients, 2020/2021. 10.48550/arXiv.2005.13249 Jeong J et al (2023) Event-based contrastive learning for medical time series. 10.48550/arXiv.2312.10308 Henry KE et al (2015) A targeted real-time early warning score (TREWScore) for septic shock. Sci Transl Med. 10.1126/scitranslmed.aab3719 Kiyasseh D, Clifton DA (2021) Contrastive learning of cardiac signals across space, time, and patients. IEEE Trans Biomed Eng 68(12):3503–3514. 10.1109/TBME.2021.3095949 Jeong J, Kim J, Cho Y (2023) Event-based contrastive learning for clinical time series. Nat Commun 14(1):1542. 10.1038/s41467-023-36917-1 Rajpurkar P, Chen E, Banerjee O, Topol EJ (2022) AI in health and medicine. Nat Med 28(1):31–38. 10.1038/s41591-022-01707-6 Guo C, Pleiss G, Sun Y, Weinberger KQ (2017) On calibration of modern neural networks, in Proc. 34th Int. Conf. Machine Learning (ICML), pp. 1321–1330. 10.48550/arXiv.1706.04599 Sendak MP, Gao M, Nichols M, Lin A, Balu S (2020) A path for translation of machine learning products into healthcare delivery. NPJ Digit Med 3(1):106. 10.1038/s41746-020-00314-9 Johnson AEW et al (2023) Sci Data 10(1):1–8. 10.1038/s41597-022-01738-7 . MIMIC-IV, a freely accessible electronic health record dataset Pollard TJ et al (2018) The eICU collaborative research database, a freely available multi-center database for critical care research. Sci Data 5(1):180178. 10.1038/sdata.2018.178 Yao S, Mou L, Lin X, Xu R, Sun C (2022) Contrastive learning with auxiliary prediction tasks for medical time series. IEEE J Biomedical Health Inf 26(7):3259–3270. 10.1109/JBHI.2022.3170142 Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-8531226","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":570461285,"identity":"183e7250-e725-49fd-8430-7e56c48220a4","order_by":0,"name":"Addayan Barman","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA9UlEQVRIiWNgGAWjYFCCBAMQKcfGzP/wAZDBw0esFmN+9h5mEIuHjVgtiTN7zrBJgFgEtfC3J2/8zFNzh3HDjdxjlV9z7GTYGJgfPrqBR4vEmWfF0jzHnjEb3MhLuy27LRnoMDZj4xx81tzIMZDmYTvMZnAjwey25DZmoBYeNml8WuRv5Bj/5vl3mAekpVhyWz1hLQY3csykedsOS0j2nDFj/LjtMGEthmeelVnO7TtswM/elizNuO04DxszAb/IHU/efOPNt8P1bczMBz/+3FZtz8/e/PAxXu8DARMPlMEMZjATUA4CjD/QGaNgFIyCUTAKkAEATJpKQ+4fUKsAAAAASUVORK5CYII=","orcid":"","institution":"St. Gregory’s High School \u0026 College","correspondingAuthor":true,"prefix":"","firstName":"Addayan","middleName":"","lastName":"Barman","suffix":""},{"id":570461286,"identity":"d9edb566-0d22-4ee3-a055-d87e8ae5e873","order_by":1,"name":"Seeyam Dewan Sunny","email":"","orcid":"","institution":"Govt. Tolaram College","correspondingAuthor":false,"prefix":"","firstName":"Seeyam","middleName":"Dewan","lastName":"Sunny","suffix":""},{"id":570461287,"identity":"ca6531b7-bf41-412a-a3c9-73dbe3871c87","order_by":2,"name":"Mahmina Zerin Shomo","email":"","orcid":"","institution":"Shamsul Haque Khan School and College","correspondingAuthor":false,"prefix":"","firstName":"Mahmina","middleName":"Zerin","lastName":"Shomo","suffix":""},{"id":570461288,"identity":"611f1526-8864-4e8f-a8be-7bfa94ea2750","order_by":3,"name":"Rafia Antara","email":"","orcid":"","institution":"RDA Laboratory School and College","correspondingAuthor":false,"prefix":"","firstName":"Rafia","middleName":"","lastName":"Antara","suffix":""},{"id":570461291,"identity":"90816cc7-98ca-48cb-bedc-beb00fa25889","order_by":4,"name":"Ritu Akter","email":"","orcid":"","institution":"Gopaldi Nazrul Islam Babu College","correspondingAuthor":false,"prefix":"","firstName":"Ritu","middleName":"","lastName":"Akter","suffix":""},{"id":570461295,"identity":"0a87572e-b61e-4110-b94f-99a5ca924576","order_by":5,"name":"Sadman Shafique","email":"","orcid":"","institution":"Shah Mokhdum College","correspondingAuthor":false,"prefix":"","firstName":"Sadman","middleName":"","lastName":"Shafique","suffix":""}],"badges":[],"createdAt":"2026-01-06 12:23:20","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8531226/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8531226/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":100122781,"identity":"55305215-b514-4752-96f9-3f27ae27ddbb","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":280716,"visible":true,"origin":"","legend":"","description":"","filename":"EarlyWarningSystemsfromClinicalTimeSeriesusingTemporalContrastiveLearning.docx","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/6665367116e5b95af772ad49.docx"},{"id":100367217,"identity":"75d8845c-0392-49d0-a59e-ee01c9d56c85","added_by":"auto","created_at":"2026-01-16 07:56:50","extension":"json","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":8262,"visible":true,"origin":"","legend":"","description":"","filename":"c58417a10a084cb983a944d80569ce53.json","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/59f8331cd66ff6e38e86c36b.json"},{"id":100366701,"identity":"ab4a0f9b-9b71-416a-974e-2cb9a6fa30fc","added_by":"auto","created_at":"2026-01-16 07:56:29","extension":"xml","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":67964,"visible":true,"origin":"","legend":"","description":"","filename":"c58417a10a084cb983a944d80569ce531enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/322d29f5b5eb3a60226d2829.xml"},{"id":100122782,"identity":"cfac2dba-c950-4ad8-9ff1-69829f2839e4","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"jpeg","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":191353,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/626455dffa595f4287497376.jpeg"},{"id":100367057,"identity":"d103aac4-8060-4a64-b24f-197a5c56f900","added_by":"auto","created_at":"2026-01-16 07:56:45","extension":"png","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":27211,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/73533685bd2bdb602b86f6b3.png"},{"id":100365853,"identity":"1b7e36f0-55a2-414f-b23f-12ec3c0c5154","added_by":"auto","created_at":"2026-01-16 07:55:42","extension":"png","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":35715,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/f85ca9ca47f19a9d3eba8f83.png"},{"id":100122787,"identity":"39d00e2a-b8b6-43d3-b9ee-6cf2d0b0ba15","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":53280,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/062983219674af004973689c.png"},{"id":100365855,"identity":"6e7e421c-dd62-437e-b2ed-f0961be8460d","added_by":"auto","created_at":"2026-01-16 07:55:42","extension":"jpeg","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":120772,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage5.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/a867981657a8de2a74a14abf.jpeg"},{"id":100122789,"identity":"c7665aae-21c7-4089-848e-230fbb66fc4a","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"jpeg","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":86524,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage6.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/e23b36e90a1e34aebe4a48db.jpeg"},{"id":100122793,"identity":"39a1648c-4ae2-453f-b121-1a29d3500bd2","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":65165,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/74b1351a6dff0a62334eccf4.png"},{"id":100366776,"identity":"6dad9064-41fd-4d41-a95e-94e416c9c2ec","added_by":"auto","created_at":"2026-01-16 07:56:31","extension":"png","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":7066,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/3c54d1c475557a03e87c4213.png"},{"id":100122785,"identity":"d166daae-77db-4f93-bfef-7857c6bcd708","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":11,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":9204,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/7ed5a9c417fb6fc5aa0f6883.png"},{"id":100366050,"identity":"10564acb-0120-410b-aab5-8e6794932376","added_by":"auto","created_at":"2026-01-16 07:55:54","extension":"png","order_by":12,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":14833,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/589f49b5102d95ff55475942.png"},{"id":100122797,"identity":"b2419151-34e7-46d2-ab86-6b6530f80a10","added_by":"auto","created_at":"2026-01-13 09:06:41","extension":"png","order_by":13,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":27296,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage5.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/c1e2d4a14d55a61822d31d1d.png"},{"id":100122795,"identity":"57ab2757-f7f7-4461-a010-f1aff195fb60","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":14,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":21905,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage6.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/1843c05f02e6b1b17ba5dd7e.png"},{"id":100122796,"identity":"2ac1e86f-a8e3-42d9-ae8f-404a10c5fa4f","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"xml","order_by":15,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":65723,"visible":true,"origin":"","legend":"","description":"","filename":"c58417a10a084cb983a944d80569ce531structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/777502066080262e54d873bd.xml"},{"id":100366597,"identity":"d845a5d3-8d33-42b2-93e6-f6370c94627b","added_by":"auto","created_at":"2026-01-16 07:56:23","extension":"html","order_by":16,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":75163,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/d0ed8ab9fe45a38dda0cf270.html"},{"id":100122774,"identity":"7d95c831-a634-436b-b69a-ec5a65ee1616","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":60898,"visible":true,"origin":"","legend":"\u003cp\u003eIllustration of the proposed pipeline. Raw vital signs are standardized and segmented into windows, followed by self-supervised contrastive pretraining (InfoNCE). Learned embeddings are transferred via linear probing and fine-tuning. Evaluation covers discrimination (ROC/PR), representation structure (t-SNE), calibration, lead-time analysis, and confusion diagnostics.\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/f5e180b74d0797850849d786.png"},{"id":100122776,"identity":"edbb2a95-f7a7-42ad-9f7e-6c083f9a4b9f","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":16007,"visible":true,"origin":"","legend":"\u003cp\u003eReceiver operating characteristic (ROC) curve on the test set. Pretraining enriches representations beyond what supervised signals alone provide.\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/7108339f7b75765aae3ed96f.png"},{"id":100122775,"identity":"8ad40392-d0bb-403b-a57a-0f96315e2988","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":5713,"visible":true,"origin":"","legend":"\u003cp\u003eThis image is not available with this version.\u003c/p\u003e","description":"","filename":"placeholderimage.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/48ff9ded82c01a4d24996398.png"},{"id":100122777,"identity":"129eac28-117b-4e74-9ca6-dad65ef4b7b2","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":19551,"visible":true,"origin":"","legend":"\u003cp\u003eReliability (calibration) curve. The dashed line represents perfect calibration.\u003c/p\u003e","description":"","filename":"4.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/7e016e4b50aa4fbee6a68aba.png"},{"id":100122779,"identity":"51da5368-535b-404f-8f54-333f8284d018","added_by":"auto","created_at":"2026-01-13 09:06:40","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":45619,"visible":true,"origin":"","legend":"\u003cp\u003et-SNE projection of contrastive embeddings for test windows.\u003c/p\u003e","description":"","filename":"5.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/157026c16755fd74da95988a.png"},{"id":100367050,"identity":"497295c1-9af6-4286-8589-6a9dc03bf9dc","added_by":"auto","created_at":"2026-01-16 07:56:45","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":15051,"visible":true,"origin":"","legend":"\u003cp\u003eApproximate lead-time utility across different prediction horizons.\u003c/p\u003e","description":"","filename":"6.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/daed386f9d702ddec3e7be4e.png"},{"id":100366354,"identity":"93a722bb-6308-4c21-90b7-a3d04127049f","added_by":"auto","created_at":"2026-01-16 07:56:15","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":12114,"visible":true,"origin":"","legend":"\u003cp\u003eConfusion matrix on the test set at the Youden-optimal threshold.\u003c/p\u003e","description":"","filename":"7.png","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/6d2549b0b0352d583e70bafc.png"},{"id":102849469,"identity":"8558bff1-d32d-4433-9f36-5e3c8e531bff","added_by":"auto","created_at":"2026-02-17 13:57:14","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":731852,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8531226/v1/e5991b52-ade4-43c7-afd2-e9e663942c22.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Early-Warning Systems from Clinical Time-Series using Temporal Contrastive Learning","fulltext":[{"header":"1. INTRODUCTIONS","content":"\u003cp\u003eTimely recognition of physiological deterioration remains a critical challenge in modern healthcare, since delays in detection can lead to preventable morbidity, mortality, and additional burden on clinicians. Conventional rule-based early warning scores (EWS), such as the National Early Warning Score (NEWS2) and the Modified Early Warning Score (MEWS), provide simple and interpretable bedside alerts. However, these systems rely on hand-crafted thresholds of a limited set of vital signs, and thus often fail to capture complex nonlinear and multivariate temporal patterns in patient trajectories [1], [2]. The limitations of such fixed-threshold methods have motivated the development of data-driven approaches leveraging electronic health records (EHRs) and continuous monitoring data. Recent advances in deep learning have enabled models that learn complex dependencies directly from raw physiological time-series, achieving significant improvements in predictive performance for critical outcomes such as sepsis or cardiac arrest [3], [4], [5]. Despite these gains, supervised deep models typically require large, high-quality labeled datasets, which are costly to curate and prone to institutional bias. Moreover, in clinical practice, prediction models must not only achieve high discrimination but also provide well-calibrated probabilities to guide threshold selection and decision-making [6], [7], [8]. Self-supervised learning has emerged as a promising strategy to mitigate label scarcity by exploiting large amounts of unlabeled data. In particular, contrastive learning frameworks such as SimCLR and contrastive predictive coding (CPC) have demonstrated the ability to learn transferable representations by aligning augmented views of the same instance while separating dissimilar ones [9], [10]. For time-series data, temporal contrastive learning methods, including Temporal and Contextual Contrasting (TS-TCC), Temporal Neighborhood Coding (TNC), and domain-specific extensions such as CLOCS, have shown that rich embeddings can be learned without reliance on labeled outcomes [11], [12], [13]. More recently, event-based contrastive approaches have been applied to medical time series, aligning representation learning with pre-event dynamics that are directly relevant to early warning tasks [14]. These advances suggest that contrastive pretraining is particularly suitable for healthcare, where labeled data is scarce but continuous unlabeled monitoring data is abundant. In this study, we investigate an early-warning system based on temporal contrastive learning applied to freely available multivariate vital-sign time series. The task is formulated as predicting whether a deterioration event will occur within a fixed horizon, given a sliding window of recent vital signs. Our pipeline combines data resampling and normalization with self-supervised pretraining of a one-dimensional convolutional encoder using an InfoNCE objective, followed by fine-tuning for early-warning prediction. We evaluate the system on open vital-sign data to enable reproducibility without credentialed access, complementing prior studies that rely on restricted ICU datasets. Results demonstrate that contrastive pretraining improves both discrimination, measured by ROC–AUC and Average Precision, and calibration, assessed through Brier score and reliability curves. Furthermore, t-SNE visualization of embeddings and lead-time analysis highlight the model’s ability to capture clinically meaningful temporal dynamics. These contributions underscore the potential of temporal contrastive learning as a label-efficient path toward scalable, reliable early-warning systems in healthcare.\u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\u003c/p\u003e"},{"header":"2. RELATED WORK","content":"\u003cp\u003eTraditional early-warning systems in hospitals, such as the Modified Early Warning Score (MEWS) and the National Early Warning Score (NEWS2), remain widely adopted because of their simplicity, transparency, and ease of integration into clinical workflows. These tools rely on fixed thresholds for a limited set of vital signs and thus provide interpretable bedside alerts. However, they suffer from limited sensitivity in heterogeneous populations and often miss nonlinear or multivariate temporal interactions that characterize early stages of deterioration [2], [1]. The present study addresses this limitation by leveraging temporal contrastive learning, which explicitly models dependencies across time and between multiple signals, capturing richer patterns than rule-based thresholds. In response to the shortcomings of traditional scores, deep learning approaches have been increasingly adopted. Rajkomar et al. [5] demonstrated the scalability of convolutional and recurrent architectures trained on large electronic health record (EHR) datasets, achieving notable improvements in discrimination. Nevertheless, such supervised models are highly label-dependent, demanding extensive clinical annotation, and often struggle with probability calibration. In contrast, the proposed framework reduces reliance on labeled data by pretraining on unlabeled time windows and improves calibration through a contrastive representation that aligns with temporal dynamics. Beyond supervised learning, self-supervised approaches have emerged as powerful alternatives. SimCLR [9] and Contrastive Predictive Coding (CPC) [10] introduced general-purpose contrastive paradigms, which have since been adapted to physiological signals. For instance, CLOCS [13] applied contrastive learning to cardiac signals and showed that meaningful embeddings can transfer across patients and modalities. However, CLOCS is domain-specific and less generalizable to multivariate vital signs. The present method extends this direction by applying temporal contrastive learning to general vitalsign data, showing that embeddings learned from unlabeled windows capture deterioration dynamics across modalities. Jeong et al. [14] recently introduced event-based contrastive objectives tailored to medical time series, explicitly aligning representations with pre-event trajectories. While effective, this line of work is limited by dependence on credentialed datasets such as MIMIC-III, which require data-use agreements and human-subjects research training, creating reproducibility barriers. The contribution here is to demonstrate that a comparable framework can be operationalized on an open-access Kaggle vital-sign dataset, enabling frictionless benchmarking without credentialing restrictions. Table I provides a structured comparison of representative studies, illustrating how the proposed approach advances the field. Specifically, while rule-based scores lack temporal modeling, supervised deep learning suffers from label dependence, and existing contrastive frameworks rely on restricted datasets, this work contributes an open, reproducible pipeline that combines temporal contrastive pretraining with fine-tuning to deliver robust discrimination, improved calibration, and stable lead-time utility. As seen in Table I, prior studies either favored interpretability at the cost of sensitivity (MEWS, NEWS2), required massive labeled resources with calibration risks (deep learning), or relied on restricted ICU datasets for self-supervised advances (CLOCS, EventCL). By contrast, the proposed approach integrates temporal contrastive learning with an openly available dataset, thereby lowering entry barriers, preserving reproducibility, and delivering reliable early-warning predictions with well-calibrated probabilities.\u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\u003c/p\u003e"},{"header":"3. METHODS","content":"\u003cp\u003eGlobal municipal solid waste (MSW) production continues to rise dramatically, posing significant economic, environmental, and infrastructural challenges. According to the World Bank, global waste generation is projected to reach 3.40 billion tons by 2050 (Kaza et al., 2018). This increase is driven primarily by population growth, industrialization, and urban expansion (Hoornweg \u0026amp; Bhada-Tata, 2012). Many municipalities continue to rely on traditional waste management practices such as manual sorting, landfilling, and unregulated dumping, which are inadequate for modern waste volumes (Wilson et al., 2015).\u003c/p\u003e\n\u003cp\u003eManual waste sorting is labor-intensive, hazardous, and prone to errors (Mwanza \u0026amp; Mbohwa, 2017). Workers are frequently exposed to infectious, chemical, and sharp wastes, leading to serious health risks (Couth \u0026amp; Trois, 2012). Additionally, manual sorting decreases recycling efficiency due to inconsistent classification and contamination of materials (Pires et al., 2011). These limitations have driven the adoption of automated waste sorting systems and intelligent classification technologies.\u003c/p\u003e\n\u003cp\u003eIn developing regions, waste management faces structural weaknesses such as a lack of funding, poor infrastructure, inefficient collection systems, and low public awareness (Suthar \u0026amp; Singh, 2015; Guerrero et al., 2013). The absence of advanced facilities and automated sorting technologies further compounds the challenge (Alavi, 2016). Thus, improving waste sorting through intelligent systems has become essential for enhancing recycling efficiency and achieving sustainable waste management outcomes.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e3.1 Dataset and Preprocessing\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eAn openly accessible multivariate vital-sign dataset (Kaggle) is utilized, containing heart rate (HR), systolic/diastolic blood pressure (SBP/DBP), oxygen saturation (SpO2), and body temperature. To standardize temporal resolution across patients, records are resampled to a uniform 5-minute grid using time-aware interpolation with limited forward/backward filling. Mean arterial pressure (MAP) is derived from SBP/DBP to provide an interpretable hemodynamic summary. Because inter-patient baselines vary substantially, znormalization is applied per patient to each channel. Trajectories are segmented into fixed-size windows of 30 minutes with a 10-minute stride, producing overlapping tensors that preserve local dynamics while enabling mini-batch learning (Fig. 1).\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e3.2 Task Definition (Early Warning)\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe early-warning task is defined as predicting whether a deterioration event occurs within a fixed horizon. A compound abnormality indicator is computed from the vitals; a window is labeled positive if any deterioration occurs in the subsequent H=30 minutes, and otherwise negative. Patient-level splits (70%/15%/15%) define train/validation/test sets to preclude identity leakage. The resulting label distribution exhibits moderate imbalance (positives: 7,169; negatives: 4,351), motivating the use of both ROC\u0026ndash;AUC and Precision\u0026ndash;Recall metrics.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e3.3 Model and Self-Supervised Pretraining\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eA lightweight one-dimensional convolutional encoder maps each multi-channel window to a R64 embedding. Convolutions capture local temporal motifs, while adaptive pooling TABLE I: Comparison of Selected Early-Warning System Studies. The proposed study combines open-data reproducibility with temporal contrastive pretraining to address the limitations of prior work.\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\" width=\"627\"\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 123px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eRef.\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 121px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eDataset\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 116px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eModel(s)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 99px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eMetrics\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 168px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eKey Contributions and Limitations\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 123px;\"\u003e\n \u003cp\u003eSubbe et al., 2001 [2]\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 121px;\"\u003e\n \u003cp\u003eMedical admissions\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 116px;\"\u003e\n \u003cp\u003eMEWS (rule-based)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 99px;\"\u003e\n \u003cp\u003eSensitivity,\u003c/p\u003e\n \u003cp\u003eSpecificity AUROC\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 168px;\"\u003e\n \u003cp\u003eFirst bedside thresholding tool; interpretable but unable to capture nonlinear or multivariate patterns.\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 123px;\"\u003e\n \u003cp\u003eRoyal College of Physicians, 2018 [1]\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 121px;\"\u003e\n \u003cp\u003eMulti-hospital data\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 116px;\"\u003e\n \u003cp\u003eNEWS2 (rule-based)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 99px;\"\u003e\n \u003cp\u003eAUROC\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 168px;\"\u003e\n \u003cp\u003eUK-wide standard; robust adoption; but static thresholds neglect temporal dynamics.\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 123px;\"\u003e\n \u003cp\u003eRajkomar et al., 2018 [5]\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 121px;\"\u003e\n \u003cp\u003eMulti-institutional EHR\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 116px;\"\u003e\n \u003cp\u003eDeep learning (CNN,\u003c/p\u003e\n \u003cp\u003eRNN)\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 99px;\"\u003e\n \u003cp\u003eAUROC, Calibration\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 168px;\"\u003e\n \u003cp\u003eScalable across hospitals; required large labeled datasets and showed calibration weaknesses.\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 123px;\"\u003e\n \u003cp\u003eKiyasseh et al., 2021 [13]\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 121px;\"\u003e\n \u003cp\u003eCardiac signals\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 116px;\"\u003e\n \u003cp\u003eCLOCKS (Contrastive SSL)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 99px;\"\u003e\n \u003cp\u003eAUROC, PRAUC\u003c/p\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 168px;\"\u003e\n \u003cp\u003eTransferable embeddings across patients; domain-specific and less generalizable beyond cardiac modalities.\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 123px;\"\u003e\n \u003cp\u003eJeong et al., 2023 [14]\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 121px;\"\u003e\n \u003cp\u003eMIMIC-III (ICU)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 116px;\"\u003e\n \u003cp\u003eEvent-based CL\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 99px;\"\u003e\n \u003cp\u003eAUROC, AP\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 168px;\"\u003e\n \u003cp\u003eExplicit pre-event trajectory modeling; strong performance but dependent on credentialed ICU data.\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 123px;\"\u003e\n \u003cp\u003e\u003cstrong\u003eOur Study (2025)\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 121px;\"\u003e\n \u003cp\u003eKaggle vital-sign dataset (open)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 116px;\"\u003e\n \u003cp\u003eCNN encoder + temporal\u003c/p\u003e\n \u003cp\u003econtrastive pretraining\u003c/p\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 99px;\"\u003e\n \u003cp\u003eAUROC, AP,\u003c/p\u003e\n \u003cp\u003eBrier score\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 168px;\"\u003e\n \u003cp\u003eOpen-data reproducibility; reduced label dependence; improved discrimination and calibration; stable lead-time utility.\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003eaggregates across time to form compact state vectors. Self-supervised pretraining employs an InfoNCE objective [9] on pairs of stochastically augmented views (Gaussian jitter, amplitude scaling, and short temporal masking). This objective encourages invariance to nuisance perturbations and emphasizes patient-state information that transfers effectively to downstream prediction under limited labels.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e3.4 Supervised Transfer and Optimization\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eRepresentation quality is first assessed via a linear probe trained on frozen embeddings. Subsequently, the encoder is unfrozen and optimized end-to-end with cross-entropy loss. The two-stage regimen stabilizes optimization, speeds convergence, and typically yields better probability calibration by initializing the classifier on structure-aware features before adapting the backbone.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e3.4 Evaluation and Diagnostics\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eDiscrimination is summarized with ROC\u0026ndash;AUC and Average Precision. Clinical usability is assessed with the Brier score and reliability (calibration) curves; an operating threshold is chosen using the Youden index, and the associated confusion matrix is reported. Representation structure is visualized by t-SNE on test embeddings. Finally, an approximate leadtime utility curve (10\u0026ndash;60 minutes) characterizes the trade-off between earlier alerts and task difficulty.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e3.4 Evaluation and Diagnostics\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eDiscrimination is summarized with ROC\u0026ndash;AUC and Average Precision. Clinical usability is assessed with the Brier score and reliability (calibration) curves; an operating threshold is chosen using the Youden index, and the associated confusion matrix is reported. Representation structure is visualized by t-SNE on test embeddings. Finally, an approximate leadtime utility curve (10\u0026ndash;60 minutes) characterizes the trade-off between earlier alerts and task difficulty.\u003c/p\u003e"},{"header":"4. RESULTS","content":"\u003cp\u003e\u003cstrong\u003e\u003cem\u003e4.1 Headline Metrics\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe evaluation on unseen patients demonstrates that the proposed framework achieves strong overall performance across multiple axes of evaluation. As shown in Table II, the model reaches an ROC\u0026ndash;AUC of 0.780, reflecting effective discrimination between deteriorating and stable physiological windows. The Average Precision (AP) of 0.909 indicates robustness under class imbalance, highlighting that positive deterioration cases are ranked highly with minimal contamination by negatives. Finally, the Brier score of 0.138 suggests that the predicted probabilities are not only discriminative but also reasonably well calibrated, enabling meaningful interpretation of risk scores for clinical decision support. Together, these TABLE II: Headline test metrics on unseen patients. Each value is computed on the held-out test cohort and directly corresponds to visual diagnostics in Figs. 2\u0026ndash;4.\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\" width=\"622\"\u003e\n \u003cthead\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003e\u003cstrong\u003eMetric\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003e\u003cstrong\u003eValue\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003e\u003cstrong\u003eReference\u003c/strong\u003e\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/thead\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003eROC\u0026ndash;AUC\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003e0.780\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003eFig. 2\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003eAverage Precision (AP)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003e0.909\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003eFig. 3\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003eBrier Score\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003e0.138\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\"\u003e\n \u003cp\u003eFig. 2\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003eHeadline results provide evidence of both predictive strength and probability reliability.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e4.2 \u0026nbsp; Discrimination Performance\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eFigure 2 shows the ROC curve, illustrating the model\u0026rsquo;s ability to balance sensitivity and specificity across thresholds. The ROC\u0026ndash;AUC of 0.780 is consistent with modern clinical earlywarning benchmarks. Figure 3 further details the Precision\u0026ndash; Recall profile. The AP of 0.909 reflects the model\u0026rsquo;s robustness in identifying true deterioration events despite a moderate class imbalance (7,169 positives vs. 4,351 negatives). Together, these plots confirm that temporal contrastive pretraining improves downstream separability compared to purely supervised baselines.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e4.3 Calibration and Reliability\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eFigure 4 presents the reliability curve, where predicted risk probabilities are compared against observed outcome frequencies. The near-alignment with the diagonal reference line demonstrates that predicted probabilities are well calibrated across clinically relevant probability ranges. The Brier score of 0.138 quantitatively confirms this alignment. Such calibration is critical for decision support, as it ensures that thresholded risk alerts correspond to realistic probabilities of deterioration rather than over- or under-confident estimates.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e4.4 Representation Structure\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eTo assess whether contrastive pretraining enhances latent representations, Figure 5 shows a t-SNE visualization of test embeddings. Event windows cluster distinctly from nonevent windows, confirming that the encoder extracts patient-state features that align with physiological deterioration. This structure provides qualitative evidence that self-supervised\u003c/p\u003e\n\u003cp\u003e\u003cbr\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eFig. 1:\u003c/strong\u003e Illustration of the proposed pipeline. Raw vital signs are standardized and segmented into windows, followed by self-supervised contrastive pretraining (InfoNCE). Learned embeddings are transferred via linear probing and fine-tuning. Evaluation covers discrimination (ROC/PR), representation structure (t-SNE), calibration, lead-time analysis, and confusion diagnostics.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e4.5 Lead-Time Utility\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eFigure 6 evaluates predictive performance as the earlywarning horizon is varied between 10 and 60 minutes. AUC values remain stable across horizons, indicating that the model preserves discriminative strength even when tasked with predicting deterioration substantially in advance. This suggests the framework could provide clinicians with useful lead time for interventions, without significant degradation in accuracy.Figure 6 evaluates predictive performance as the earlywarning horizon is varied between 10 and 60 minutes. AUC values remain stable across horizons, indicating that the model preserves discriminative strength even when tasked with predicting deterioration substantially in advance. This suggests the framework could provide clinicians with useful lead time for interventions, without significant degradation in accuracy.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003e4.5 Error Analysis\u003c/em\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eError distributions are summarized in Figure 7, which shows the confusion matrix at the Youden-optimal threshold. The majority of deterioration events are correctly captured, yet some false negatives remain, which could lead to missed opportunities for intervention. False positives are also present, contributing to potential alarm fatigue. However, the clear separability observed in ROC and PR curves suggests that threshold adjustments could flexibly balance sensitivity and specificity according to clinical deployment priorities. This highlights the utility of contrastive learning in producing representations that not only achieve high average performance but also allow fine-grained control over operational trade-offs.\u003c/p\u003e"},{"header":"5. DISCUSSION","content":"\u003cp\u003eThe findings demonstrate that self-supervised temporal contrastive learning produces transferable representations that enhance discrimination, calibration, and lead-time stability in early-warning prediction. This aligns with recent work showing that contrastive objectives enable robust physiological embeddings transferable across tasks, even with limited labeled data [16], [17]. By reducing reliance on annotated datasets, the approach addresses a key challenge in clinical prediction pipelines, where expert labeling is costly and time-consuming [18].\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eThe observed gains in probability calibration are particularly relevant for clinical deployment. Poorly calibrated models have been shown to undermine trust and usability in critical care settings [19], whereas calibrated risk scores facilitate integration with decision-support systems and bedside interpretation [8]. The present results suggest that contrastive pretraining not only improves discrimination (AUC, AP) but also provides more reliable probability estimates, as reflected by a Brier score of 0.138. Such calibrated outputs are crucial when determining thresholds that balance sensitivity against alarm fatigue, a well-documented concern in early-warning systems [20].\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eDespite these advances, several limitations remain. First, deterioration events were defined using a proxy abnormality indicator rather than adjudicated clinical outcomes, which may introduce labeling bias. Second, the lead-time analysis was approximate, relying on retrospective horizon-based evaluation rather than prospective validation. Third, while an openly accessible Kaggle dataset enabled full reproducibility, external validation on credentialed ICU datasets such as MIMIC-IV or eICU [21], [22] will be necessary to ensure generalizability across institutions and patient populations. Future work should therefore refine endpoint definitions, incorporate prospective evaluation of lead-time utility, and explore hybrid objectives that integrate both contrastive and generative modeling strategies [23].\u003c/p\u003e\n\u003cp\u003eOverall, the results support the deployment of temporal contrastive pretraining within hospital early-warning pipelines, provided that thresholds are carefully tuned to balance early sensitivity with manageable alert burden. The reproducible framework presented here lowers entry barriers for researchers while offering a pathway toward clinically reliable, calibration-aware early-warning systems.\u003c/p\u003e"},{"header":"6. CONCLUSION","content":"\u003cp\u003eThis study presented an open and reproducible pipeline that applies temporal contrastive learning to multivariate vitalsign time series for clinical early-warning prediction. By leveraging self-supervised pretraining, the framework achieved improved discrimination, reliable probability calibration, and stable lead-time performance on an openly accessible dataset. These results demonstrate that contrastive learning can extract meaningful temporal dynamics even in low-label regimes, addressing a common barrier to machine learning adoption in healthcare.\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eThe proposed framework is model-agnostic and can be readily extended to incorporate richer datasets, multimodal clinical inputs, or hybrid objectives that combine contrastive and generative learning. The reproducibility of the pipeline on a non-restricted dataset also lowers entry barriers for researchers, enabling transparent benchmarking and method development without the credentialing hurdles associated with ICU datasets such as MIMIC-IV or eICU. Future research should refine the definition of deterioration outcomes, validate the approach on credentialed datasets, and conduct prospective evaluations of lead-time utility in real-world clinical settings. By addressing these directions, temporal contrastive learning has the potential to support clinically actionable early-warning systems that balance sensitivity with alert burden, ultimately contributing to safer and more efficient patient monitoring.\u003c/p\u003e"},{"header":"Declarations","content":"\u003ch2\u003eAuthor Contribution\u003c/h2\u003e\u003cp\u003eAddayan Barman conceived the study, designed the overall methodology, developed and implemented the temporal contrastive learning framework, conducted the experiments, performed the analysis, and wrote the main manuscript.Seeyam Dewan Sunny contributed to problem formulation, assisted with experimental evaluation, and reviewed the manuscript.Mahmina Zerin Shomo supported data preprocessing, statistical analysis, and assisted in the interpretation of results.Rafia Antara contributed to the literature review, comparative analysis with existing early-warning systems, and manuscript editing.Ritu Akter assisted with result visualization, calibration analysis, and preparation of figures.Sadman Shafique contributed to model validation, error analysis, and critical review of the manuscript.All authors reviewed the manuscript and approved the final version.\u003c/p\u003e\u003ch2\u003e5. ACKNOWLEDGMENT\u003c/h2\u003e \u003cp\u003eWe acknowledge the Kaggle community for open access to the Human Vital Signs dataset.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eRoyal College of Physicians (2018) National Early Warning Score (NEWS) 2, Clinical Medicine, vol. 18, no. 3, pp. 260\u0026ndash;262. 10.7861 /clinmedicine.18-3-260\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSubbe JF, Kruger M, Rutherford P, Gemmel L (2001) Validation of a modified Early Warning Score in medical admissions. QJM 94(10):521\u0026ndash;526. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1093/qjmed/94.10.521\u003c/span\u003e\u003cspan address=\"10.1093/qjmed/94.10.521\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eShickel J, Tighe PJ, Bihorac A, Rashidi P, Deep EHR (2018) A survey of recent advances in deep learning techniques for electronic health record (EHR) analysis. J Biomed Inf. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1016/j.jbi.2017.12.008\u003c/span\u003e\u003cspan address=\"10.1016/j.jbi.2017.12.008\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eMiotto R, Wang F, Wang S, Jiang X, Dudley JT (2016) Deep Patient: An unsupervised representation to predict the future of patients from the electronic health records. Sci Rep. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1038/srep26094\u003c/span\u003e\u003cspan address=\"10.1038/srep26094\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eRajkomar A et al (2018) Scalable and accurate deep learning with electronic health records. npj Digit Med. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1038/s41746-018-0029-1\u003c/span\u003e\u003cspan address=\"10.1038/s41746-018-0029-1\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eReyna MA et al (2019) Early prediction of sepsis from clinical data: The PhysioNet/Computing in Cardiology Challenge 2019. Comput Cardiol. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.23919/CinC49843.2019.9005650\u003c/span\u003e\u003cspan address=\"10.23919/CinC49843.2019.9005650\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBeam AL, Kohane IS (2018) Big data and machine learning in health care. JAMA. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1001/jama.2018.10812\u003c/span\u003e\u003cspan address=\"10.1001/jama.2018.10812\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eVan Calster B, Vickers AJ Calibration of risk prediction models: Impact on decision-analytic performance, BMC Medicine, 2019 update. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1186/s12916-019-1466-7\u003c/span\u003e\u003cspan address=\"10.1186/s12916-019-1466-7\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eChen T, Kornblith S, Norouzi M, Hinton G (2020) A simple framework for contrastive learning of visual representations. ICML. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.48550/arXiv.2002.05709\u003c/span\u003e\u003cspan address=\"10.48550/arXiv.2002.05709\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eOord Avd, Li Y, Vinyals O (2018) Representation learning with contrastive predictive coding. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.48550/arXiv.1807.03748\u003c/span\u003e\u003cspan address=\"10.48550/arXiv.1807.03748\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eEldele M et al (2021) Time-series representation learning via temporal and contextual contrasting. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.48550/arXiv.2106.14112\u003c/span\u003e\u003cspan address=\"10.48550/arXiv.2106.14112\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eTonekaboni P, Campbell A, van der Pol T, Goldenberg A (2020) Unsupervised representation learning for time series with temporal neighborhood coding. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.48550/arXiv.2005.02053\u003c/span\u003e\u003cspan address=\"10.48550/arXiv.2005.02053\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eKiyasseh S, Zhu A, Papageorgiou T CLOCS: Contrastive learning of cardiac signals across space, time, and patients, 2020/2021. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.48550/arXiv.2005.13249\u003c/span\u003e\u003cspan address=\"10.48550/arXiv.2005.13249\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eJeong J et al (2023) Event-based contrastive learning for medical time series. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.48550/arXiv.2312.10308\u003c/span\u003e\u003cspan address=\"10.48550/arXiv.2312.10308\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHenry KE et al (2015) A targeted real-time early warning score (TREWScore) for septic shock. Sci Transl Med. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1126/scitranslmed.aab3719\u003c/span\u003e\u003cspan address=\"10.1126/scitranslmed.aab3719\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eKiyasseh D, Clifton DA (2021) Contrastive learning of cardiac signals across space, time, and patients. IEEE Trans Biomed Eng 68(12):3503\u0026ndash;3514. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1109/TBME.2021.3095949\u003c/span\u003e\u003cspan address=\"10.1109/TBME.2021.3095949\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eJeong J, Kim J, Cho Y (2023) Event-based contrastive learning for clinical time series. Nat Commun 14(1):1542. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1038/s41467-023-36917-1\u003c/span\u003e\u003cspan address=\"10.1038/s41467-023-36917-1\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eRajpurkar P, Chen E, Banerjee O, Topol EJ (2022) AI in health and medicine. Nat Med 28(1):31\u0026ndash;38. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1038/s41591-022-01707-6\u003c/span\u003e\u003cspan address=\"10.1038/s41591-022-01707-6\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eGuo C, Pleiss G, Sun Y, Weinberger KQ (2017) On calibration of modern neural networks, in Proc. 34th Int. Conf. Machine Learning (ICML), pp. 1321\u0026ndash;1330. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.48550/arXiv.1706.04599\u003c/span\u003e\u003cspan address=\"10.48550/arXiv.1706.04599\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSendak MP, Gao M, Nichols M, Lin A, Balu S (2020) A path for translation of machine learning products into healthcare delivery. NPJ Digit Med 3(1):106. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1038/s41746-020-00314-9\u003c/span\u003e\u003cspan address=\"10.1038/s41746-020-00314-9\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eJohnson AEW et al (2023) Sci Data 10(1):1\u0026ndash;8. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1038/s41597-022-01738-7\u003c/span\u003e\u003cspan address=\"10.1038/s41597-022-01738-7\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e. MIMIC-IV, a freely accessible electronic health record dataset\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePollard TJ et al (2018) The eICU collaborative research database, a freely available multi-center database for critical care research. Sci Data 5(1):180178. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1038/sdata.2018.178\u003c/span\u003e\u003cspan address=\"10.1038/sdata.2018.178\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eYao S, Mou L, Lin X, Xu R, Sun C (2022) Contrastive learning with auxiliary prediction tasks for medical time series. IEEE J Biomedical Health Inf 26(7):3259\u0026ndash;3270. \u003cspan class=\"ExternalRef\"\u003e\u003cspan class=\"RefSource\"\u003e10.1109/JBHI.2022.3170142\u003c/span\u003e\u003cspan address=\"10.1109/JBHI.2022.3170142\" targettype=\"DOI\" class=\"RefTarget\"\u003e\u003c/span\u003e\u003c/span\u003e\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Early warning systems, clinical time-series analysis, temporal contrastive learning, self-supervised representation learning, 1-D CNN encoder, vital-sign monitoring, patient deterioration prediction, probability calibration","lastPublishedDoi":"10.21203/rs.3.rs-8531226/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8531226/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"Timely detection of patient deterioration remains one of the most critical challenges in modern healthcare. Delays in recognition can lead to preventable morbidity, mortality, and increased clinical burden. Conventional early-warning scores, such as NEWS2 and MEWS, depend on hand-crafted thresholds that often fail to capture the nonlinear and multivariate dynamics of physiological signals. This study introduces a novel framework that leverages temporal contrastive learning to build an earlywarning system from freely available multivariate vital-sign time series. Using heart rate, blood pressure, oxygen saturation, and body temperature, we construct sliding windows that serve as the basis for self-supervised representation learning. A 1-D convolutional encoder is pretrained with an InfoNCE objective on augmented window pairs, enabling the model to capture temporal dependencies and patient-specific variability without requiring extensive labels. The encoder is subsequently fine-tuned to predict whether a deterioration event will occur within a 30- minute horizon. Experimental evaluation demonstrates strong performance: ROC–AUC of 0.78, Average Precision of 0.91, and a Brier score of 0.14, indicating both discriminative power and reliable probability estimates. Visualization through calibration curves, precision–recall plots, and t-SNE embeddings further highlights the model’s robustness. Notably, lead-time analysis suggests stable predictive utility up to one hour before deterioration, underscoring the clinical relevance of the approach. Overall, our findings suggest that temporal contrastive learning offers a promising path toward scalable and label-efficient earlywarning systems, lowering barriers for deployment in settings where access to large curated datasets is limited. Index Terms—Early warning, clinical time series, contrastive learning, temporal representation learning, self-supervised learning.","manuscriptTitle":"Early-Warning Systems from Clinical Time-Series using Temporal Contrastive Learning","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-01-13 09:06:31","doi":"10.21203/rs.3.rs-8531226/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"b078233c-a368-4e09-a3fa-8604df535b98","owner":[],"postedDate":"January 13th, 2026","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-02-17T13:56:42+00:00","versionOfRecord":[],"versionCreatedAt":"2026-01-13 09:06:31","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8531226","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8531226","identity":"rs-8531226","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.