BeatAI: BiomEtrics for real-time Atrial Arrhythmia tracking using Transformer Artificial Intelligence from wearables after discharge from cardiac surgery

preprint OA: closed
Full text JSON View at publisher
Full text 89,834 characters · extracted from preprint-html · click to expand
BeatAI: BiomEtrics for real-time Atrial Arrhythmia tracking using Transformer Artificial Intelligence from wearables after discharge from cardiac surgery | 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 Article BeatAI: BiomEtrics for real-time Atrial Arrhythmia tracking using Transformer Artificial Intelligence from wearables after discharge from cardiac surgery Amin Ramezani, Negin Maddah, Melina Heine, Ali Homaei, Leonard Simeth, and 5 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-9138384/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 11 You are reading this latest preprint version Abstract Background Postoperative atrial fibrillation (POAF) affects 20 ̶50% of patients undergoing cardiac surgery and is associated with prolonged hospital stays and adverse outcomes. Although several risk factors for developing POAF have been identified, accurate prediction remains challenging. Wearable echocardiography (ECG) patches and remote patient monitoring now enable continuous heart rhythm surveillance, while artificial intelligence (AI) models may detect subtle, yet distinct electrophysiologic signatures that precede POAF development. Objective This study evaluates whether combining continuous ECG patch monitoring with deep learning models can improve both early risk stratification and near real-time prediction of POAF after cardiac surgery. Methods We analyzed continuous ECG and wearable-derived physiology from 101 postoperative cardiac surgery patients enrolled in a prospective remote monitoring trial. Each patient wore an adhesive patch sensor (VivaLNK VV-330) for 14 days after hospital discharge, capturing per-second ECG and activity streams. We developed two complementary deep learning pipelines: (1) a daily-level multimodal Transformer, which downsampled ECG and contextual “TAB tokens” into day-wise units to predict AF occurrence and burden, and (2) an hour-ahead forecasting model, which condensed the last two hours of minute-level physiology into attention-weighted summaries to generate rolling, causal predictions of AF risk in the subsequent hour. Results Across nearly 1.7 million downsampled data elements, the daily-level model showed conservative behavior with very low false negatives, consistently identifying AF-positive days and correctly stratifying high-burden episodes. The hour-ahead forecasting model was trained and validated on 9,267 windows (hours) and achieved excellent discrimination (AUC 0.945), high specificity (0.99), and strong predictive value (NPV 0.98). Recall-oriented calibration further reduced missed AF hours while maintaining low false alarms. Together, these frameworks provided reliable daily burden stratification and fine-grained, near real-time risk forecasting. Conclusion Continuous multimodal monitoring paired with AI enables accurate POAF detection, daily risk stratification, and rolling hour-ahead forecasts. This dual-resolution framework has the potential to support perioperative decision-making by enabling earlier intervention, targeted surveillance, and optimized allocation of preventive therapies in cardiac surgery patients. Health sciences/Cardiology Biological sciences/Computational biology and bioinformatics Health sciences/Health care Health sciences/Medical research Atrial fibrillation remote patient monitoring artificial intelligence perioperative monitoring cardiac surgery Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 I. Introduction Postoperative atrial fibrillation (POAF) is the most common complication after cardiac surgery and affects between 20 and 50% of patients [ 1 , 2 ]. It is associated with longer ICU and hospital stays, increased rate of stroke [ 3 ], heart failure, readmission, and greater long-term mortality. Current management remains reactive rather than proactive because POAF is often transient and unpredictable. Although several patient and procedural risk factors have been identified (e.g., age, chronic kidney disease, heart failure, mitral valve disease, prior atrial fibrillation, and cardiopulmonary bypass time) [ 3 , 4 ], current perioperative risk scores remain poorly calibrated and frequently fail to identify patients who will ultimately experience POAF. Consequently, preventive therapies are inconsistently applied, leading to missed opportunities for targeted intervention [ 5 , 6 ]. The dynamic postoperative recovery period is uniquely suited for continuous physiologic surveillance, as it is characterized by fluctuating autonomic tone, inflammation, and hemodynamics. Wearable sensors have proven effective for remote patient monitoring (RPM) and early arrhythmia detection [ 7 ], [ 8 ]. Of note, these technologies generate rich, longitudinal datasets that offer a unique opportunity and paradigm shift in targeting the clinical problem: moving from retrospective event detection towards real-time risk forecasting and personalized prophylaxis. Recent advances in artificial intelligence (AI) enable end-to-end deep learning on raw ECG signals to extract latent electrophysiologic precursors, such as premonitory P-wave or atrial substrate changes. While transformer-based models and multimodal fusion have improved generalizability and data efficiency [ 9 , 10 , 11 , 12 ], translation to perioperative care remains limited. Few models have been validated on continuous postoperative monitoring trials, and virtually none are capable of prospective, real-time forecasting at scale [ 13 , 14 , 15 , 16 ]. We address this gap by leveraging continuous ECG data from a prospective remote patient monitoring study to predict POAF. We evaluate a dual-resolution approach: a multimodal daily-level Transformer for arrhythmia detection and burden classification, paired with a hybrid sequence model for rolling hour-ahead forecasts. We hypothesize that AI models can identify subtle electrophysiologic signatures that precede POAF, delivering predictive performance superior to existing clinical risk scores. This work establishes a framework for precision prevention, aiming to not just detecting AF after it occurs, but to predict when it will occur. Thereby we aim to unlock a path toward precision prevention and individualized recovery trajectories. II. Methods II.1. Study design We conducted a proof-of-concept analysis on a pilot cohort of postoperative cardiac surgery patients enrolled in an ongoing IRB-approved prospective remote patient monitoring trial at Mass General Brigham (Protocol #2021P000356). Between January 2021 and May 2025, a total of 140 adult patients undergoing cardiac surgery with cardiopulmonary bypass and were fitted with an FDA-approved adhesive ECG patch monitor (VV-330, VivaLNK, Campbell, CA) at hospital discharge. In brief, patients were instructed to wear the device continuously for 14 days to capture high-resolution postoperative rhythm and physiologic data. For the present analysis, we included 140 postoperative cardiac-surgery patients, to enable more robust development and evaluation of AI–based POAF prediction models. II.2. Study cohort and data streams Eligible patients were adults (> 20 years) undergoing cardiac surgery with median sternotomy and cardiopulmonary bypass, who provided informed consent. Exclusion criteria included history of AF exceeding one year prior to surgery, presence of implanted cardiac assist devices, enrollment in other pharmacological trials, and lack or poor quality of data (< 80% of the postoperative monitoring period). Of the 140 patients enrolled in the parent trial, 101 were included in the primary monitoring analysis (Fig. 1 ). Continuous physiologic data were acquired from wearable ECG patch sensors, placed immediately after hospital discharge. Each record contained a timestamp, short ECG rhythm snippets (128 samples each), and scalar physiologic and activity variables per sample, including heart rate, root mean square of successive differences (RMSSD), skin temperature, activity score, and signal-to-noise ratio (SNR). Accelerometer-based motion summaries were also derived as mean and standard deviation across x, y, and z axes. When available, beat-to-beat intervals (RRI) and a respiratory waveform level (RWL) were included. In addition, static demographic information were incorporated, including age and sex. II.3. Outcome definitions and prediction tasks The study leveraged continuous postoperative real-time monitoring to assess whether advanced AI methods could anticipate POAF risk across different temporal resolutions. We implemented two complementary prediction frameworks: II.3A. Daily-level risk stratification : Each patient-day was treated as a separate unit of analysis. Continuous ECG and wearable sensor signals were originally recorded at one-second resolution and then downsampled to one sample per minute, yielding 1,440 samples per day. For each minute, a 128-HZ ECG rhythm strip was extracted and paired with its root mean square (RMS) amplitude. In parallel, we engineered tabular context features (“TAB tokens”) that aggregated per-minute physiologic and behavioral data, including average heart rate, RMSSD, temperature, motion, activity, and ECG amplitude. Together, these features captured both electrical morphology and physiologic context. A multimodal Transformer model was then trained, projecting ECG and TAB tokens into a shared latent space. The architecture incorporated modality-specific embeddings, day-level positional encodings, masked mean pooling, and cross-modal attention to distinguish true arrhythmia from motion artifacts. Outputs included binary AF detectione and ordinal AF burden classification (single vs. multiple daily episodes). We trained the model in two steps: initially on AF detection followed by fine-tuning on AF-positive days for burden estimation. To address class imbalance and computational constraints, a sampling strategy retained ~ 2% of the raw data (2,024,735 rows from 101 patients) while ensuring full representation of all AF episodes. Evaluation prioritized clinically relevant metrics: for AF detection, precision, recall, and balanced accuracy, with sensitivity prioritized to minimize missed AF episodes; and for AF burden, recall on high-burden days, given its prognostic significance. II.3B. Hour-ahead forecasting : To enable fine-grained, rolling predictions, we also framed the problem as near real-time forecasting of AF. Hours were labeled AF-positive if they contained ≥ 5 AF-positive minutes. At each time t , the model ingested only the preceding two hours of data [t–2h, t] to predict the AF probability in the next hour [t, t + 1h]. After an initial two-hour warm-up, the system generated continuous hour-ahead forecasts throughout the 14-day monitoring period, updating in real time as new minutes arrived. For the hour-ahead framework, raw samples were aggregated into minute-level features. For each minute of monitoring, we derived a comprehensive set of physiologic and behavioral features from the wearable sensor data. Electrocardiogram (ECG) waveforms (128 samples per minute) were used to compute the root-mean-square (RMS) amplitude as a measure of signal strength and myocardial depolarization intensity. Standard vital and activity markers were extracted from the wearable telemetry, including heart rate, short-term heart-rate variability (RMSSD), skin temperature, activity level, and signal-to-noise ratio. Three-axis accelerometry was summarized by computing the mean and standard deviation of the acceleration in each spatial direction (x, y, and z), capturing overall mobility and postural dynamics. Respiratory behavior was characterized using a respiratory-waveform surrogate derived from thoracic impedance; when available, we computed the minute-wise average of this respiratory signal. Beat-to-beat interval series were used to derive additional heart-rate–variability metrics, including mean RR interval, SDNN, RMSSD, and pNN50, reflecting autonomic tone and rhythm stability. Finally, each minute was assigned a binary atrial fibrillation (AF) indicator, defined as positive if any ECG snippet within that minute was classified as AF by the underlying arrhythmia detector.. Minutes with no valid ECG snippet were discarded. Minutes were then grouped into hours if ≥ 10 valid minutes were available. For each subject, we constructed sliding 2-hour context windows to forecast the next hour. Additional derived features included coverage (observed minutes/120), episode history (AF in the most recent hour, run length of the current state, AF count and fraction across the two hours, hours since last AF onset and offset), circadian terms (sine/cosine of hour-of-day), and relative hour-position scalar (0 for the older hour, 1 for the most recent). Static preoperative covariates (e.g., age, sex, prior AF) were appended when available. To reduce inter-subject variability, minute features were z-scored within each subject’s training set. If insufficient training data existed, a global scaler fit on all training minutes was applied. History, circadian, and hour-position scalars were left unstandardized. II.4. Model architectures II.4A. Daily-level multimodal Transformer : The model used modality-specific embedding layers for ECG and TAB tokens, day-level positional encodings, masked mean pooling, and cross-modal attention. Outputs included binary AF detection and ordinal AF burden classification. Training was staged, with the burden head optimized only on AF-positive days (Fig. 2). II.4B. Hour-ahead hybrid sequence model : The real-time model comprised a three-stage encoder: i) GRU denoising/compression (96 units) to process variable-length minute sequences, ii) Transformer encoder (2 layers, 4 heads, GELU activation, width 128) to capture temporal dependencies (e.g., evolving HRV and activity patterns 20–40 minutes earlier), and iii) Attention pooling to emphasize informative minutes while down-weighting uninformative or noisy segments. The pooled summary vector was concatenated with static covariates, coverage, and episode-history features, then passed through two fully connected layers (192→128, ReLU, dropout 0.05). A final linear unit produced a logit, with the sigmoid interpreted as the probability of AF in the next hour. II.5. Down sampling, To mitigate the heavy class imbalance caused by prolonged AF-negative monitoring, we applied a simple, temporally coherent down-sampling rule at the patient level. For patients who ever exhibited AF (non-zero daily AF burden), we retained all days up to and including the last AF-positive day and kept one additional AF-negative day thereafter; all later AF-negative days were excluded. After forming daily records, this step reduced the dataset from 2,024,735 to 1,470,235 rows (~ 27% reduction) without removing any AF-positive data. AF burden values present in the dataset were none, single, multiple, and continuous. Across the day-level records, the distribution of AF-burden states included 180,145 rows with single burden, 133,878 rows with multiple burden, and 243,364 rows with continuous AF burden as shown in Fig. 3 . At the subject level, using each patient’s highest recorded burden, 20 subjects exhibited a maximum single burden, 13 subjects reached multiple-AF burden in a day, and 10 subjects reached continuous AF per day. Figure 4 shows only patients who experienced AF at least once; subjects with no AF were excluded in this visualization. An hour is classified as AF + if it contains ≥ 5 AF-positive minutes. Displaying absolute hour counts allows direct comparison of each patient’s AF burden and total monitored time. Among these patients, we observe substantial between-patient heterogeneity in total monitored hours and in class balance. A minority contribute long recordings with a high AF burden, while many contribute shorter traces with predominantly AF-negative hours. This uneven per-subject contribution and AF+/Non-AF imbalance underscore the need for subject-aware evaluation and motivate our approach to curtail long AF-negative tails during training. A sample of temporal structure of AF burden is illustrated in Fig. 5 , which shows representative hour-by-hour trajectories of valid monitoring minutes for three subjects. AF-positive hours,defined as hours containing ≥ 5 AF-positive minutes, are highlighted with red markers and shaded regions. These examples demonstrate how AF episodes cluster within individuals. II.6. Training and validation The AI model addressed class imbalance using weighted binary cross-entropy and focal loss, with oversampling of AF-positive windows. The hour-ahead model used a weighted random sampler to ensure balanced exposure. Optimization was performed with AdamW (learning rate 1×10⁻³, weight decay 5×10⁻⁵), mixed-precision training, and gradient-norm clipping (1.0). Training was capped at 50 epochs with early stopping triggered by validation plateaus, and learning rates adapted via ReduceLROnPlateau. To prevent temporal leakage, data were split within subjects, using the first 80% of time-series windows for training and the final 20% for validation. Windows spanning the cutoff were discarded. For tran and validation, there are 101 postoperative cardiac surgery patients fitted with continuous wearable monitoring. Across all subjects, we constructed 6,949 supervised K-hour windows (K = 2 context hours) for learning the next-hour AF label. After a within-subject temporal split, 5,495 windows were used for training and 1,153 for validation; 99 windows straddling the split boundary were discarded. Using the granular AF signal, AF-positive hours were defined as hours with ≥ 5 AF-positive minutes. In the validation set, this yielded 180 AF-positive and 973 AF-negative hours (AF prevalence ≈ 19%). II.7. Calibration and decision rules Because AF episodes often persist once initiated, the hour-ahead system applied a hysteresis decision rule with dual thresholds: a start threshold (τ↑) to trigger AF and a stay threshold (τ↓) to maintain the AF state. These thresholds were tuned on the validation set through a recall-focused search under specificity constraints (≥ 0.92, relaxed stepwise to ≥ 0.85 if unmet). This approach favored minimizing false negatives while keeping false positives low. Model performance was summarized using balanced accuracy, macro-F1, AUC, and confusion matrices. II.8. Real-time deployment simulation In simulated bedside use, the model produces rolling hour-ahead probabilities after a 2-hour warm-up window built from minute-level signals and episode-history features. Hysteresis uses the prior hour’s AF state to decide whether to initiate or maintain an alert. This way the model forecasts the probability of AF for the next hour. Clinical trial number: not applicable. III. Results At neutral decision thresholds (τ↑ = τ↓ = 0.5), the model showed strong discrimination on the validation set (AUC = 0.94; Fig. 6 a). To reflect the higher cost of missed postoperative AF, we applied a recall-focused hysteresis scheme that decouples alert initiation (τ↑) from alert persistence (τ↓). The final operating point (τ↑ = 0.936, τ↓ = 0.050) achieved TPR = 0.867 and TNR = 0.967, with confusion matrix TN = 941, FP = 32; FN = 24, TP = 156, yielding balanced accuracy = 0.917, macro-F1 = 0.909, and overall accuracy = 0.951 (Fig. 6 b). Relative to a more aggressive intermediate setting (τ↑ ≈ 0.849, τ↓ = 0.050; TPR = 0.883, TNR = 0.929), the chosen thresholds cut false positives by more than half (69 → 32) at the cost of a small increase in false negatives (21 → 24), a clinically preferable trade-off that reduces alarm burden while preserving high sensitivity. Compared to an hour-persistence baseline, the calibrated point slightly improves balanced accuracy (0.917 vs 0.915) with comparable macro-F1 (0.909 vs 0.910). Overall, hysteresis primarily optimizes alert dynamics and workload, while underlying discrimination remains strong (AUC = 0.94). To further interpret the model’s temporal decision-making, we examined the distribution of attention weights within the two-hour input windows. Figure 7 illustrates the model’s minute-level attention over the 2-hour context window for one true-positive (TP) and one false-negative (FN) example. In the TP case (predicted P(AF) = 0.99), attention peaks twice (~ 0.3) before and after 60 minutes (1 hour) before the prediction horizon. In contrast, the FN case (predicted P(AF) = 0.475) concentrates attention more narrowly with a higher single peak (~ 0.8) around the 10-minute lead but lacks the mid-window reinforcement, consistent with lower overall confidence and a missed alert despite a salient transient motif. Together, these paired examples indicate that correct forecasts tend to exhibit multi-locus attention, whereas misses are dominated by isolated focal peaks without earlier evidence. V. Discussion Postoperative atrial fibrillation (POAF) remains one of the most clinically consequential complications following cardiac surgery, occurring in 20–50% of patients depending on procedure type and comorbidity profile [ 17 – 19 ]. Its impact is substantial: POAF is linked to prolonged hospitalization, thromboembolic complications, heart failure exacerbation, and increased rehospitalization and mortality risk [ 19 – 22 ]. A defining challenge is that POAF is highly intermittent, many episodes are brief, transient, and clinically silent. Continuous in-hospital telemetry is generally effective at detecting arrhythmias while patients remain monitored, but a large proportion of AF burden emerges after discontinuation of telemetry and following discharge, when monitoring becomes intermittent and symptom-driven [ 23 – 25 ]. Prior studies have demonstrated that remote monitoring with wearable ECG patches is feasible, well-tolerated, and significantly improves AF detection in the early postoperative period compared with symptom reporting or routine follow-up [ 26 – 30 ]. Our results extend monitoring from detection to hour-ahead prediction, enabling proactive and temporally granular risk assessment. Using a multimodal Transformer at the daily scale and a hybrid GRU-Transformer at the hourly scale, the system captures both long-horizon AF burden signatures and short-horizon physiologic precursors immediately preceding onset. A brief 2-hour warm-up suffices before rolling, hour-ahead forecasts begin—compatible with real-world clinical workflow. After recall-focused hysteresis calibration, we selected a conservative, clinically intuitive operating point—“start strict, stay permissive”—with τ↑ = 0.936 and τ↓ = 0.050. At these thresholds, validation performance was: TPR 0.867 (156/180), TNR 0.97 (941/973), PPV 0.83, NPV 0.98, balanced accuracy 0.92, macro-F1 0.91, overall accuracy 0.95, and AUC 0.94. The confusion matrix (TN = 941, FP = 32; FN = 24, TP = 156) corresponds to a 3.3% false-alarm rate among non-AF hours. This operating point reduces spurious triggers while preserving high sensitivity; for even more sensitivity, a looser recall-first setting (lower τ↑) increased TPR at the expected cost in specificity, illustrating a controllable precision-recall trade-off depending on clinical tolerance for false alarms. To interpret temporal decision-making, we examined minute-level attention over the 2-hour context. In a representative true positive (P(AF) = 0.99), attention exhibited two peaks (≈ 0.3) bracketing ~ 1 hour before the prediction horizon, suggesting multi-locus evidence accumulation. In a false negative (P(AF) = 0.475), attention collapsed to a single sharp peak (~ 0.8) ~ 10 minutes before the horizon without mid-window reinforcement—consistent with lower confidence and a missed alert despite a salient transient motif. Taken together, these examples indicate that correct forecasts tend to integrate corroborating cues across the window, whereas misses are dominated by isolated late peaks. At the daily scale, the multimodal Transformer stratified AF-burden patterns (AF-negative, single-episode, multi-episode) and complements the hour-ahead model by situating short-term risk within longer-term physiology—useful for downstream decisions (e.g., anticoagulation, rhythm-control strategy, follow-up intensity). Finally, the multimodal design was robust to motion: ECG irregularities coincident with substantial activity were down-weighted, while physiologically coherent patterns were emphasized, reducing false alarms typical of wearable data. Overall, the framework shifts postoperative surveillance from passive detection to anticipatory care, delivering interpretable, data-efficient, and clinically tunable AF forecasts. VI. Conclusion This pilot study establishes the feasibility of combining continuous wearable ECG monitoring with multimodal AI to move POAF surveillance beyond retrospective detection toward real-time, clinically actionable prediction. With a brief 2-hour warm-up, our hour-ahead warner GRU-Transformer, captures risk signals, achieving balanced accuracy 92% and AUC 94%. Attention analyses suggest correct forecasts integrate multi-locus evidence across the two-hour window, whereas misses are driven by isolated late peaks—an interpretable behavior that aligns with physiologic intuition. Despite the modest cohort, results indicate a clinically tunable system that prioritizes sensitivity while controlling alert burden, positioning AI-enabled monitoring as a proactive decision-support tool for early therapy adjustments, targeted follow-up, and individualized recovery. Future work should include multi-center external validation, prospective workflow studies (alert usability and response time), subgroup/fairness analyses, drift and recalibration monitoring, and on-device efficiency assessments. If validated at scale, multimodal AI-driven monitoring could help redefine postoperative rhythm management, making POAF prediction an actionable component of precision perioperative care. Declarations Acknowledgements The graphical abstract was created with the BioRender software (https://BioRender.com). Melina Heine received funding from the Biomedical Education Program (BMEP) and the German Heart Foundation (Deutsche Herzstiftung e.V.) . Data Availability The data that support the findings of this study are not publicly available due to institutional and patient privacy restrictions but are available from the corresponding author upon reasonable request and with appropriate institutional approvals. Author contributions Conceptualization: A.R., N.M., M.H., J.W., F.R.N.; Data curation: M.H., L.M., A.R., N.M.; Statistics and modeling: N.M., A.R.; Visualization – graphical abstract: M.H.; Visualization – model and results: N.M.; Writing – original draft: A.R., N.M., M.H., J.W., F.R.N.; Writing – review and editing: A.R., N.M., M.H., A.H., L.S., L.M., A.O., J.D.M., J.W., F.R.N. References O’Brien B, Burrage PS, Ngai JY, Prutkin JM, Huang CC, Xu X, et al. Society of Cardiovascular Anesthesiologists/European Association of Cardiothoracic Anaesthetists Practice Advisory for the Management of Perioperative Atrial Fibrillation in Patients Undergoing Cardiac Surgery. Journal of Cardiothoracic and Vascular Anesthesia. 2019 Jan;33(1):12–26. Greenberg JW, Lancaster TS, Schuessler RB, Melby SJ. Postoperative atrial fibrillation following cardiac surgery: a persistent complication. European Journal of Cardio-Thoracic Surgery. 2017 Oct 1;52(4):665–72. Woldendorp K, Farag J, Khadra S, Black D, Robinson B, Bannon P. Postoperative Atrial Fibrillation After Cardiac Surgery: A Meta-Analysis. The Annals of Thoracic Surgery. 2021 Dec;112(6):2084–93. Gaudino M, Di Franco A, Rong LQ, Piccini J, Mack M. Postoperative atrial fibrillation: from mechanisms to treatment. European Heart Journal. 2023 Mar 21;44(12):1020–39. Halsey, Grace. "Updated Guidelines for Atrial Fibrillation from ACC/AHA Focus on Aggressive Prevention and Control and a Continuum of Care." Patient Care (Online) (2023): NA-NA. Hindricks, Gerhard, et al. "2020 ESC Guidelines for the diagnosis and management of atrial fibrillation developed in collaboration with the European Association for Cardio-Thoracic Surgery (EACTS) The Task Force for the diagnosis and management of atrial fibrillation of the European Society of Cardiology (ESC) Developed with the special contribution of the European Heart Rhythm Association (EHRA) of the ESC." European heart journal 42.5 (2021): 373-498. Perez, Marco V., et al. "Large-scale assessment of a smartwatch to identify atrial fibrillation." New England Journal of Medicine 381.20 (2019): 1909-1917. Ha ACT, Verma S, Mazer CD, Quan A, Yanagawa B, Latter DA, et al. Effect of Continuous Electrocardiogram Monitoring on Detection of Undiagnosed Atrial Fibrillation After Hospitalization for Cardiac Surgery: A Randomized Clinical Trial. JAMA Netw Open. 2021 Aug 27;4(8):e2121867. Ibrahim, Hussein, et al. "Reporting guidelines for clinical trials of artificial intelligence interventions: the SPIRIT-AI and CONSORT-AI guidelines." Trials 22.1 (2021): 11. Vasey, Baptiste, et al. "Reporting guideline for the early stage clinical evaluation of decision support systems driven by artificial intelligence: DECIDE-AI." bmj 377 (2022). Wolff, Robert F., et al. "PROBAST: a tool to assess the risk of bias and applicability of prediction model studies." Annals of internal medicine 170.1 (2019): 51-58. Luo, Nancy, et al. "Exercise training in patients with chronic heart failure and atrial fibrillation." Journal of the American College of Cardiology 69.13 (2017): 1683-1691. Patel, Nimesh, and Jose A. Joglar. "Postoperative atrial fibrillation after cardiac surgery and the challenges of predicting risk." American Journal of Cardiology 209 (2023): 241. De la Fuente-Martínez, J., et al. "Impact of arrhythmia in hospital mortality in acute ischemic stroke patients: a retrospective cohort study in northern Mexico." Journal of Stroke and Cerebrovascular Diseases 31.2 (2022): 106259. Bögge, Lukas, Itsaso Colás-Blanco, and Pascale Piolino. "Respiratory sinus arrhythmia during biofeedback is linked to persistent improvements in attention, short-term memory, and positive self-referential episodic memory." Frontiers in neuroscience 16 (2022): 791498. Apfel, Gabriel, et al. "Assessing the utility of atrial fibrillation induction to risk stratify children with Wolff–Parkinson–White syndrome." Cardiology in the Young 34.9 (2024): 1849-1853. Gillinov AM, et al. Rate Control vs Rhythm Control for Atrial Fibrillation after Cardiac Surgery. NEJM. 2016;374:1911–1921. Filardo G, et al. Epidemiology of new-onset atrial fibrillation following coronary artery bypass graft surgery. Heart. 2009;95:522–528. Mariscalco G, et al. Atrial fibrillation after isolated coronary surgery affects late survival. Circulation. 2008;118:1612–1618. El-Chami MF, et al. Postoperative atrial fibrillation predicts long-term mortality after CABG. J Thorac Cardiovasc Surg. 2010;140:110–116. Ahlsson A, et al. Postoperative atrial fibrillation and stroke: a nationwide cohort study. Ann Thorac Surg. 2014;98:103–110. Villareal RP, et al. Postoperative atrial fibrillation and cardiac morbidity. J Am Coll Cardiol. 2004;43:742–748. Greenberg JW, et al. Postoperative atrial fibrillation following cardiac surgery: a persistent complication. Eur J Cardiothorac Surg. 2017;52:665–672. Steinberg JS, et al. Lack of symptoms in patients with atrial fibrillation. Am Heart J. 2014;168:643–649. Freedman B, et al. Screening for atrial fibrillation: a report of the AF-SCREEN International Collaboration. Circulation. 2017;135:e604–e621. Lubitz SA, et al. Screening for atrial fibrillation after ischemic stroke: findings from extended monitoring. Circulation. 2015;131:149–156. Passman RS, et al. Pivotal role of continuous cardiac monitoring for detection of atrial fibrillation: the CRYSTAL-AF study. NEJM. 2014;370:2478–2486. Barrett PM, et al. Comparison of 24-hour Holter monitoring with 14-day novel adhesive patch ECG monitoring. Am J Med. 2014;127:95.e11–95.e17. Fuster V, et al. Mobile health for atrial fibrillation screening: promise and challenges. Nat Rev Cardiol. 2018;15:657–675. Bumgarner JM, et al. Smartwatch algorithm for automated detection of atrial fibrillation. Circulation. 2018;138:289–291. Additional Declarations No competing interests reported. Supplementary Files Graphicalabstract.docx Cite Share Download PDF Status: Under Review Version 1 posted Reviews received at journal 07 May, 2026 Reviews received at journal 03 May, 2026 Reviewers agreed at journal 28 Apr, 2026 Reviewers agreed at journal 26 Apr, 2026 Reviews received at journal 20 Apr, 2026 Reviewers agreed at journal 15 Apr, 2026 Reviewers agreed at journal 13 Apr, 2026 Reviewers invited by journal 12 Apr, 2026 Editor assigned by journal 19 Mar, 2026 Submission checks completed at journal 17 Mar, 2026 First submitted to journal 16 Mar, 2026 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-9138384","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":625578884,"identity":"d65a4a99-171a-4f13-a158-4319d938d3b3","order_by":0,"name":"Amin Ramezani","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABAklEQVRIiWNgGAWjYDADNvYeBmYGhgMQHg8DA2MDQS08Z0jVwiCRQ6QW/tmHn2748Mcuj0/y7THpAoY78uYzkp99eMNgI7vhAA6zz6WZ3ZzBk1zMJp2XJj2D4ZnhnBtpxjPnMKQZ49LCcIbB7DaPBHNim3QOkMFwmHEGzwFjZiAjEZcW+TPs327/MahPbJM8A9ZiP4Pn+Geglv84tRic4TG7zZBwOLFNggesJXEGew/IlgM4tRie4Sm72XPgeGIbT176bx6Dw8lALcWMcwySjWfi0CJ3hn3bjR9/qhPnt589bMxTcdh2BjP7ZoY3FXayfbi8j+ZODMYoGAWjYBSMAnIAAIB0XZOunrg6AAAAAElFTkSuQmCC","orcid":"","institution":"Brigham and Women's Hospital","correspondingAuthor":true,"prefix":"","firstName":"Amin","middleName":"","lastName":"Ramezani","suffix":""},{"id":625578885,"identity":"4581b62d-9204-4a43-affe-2fe2927e41c1","order_by":1,"name":"Negin Maddah","email":"","orcid":"","institution":"Northeastern University","correspondingAuthor":false,"prefix":"","firstName":"Negin","middleName":"","lastName":"Maddah","suffix":""},{"id":625578886,"identity":"ecc75d14-f213-416e-9642-62df28d25606","order_by":2,"name":"Melina Heine","email":"","orcid":"","institution":"Brigham and Women's Hospital","correspondingAuthor":false,"prefix":"","firstName":"Melina","middleName":"","lastName":"Heine","suffix":""},{"id":625578887,"identity":"7396af35-8c1b-42df-8e32-65addcbffed4","order_by":3,"name":"Ali Homaei","email":"","orcid":"","institution":"Brigham and Women's Hospital","correspondingAuthor":false,"prefix":"","firstName":"Ali","middleName":"","lastName":"Homaei","suffix":""},{"id":625578888,"identity":"e370431a-3066-4aea-9426-66f39eb6b539","order_by":4,"name":"Leonard Simeth","email":"","orcid":"","institution":"Brigham and Women's Hospital","correspondingAuthor":false,"prefix":"","firstName":"Leonard","middleName":"","lastName":"Simeth","suffix":""},{"id":625578889,"identity":"6509c175-f234-48a5-9ee9-1cf7b96d447a","order_by":5,"name":"Laura Mazuera","email":"","orcid":"","institution":"Brigham and Women's Hospital","correspondingAuthor":false,"prefix":"","firstName":"Laura","middleName":"","lastName":"Mazuera","suffix":""},{"id":625578891,"identity":"5bd57cac-5de2-4c87-86e5-f42146e6d04b","order_by":6,"name":"Asishana Osho","email":"","orcid":"","institution":"Massachusetts General Hospital","correspondingAuthor":false,"prefix":"","firstName":"Asishana","middleName":"","lastName":"Osho","suffix":""},{"id":625578893,"identity":"00c42091-cadf-4787-b406-c429f877c7c5","order_by":7,"name":"Jochen D. Muehlschlegel","email":"","orcid":"","institution":"Johns Hopkins University","correspondingAuthor":false,"prefix":"","firstName":"Jochen","middleName":"D.","lastName":"Muehlschlegel","suffix":""},{"id":625578895,"identity":"cdf57ea4-558b-42fe-9244-41db278bf66a","order_by":8,"name":"Jakob Wollborn","email":"","orcid":"","institution":"Brigham and Women's Hospital","correspondingAuthor":false,"prefix":"","firstName":"Jakob","middleName":"","lastName":"Wollborn","suffix":""},{"id":625578897,"identity":"b63db68d-7b32-437e-a1ee-173962d958fa","order_by":9,"name":"Farhad R. Nezami","email":"","orcid":"","institution":"Brigham and Women's Hospital","correspondingAuthor":false,"prefix":"","firstName":"Farhad","middleName":"R.","lastName":"Nezami","suffix":""}],"badges":[],"createdAt":"2026-03-16 13:23:17","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-9138384/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-9138384/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":107355821,"identity":"1f08f754-4dba-4590-a5cf-5397acda5194","added_by":"auto","created_at":"2026-04-20 16:55:10","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":51946,"visible":true,"origin":"","legend":"\u003cp\u003eCohort Selection Flow Chart\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/3607ce28f517d59b3de2bb6d.png"},{"id":107355838,"identity":"4e854a3c-0b9a-4e50-8f94-60c06724125d","added_by":"auto","created_at":"2026-04-20 16:55:12","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":274142,"visible":true,"origin":"","legend":"\u003cp\u003eHigh Level Model Structure (ECG: Electrocardiogram, HR: Heart Rate, RMSSD: Root Mean Square of Successive Differences of RR Intervals, SNR: Signal-to-Noise Ratio, ACC x/y/z: Accelerometer (x, y, z axes), RRI: sR-R Interval (beat-to-beat interval), RWL: Respiration Waveform Level, AF: Atrial Fibrillation, GRU: Gated Recurrent Unit)\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/b34d8d8e6e69c16806b25807.png"},{"id":107355845,"identity":"b7c43528-9cfd-4f43-b7d9-6e51ab2b88af","added_by":"auto","created_at":"2026-04-20 16:55:13","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":53968,"visible":true,"origin":"","legend":"\u003cp\u003eDistribution of AF-burden values across all day-level records.\u003c/p\u003e","description":"","filename":"3.png","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/efe827691bf7698822873c45.png"},{"id":107355822,"identity":"88c4f7cc-ab51-4d53-9bcc-d6b18a9f4eef","added_by":"auto","created_at":"2026-04-20 16:55:10","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":99457,"visible":true,"origin":"","legend":"\u003cp\u003ePer-subject summary for patients who experienced AF at least once, showing absolute counts of AF-positive hours (green) and non-AF hours (orange). An hour is classified as AF-positive if it contains at least five AF-positive minutes. The plot displays absolute hour counts, showing the ratio of AF burden and total monitored time for each patient.\u003c/p\u003e","description":"","filename":"4.png","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/a0dc8d2109b10533f04c8499.png"},{"id":107355850,"identity":"2ab7e6c9-43c9-4920-a6a7-4258bf3da021","added_by":"auto","created_at":"2026-04-20 16:55:13","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":149115,"visible":true,"origin":"","legend":"\u003cp\u003eExample time series of valid minutes per hour for three subjects, illustrating atrial fibrillation (AF) burden. Each panel shows hourly counts of valid monitoring minutes (blue line), with AF-positive hours (≥5 AF minutes) highlighted by red stars and shaded regions. Subject 13 (top) experienced 41 AF-positive hours across 11 days, while Subject 33 (bottom) had 22 AF-positive hours concentrated in a single day.\u003c/p\u003e","description":"","filename":"5.png","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/ae0f0759271aec9923955703.png"},{"id":107355905,"identity":"b70c9d06-e7d7-45f7-8575-6cea3ae535dd","added_by":"auto","created_at":"2026-04-20 16:55:30","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":89352,"visible":true,"origin":"","legend":"\u003cp\u003eModel performance in atrial fibrillation (AF) detection. \u003cem\u003e(a)\u003c/em\u003e Receiver operating characteristic (ROC) curve for the validation dataset, achieving an area under the curve (AUC) of 0.94. \u003cem\u003e(b)\u003c/em\u003eConfusion matrix at the optimal hysteresis thresholds (τ↑ = 0. 936, τ↓ = 0.05), showing strong discrimination with 941 true negatives, 156 true positives, 32 false positives, and 24 3 false negatives.\u003c/p\u003e","description":"","filename":"6.png","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/67ad57ecf601a5f2d7cba76a.png"},{"id":107355884,"identity":"a783ed01-7320-45d1-b750-32e97936f87d","added_by":"auto","created_at":"2026-04-20 16:55:24","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":144339,"visible":true,"origin":"","legend":"\u003cp\u003eAttention weight distributions over time windows preceding atrial fibrillation (AF) predictions. (\u003cem\u003eTop\u003c/em\u003e) Example of a TP prediction (P(AF) = 0.99), showing two primary peaks rises before and after ~60, indicating integration of recent cues with broader context. (\u003cem\u003eBottom\u003c/em\u003e) Example of a FN prediction (P(AF) = 0.475), showing a single sharp peak with minimal near the window end, consistent with insufficient evidence to trigger an alert.\u003c/p\u003e","description":"","filename":"7.png","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/1fc32c1d7c93fdbf7c64ec16.png"},{"id":107486339,"identity":"4249c5e4-68cc-408d-b8ef-73b3db137337","added_by":"auto","created_at":"2026-04-22 02:38:06","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":960504,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/7740f310-b44b-4f49-9c43-2a654c6966d3.pdf"},{"id":107355852,"identity":"40b98073-839e-4bab-8b00-86538ffaf3b3","added_by":"auto","created_at":"2026-04-20 16:55:14","extension":"docx","order_by":1,"title":"","display":"","copyAsset":false,"role":"supplement","size":956678,"visible":true,"origin":"","legend":"","description":"","filename":"Graphicalabstract.docx","url":"https://assets-eu.researchsquare.com/files/rs-9138384/v1/9695cb6fcdcdd60a0c0426c7.docx"}],"financialInterests":"No competing interests reported.","formattedTitle":"BeatAI: BiomEtrics for real-time Atrial Arrhythmia tracking using Transformer Artificial Intelligence from wearables after discharge from cardiac surgery","fulltext":[{"header":"I. Introduction","content":"\u003cp\u003ePostoperative atrial fibrillation (POAF) is the most common complication after cardiac surgery and affects between 20 and 50% of patients [\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e, \u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e]. It is associated with longer ICU and hospital stays, increased rate of stroke [\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e], heart failure, readmission, and greater long-term mortality. Current management remains reactive rather than proactive because POAF is often transient and unpredictable. Although several patient and procedural risk factors have been identified (e.g., age, chronic kidney disease, heart failure, mitral valve disease, prior atrial fibrillation, and cardiopulmonary bypass time) [\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e, \u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e], current perioperative risk scores remain poorly calibrated and frequently fail to identify patients who will ultimately experience POAF. Consequently, preventive therapies are inconsistently applied, leading to missed opportunities for targeted intervention [\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e, \u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eThe dynamic postoperative recovery period is uniquely suited for continuous physiologic surveillance, as it is characterized by fluctuating autonomic tone, inflammation, and hemodynamics. Wearable sensors have proven effective for remote patient monitoring (RPM) and early arrhythmia detection [\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e], [\u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e]. Of note, these technologies generate rich, longitudinal datasets that offer a unique opportunity and paradigm shift in targeting the clinical problem: moving from retrospective event detection towards real-time risk forecasting and personalized prophylaxis.\u003c/p\u003e \u003cp\u003eRecent advances in artificial intelligence (AI) enable end-to-end deep learning on raw ECG signals to extract latent electrophysiologic precursors, such as premonitory P-wave or atrial substrate changes. While transformer-based models and multimodal fusion have improved generalizability and data efficiency [\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e, \u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e10\u003c/span\u003e, \u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e11\u003c/span\u003e, \u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e], translation to perioperative care remains limited. Few models have been validated on continuous postoperative monitoring trials, and virtually none are capable of prospective, real-time forecasting at scale [\u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e13\u003c/span\u003e, \u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e14\u003c/span\u003e, \u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e15\u003c/span\u003e, \u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e16\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eWe address this gap by leveraging continuous ECG data from a prospective remote patient monitoring study to predict POAF. We evaluate a dual-resolution approach: a multimodal daily-level Transformer for arrhythmia detection and burden classification, paired with a hybrid sequence model for rolling hour-ahead forecasts. We hypothesize that AI models can identify subtle electrophysiologic signatures that precede POAF, delivering predictive performance superior to existing clinical risk scores. This work establishes a framework for precision prevention, aiming to not just detecting AF after it occurs, but to predict when it will occur. Thereby we aim to unlock a path toward precision prevention and individualized recovery trajectories.\u003c/p\u003e"},{"header":"II. Methods","content":"\u003cdiv id=\"Sec3\" class=\"Section2\"\u003e \u003ch2\u003eII.1. Study design\u003c/h2\u003e \u003cp\u003eWe conducted a proof-of-concept analysis on a pilot cohort of postoperative cardiac surgery patients enrolled in an ongoing IRB-approved prospective remote patient monitoring trial at Mass General Brigham (Protocol #2021P000356). Between January 2021 and May 2025, a total of 140 adult patients undergoing cardiac surgery with cardiopulmonary bypass and were fitted with an FDA-approved adhesive ECG patch monitor (VV-330, VivaLNK, Campbell, CA) at hospital discharge. In brief, patients were instructed to wear the device continuously for 14 days to capture high-resolution postoperative rhythm and physiologic data. For the present analysis, we included 140 postoperative cardiac-surgery patients, to enable more robust development and evaluation of AI\u0026ndash;based POAF prediction models.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec4\" class=\"Section2\"\u003e \u003ch2\u003eII.2. Study cohort and data streams\u003c/h2\u003e \u003cp\u003eEligible patients were adults (\u0026gt;\u0026thinsp;20 years) undergoing cardiac surgery with median sternotomy and cardiopulmonary bypass, who provided informed consent. Exclusion criteria included history of AF exceeding one year prior to surgery, presence of implanted cardiac assist devices, enrollment in other pharmacological trials, and lack or poor quality of data (\u0026lt;\u0026thinsp;80% of the postoperative monitoring period). Of the 140 patients enrolled in the parent trial, 101 were included in the primary monitoring analysis (Fig.\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e). Continuous physiologic data were acquired from wearable ECG patch sensors, placed immediately after hospital discharge. Each record contained a timestamp, short ECG rhythm snippets (128 samples each), and scalar physiologic and activity variables per sample, including heart rate, root mean square of successive differences (RMSSD), skin temperature, activity score, and signal-to-noise ratio (SNR). Accelerometer-based motion summaries were also derived as mean and standard deviation across x, y, and z axes. When available, beat-to-beat intervals (RRI) and a respiratory waveform level (RWL) were included. In addition, static demographic information were incorporated, including age and sex.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec5\" class=\"Section2\"\u003e \u003ch2\u003eII.3. Outcome definitions and prediction tasks\u003c/h2\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eThe study leveraged continuous postoperative real-time monitoring to assess whether advanced AI methods could anticipate POAF risk across different temporal resolutions. We implemented two complementary prediction frameworks:\u003c/p\u003e \u003cp\u003e \u003cspan type=\"Underline\" class=\"Underline\" name=\"Emphasis\"\u003eII.3A. Daily-level risk stratification\u003c/span\u003e: Each patient-day was treated as a separate unit of analysis. Continuous ECG and wearable sensor signals were originally recorded at one-second resolution and then downsampled to one sample per minute, yielding 1,440 samples per day. For each minute, a 128-HZ ECG rhythm strip was extracted and paired with its root mean square (RMS) amplitude. In parallel, we engineered tabular context features (\u0026ldquo;TAB tokens\u0026rdquo;) that aggregated per-minute physiologic and behavioral data, including average heart rate, RMSSD, temperature, motion, activity, and ECG amplitude. Together, these features captured both electrical morphology and physiologic context. A multimodal Transformer model was then trained, projecting ECG and TAB tokens into a shared latent space. The architecture incorporated modality-specific embeddings, day-level positional encodings, masked mean pooling, and cross-modal attention to distinguish true arrhythmia from motion artifacts. Outputs included binary AF detectione and ordinal AF burden classification (single vs. multiple daily episodes). We trained the model in two steps: initially on AF detection followed by fine-tuning on AF-positive days for burden estimation. To address class imbalance and computational constraints, a sampling strategy retained\u0026thinsp;~\u0026thinsp;2% of the raw data (2,024,735 rows from 101 patients) while ensuring full representation of all AF episodes. Evaluation prioritized clinically relevant metrics: for AF detection, precision, recall, and balanced accuracy, with sensitivity prioritized to minimize missed AF episodes; and for AF burden, recall on high-burden days, given its prognostic significance.\u003c/p\u003e \u003cp\u003e \u003cspan type=\"Underline\" class=\"Underline\" name=\"Emphasis\"\u003eII.3B. Hour-ahead forecasting\u003c/span\u003e: To enable fine-grained, rolling predictions, we also framed the problem as near real-time forecasting of AF. Hours were labeled AF-positive if they contained\u0026thinsp;\u0026ge;\u0026thinsp;5 AF-positive minutes. At each time \u003cem\u003et\u003c/em\u003e, the model ingested only the preceding two hours of data [t\u0026ndash;2h, t] to predict the AF probability in the next hour [t, t\u0026thinsp;+\u0026thinsp;1h]. After an initial two-hour warm-up, the system generated continuous hour-ahead forecasts throughout the 14-day monitoring period, updating in real time as new minutes arrived. For the hour-ahead framework, raw samples were aggregated into minute-level features. For each minute of monitoring, we derived a comprehensive set of physiologic and behavioral features from the wearable sensor data. Electrocardiogram (ECG) waveforms (128 samples per minute) were used to compute the root-mean-square (RMS) amplitude as a measure of signal strength and myocardial depolarization intensity. Standard vital and activity markers were extracted from the wearable telemetry, including heart rate, short-term heart-rate variability (RMSSD), skin temperature, activity level, and signal-to-noise ratio. Three-axis accelerometry was summarized by computing the mean and standard deviation of the acceleration in each spatial direction (x, y, and z), capturing overall mobility and postural dynamics. Respiratory behavior was characterized using a respiratory-waveform surrogate derived from thoracic impedance; when available, we computed the minute-wise average of this respiratory signal. Beat-to-beat interval series were used to derive additional heart-rate\u0026ndash;variability metrics, including mean RR interval, SDNN, RMSSD, and pNN50, reflecting autonomic tone and rhythm stability. Finally, each minute was assigned a binary atrial fibrillation (AF) indicator, defined as positive if any ECG snippet within that minute was classified as AF by the underlying arrhythmia detector.. Minutes with no valid ECG snippet were discarded. Minutes were then grouped into hours if\u0026thinsp;\u0026ge;\u0026thinsp;10 valid minutes were available. For each subject, we constructed sliding 2-hour context windows to forecast the next hour. Additional derived features included coverage (observed minutes/120), episode history (AF in the most recent hour, run length of the current state, AF count and fraction across the two hours, hours since last AF onset and offset), circadian terms (sine/cosine of hour-of-day), and relative hour-position scalar (0 for the older hour, 1 for the most recent). Static preoperative covariates (e.g., age, sex, prior AF) were appended when available. To reduce inter-subject variability, minute features were z-scored within each subject\u0026rsquo;s training set. If insufficient training data existed, a global scaler fit on all training minutes was applied. History, circadian, and hour-position scalars were left unstandardized.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003eII.4. Model architectures\u003c/h2\u003e \u003cp\u003e \u003cspan type=\"Underline\" class=\"Underline\" name=\"Emphasis\"\u003eII.4A. Daily-level multimodal Transformer\u003c/span\u003e: The model used modality-specific embedding layers for ECG and TAB tokens, day-level positional encodings, masked mean pooling, and cross-modal attention. Outputs included binary AF detection and ordinal AF burden classification. Training was staged, with the burden head optimized only on AF-positive days (Fig.\u0026nbsp;2).\u003c/p\u003e \u003cp\u003e \u003cspan type=\"Underline\" class=\"Underline\" name=\"Emphasis\"\u003eII.4B. Hour-ahead hybrid sequence model\u003c/span\u003e: The real-time model comprised a three-stage encoder: i) GRU denoising/compression (96 units) to process variable-length minute sequences, ii) Transformer encoder (2 layers, 4 heads, GELU activation, width 128) to capture temporal dependencies (e.g., evolving HRV and activity patterns 20\u0026ndash;40 minutes earlier), and iii) Attention pooling to emphasize informative minutes while down-weighting uninformative or noisy segments.\u003c/p\u003e \u003cp\u003eThe pooled summary vector was concatenated with static covariates, coverage, and episode-history features, then passed through two fully connected layers (192\u0026rarr;128, ReLU, dropout 0.05). A final linear unit produced a logit, with the sigmoid interpreted as the probability of AF in the next hour.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec7\" class=\"Section2\"\u003e \u003ch2\u003eII.5. Down sampling,\u003c/h2\u003e \u003cp\u003eTo mitigate the heavy class imbalance caused by prolonged AF-negative monitoring, we applied a simple, temporally coherent down-sampling rule at the patient level. For patients who ever exhibited AF (non-zero daily AF burden), we retained all days up to and including the last AF-positive day and kept one additional AF-negative day thereafter; all later AF-negative days were excluded. After forming daily records, this step reduced the dataset from 2,024,735 to 1,470,235 rows (~\u0026thinsp;27% reduction) without removing any AF-positive data. AF burden values present in the dataset were none, single, multiple, and continuous. Across the day-level records, the distribution of AF-burden states included 180,145 rows with single burden, 133,878 rows with multiple burden, and 243,364 rows with continuous AF burden as shown in Fig.\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e3\u003c/span\u003e. At the subject level, using each patient\u0026rsquo;s highest recorded burden, 20 subjects exhibited a maximum single burden, 13 subjects reached multiple-AF burden in a day, and 10 subjects reached continuous AF per day.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eFigure \u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e4\u003c/span\u003e shows only patients who experienced AF at least once; subjects with no AF were excluded in this visualization. An hour is classified as AF\u0026thinsp;+\u0026thinsp;if it contains\u0026thinsp;\u0026ge;\u0026thinsp;5 AF-positive minutes. Displaying absolute hour counts allows direct comparison of each patient\u0026rsquo;s AF burden and total monitored time. Among these patients, we observe substantial between-patient heterogeneity in total monitored hours and in class balance. A minority contribute long recordings with a high AF burden, while many contribute shorter traces with predominantly AF-negative hours. This uneven per-subject contribution and AF+/Non-AF imbalance underscore the need for subject-aware evaluation and motivate our approach to curtail long AF-negative tails during training.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eA sample of temporal structure of AF burden is illustrated in Fig.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e5\u003c/span\u003e, which shows representative hour-by-hour trajectories of valid monitoring minutes for three subjects. AF-positive hours,defined as hours containing\u0026thinsp;\u0026ge;\u0026thinsp;5 AF-positive minutes, are highlighted with red markers and shaded regions. These examples demonstrate how AF episodes cluster within individuals.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec8\" class=\"Section2\"\u003e \u003ch2\u003eII.6. Training and validation\u003c/h2\u003e \u003cp\u003eThe AI model addressed class imbalance using weighted binary cross-entropy and focal loss, with oversampling of AF-positive windows. The hour-ahead model used a weighted random sampler to ensure balanced exposure. Optimization was performed with AdamW (learning rate 1\u0026times;10⁻\u0026sup3;, weight decay 5\u0026times;10⁻⁵), mixed-precision training, and gradient-norm clipping (1.0). Training was capped at 50 epochs with early stopping triggered by validation plateaus, and learning rates adapted via ReduceLROnPlateau. To prevent temporal leakage, data were split within subjects, using the first 80% of time-series windows for training and the final 20% for validation. Windows spanning the cutoff were discarded. For tran and validation, there are 101 postoperative cardiac surgery patients fitted with continuous wearable monitoring. Across all subjects, we constructed 6,949 supervised K-hour windows (K\u0026thinsp;=\u0026thinsp;2 context hours) for learning the next-hour AF label. After a within-subject temporal split, 5,495 windows were used for training and 1,153 for validation; 99 windows straddling the split boundary were discarded. Using the granular AF signal, AF-positive hours were defined as hours with \u0026ge;\u0026thinsp;5 AF-positive minutes. In the validation set, this yielded 180 AF-positive and 973 AF-negative hours (AF prevalence\u0026thinsp;\u0026asymp;\u0026thinsp;19%).\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec9\" class=\"Section2\"\u003e \u003ch2\u003eII.7. Calibration and decision rules\u003c/h2\u003e \u003cp\u003eBecause AF episodes often persist once initiated, the hour-ahead system applied a hysteresis decision rule with dual thresholds: a start threshold (τ\u0026uarr;) to trigger AF and a stay threshold (τ\u0026darr;) to maintain the AF state. These thresholds were tuned on the validation set through a recall-focused search under specificity constraints (\u0026ge;\u0026thinsp;0.92, relaxed stepwise to \u0026ge;\u0026thinsp;0.85 if unmet). This approach favored minimizing false negatives while keeping false positives low. Model performance was summarized using balanced accuracy, macro-F1, AUC, and confusion matrices.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec10\" class=\"Section2\"\u003e \u003ch2\u003eII.8. Real-time deployment simulation\u003c/h2\u003e \u003cp\u003eIn simulated bedside use, the model produces rolling hour-ahead probabilities after a 2-hour warm-up window built from minute-level signals and episode-history features. Hysteresis uses the prior hour\u0026rsquo;s AF state to decide whether to initiate or maintain an alert. This way the model forecasts the probability of AF for the next hour.\u003c/p\u003e \u003cp\u003e \u003cb\u003eClinical trial number: not applicable.\u003c/b\u003e \u003c/p\u003e \u003c/div\u003e"},{"header":"III. Results","content":"\u003cp\u003eAt neutral decision thresholds (τ\u0026uarr; = τ\u0026darr; = 0.5), the model showed strong discrimination on the validation set (AUC\u0026thinsp;=\u0026thinsp;0.94; Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e6\u003c/span\u003ea). To reflect the higher cost of missed postoperative AF, we applied a recall-focused hysteresis scheme that decouples alert initiation (τ\u0026uarr;) from alert persistence (τ\u0026darr;). The final operating point (τ\u0026uarr; = 0.936, τ\u0026darr; = 0.050) achieved TPR\u0026thinsp;=\u0026thinsp;0.867 and TNR\u0026thinsp;=\u0026thinsp;0.967, with confusion matrix TN\u0026thinsp;=\u0026thinsp;941, FP\u0026thinsp;=\u0026thinsp;32; FN\u0026thinsp;=\u0026thinsp;24, TP\u0026thinsp;=\u0026thinsp;156, yielding balanced accuracy\u0026thinsp;=\u0026thinsp;0.917, macro-F1\u0026thinsp;=\u0026thinsp;0.909, and overall accuracy\u0026thinsp;=\u0026thinsp;0.951 (Fig.\u0026nbsp;\u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e6\u003c/span\u003eb). Relative to a more aggressive intermediate setting (τ\u0026uarr; \u0026asymp; 0.849, τ\u0026darr; = 0.050; TPR\u0026thinsp;=\u0026thinsp;0.883, TNR\u0026thinsp;=\u0026thinsp;0.929), the chosen thresholds cut false positives by more than half (69 \u0026rarr; 32) at the cost of a small increase in false negatives (21 \u0026rarr; 24), a clinically preferable trade-off that reduces alarm burden while preserving high sensitivity. Compared to an hour-persistence baseline, the calibrated point slightly improves balanced accuracy (0.917 vs 0.915) with comparable macro-F1 (0.909 vs 0.910). Overall, hysteresis primarily optimizes alert dynamics and workload, while underlying discrimination remains strong (AUC\u0026thinsp;=\u0026thinsp;0.94).\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eTo further interpret the model\u0026rsquo;s temporal decision-making, we examined the distribution of attention weights within the two-hour input windows. Figure\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e7\u003c/span\u003e illustrates the model\u0026rsquo;s minute-level attention over the 2-hour context window for one true-positive (TP) and one false-negative (FN) example. In the TP case (predicted P(AF)\u0026thinsp;=\u0026thinsp;0.99), attention peaks twice (~\u0026thinsp;0.3) before and after 60 minutes (1 hour) before the prediction horizon. In contrast, the FN case (predicted P(AF)\u0026thinsp;=\u0026thinsp;0.475) concentrates attention more narrowly with a higher single peak (~\u0026thinsp;0.8) around the 10-minute lead but lacks the mid-window reinforcement, consistent with lower overall confidence and a missed alert despite a salient transient motif. Together, these paired examples indicate that correct forecasts tend to exhibit multi-locus attention, whereas misses are dominated by isolated focal peaks without earlier evidence.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e"},{"header":"V. Discussion","content":"\u003cp\u003ePostoperative atrial fibrillation (POAF) remains one of the most clinically consequential complications following cardiac surgery, occurring in 20\u0026ndash;50% of patients depending on procedure type and comorbidity profile [\u003cspan additionalcitationids=\"CR18\" citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e19\u003c/span\u003e]. Its impact is substantial: POAF is linked to prolonged hospitalization, thromboembolic complications, heart failure exacerbation, and increased rehospitalization and mortality risk [\u003cspan additionalcitationids=\"CR20 CR21\" citationid=\"CR19\" class=\"CitationRef\"\u003e19\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e22\u003c/span\u003e]. A defining challenge is that POAF is highly intermittent, many episodes are brief, transient, and clinically silent. Continuous in-hospital telemetry is generally effective at detecting arrhythmias while patients remain monitored, but a large proportion of AF burden emerges after discontinuation of telemetry and following discharge, when monitoring becomes intermittent and symptom-driven [\u003cspan additionalcitationids=\"CR24\" citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e25\u003c/span\u003e]. Prior studies have demonstrated that remote monitoring with wearable ECG patches is feasible, well-tolerated, and significantly improves AF detection in the early postoperative period compared with symptom reporting or routine follow-up [\u003cspan additionalcitationids=\"CR27 CR28 CR29\" citationid=\"CR26\" class=\"CitationRef\"\u003e26\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR30\" class=\"CitationRef\"\u003e30\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eOur results extend monitoring from detection to hour-ahead prediction, enabling proactive and temporally granular risk assessment. Using a multimodal Transformer at the daily scale and a hybrid GRU-Transformer at the hourly scale, the system captures both long-horizon AF burden signatures and short-horizon physiologic precursors immediately preceding onset. A brief 2-hour warm-up suffices before rolling, hour-ahead forecasts begin\u0026mdash;compatible with real-world clinical workflow. After recall-focused hysteresis calibration, we selected a conservative, clinically intuitive operating point\u0026mdash;\u0026ldquo;start strict, stay permissive\u0026rdquo;\u0026mdash;with τ\u0026uarr; = 0.936 and τ\u0026darr; = 0.050. At these thresholds, validation performance was: TPR 0.867 (156/180), TNR 0.97 (941/973), PPV 0.83, NPV 0.98, balanced accuracy 0.92, macro-F1 0.91, overall accuracy 0.95, and AUC 0.94. The confusion matrix (TN\u0026thinsp;=\u0026thinsp;941, FP\u0026thinsp;=\u0026thinsp;32; FN\u0026thinsp;=\u0026thinsp;24, TP\u0026thinsp;=\u0026thinsp;156) corresponds to a 3.3% false-alarm rate among non-AF hours. This operating point reduces spurious triggers while preserving high sensitivity; for even more sensitivity, a looser recall-first setting (lower τ\u0026uarr;) increased TPR at the expected cost in specificity, illustrating a controllable precision-recall trade-off depending on clinical tolerance for false alarms.\u003c/p\u003e \u003cp\u003eTo interpret temporal decision-making, we examined minute-level attention over the 2-hour context. In a representative true positive (P(AF)\u0026thinsp;=\u0026thinsp;0.99), attention exhibited two peaks (\u0026asymp;\u0026thinsp;0.3) bracketing\u0026thinsp;~\u0026thinsp;1 hour before the prediction horizon, suggesting multi-locus evidence accumulation. In a false negative (P(AF)\u0026thinsp;=\u0026thinsp;0.475), attention collapsed to a single sharp peak (~\u0026thinsp;0.8)\u0026thinsp;~\u0026thinsp;10 minutes before the horizon without mid-window reinforcement\u0026mdash;consistent with lower confidence and a missed alert despite a salient transient motif. Taken together, these examples indicate that correct forecasts tend to integrate corroborating cues across the window, whereas misses are dominated by isolated late peaks.\u003c/p\u003e \u003cp\u003eAt the daily scale, the multimodal Transformer stratified AF-burden patterns (AF-negative, single-episode, multi-episode) and complements the hour-ahead model by situating short-term risk within longer-term physiology\u0026mdash;useful for downstream decisions (e.g., anticoagulation, rhythm-control strategy, follow-up intensity). Finally, the multimodal design was robust to motion: ECG irregularities coincident with substantial activity were down-weighted, while physiologically coherent patterns were emphasized, reducing false alarms typical of wearable data. Overall, the framework shifts postoperative surveillance from passive detection to anticipatory care, delivering interpretable, data-efficient, and clinically tunable AF forecasts.\u003c/p\u003e"},{"header":"VI. Conclusion","content":"\u003cp\u003eThis pilot study establishes the feasibility of combining continuous wearable ECG monitoring with multimodal AI to move POAF surveillance beyond retrospective detection toward real-time, clinically actionable prediction. With a brief 2-hour warm-up, our hour-ahead warner GRU-Transformer, captures risk signals, achieving balanced accuracy 92% and AUC 94%. Attention analyses suggest correct forecasts integrate multi-locus evidence across the two-hour window, whereas misses are driven by isolated late peaks\u0026mdash;an interpretable behavior that aligns with physiologic intuition. Despite the modest cohort, results indicate a clinically tunable system that prioritizes sensitivity while controlling alert burden, positioning AI-enabled monitoring as a proactive decision-support tool for early therapy adjustments, targeted follow-up, and individualized recovery. Future work should include multi-center external validation, prospective workflow studies (alert usability and response time), subgroup/fairness analyses, drift and recalibration monitoring, and on-device efficiency assessments. If validated at scale, multimodal AI-driven monitoring could help redefine postoperative rhythm management, making POAF prediction an actionable component of precision perioperative care.\u003c/p\u003e"},{"header":"Declarations","content":"\u003cp\u003e\u003cstrong\u003eAcknowledgements\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe graphical abstract was created with the BioRender software (https://BioRender.com).\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eMelina Heine received funding from the \u003cem\u003eBiomedical Education Program (BMEP)\u003c/em\u003e and the \u003cem\u003eGerman Heart Foundation (Deutsche Herzstiftung e.V.)\u003c/em\u003e.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eData Availability\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe data that support the findings of this study are not publicly available due to institutional and patient privacy restrictions but are available from the corresponding author upon reasonable request and with appropriate institutional approvals.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAuthor contributions\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eConceptualization: A.R., N.M., M.H., J.W., F.R.N.; Data curation: M.H., L.M., A.R., N.M.; Statistics and modeling: N.M., A.R.; Visualization – graphical abstract: M.H.; Visualization – model and results: N.M.; Writing – original draft: A.R., N.M., M.H., J.W., F.R.N.; Writing – review and editing: A.R., N.M., M.H., A.H., L.S., L.M., A.O., J.D.M., J.W., F.R.N.\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n \u003cli\u003eO\u0026rsquo;Brien B, Burrage PS, Ngai JY, Prutkin JM, Huang CC, Xu X, et al. Society of Cardiovascular Anesthesiologists/European Association of Cardiothoracic Anaesthetists Practice Advisory for the Management of Perioperative Atrial Fibrillation in Patients Undergoing Cardiac Surgery. Journal of Cardiothoracic and Vascular Anesthesia. 2019 Jan;33(1):12\u0026ndash;26.\u0026nbsp;\u003c/li\u003e\n \u003cli\u003eGreenberg JW, Lancaster TS, Schuessler RB, Melby SJ. Postoperative atrial fibrillation following cardiac surgery: a persistent complication. European Journal of Cardio-Thoracic Surgery. 2017 Oct 1;52(4):665\u0026ndash;72.\u0026nbsp;\u003c/li\u003e\n \u003cli\u003eWoldendorp K, Farag J, Khadra S, Black D, Robinson B, Bannon P. Postoperative Atrial Fibrillation After Cardiac Surgery: A Meta-Analysis. The Annals of Thoracic Surgery. 2021 Dec;112(6):2084\u0026ndash;93.\u0026nbsp;\u003c/li\u003e\n \u003cli\u003eGaudino M, Di Franco A, Rong LQ, Piccini J, Mack M. Postoperative atrial fibrillation: from mechanisms to treatment. European Heart Journal. 2023 Mar 21;44(12):1020\u0026ndash;39.\u0026nbsp;\u003c/li\u003e\n \u003cli\u003eHalsey, Grace. \u0026quot;Updated Guidelines for Atrial Fibrillation from ACC/AHA Focus on Aggressive Prevention and Control and a Continuum of Care.\u0026quot; Patient Care (Online) (2023): NA-NA.\u003c/li\u003e\n \u003cli\u003eHindricks, Gerhard, et al. \u0026quot;2020 ESC Guidelines for the diagnosis and management of atrial fibrillation developed in collaboration with the European Association for Cardio-Thoracic Surgery (EACTS) The Task Force for the diagnosis and management of atrial fibrillation of the European Society of Cardiology (ESC) Developed with the special contribution of the European Heart Rhythm Association (EHRA) of the ESC.\u0026quot;\u0026nbsp;European heart journal\u0026nbsp;42.5 (2021): 373-498.\u003c/li\u003e\n \u003cli\u003ePerez, Marco V., et al. \u0026quot;Large-scale assessment of a smartwatch to identify atrial fibrillation.\u0026quot;\u0026nbsp;New England Journal of Medicine\u0026nbsp;381.20 (2019): 1909-1917.\u003c/li\u003e\n \u003cli\u003eHa ACT, Verma S, Mazer CD, Quan A, Yanagawa B, Latter DA, et al. Effect of Continuous Electrocardiogram Monitoring on Detection of Undiagnosed Atrial Fibrillation After Hospitalization for Cardiac Surgery: A Randomized Clinical Trial. JAMA Netw Open. 2021 Aug 27;4(8):e2121867.\u0026nbsp;\u003c/li\u003e\n \u003cli\u003eIbrahim, Hussein, et al. \u0026quot;Reporting guidelines for clinical trials of artificial intelligence interventions: the SPIRIT-AI and CONSORT-AI guidelines.\u0026quot;\u0026nbsp;Trials\u0026nbsp;22.1 (2021): 11.\u003c/li\u003e\n \u003cli\u003eVasey, Baptiste, et al. \u0026quot;Reporting guideline for the early stage clinical evaluation of decision support systems driven by artificial intelligence: DECIDE-AI.\u0026quot;\u0026nbsp;bmj\u0026nbsp;377 (2022).\u003c/li\u003e\n \u003cli\u003eWolff, Robert F., et al. \u0026quot;PROBAST: a tool to assess the risk of bias and applicability of prediction model studies.\u0026quot;\u0026nbsp;Annals of internal medicine\u0026nbsp;170.1 (2019): 51-58.\u003c/li\u003e\n \u003cli\u003eLuo, Nancy, et al. \u0026quot;Exercise training in patients with chronic heart failure and atrial fibrillation.\u0026quot;\u0026nbsp;Journal of the American College of Cardiology\u0026nbsp;69.13 (2017): 1683-1691.\u003c/li\u003e\n \u003cli\u003ePatel, Nimesh, and Jose A. Joglar. \u0026quot;Postoperative atrial fibrillation after cardiac surgery and the challenges of predicting risk.\u0026quot;\u0026nbsp;American Journal of Cardiology\u0026nbsp;209 (2023): 241.\u003c/li\u003e\n \u003cli\u003eDe la Fuente-Mart\u0026iacute;nez, J., et al. \u0026quot;Impact of arrhythmia in hospital mortality in acute ischemic stroke patients: a retrospective cohort study in northern Mexico.\u0026quot;\u0026nbsp;Journal of Stroke and Cerebrovascular Diseases\u0026nbsp;31.2 (2022): 106259.\u003c/li\u003e\n \u003cli\u003eB\u0026ouml;gge, Lukas, Itsaso Col\u0026aacute;s-Blanco, and Pascale Piolino. \u0026quot;Respiratory sinus arrhythmia during biofeedback is linked to persistent improvements in attention, short-term memory, and positive self-referential episodic memory.\u0026quot;\u0026nbsp;Frontiers in neuroscience\u0026nbsp;16 (2022): 791498.\u003c/li\u003e\n \u003cli\u003eApfel, Gabriel, et al. \u0026quot;Assessing the utility of atrial fibrillation induction to risk stratify children with Wolff\u0026ndash;Parkinson\u0026ndash;White syndrome.\u0026quot;\u0026nbsp;Cardiology in the Young\u0026nbsp;34.9 (2024): 1849-1853.\u003c/li\u003e\n \u003cli\u003eGillinov AM, et al. \u003cem\u003eRate Control vs Rhythm Control for Atrial Fibrillation after Cardiac Surgery.\u003c/em\u003e NEJM. 2016;374:1911\u0026ndash;1921.\u003c/li\u003e\n \u003cli\u003eFilardo G, et al. \u003cem\u003eEpidemiology of new-onset atrial fibrillation following coronary artery bypass graft surgery.\u003c/em\u003e Heart. 2009;95:522\u0026ndash;528.\u003c/li\u003e\n \u003cli\u003eMariscalco G, et al. \u003cem\u003eAtrial fibrillation after isolated coronary surgery affects late survival.\u003c/em\u003e Circulation. 2008;118:1612\u0026ndash;1618.\u003c/li\u003e\n \u003cli\u003eEl-Chami MF, et al. \u003cem\u003ePostoperative atrial fibrillation predicts long-term mortality after CABG.\u003c/em\u003e J Thorac Cardiovasc Surg. 2010;140:110\u0026ndash;116.\u003c/li\u003e\n \u003cli\u003eAhlsson A, et al. \u003cem\u003ePostoperative atrial fibrillation and stroke: a nationwide cohort study.\u003c/em\u003e Ann Thorac Surg. 2014;98:103\u0026ndash;110.\u003c/li\u003e\n \u003cli\u003eVillareal RP, et al. \u003cem\u003ePostoperative atrial fibrillation and cardiac morbidity.\u003c/em\u003e J Am Coll Cardiol. 2004;43:742\u0026ndash;748.\u003c/li\u003e\n \u003cli\u003eGreenberg JW, et al. \u003cem\u003ePostoperative atrial fibrillation following cardiac surgery: a persistent complication.\u003c/em\u003e Eur J Cardiothorac Surg. 2017;52:665\u0026ndash;672.\u003c/li\u003e\n \u003cli\u003eSteinberg JS, et al. \u003cem\u003eLack of symptoms in patients with atrial fibrillation.\u003c/em\u003e Am Heart J. 2014;168:643\u0026ndash;649.\u003c/li\u003e\n \u003cli\u003eFreedman B, et al. \u003cem\u003eScreening for atrial fibrillation: a report of the AF-SCREEN International Collaboration.\u003c/em\u003e Circulation. 2017;135:e604\u0026ndash;e621.\u003c/li\u003e\n \u003cli\u003eLubitz SA, et al. \u003cem\u003eScreening for atrial fibrillation after ischemic stroke: findings from extended monitoring.\u003c/em\u003e Circulation. 2015;131:149\u0026ndash;156.\u003c/li\u003e\n \u003cli\u003ePassman RS, et al. \u003cem\u003ePivotal role of continuous cardiac monitoring for detection of atrial fibrillation: the CRYSTAL-AF study.\u003c/em\u003e NEJM. 2014;370:2478\u0026ndash;2486.\u003c/li\u003e\n \u003cli\u003eBarrett PM, et al. \u003cem\u003eComparison of 24-hour Holter monitoring with 14-day novel adhesive patch ECG monitoring.\u003c/em\u003e Am J Med. 2014;127:95.e11\u0026ndash;95.e17.\u003c/li\u003e\n \u003cli\u003eFuster V, et al. \u003cem\u003eMobile health for atrial fibrillation screening: promise and challenges.\u003c/em\u003e Nat Rev Cardiol. 2018;15:657\u0026ndash;675.\u003c/li\u003e\n \u003cli\u003eBumgarner JM, et al. \u003cem\u003eSmartwatch algorithm for automated detection of atrial fibrillation.\u003c/em\u003e Circulation. 2018;138:289\u0026ndash;291.\u003c/li\u003e\n\u003c/ol\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"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":"npj-digital-medicine","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"npjdigitalmed","sideBox":"Learn more about [npj Digital Medicine](http://www.nature.com/npjdigitalmed/)","snPcode":"41746","submissionUrl":"https://submission.springernature.com/new-submission/41746/3","title":"npj Digital Medicine","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"NPJ","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"Atrial fibrillation, remote patient monitoring, artificial intelligence, perioperative monitoring, cardiac surgery","lastPublishedDoi":"10.21203/rs.3.rs-9138384/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-9138384/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003e\u003cstrong\u003eBackground \u003c/strong\u003ePostoperative atrial fibrillation (POAF) affects 20 ̶50% of patients undergoing cardiac surgery and is associated with prolonged hospital stays and adverse outcomes. Although several risk factors for developing POAF have been identified, accurate prediction remains challenging. Wearable echocardiography (ECG) patches and remote patient monitoring now enable continuous heart rhythm surveillance, while artificial intelligence (AI) models may detect subtle, yet distinct electrophysiologic signatures that precede POAF development.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eObjective\u003c/strong\u003e This study evaluates whether combining continuous ECG patch monitoring with deep learning models can improve both early risk stratification and near real-time prediction of POAF after cardiac surgery.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eMethods\u003c/strong\u003e We analyzed continuous ECG and wearable-derived physiology from 101 postoperative cardiac surgery patients enrolled in a prospective remote monitoring trial. Each patient wore an adhesive patch sensor (VivaLNK VV-330) for 14 days after hospital discharge, capturing per-second ECG and activity streams. We developed two complementary deep learning pipelines: (1) a daily-level multimodal Transformer, which downsampled ECG and contextual “TAB tokens” into day-wise units to predict AF occurrence and burden, and (2) an hour-ahead forecasting model, which condensed the last two hours of minute-level physiology into attention-weighted summaries to generate rolling, causal predictions of AF risk in the subsequent hour.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eResults\u003c/strong\u003e Across nearly 1.7 million downsampled data elements, the daily-level model showed conservative behavior with very low false negatives, consistently identifying AF-positive days and correctly stratifying high-burden episodes. The hour-ahead forecasting model was trained and validated on 9,267 windows (hours) and achieved excellent discrimination (AUC 0.945), high specificity (0.99), and strong predictive value (NPV 0.98). Recall-oriented calibration further reduced missed AF hours while maintaining low false alarms. Together, these frameworks provided reliable daily burden stratification and fine-grained, near real-time risk forecasting.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eConclusion \u003c/strong\u003eContinuous multimodal monitoring paired with AI enables accurate POAF detection, daily risk stratification, and rolling hour-ahead forecasts. This dual-resolution framework has the potential to support perioperative decision-making by enabling earlier intervention, targeted surveillance, and optimized allocation of preventive therapies in cardiac surgery patients.\u003c/p\u003e","manuscriptTitle":"BeatAI: BiomEtrics for real-time Atrial Arrhythmia tracking using Transformer Artificial Intelligence from wearables after discharge from cardiac surgery","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2026-04-20 16:54:02","doi":"10.21203/rs.3.rs-9138384/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"editorInvitedReview","content":"","date":"2026-05-07T07:35:24+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-03T15:05:56+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"94439780770260775782658986856033634964","date":"2026-04-28T08:39:29+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"187088130126961569187995109441325668023","date":"2026-04-26T06:33:04+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-04-20T12:04:57+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"313689959876013315463804837351037895657","date":"2026-04-15T06:42:04+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"241570911005284950618813296698170995165","date":"2026-04-13T06:31:46+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2026-04-13T02:19:14+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2026-03-19T14:33:11+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2026-03-18T00:58:52+00:00","index":"","fulltext":""},{"type":"submitted","content":"npj Digital Medicine","date":"2026-03-16T13:06:49+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"npj-digital-medicine","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"npjdigitalmed","sideBox":"Learn more about [npj Digital Medicine](http://www.nature.com/npjdigitalmed/)","snPcode":"41746","submissionUrl":"https://submission.springernature.com/new-submission/41746/3","title":"npj Digital Medicine","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"NPJ","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"20642d6c-f47d-4547-9395-596f756810e1","owner":[],"postedDate":"April 20th, 2026","published":true,"recentEditorialEvents":[{"type":"editorInvitedReview","content":"","date":"2026-05-07T07:35:24+00:00","index":44,"fulltext":""},{"type":"editorInvitedReview","content":"","date":"2026-05-03T15:05:56+00:00","index":43,"fulltext":""}],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[{"id":66586644,"name":"Health sciences/Cardiology"},{"id":66586645,"name":"Biological sciences/Computational biology and bioinformatics"},{"id":66586646,"name":"Health sciences/Health care"},{"id":66586647,"name":"Health sciences/Medical research"}],"tags":[],"updatedAt":"2026-04-20T16:54:03+00:00","versionOfRecord":[],"versionCreatedAt":"2026-04-20 16:54:02","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-9138384","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-9138384","identity":"rs-9138384","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.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2026) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00