Deep Learning for Time-Series Segmentation of Mechanical Ventilator Waveforms | 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 Deep Learning for Time-Series Segmentation of Mechanical Ventilator Waveforms Preeti Gupta, Aditya Nemani, Virginia R. de Sa, Alex K. Pearce, and 3 more This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-8001137/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 10 You are reading this latest preprint version Abstract Accurate segmentation of ventilator waveforms is essential for detecting patient–ventilator asynchronies (PVAs), yet current heuristic methods can fail in noisy, real-world data. We developed and validated a deep learning model using a one-dimensional attention-gated U-Net architecture to identify inspiratory and expiratory onsets in mechanical ventilation waveforms. The model was trained and tested on 9,719 breaths from 33 patients and outperformed published rule-based methods, achieving F1 scores of > 0.99 for both inspiratory and expiratory onset detection within a 0.1-second tolerance window. Performance remained robust in asynchronous breaths (F1 ≥ 0.98). When applied to quantify PVAs, the model reproduced reference standard asynchrony frequencies with no significant differences, whereas heuristic methods produced large deviations. Gradient-weighted class activation maps suggest that the model leveraged a diverse set of waveform features to inform segmentation. This computationally efficient model enables highly-accurate, real-time waveform analysis and provides a foundation for scalable, reproducible assessment of ventilator–patient interactions. Biological sciences/Computational biology and bioinformatics Physical sciences/Engineering Health sciences/Health care Physical sciences/Mathematics and computing Health sciences/Medical research Figures Figure 1 Figure 2 Figure 3 Introduction Invasive mechanical ventilation (MV) is a common life-sustaining intervention for patients with acute respiratory failure, neurologic deterioration, or airway compromise. Each year, more than 2.1 million adults in the United States receive MV, and approximately 40% of intensive care unit (ICU) admissions require ventilatory support 1 , 2 , 3 . Despite its widespread use, MV use is associated with a high mortality rate of 30–43%, reflecting not only the severity of underlying illness but also complications such as ventilator-induced lung injury and ventilator associated complications 4 , 5 . An important and increasingly recognized contributor to adverse outcomes is patient–ventilator asynchrony (PVA), which occurs when the ventilator’s breath delivery is misaligned with the patient’s intrinsic respiratory effort 6 . Asynchronies arise from mismatched ventilator settings, such as when inspiratory and expiratory cycles begin too early or too late, sometimes leading to excessive tidal volumes, a known risk factor for ventilator-induced lung injury 7 , 8 . To identify PVAs, the inspiratory and expiratory phases of the breath cycle must be distinguished 9 . While experts can do this visually, large-scale systematic analysis requires automation to be feasible. At a minimum, ventilator waveforms must be segmented into individual breaths, since this pre-processing step forms the foundation of even the most advanced deep learning models developed to date 10 – 12 . Many ventilators and middleware platforms used for data capture do not provide this segmentation directly, so it must be inferred from pressure and flow measurements. Prior studies have attempted to define phase onsets using heuristic rules, but such approaches could be prone to failure in real-world data, which are frequently affected by noise, artifact, and the very asynchronies they aim to detect 13 , 14 . To date, no published studies to our knowledge have systematically compared the performance of heuristic methods to machine learning methods for MV breath segmentation in real-world datasets, particularly those enriched for asynchronous breaths. Deep learning approaches may address the challenge of segmenting real world data. U-Net convolutional networks were originally developed for biomedical image segmentation to overcome the requirement for a large quantity of annotated training samples 15 . These approaches have since been adapted for one-dimensional (1-D) signals such as audio waves 16 and MV waveforms 17 . As such, we utilized a U-Net architecture to develop a deep learning model to segment inspiratory and expiratory phases of ventilator waveforms. We hypothesized that this model would outperform rules-based segmentation methods. We further hypothesized that our model would maintain robust performance in the often noisy signals typical of asynchronous breaths. Finally, we assessed how different segmentation methods influence the quantification of asynchronies. Results The deidentified dataset consisted of 9,719 breaths from 33 patients who required various modes of MV for a range of acute indications. The train and validation dataset contained 8,520 breaths and the test dataset contained 1,199 breaths, with no patient overlap between datasets ( Table 1 ). The prevalence of PVA was 28% in the training/validation dataset and 32% in the test dataset. Compared with the training/validation cohort, the test set was characterized by higher airway pressures and flows and shorter expiratory durations. Table 1. Cohort Characteristics Train and Validation (n = 8,520 breaths) Test (n = 1,199 breaths) Mean Pressure (cm H2O), Median (IQR) 13.0 (10.3-16.7) 17.2(15.2-21.9) Peak Pressure (cm H20), Median (IQR) 25.2 (20.8-31.9) 31.4 (29.4-35.0) Peak Flow (L/min), Median (IQR) 59.7 (50.4-70.5) 71.2 (60.6-84.1) Tidal Volume (mL), Median (IQR) Inhaled Exhaled 389 (280-494) 404 (278-512) 397 (328-452) 377 (304-456) Inspiratory Duration, sec (IQR) 0.9 (0.8-0.9) 0.9 (0.8-0.9) Expiratory Duration, sec (IQR) 1.8 (1.2-2.8) 1.6 (1.1-1.8) Breaths/Patient, n 294 300 Type of Breath, n (%) Normal Asynchrony Artifact 5,675 (67%) 2,345 (28%) 500 (6%) 815 (68%) 380 (32%) 4 (0.3%) Model Performance The final deep learning model contained 8.9 million parameters (3.0 million trainable; ≈11 MB). It substantially outperformed both baseline approaches, the zero-crossing heuristic and derivative backtracking method, for detecting cycling events at the exact timepoint of the reference standard. For inspiratory onsets, the model achieved an F1 score of 0.98, compared with 0.56 for the derivative backtracking method and 0.06 for zero-crossing. For expiratory onsets, the deep learning model reached an F1 score of 0.94, whereas both baseline methods performed with an F1 score of 0.01 (Table 2). Within a tolerance window of ±0.1 seconds of the reference standard, the baseline models improved, but the deep learning model still exceeded their performance, achieving a recall and precision of >0.99 for inspiratory onsets. Recall was >0.99 and precision 0.98 for expiratory onsets (Table 2). In contrast, within this 0.1 second margin of error for inspiratory onset, the zero-crossing method and the derivative backtracking method achieved low precision of 0.55 and 0.70, respectively. Similarly, for expiratory onsets within the 0.1 second margin of error, the zero-crossing model had a precision of 0.48 and the derivative backtracking method had a precision of 0.71. The heuristic models had lower recall for expiratory onsets than inspiratory onsets. Table 2. Onsets Detected Exactly at Reference Standard Time Point and within 0.1s of Reference Standard Time Point Model (number of onsets) F1 Score Precision Recall F1 Score (within 0.1s) Precision (within 0.1s) Recall (within 0.1s) Inspiratory Onset (True n = 1,199) Deep Learning (n = 1,198) 0.98 0.98 0.98 >0.99 >0.99 >0.99 Zero Crossing (n=1,940) 0.06 0.05 0.08 0.68 0.55 0.88 Derivative Backtracking (n = 1,561) 0.56 0.5 0.65 0.79 0.7 0.91 Expiratory Onset (True n = 1,198) Deep Learning (n = 1,211) 0.94 0.93 0.94 0.99 0.98 >0.99 Zero Crossing (n = 1,937) 0.01 0.01 0.01 0.59 0.47 0.77 Derivative Backtracking (n = 1,204) 0.01 0.01 0.01 0.71 0.71 0.71 s = seconds; Performance in Normal and Asynchronous Breaths When stratified by type of breath, the deep learning model also outperformed the best baseline heuristic method (Table 3). For normal breaths, the model achieved an F1 score of >0.99 within 0.1 seconds of both inspiratory and expiratory onsets, compared to 0.85 and 0.69 for the derivative backtracking method, respectively. In breaths annotated as PVAs, deep learning model performance remained high, with F1 scores of 0.99 for inspiratory onsets and 0.98 for expiratory onsets. In contrast, the derivative backtracking method demonstrated a decline in performance for inspiratory onset detection (F1 score 0.63), while showing a slight improvement for expiratory onsets (F1 score 0.76). Table 3. Subgroups by Type of Breath (Normal vs. PVA) F1 (within 0.1s) Precision (within 0.1s) Recall (within 0.1s) Normal Breaths (n = 815) Inspiratory Onset Deep Learning 0.99 >0.99 0.99 Derivative Backtracking 0.85 0.81 0.88 Expiratory Onset Deep Learning >0.99 0.99 >0.99 Derivative Backtracking 0.69 0.70 0.67 PVA Breaths (n = 380) Inspiratory Onset Deep Learning 0.99 0.99 >0.99 Derivative Backtracking 0.63 0.49 0.87 Expiratory Onset Deep Learning 0.98 0.97 0.99 Derivative Backtracking 0.76 0.72 0.79 s = seconds; PVA = patient-ventilator asynchrony; Model Interpretability The gradient-weighted class activation maps (Grad-CAM), applied to the last convolutional layer of the shared U-Net trunk, are illustrated in three manually selected input windows (Figure 1). The central region of each plot represents the output window, and each plot depicts activation heatmaps for an onset prediction at a single timestep in the 1-D time series. Across the breaths, the inspiratory and expiratory onsets of neighboring breaths appear to influence segmentation, suggesting that the model may be learning from the periodicity of the breaths. The plot demonstrates that several regions of each window contribute to the overall prediction. The final panel shows an incorrect expiratory onset prediction, notable for its lack of activation in the surrounding time segments. Figure 1. Grad-CAM Figure 1. Gradient Weighted Class Activated Map. Red represents the highest activation values in the layer, which indicate regions of the waveform that had the greatest influence on the model’s prediction. The heat map reflects the model’s attention across both pressure and flow waveforms together. Each panel displays inspiratory onset detection (top) and expiratory onset detection (bottom). Dashed lines show the model’s predicted probability for each phase onset, and the ‘X’ marks the specific prediction referenced by the heat map. The area enclosed by solid black lines represents the output window, which is the time segment for which the model generated predictions, while the entire plot corresponds to the input window, which includes all the waveform data the model used to make those predictions. The final panel illustrates a correct inspiratory onset prediction (top) and an incorrect expiratory onset prediction (bottom), which is distinguished by minimal activation in the adjacent waveform regions. Clinical Application of the Model Finally, we applied the different segmentation approaches to quantify the frequency of asynchronous breathing patterns. Using the reference standard, the prevalence of double-triggered breaths was 8% under the first published definition and 4% under the second, while stacked breaths occurred in 33% of cases 9,18 . Use of the deep learning model’s inspiratory and expiratory onsets reproduced these frequencies with no statistically significant differences (double triggering: 9% by the first definition, p = 0.80; 4% by the second definition, p = 0.74; stacked: 33%, p = 0.91). In contrast, the derivative backtracking method yielded substantially different estimates (double triggering: 32% by the first definition, p < 0.01; 34% by the second definition, p < 0.01; stacked: 11%, p < 0.01) (Figure 2). Figure 2. Comparison of Asynchrony Frequency Identified by Different Segmentation Models Figure 2. Comparison of Asynchrony Frequency Identified by Different Segmentation Models. Error bars represent 95% confidence intervals. Discussion In this study, we aimed to develop a deep learning model to accurately classify the onset of both inspiration and expiration in a real-world dataset of ventilator waveforms enriched for PVA. We found that our model outperformed traditional heuristic approaches for ventilator waveform segmentation in this dataset, with high precision and recall, and very few errors, maintaining performance even in asynchronous breaths. Notably, the model reproduced asynchrony frequencies that statistically matched the reference standard, whereas rules-based approaches produced markedly different estimates, underscoring how methodological variability can drive heterogeneity in this field of research. Because PVAs are associated with adverse outcomes such as lung injury, diaphragm dysfunction, prolonged ventilation, and mortality, consistent definitions and reliable segmentation methods are essential to advance research and clinical monitoring 19 . There is growing interest in using artificial intelligence to detect PVAs in real time, but the success of such models depends heavily on the quality of training data and the reference standard labels used 19 , 20 . Our results demonstrate that in addition to PVA annotations, the segmentation of breaths themselves is a critical factor shaping PVA quantification. Prior reviews emphasize the lack of consensus in PVA definitions as a major barrier to reliable clinical tools 19 , 20 . Our findings show that consensus methods for breath segmentation should be established alongside consensus definitions of PVAs to support reproducible model development across institutions. Our high-performance results are consistent with those of Bakkes et al., whose conference paper also employed a U-Net architecture to identify physiologic features in ventilator waveforms 17 . Whereas their model was designed to detect the patient’s inspiratory and expiratory efforts, our approach focused on identifying phase transitions based on when the ventilator initiates and terminates breath delivery. These complementary perspectives are both necessary for detecting patient–ventilator asynchronies, which arise from mismatches between the patient’s efforts and the ventilator’s timing. We extend their work by demonstrating the versatility of the U-Net architecture for physiologic time-series analysis, using a dataset that included more than twice as many patients and breaths, as well as a substantial number of double-triggered breaths that were absent in their cohort. While Bakkes et al.’s model showed discrepancies between the true incidence of PVA types (delayed inspiration, early cycling, late cycling, and ineffective efforts) and the incidence detected by their model, our model reproduced the PVA frequencies observed in the reference standard. This difference may reflect both the type of asynchronies evaluated—our model focused on double triggering and breath stacking, which display more pronounced waveform deflections—and methodological differences in how the reference standard was incorporated. Specifically, our model trained on exact onset time points, whereas their approach used a 210-millisecond onset window. That interval may be too broad, given that some of their PVA definitions involved timing differences of only 100–300 milliseconds between the patient’s respiratory effort and the ventilator’s corresponding termination of breath delivery. Additionally, in our data, when the inspiratory onset was detected more than 100 milliseconds after the true onset, the estimated tidal volume decreased by over 10%. Such timing errors could affect the detection of asynchronies that depend on tidal volume measurements, including some of those analyzed in our study. These findings underscores that precise onset detection is critical for accurately characterizing these physiologic events. Our results are further supported by another study that applied a U-Net architecture to segment invasive physiologic signals, specifically the onset and offset of atrial activity in electrophysiologic recordings 21 . Although that model achieved slightly lower performance than ours, their model showed resilience even when artificial noise was introduced. This finding highlights the suitability and resilience of U-Net architectures for segmenting complex time-series physiologic data, even under noisy conditions, such as PVAs. Automated segmentation addresses practical challenges in the field. Manual segmentation is time consuming and limits sample sizes, while ventilator-generated segmentation is inconsistently available across ventilator platforms and middleware solutions that collect ventilator waveform data. Heuristic-based approaches may fail because they typically use one waveform input (usually flow), which may differ across ventilator modes and PVA types. In contrast, Grad-CAM visualizations revealed that our model forms complex, temporally distributed feature maps across the breath and neighboring cycles, integrating information from both flow and pressure inputs to guide segmentation, which may explain our model’s consistent performance in both synchronous and asynchronous breaths. By providing a robust, automated solution, our model represents an important step down the path toward standardization of ventilator waveform data segmentation and subsequent research with this rich data type. With ~ 3 million trainable parameters (≈ 11 MB), the model is computationally efficient, and the 3.5-second sliding window enables near real-time inference. These characteristics make it practical for bedside use, where continuous breath-by-breath segmentation could form the foundation for a unified model for the automated detection of PVAs. This study has several limitations. External validation on additional ventilator types and at multiple centers is needed to assess broader generalizability. While our limited access to MV waveform data from a single health system and ventilator type prohibited external validation testing, we incorporated several standard regularization strategies, such as dropout layers, early stopping and a weight decay in the optimizer, to reduce overfitting. Uniquely, training the model with multiple heads also regularizes the shared trunk, which may improve generalization. Nonetheless, future studies will need to confirm our results on independent datasets and diverse ventilator platforms. Additionally, our baseline heuristics were implemented according to published descriptions, but source code was not available, which may have limited the fidelity of reproduction. The inspiratory onset reference standard was also proprietary, limiting transparency into how those labels were generated. Furthermore, the model’s segmentation performance should be systematically validated on additional types of patient–ventilator asynchronies (PVAs) and commonly-encountered artifacts such as cough or condensation in the circuit to ensure broad applicability, as manual review of mis-segmentations revealed challenges in detecting some cases. Finally, future work should evaluate the model’s actionability and its clinical impact when used to guide interventions aimed at reducing PVAs. In conclusion, our attention-gated U-Net achieves high segmentation accuracy and sufficient computational efficiency for near real-time use. By enabling data harmonization and scalable analysis, automated segmentation provides a foundation for more consistent study of ventilator–patient interactions. Because segmentation directly impacts PVA identification, future work should focus on standardizing not only PVA definitions but also breath segmentation methods, paving the way for precise, reproducible, and clinically deployable tools for automated PVA monitoring. Methods This study was reported in accordance with the Checklist for Artificial Intelligence in Medical Imaging (CLAIM) guidelines (Supplementary Table 1) 22 . Although developed for imaging applications, CLAIM was selected because segmentation of ventilator waveform time series has important methodological parallels with imaging segmentation tasks. In the absence of a dedicated reporting standard for artificial intelligence applied to physiologic signals, CLAIM provided an appropriate framework to promote rigor, transparency, and reproducibility. Data This retrospective study was a secondary analysis of previously collected ventilator waveform data at the University of California, Davis Health and was approved by its institutional review board, with informed consent obtained for all participants 18 . All methods were performed in accordance with the relevant guidelines and regulations. Following data collection, the dataset was enriched for segments with high rates of PVA. Supplementary Fig. 1 shows examples of normal, asynchronous and artifact-laden breaths in the dataset with corresponding inspiratory and expiratory onset labels. Data was collected from Puritan Bennet 840 ventilators, using a serial port connected by a serial-USB null modem cable to a Raspberry pi microcomputer. The ventilator generated pressure and flow measurements at a rate of 50 Hz. The dataset consisted of 9,719 breaths from 33 unique patients, that were deidentified prior to receiving the dataset. Labels for PVAs (double triggers, breath stack or asynchrony not otherwise specified) had been annotated by two pulmonary and critical care physicians. All data from this dataset were included in the analysis, and no missing data was present. Data pre-processing entailed creating timestamps every 0.02s for each measurement. The reference standard for the start of each inspiration was provided as a discrete label by the ventilator, selected with the assumption that ventilator-generated breath onsets incorporate intrinsic knowledge of ventilator breath delivery. Since expiratory onsets were not available from the ventilator, we implemented a previously published algorithm to generate candidate expiratory onset points, providing a standardized initial estimate across all breaths. These candidate expiratory onsets were plotted where the flow waveform crossed zero following the largest positive continuous area under the curve. An expert pulmonary and critical care physician then manually reviewed every candidate and confirmed or relabeled each as appropriate, using a custom graphical user interface (GUI) developed in Python (version 3.13.5, Tkinter library) 18 . The physician disagreed with the algorithmic assignment in approximately 15% of instances, typically in breaths where the algorithm marked the onset of patient expiratory effort rather than the ventilator’s transition to expiration, reflecting our goal to label the precise time point when the ventilator cycled from inspiration to expiration rather than when patient expiratory effort began 17 . Difficult or ambiguous cases were reviewed with senior physicians with more than a decade of experience in ventilator waveform research, to ensure accuracy and consistency. Reference standards were developed for the entire dataset prior to cohort generation. The dataset was split by patient file into training (80%), validation (10%) and test (10%) cohorts. No patient was present in more than one cohort. Based on sample size calculations, detecting an increase in accurately segmented breaths from 70% to 80% with 80% power would require a minimum of 291 breaths in the test set. Baseline Models The deep learning model was compared to two baseline models. The first, termed zero crossings, labelled inspiratory onsets when flow crossed from negative to positive values and expiratory onsets when flow crossed from positive to negative values 14 . The second model, termed the derivative backtracking method, was adapted from a previously published heuristic 23 . Inspiratory onsets were identified by first locating flow values greater than 12 L/min, then stepping backward to the point where the flow derivative began to change. Expiratory onsets were determined by finding flow values less than − 5 L/min that remained negative for at least 25 milliseconds after the inspiratory onset, and then stepping backward using the first derivative to identify where the flow crossed zero or plateaued. Deep Learning Model: Data Preparation and Architecture For the deep learning model, ventilator waveform data were segmented into fixed-length windows of 352 timesteps (7.04 seconds at 50 Hz), each containing two one-dimensional input channels: airway pressure and flow. For each input window, pressure and flow values were normalized so that each feature had a mean of zero and a standard deviation of one, ensuring that all signals were on the same scale before training. Each input window was paired with output labels spanning the central 176 samples (3.52 seconds, which corresponds to the average breath duration) to minimize edge effects. A two-channel one-dimensional convolutional neural network with a U-Net–style encoder–decoder architecture with attention-gated skip connections was trained to jointly detect two types of cycling events, inspiratory and expiratory onsets (Fig. 3 ). The shared trunk then branches into dual heads, each specializing in its respective task. This design maintains efficiency through shared representations while enabling the model to capture idiosyncratic nuances in each head. It also helps mitigate potential conflicts where certain weights and biases might benefit one task but hinder the other. Figure 3 . 1D U-Net with Attention-Gated Skip Connections for Dual Event Detection. The diagram illustrates the four primary components of the model architecture: encoder blocks, bottleneck layer, decoder blocks, and two task-specific heads. The numbers below each block represent the size of the feature maps. The encoder comprises four convolutional blocks, with progressively doubling feature depth, each consisting of paired 1D convolution and LeakyReLU layers, and max pooling layers. The bottleneck uses dilated convolutions, LeakyReLU, and a dropout layer. The decoder mirrors the encoder using 1D transposed convolution upsampling blocks and concatenates the output with skip connections from the encoder, gated by attention mechanisms. This shared representation is center cropped and passed onto two task-specific heads: one for inspiratory onset and another for expiratory onset. Each 1D convolution layer of these heads is followed by layer normalization, dropout, and time distributed dense layers with GELU and a terminal sigmoid activation. Deep Learning Model Training and Post-Processing Training used an uncertainty-weighted composite loss combining focal and dice loss functions to address extreme class imbalance, event detection accuracy and dynamically balance the contributions of the two outputs 24 . Specifically, the total loss was defined as: $$\:{\mathcal{L}}_{total}=\frac{1}{2{\sigma\:}_{1}^{2}}{\mathcal{L}}_{focal}+\frac{1}{2{\sigma\:}_{2}^{2}}{\mathcal{L}}_{dice}+\text{log}{\sigma\:}_{1}+\text{log}{\sigma\:}_{2}$$ where \(\:{\sigma\:}_{1}\) and \(\:{\sigma\:}_{2}\) are task-specific uncertainty parameters learned during training. The logarithmic terms act as regularizers that prevent \(\:{\sigma\:}_{1}\) and \(\:{\sigma\:}_{2}\) from diverging and help maintain numerical stability while balancing optimization across tasks. The focal loss was formulated as: $$\:{\mathcal{L}}_{focal}={-\alpha\:(1-{p}_{t})}^{\gamma\:}\text{log}\left({p}_{t}\right)$$ where \(\:{p}_{t}\) is the predicted probability of the true class, \(\:\alpha\:\) is a balancing factor and \(\:\gamma\:\) controls the focusing strength, to diminish the influence of easily classifiable examples on the overall loss. The Dice loss was defined as: $$\:{\mathcal{L}}_{dice}=1-\frac{2{\sum\:}_{i}{p}_{i}{g}_{i}+ϵ}{{\sum\:}_{i}{p}_{i}\:+{\sum\:}_{i}{g}_{i}\:+ϵ}$$ Here, \(\:{p}_{i}\) denotes the predicted probability for element \(\:i\) , \(\:{g}_{i}\) represents the corresponding ground-truth label, and \(\:ϵ\) is a small constant added for numerical stability. This function ensures better temporal alignment between predicted events and ground truth. The model was initialized using He initialization and trained with the AdamW optimizer with an initial learning rate of 5e-4, mini-batches of 32 windows, and early stopping based on validation loss (patience of 10 epochs, minimum delta of 1×10⁻⁴) to prevent overfitting 25 . The final model was selected as the epoch with the lowest validation loss under these criteria. Implementation was performed in TensorFlow/Keras and trained with GPU acceleration. During training, output windows were generated with a step size of 176 samples, resulting in non-overlapping output label spans. After inference, predictions were refined with debouncing and segment-level constraints, allowing at most one expiratory onset (with the maximum probability) per predicted breath interval, to improve clinical plausibility and reduce spurious detections. Evaluation Due to class imbalance, with 0.7% of data points representing onset events, the F1 score, the harmonic mean of precision (positive predictive value) and recall (sensitivity), was chosen to evaluate the primary outcome of the model’s segmentation performance against the reference standard in the test set, both at the exact time point and within a 0.1 second tolerance window. This window was chosen based on prior literature showing that patients exhibit no conscious or unconscious respiratory responses to occlusion within this period, suggesting this is a clinically insignificant time period that would avoid interference with PVAs while still allowing a small tolerance in breath segmentation 26 . This window duration was further informed by an analysis of our dataset in which inspiratory onsets detected more than 100 milliseconds after the true onset produced over 10% error in estimated tidal volume, further supporting the use of this threshold as both physiologically and analytically appropriate (Supplementary Fig. 2). To characterize model performance further, sensitivity analyses were performed by breath type (normal vs. asynchronous), based on the annotated dataset labels. Model interpretability was assessed by applying gradient weighted class activation maps (Grad-CAM) 27 on manually selected input windows. The secondary objective was to compare PVA quantification across the highest performing segmentation methods. Double-triggered breaths and stacked breaths were selected as clinically meaningful categories with established definitions based on inspiratory and expiratory segmentation 9 , 18 . Asynchrony frequency, defined as the ratio of asynchronous breaths to total breaths, was calculated using the reference standard according to two published definitions for double triggering and one for stacked breaths 9 , 18 . The first definition classifies a double-triggered breath as having an expiratory time less than 50% of the mean inspiratory time 9 . The other defines a double-triggered breath as one with an expiratory time ≤ 0.3 seconds combined with either an expiratory-to-inspiratory tidal volume ratio (TVe/TVi) < 0.25, or a TVe/TVi < 0.50 with an expiratory tidal volume 0.3 seconds with TVe/TVi < 0.9 18 . Segmentation outputs from both the derivative backtracking method and the deep learning model were applied to the test set, and asynchrony frequencies were calculated accordingly. Statistical comparisons were performed using two-sided t-tests for continuous variables and chi-squared tests for categorical variables. Declarations Data Availability: Data are available on reasonable request. Code Availability: Code is available on reasonable request. Acknowledgments: Research reported in this publication was supported by the National Center For Advancing Translational Sciences of the National Institutes of Health under Award Number K12TR004410. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health. Author Contributions: Preeti Gupta: Conceptualization. Methodology, Formal analysis, Investigation, Data Curation, Writing – Original Draft, Visualization; Aditya Nemani: Conceptualization, Methodology, Software, Formal analysis, Investigation, Data curation, Writing – Original Draft, Visualization; Virginia R. de Sa: Supervision, Validation; Alex K. Pearce: Data curation; Shamim Nemati: Supervision, Validation; Atul Malhotra: Conceptualization, Supervision; Jason Y. Adams: Conceptualization, Methodology, Validation, Data curation, Supervision; All authors : Writing – Review & Editing Funding: Dr. Gupta is supported by a K12 award from NCATS (K12TR004410) Competing Interests: Dr. Malhotra is funded by NIH and reports income from Eli Lilly, Zoll, Livanova, Powell Mansfield and Sunrise. Resmed provides a philanthropic donation to UCSD. He and Dr. Nemati are co-founders of Clairyon, a small startup focused on predictive analytics in sepsis. Dr. Nemati is also a consultant for Neural Point, a start-up focused on the diagnosis of sleep apnea. Dr. Adams is funded by NIH and is also co-inventor (Patent# US11839585B2) of technology related to the detection of patient-ventilator asynchrony and is a co-founder of Certus Critical Care Inc. References Jivraj, N. K. et al. Use of Mechanical Ventilation Across 3 Countries. JAMA Intern. Med. 183 , 824 (2023). United States - Census Bureau Profile. https://data.census.gov/profile/United_States?g=010XX00US. Wunsch, H. et al. ICU Occupancy and Mechanical Ventilator Use in the United States*: Crit. Care Med. 41 , 2712–2719 (2013). Esteban, A. et al. Characteristics and Outcomes in Adult Patients Receiving Mechanical VentilationA 28-Day International Study. JAMA 287 , 345–355 (2002). Karagiannidis, C. et al. In-hospital mortality, comorbidities, and costs of one million mechanically ventilated patients in Germany: a nationwide observational study before, during, and after the COVID-19 pandemic. Lancet Reg. Health – Eur. 42 , (2024). Rietveld, T. P. et al. Let’s get in sync: current standing and future of AI-based detection of patient-ventilator asynchrony. Intensive Care Med. Exp. 13 , 39 (2025). Beitler, J. R. et al. Quantifying unintended exposure to high tidal volumes from breath stacking dyssynchrony in ARDS: the BREATHE Criteria. Intensive Care Med. 42 , 1427 (2016). Sottile, P. D., Smith, B., Stroh, J. N., Albers, D. J. & Moss, M. Flow-Limited and Reverse-Triggered Ventilator Dyssynchrony Are Associated With Increased Tidal and Dynamic Transpulmonary Pressure. Crit. Care Med. 52 , 743–751 (2024). Thille, A. W., Rodriguez, P., Cabello, B., Lellouche, F. & Brochard, L. Patient-ventilator asynchrony during assisted mechanical ventilation. Intensive Care Med. 32 , 1515–1522 (2006). Chen, D., Lin, K., Deng, Z., Li, D. & Deng, Q. Attention-based convolutional long short-term memory neural network for detection of patient-ventilator asynchrony from mechanical ventilation. Biomed. Signal Process. Control 78 , 103923 (2022). Zhang, L. et al. Detection of patient-ventilator asynchrony from mechanical ventilation waveforms using a two-layer long short-term memory neural network. Comput. Biol. Med. 120 , 103721 (2020). Pan, Q. et al. An interpretable 1D convolutional neural network for detecting patient-ventilator asynchrony in mechanical ventilation. Comput. Methods Programs Biomed. 204 , 106057 (2021). Blanch, L. et al. Asynchronies during mechanical ventilation are associated with mortality. Intensive Care Med. 41 , 633–641 (2015). Sottile, P. D., Albers, D., Higgins, C., Mckeehan, J. & Moss, M. M. The Association between Ventilator Dyssynchrony, Delivered Tidal Volume, and Sedation using a Novel Automated Ventilator Dyssynchrony Detection Algorithm. Crit. Care Med. 46 , e151–e157 (2018). Ronneberger, O., Fischer, P. & Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. in Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015 (eds Navab, N., Hornegger, J., Wells, W. M. & Frangi, A. F.) vol. 9351 234–241 (Springer International Publishing, Cham, 2015). Stoller, D., Ewert, S. & Dixon, S. Wave-U-Net: A Multi-Scale Neural Network for End-to-End Audio Source Separation. (2018) doi:10.48550/ARXIV.1806.03185. Bakkes, T. H. G. F., Montree, R. J. H., Mischi, M., Mojoli, F. & Turco, S. A machine learning method for automatic detection and classification of patient-ventilator asynchrony. in 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC) 150–153 (2020). doi:10.1109/EMBC44109.2020.9175796. Adams, J. Y. et al. Development and Validation of a Multi-Algorithm Analytic Platform to Detect Off-Target Mechanical Ventilation. Sci. Rep. 7 , 14980 (2017). Rietveld, T. P. et al. Let’s get in sync: current standing and future of AI-based detection of patient-ventilator asynchrony. Intensive Care Med. Exp. 13 , 39 (2025). Jiang, G. et al. Application progress of machine learning in patient-ventilator asynchrony during mechanical ventilation: a systematic review. Crit. Care 29 , 295 (2025). Redina, R., Hejc, J., Filipenska, M. & Starek, Z. Analyzing the performance of biomedical time-series segmentation with electrophysiology data. Sci. Rep. 15 , 11776 (2025). Tejani, A. S. et al. Checklist for Artificial Intelligence in Medical Imaging (CLAIM): 2024 Update. Radiol. Artif. Intell. 6 , e240300 (2024). Blanch, L. et al. Asynchronies during mechanical ventilation are associated with mortality. Intensive Care Med. 41 , 633–641 (2015). Cipolla, R., Gal, Y. & Kendall, A. Multi-task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics. in 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition 7482–7491 (IEEE, Salt Lake City, UT, USA, 2018). doi:10.1109/CVPR.2018.00781. He, K., Zhang, X., Ren, S. & Sun, J. Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification. in 2015 IEEE International Conference on Computer Vision (ICCV) 1026–1034 (IEEE, Santiago, Chile, 2015). doi:10.1109/ICCV.2015.123. Whitelaw, W. A., Derenne, J.-P. & Milic-Emili, J. Occlusion pressure as a measure of respiratory center output cm conscious man. Respir. Physiol. 23 , 181–199 (1975). Selvaraju, R. R. et al. Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. in 2017 IEEE International Conference on Computer Vision (ICCV) 618–626 (2017). doi:10.1109/ICCV.2017.74. Additional Declarations Competing interest reported. Dr. Malhotra is funded by NIH and reports income from Eli Lilly, Zoll, Livanova, Powell Mansfield and Sunrise. Resmed provides a philanthropic donation to UCSD. He and Dr. Nemati are co-founders of Clairyon, a small startup focused on predictive analytics in sepsis. Dr. Nemati is also a consultant for Neural Point, a start-up focused on the diagnosis of sleep apnea. Dr. Adams is funded by NIH and is also co-inventor (Patent# US11839585B2) of technology related to the detection of patient-ventilator asynchrony and is a co-founder of Certus Critical Care Inc. Supplementary Files BreathSegSupplemetaryTablesFigures102825.docx Cite Share Download PDF Status: Under Review Version 1 posted Editorial decision: Revision requested 15 Dec, 2025 Reviews received at journal 14 Dec, 2025 Reviews received at journal 03 Dec, 2025 Reviewers agreed at journal 21 Nov, 2025 Reviewers agreed at journal 17 Nov, 2025 Reviewers invited by journal 11 Nov, 2025 Editor assigned by journal 11 Nov, 2025 Editor invited by journal 03 Nov, 2025 Submission checks completed at journal 03 Nov, 2025 First submitted to journal 03 Nov, 2025 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-8001137","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Article","associatedPublications":[],"authors":[{"id":547773029,"identity":"b2d40765-3023-44ea-bba3-fa7f2852090d","order_by":0,"name":"Preeti Gupta","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA1klEQVRIiWNgGAWjYBADORBxAMJOIEZDAoMx6VoSG5B5eIG59PFr0oU/7NLnt599eLhwRx0DP3uOAV4tln05ZdIzEpJzN5xJNzg888xhBsmeN/i1GJzhSZPmSWDO3SDBxnCYt+0Ag8ENArZAtdSny88Aa6ljsCeshf0YUMvhBIYbYC3MDAYShPzSw8NsPSPtuOGGM2kMIL/wSJx5VoBXizkP+8PbBTbV8vLtx5g/A0NMjr89eQN+hzHwGDDDOMyMDQw8eJVDtLA/QNEyCkbBKBgFowADAABFe0NRFGDB4wAAAABJRU5ErkJggg==","orcid":"","institution":"Scripps Research Translational Institute","correspondingAuthor":true,"prefix":"","firstName":"Preeti","middleName":"","lastName":"Gupta","suffix":""},{"id":547773030,"identity":"264b0622-34af-4a04-8cd8-9e21d4c6fe18","order_by":1,"name":"Aditya Nemani","email":"","orcid":"","institution":"University of California San Diego","correspondingAuthor":false,"prefix":"","firstName":"Aditya","middleName":"","lastName":"Nemani","suffix":""},{"id":547773031,"identity":"7a6ad4ac-2ee0-4a33-b2d4-17f4aa8b1e00","order_by":2,"name":"Virginia R. de Sa","email":"","orcid":"","institution":"University of California San Diego","correspondingAuthor":false,"prefix":"","firstName":"Virginia","middleName":"R.","lastName":"de Sa","suffix":""},{"id":547773032,"identity":"e08fb4a5-1e44-443b-bb77-4b773c647a92","order_by":3,"name":"Alex K. Pearce","email":"","orcid":"","institution":"University of California San Diego","correspondingAuthor":false,"prefix":"","firstName":"Alex","middleName":"K.","lastName":"Pearce","suffix":""},{"id":547773033,"identity":"850a0c94-1747-4cbb-8fe3-ebdeeb36d83a","order_by":4,"name":"Shamim Nemati","email":"","orcid":"","institution":"University of California San Diego","correspondingAuthor":false,"prefix":"","firstName":"Shamim","middleName":"","lastName":"Nemati","suffix":""},{"id":547773034,"identity":"578288c5-7dad-454c-ba16-df21690c16f6","order_by":5,"name":"Atul Malhotra","email":"","orcid":"","institution":"University of California San Diego","correspondingAuthor":false,"prefix":"","firstName":"Atul","middleName":"","lastName":"Malhotra","suffix":""},{"id":547773035,"identity":"bd1bd654-adf1-4e02-a78f-d90246a39656","order_by":6,"name":"Jason Y. Adams","email":"","orcid":"","institution":"University of California Davis","correspondingAuthor":false,"prefix":"","firstName":"Jason","middleName":"Y.","lastName":"Adams","suffix":""}],"badges":[],"createdAt":"2025-10-31 19:08:10","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-8001137/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-8001137/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":96603631,"identity":"b06c9c61-6e7d-46f9-998c-977f02e2b3ae","added_by":"auto","created_at":"2025-11-24 09:10:46","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2249041,"visible":true,"origin":"","legend":"","description":"","filename":"BreathSegmentationManuscript110225.docx","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/1aada89be6fb3be42f00e866.docx"},{"id":96493162,"identity":"d228747f-a890-4798-812b-f30fdd3f09d8","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"json","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":8981,"visible":true,"origin":"","legend":"","description":"","filename":"2f8d71aba0dd4f918726c1cda1f5d1ab.json","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/fe8ea4160f6ddbae9dce2849.json"},{"id":96493174,"identity":"40977c0c-5bb9-4631-a8c8-369696f06b46","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"docx","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":469311,"visible":true,"origin":"","legend":"","description":"","filename":"BreathSegSupplemetaryTablesFigures102825.docx","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/d248f73e76e07c7e9f1acceb.docx"},{"id":96603827,"identity":"1dd61ba2-4c8b-4e8a-b7bf-8ed60b2eefc4","added_by":"auto","created_at":"2025-11-24 09:11:43","extension":"xml","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":97241,"visible":true,"origin":"","legend":"","description":"","filename":"2f8d71aba0dd4f918726c1cda1f5d1ab1enriched.xml","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/6b2afff93f7b6eccd506a46d.xml"},{"id":96493172,"identity":"f494aa87-ea53-44e6-b5b3-79303572e0ea","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"jpeg","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":599863,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage1.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/eb5b08177f946e6a873aeffa.jpeg"},{"id":96493167,"identity":"4a6cc508-9e41-42d3-afa4-ebb020b9ec8e","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"jpeg","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":325007,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage2.jpeg","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/efad71dde5f509545032d77b.jpeg"},{"id":96603651,"identity":"95ef53b0-845d-443c-bf3a-a55c00ccfc30","added_by":"auto","created_at":"2025-11-24 09:10:54","extension":"png","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":40426,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/0b36ceb0cdce9951ee3d2b16.png"},{"id":96493176,"identity":"d47a2b27-ec7f-4f0d-99ed-a6b3154fbd44","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"png","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1382295,"visible":true,"origin":"","legend":"","description":"","filename":"floatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/ffefe8743858309f04f9bbfa.png"},{"id":96603962,"identity":"71d0ac31-8864-4b3f-97e6-67fedd3c3ada","added_by":"auto","created_at":"2025-11-24 09:12:15","extension":"png","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":106903,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage1.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/eaec2f61af2a75659bbf047b.png"},{"id":96493169,"identity":"ecc464c0-6cde-4265-aae1-16245bbf8f5d","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"png","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":60681,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage2.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/edab04e5efb6f8fcaa091281.png"},{"id":96603584,"identity":"aa9fadae-66a8-4fc1-8737-c099d8960911","added_by":"auto","created_at":"2025-11-24 09:10:20","extension":"png","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":12663,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage3.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/bf78f6ea5f9ef6f5b6fa45c6.png"},{"id":96604121,"identity":"75ab72d7-0bf5-4811-9afd-567bccccfc24","added_by":"auto","created_at":"2025-11-24 09:12:50","extension":"png","order_by":11,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":232146,"visible":true,"origin":"","legend":"","description":"","filename":"Onlinefloatimage4.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/f0932885f620c9eb0a259691.png"},{"id":96493177,"identity":"6f7532df-57b8-4b3e-9d6e-1cc9931b3c9c","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"xml","order_by":12,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":95471,"visible":true,"origin":"","legend":"","description":"","filename":"2f8d71aba0dd4f918726c1cda1f5d1ab1structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/2ff0d4173a0470af5e1f667f.xml"},{"id":96493178,"identity":"95da348a-050b-458a-86eb-cfdaa3813d67","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"html","order_by":13,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":105270,"visible":true,"origin":"","legend":"","description":"","filename":"earlyproof.html","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/fe2744786b5eef7d28f0320e.html"},{"id":96493164,"identity":"012834ad-a108-4358-9d91-0c211a6c0279","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":417090,"visible":true,"origin":"","legend":"\u003cp\u003eGrad-CAM\u003c/p\u003e\n\u003cp\u003eGradient Weighted Class Activated Map. Red represents the highest activation values in the layer, which indicate regions of the waveform that had the greatest influence on the model’s prediction. The heat map reflects the model’s attention across both pressure and flow waveforms together. Each panel displays inspiratory onset detection (top) and expiratory onset detection (bottom). Dashed lines show the model’s predicted probability for each phase onset, and the ‘X’ marks the specific prediction referenced by the heat map. The area enclosed by solid black lines represents the output window, which is the time segment for which the model generated predictions, while the entire plot corresponds to the input window, which includes all the waveform data the model used to make those predictions. The final panel illustrates a correct inspiratory onset prediction (top) and an incorrect expiratory onset prediction (bottom), which is distinguished by minimal activation in the adjacent waveform regions.\u003c/p\u003e","description":"","filename":"1.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/a16b164d5efffde0d1127b3a.png"},{"id":96493163,"identity":"da9b90fd-72d9-4b2f-bd00-e33dd7d7a890","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":62393,"visible":true,"origin":"","legend":"\u003cp\u003eComparison of Asynchrony Frequency Identified by Different Segmentation Models\u003c/p\u003e\n\u003cp\u003eComparison of Asynchrony Frequency Identified by Different Segmentation Models. Error bars represent 95% confidence intervals.\u003c/p\u003e","description":"","filename":"2.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/6eb1dbbcd29099572a94e19b.png"},{"id":96493165,"identity":"80657ef3-cd63-499b-a513-a5d5f4ddf21b","added_by":"auto","created_at":"2025-11-21 18:15:03","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":168622,"visible":true,"origin":"","legend":"\u003cp\u003e1D U-Net with Attention-Gated Skip Connections for Dual Event Detection.\u003c/p\u003e\n\u003cp\u003e1D U-Net with Attention-Gated Skip Connections for Dual Event Detection. The diagram illustrates the four primary components of the model architecture: encoder blocks, bottleneck layer, decoder blocks, and two task-specific heads. The numbers below each block represent the size of the feature maps. The encoder comprises four convolutional blocks, with progressively doubling feature depth, each consisting of paired 1D convolution and LeakyReLU layers, and max pooling layers. The bottleneck uses dilated convolutions, LeakyReLU, and a dropout layer. The decoder mirrors the encoder using 1D transposed convolution upsampling blocks and concatenates the output with skip connections from the encoder, gated by attention mechanisms. This shared representation is center cropped and passed onto two task-specific heads: one for inspiratory onset and another for expiratory onset. Each 1D convolution layer of these heads is followed by layer normalization, dropout, and time distributed dense layers with GELU and a terminal sigmoid activation.\u003c/p\u003e","description":"","filename":"3.png","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/6434d635c5e08adae2d5dd9a.png"},{"id":96913186,"identity":"a7c48a07-c252-4218-b92e-2d82412430c8","added_by":"auto","created_at":"2025-11-27 13:54:18","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1284863,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/da1b504a-bd07-42eb-bb13-62987a391499.pdf"},{"id":96604127,"identity":"97546f5c-cbe9-4e30-8bad-fb7135dca46a","added_by":"auto","created_at":"2025-11-24 09:12:51","extension":"docx","order_by":0,"title":"","display":"","copyAsset":false,"role":"supplement","size":469311,"visible":true,"origin":"","legend":"","description":"","filename":"BreathSegSupplemetaryTablesFigures102825.docx","url":"https://assets-eu.researchsquare.com/files/rs-8001137/v1/599cefe66ae2d4f1c095b206.docx"}],"financialInterests":"Competing interest reported. Dr. Malhotra is funded by NIH and reports income from Eli Lilly, Zoll, Livanova, Powell Mansfield and Sunrise. Resmed provides a philanthropic donation to UCSD. He and Dr. Nemati are co-founders of Clairyon, a small startup focused on predictive analytics in sepsis. Dr. Nemati is also a consultant for Neural Point, a start-up focused on the diagnosis of sleep apnea. Dr. Adams is funded by NIH and is also co-inventor (Patent# US11839585B2) of technology related to the detection of patient-ventilator asynchrony and is a co-founder of Certus Critical Care Inc.","formattedTitle":"Deep Learning for Time-Series Segmentation of Mechanical Ventilator Waveforms","fulltext":[{"header":"Introduction","content":"\u003cp\u003eInvasive mechanical ventilation (MV) is a common life-sustaining intervention for patients with acute respiratory failure, neurologic deterioration, or airway compromise. Each year, more than 2.1\u0026nbsp;million adults in the United States receive MV, and approximately 40% of intensive care unit (ICU) admissions require ventilatory support\u003csup\u003e\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e,\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e,\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e\u003c/sup\u003e. Despite its widespread use, MV use is associated with a high mortality rate of 30\u0026ndash;43%, reflecting not only the severity of underlying illness but also complications such as ventilator-induced lung injury and ventilator associated complications\u003csup\u003e\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e,\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e\u003cp\u003eAn important and increasingly recognized contributor to adverse outcomes is patient\u0026ndash;ventilator asynchrony (PVA), which occurs when the ventilator\u0026rsquo;s breath delivery is misaligned with the patient\u0026rsquo;s intrinsic respiratory effort\u003csup\u003e\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e\u003c/sup\u003e. Asynchronies arise from mismatched ventilator settings, such as when inspiratory and expiratory cycles begin too early or too late, sometimes leading to excessive tidal volumes, a known risk factor for ventilator-induced lung injury\u003csup\u003e\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e,\u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e\u003cp\u003eTo identify PVAs, the inspiratory and expiratory phases of the breath cycle must be distinguished\u003csup\u003e\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e\u003c/sup\u003e. While experts can do this visually, large-scale systematic analysis requires automation to be feasible. At a minimum, ventilator waveforms must be segmented into individual breaths, since this pre-processing step forms the foundation of even the most advanced deep learning models developed to date\u003csup\u003e\u003cspan additionalcitationids=\"CR11\" citationid=\"CR10\" class=\"CitationRef\"\u003e10\u003c/span\u003e\u0026ndash;\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e\u003c/sup\u003e. Many ventilators and middleware platforms used for data capture do not provide this segmentation directly, so it must be inferred from pressure and flow measurements. Prior studies have attempted to define phase onsets using heuristic rules, but such approaches could be prone to failure in real-world data, which are frequently affected by noise, artifact, and the very asynchronies they aim to detect\u003csup\u003e\u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e13\u003c/span\u003e,\u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e14\u003c/span\u003e\u003c/sup\u003e. To date, no published studies to our knowledge have systematically compared the performance of heuristic methods to machine learning methods for MV breath segmentation in real-world datasets, particularly those enriched for asynchronous breaths.\u003c/p\u003e\u003cp\u003eDeep learning approaches may address the challenge of segmenting real world data. U-Net convolutional networks were originally developed for biomedical image segmentation to overcome the requirement for a large quantity of annotated training samples\u003csup\u003e\u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e15\u003c/span\u003e\u003c/sup\u003e. These approaches have since been adapted for one-dimensional (1-D) signals such as audio waves\u003csup\u003e\u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e16\u003c/span\u003e\u003c/sup\u003e and MV waveforms\u003csup\u003e\u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e\u003c/sup\u003e. As such, we utilized a U-Net architecture to develop a deep learning model to segment inspiratory and expiratory phases of ventilator waveforms. We hypothesized that this model would outperform rules-based segmentation methods. We further hypothesized that our model would maintain robust performance in the often noisy signals typical of asynchronous breaths. Finally, we assessed how different segmentation methods influence the quantification of asynchronies.\u003c/p\u003e"},{"header":"Results","content":"\u003cp\u003eThe deidentified dataset consisted of 9,719 breaths from 33 patients who required various modes of MV for a range of acute indications. The train and validation dataset contained 8,520 breaths and the test dataset contained 1,199 breaths, with no patient overlap between datasets (\u003cstrong\u003eTable 1\u003c/strong\u003e). The prevalence of PVA was 28% in the training/validation dataset and 32% in the test dataset. Compared with the training/validation cohort, the test set was characterized by higher airway pressures and flows and shorter expiratory durations.\u003c/p\u003e\n\u003cp\u003eTable 1. Cohort Characteristics\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003eTrain and Validation (n = 8,520 breaths)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003eTest (n = 1,199 breaths)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003eMean Pressure (cm H2O), Median (IQR)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003e13.0 (10.3-16.7)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003e17.2(15.2-21.9)\u003c/p\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003ePeak Pressure (cm H20), Median (IQR)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003e25.2 (20.8-31.9)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003e31.4 (29.4-35.0)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003ePeak Flow (L/min), Median (IQR)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003e59.7 (50.4-70.5)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003e71.2 (60.6-84.1)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003eTidal Volume (mL), Median (IQR)\u003c/p\u003e\n \u003cp\u003e\u0026nbsp; \u0026nbsp; Inhaled\u003c/p\u003e\n \u003cp\u003e\u0026nbsp; \u0026nbsp; Exhaled\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003cp\u003e389 (280-494)\u003c/p\u003e\n \u003cp\u003e404 (278-512)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003cp\u003e397 (328-452)\u003c/p\u003e\n \u003cp\u003e377 (304-456)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003eInspiratory Duration, sec (IQR)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003e0.9 (0.8-0.9)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003e0.9 (0.8-0.9)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003eExpiratory Duration, sec (IQR)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003e1.8 (1.2-2.8)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003e1.6 (1.1-1.8)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003eBreaths/Patient, n\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003e294\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003e300\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 186px;\"\u003e\n \u003cp\u003eType of Breath, n (%)\u003c/p\u003e\n \u003cp\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; Normal\u003c/p\u003e\n \u003cp\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; Asynchrony\u003c/p\u003e\n \u003cp\u003e\u0026nbsp; \u0026nbsp; \u0026nbsp; Artifact\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 144px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003cp\u003e5,675 (67%)\u003c/p\u003e\n \u003cp\u003e2,345 (28%)\u003c/p\u003e\n \u003cp\u003e500 (6%)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 162px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003cp\u003e815 (68%)\u003c/p\u003e\n \u003cp\u003e380 (32%)\u003c/p\u003e\n \u003cp\u003e4 (0.3%)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003cu\u003eModel Performance\u003c/u\u003e\u003c/p\u003e\n\u003cp\u003eThe final deep learning model contained 8.9 million parameters (3.0 million trainable; \u0026asymp;11 MB). It substantially outperformed both baseline approaches, the zero-crossing heuristic and derivative backtracking method, for detecting cycling events at the exact timepoint of the reference standard. For inspiratory onsets, the model achieved an F1 score of 0.98, compared with 0.56 for the derivative backtracking method and 0.06 for zero-crossing. For expiratory onsets, the deep learning model reached an F1 score of 0.94, whereas both baseline methods performed with an F1 score of 0.01 (Table 2).\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eWithin a tolerance window of\u0026nbsp;\u0026plusmn;0.1 seconds of the reference standard, the baseline models improved, but the deep learning model still exceeded their performance, achieving a recall and precision of \u0026gt;0.99 for inspiratory onsets. Recall was \u0026gt;0.99 and precision 0.98 for expiratory onsets (Table 2). In contrast, within this 0.1 second margin of error for inspiratory onset, the zero-crossing method and the derivative backtracking method achieved low precision of 0.55 and 0.70, respectively. Similarly, for expiratory onsets within the 0.1 second margin of error, the zero-crossing model had a precision of 0.48 and the derivative backtracking method had a precision of 0.71. The heuristic models had lower recall for expiratory onsets than inspiratory onsets.\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eTable 2. Onsets Detected Exactly at Reference Standard Time Point and within 0.1s of Reference Standard Time Point\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\" width=\"630\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 90px;\"\u003e\u003cbr\u003e\u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 114px;\"\u003e\n \u003cp\u003eModel (number of onsets)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003eF1 Score\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003ePrecision\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003eRecall\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 66px;\"\u003e\n \u003cp\u003eF1 Score (within 0.1s)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003ePrecision (within 0.1s)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 84px;\"\u003e\n \u003cp\u003eRecall (within 0.1s)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd rowspan=\"3\" valign=\"top\" style=\"width: 90px;\"\u003e\n \u003cp\u003eInspiratory Onset\u003c/p\u003e\n \u003cp\u003e(True n = 1,199)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 114px;\"\u003e\n \u003cp\u003eDeep Learning\u0026nbsp;\u003c/p\u003e\n \u003cp\u003e(n = 1,198)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.98\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.98\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.98\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 66px;\"\u003e\n \u003cp\u003e\u0026gt;0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e\u0026gt;0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 84px;\"\u003e\n \u003cp\u003e\u0026gt;0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 114px;\"\u003e\n \u003cp\u003eZero Crossing (n=1,940)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.06\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.05\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.08\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 66px;\"\u003e\n \u003cp\u003e0.68\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.55\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 84px;\"\u003e\n \u003cp\u003e0.88\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 114px;\"\u003e\n \u003cp\u003eDerivative Backtracking\u003c/p\u003e\n \u003cp\u003e(n = 1,561)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.56\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.5\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.65\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 66px;\"\u003e\n \u003cp\u003e0.79\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.7\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 84px;\"\u003e\n \u003cp\u003e0.91\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd rowspan=\"3\" valign=\"top\" style=\"width: 90px;\"\u003e\n \u003cp\u003eExpiratory Onset\u003c/p\u003e\n \u003cp\u003e(True n = 1,198)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 114px;\"\u003e\n \u003cp\u003eDeep Learning\u0026nbsp;\u003c/p\u003e\n \u003cp\u003e(n = 1,211)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.94\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.93\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.94\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 66px;\"\u003e\n \u003cp\u003e0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.98\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 84px;\"\u003e\n \u003cp\u003e\u0026gt;0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 114px;\"\u003e\n \u003cp\u003eZero Crossing (n = 1,937)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.01\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.01\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.01\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 66px;\"\u003e\n \u003cp\u003e0.59\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.47\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 84px;\"\u003e\n \u003cp\u003e0.77\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 114px;\"\u003e\n \u003cp\u003eDerivative Backtracking\u003c/p\u003e\n \u003cp\u003e(n = 1,204)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.01\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.01\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 60px;\"\u003e\n \u003cp\u003e0.01\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 66px;\"\u003e\n \u003cp\u003e0.71\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 78px;\"\u003e\n \u003cp\u003e0.71\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 84px;\"\u003e\n \u003cp\u003e0.71\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003es = seconds;\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003cu\u003ePerformance in Normal and Asynchronous Breaths\u003c/u\u003e\u003c/p\u003e\n\u003cp\u003eWhen stratified by type of breath, the deep learning model also outperformed the best baseline heuristic method (Table 3). For normal breaths, the model achieved an F1 score of \u0026gt;0.99 within 0.1 seconds of both inspiratory and expiratory onsets, compared to 0.85 and 0.69 for the derivative backtracking method, respectively. In breaths annotated as PVAs, deep learning model performance remained high, with F1 scores of 0.99 for inspiratory onsets and 0.98 for expiratory onsets. In contrast, the derivative backtracking method demonstrated a decline in performance for inspiratory onset detection (F1 score 0.63), while showing a slight improvement for expiratory onsets (F1 score 0.76).\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eTable 3. Subgroups by Type of Breath (Normal vs. PVA)\u0026nbsp;\u003c/p\u003e\n\u003ctable border=\"1\" cellspacing=\"0\" cellpadding=\"0\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 80px;\"\u003e\n \u003cp\u003e\u0026nbsp;\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 85px;\"\u003e\u003cbr\u003e\u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\u003cbr\u003e\u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003eF1 (within 0.1s)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003ePrecision (within 0.1s)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003eRecall (within 0.1s)\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd rowspan=\"4\" valign=\"top\" style=\"width: 80px;\"\u003e\n \u003cp\u003eNormal Breaths\u003c/p\u003e\n \u003cp\u003e(n = 815)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd rowspan=\"2\" valign=\"top\" style=\"width: 85px;\"\u003e\n \u003cp\u003eInspiratory Onset\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\n \u003cp\u003eDeep Learning\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003e0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003e\u0026gt;0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003e0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\n \u003cp\u003eDerivative Backtracking\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003e0.85\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003e0.81\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003e0.88\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd rowspan=\"2\" valign=\"top\" style=\"width: 85px;\"\u003e\n \u003cp\u003eExpiratory Onset\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\n \u003cp\u003eDeep Learning\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003e\u0026gt;0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003e0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003e\u0026gt;0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\n \u003cp\u003eDerivative Backtracking\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003e0.69\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003e0.70\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003e0.67\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd rowspan=\"4\" valign=\"top\" style=\"width: 80px;\"\u003e\n \u003cp\u003ePVA Breaths\u003c/p\u003e\n \u003cp\u003e(n = 380)\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd rowspan=\"2\" valign=\"top\" style=\"width: 85px;\"\u003e\n \u003cp\u003eInspiratory Onset\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\n \u003cp\u003eDeep Learning\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003e0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003e0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003e\u0026gt;0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\n \u003cp\u003eDerivative Backtracking\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003e0.63\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003e0.49\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003e0.87\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd rowspan=\"2\" valign=\"top\" style=\"width: 85px;\"\u003e\n \u003cp\u003eExpiratory Onset\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\n \u003cp\u003eDeep Learning\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003e0.98\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003e0.97\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003e0.99\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003ctr\u003e\n \u003ctd valign=\"top\" style=\"width: 147px;\"\u003e\n \u003cp\u003eDerivative Backtracking\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 108px;\"\u003e\n \u003cp\u003e0.76\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 97px;\"\u003e\n \u003cp\u003e0.72\u003c/p\u003e\n \u003c/td\u003e\n \u003ctd valign=\"top\" style=\"width: 107px;\"\u003e\n \u003cp\u003e0.79\u003c/p\u003e\n \u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003es = seconds; PVA = patient-ventilator asynchrony;\u003c/p\u003e\n\u003cp\u003e\u003cu\u003eModel Interpretability\u003c/u\u003e\u003c/p\u003e\n\u003cp\u003eThe gradient-weighted class activation maps (Grad-CAM), applied to the last convolutional layer of the shared U-Net trunk, are illustrated in three manually selected input windows (Figure 1). The central region of each plot represents the output window, and each plot depicts activation heatmaps for an onset prediction at a single timestep in the 1-D time series. Across the breaths, the inspiratory and expiratory onsets of neighboring breaths appear to influence segmentation, suggesting that the model may be learning from the periodicity of the breaths. The plot demonstrates that several regions of each window contribute to the overall prediction. \u0026nbsp;The final panel shows an incorrect expiratory onset prediction, notable for its lack of activation in the surrounding time segments.\u003c/p\u003e\n\u003cp\u003eFigure 1. Grad-CAM\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eFigure 1. Gradient Weighted Class Activated Map. Red represents the highest activation values in the layer, which indicate regions of the waveform that had the greatest influence on the model\u0026rsquo;s prediction. The heat map reflects the model\u0026rsquo;s attention across both pressure and flow waveforms together. Each panel displays inspiratory onset detection (top) and expiratory onset detection (bottom). Dashed lines show the model\u0026rsquo;s predicted probability for each phase onset, and the \u0026lsquo;X\u0026rsquo; marks the specific prediction referenced by the heat map. The area enclosed by solid black lines represents the output window, which is the time segment for which the model generated predictions, while the entire plot corresponds to the input window, which includes all the waveform data the model used to make those predictions. The final panel illustrates a correct inspiratory onset prediction (top) and an incorrect expiratory onset prediction (bottom), which is distinguished by minimal activation in the adjacent waveform regions.\u003c/p\u003e\n\u003cp\u003e\u003cu\u003eClinical Application of the Model\u003c/u\u003e\u003c/p\u003e\n\u003cp\u003eFinally, we applied the different segmentation approaches to quantify the frequency of asynchronous breathing patterns. Using the reference standard, the prevalence of double-triggered breaths was 8% under the first published definition and 4% under the second, while stacked breaths occurred in 33% of cases\u003csup\u003e9,18\u003c/sup\u003e. Use of the deep learning model\u0026rsquo;s inspiratory and expiratory onsets reproduced these frequencies with no statistically significant differences (double triggering: 9% by the first definition, p = 0.80; 4% by the second definition, p = 0.74; stacked: 33%, p = 0.91). In contrast, the derivative backtracking method yielded substantially different estimates (double triggering: 32% by the first definition, p \u0026lt; 0.01; 34% by the second definition, p \u0026lt; 0.01; stacked: 11%, p \u0026lt; 0.01) (Figure 2).\u003c/p\u003e\n\u003cp\u003eFigure 2. Comparison of Asynchrony Frequency Identified by Different Segmentation Models\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eFigure 2. Comparison of Asynchrony Frequency Identified by Different Segmentation Models. Error bars represent 95% confidence intervals.\u0026nbsp;\u003c/p\u003e"},{"header":"Discussion","content":"\u003cp\u003eIn this study, we aimed to develop a deep learning model to accurately classify the onset of both inspiration and expiration in a real-world dataset of ventilator waveforms enriched for PVA. We found that our model outperformed traditional heuristic approaches for ventilator waveform segmentation in this dataset, with high precision and recall, and very few errors, maintaining performance even in asynchronous breaths. Notably, the model reproduced asynchrony frequencies that statistically matched the reference standard, whereas rules-based approaches produced markedly different estimates, underscoring how methodological variability can drive heterogeneity in this field of research. Because PVAs are associated with adverse outcomes such as lung injury, diaphragm dysfunction, prolonged ventilation, and mortality, consistent definitions and reliable segmentation methods are essential to advance research and clinical monitoring\u003csup\u003e\u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e19\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e\u003cp\u003eThere is growing interest in using artificial intelligence to detect PVAs in real time, but the success of such models depends heavily on the quality of training data and the reference standard labels used\u003csup\u003e\u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e19\u003c/span\u003e,\u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e20\u003c/span\u003e\u003c/sup\u003e. Our results demonstrate that in addition to PVA annotations, the segmentation of breaths themselves is a critical factor shaping PVA quantification. Prior reviews emphasize the lack of consensus in PVA definitions as a major barrier to reliable clinical tools\u003csup\u003e\u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e19\u003c/span\u003e,\u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e20\u003c/span\u003e\u003c/sup\u003e. Our findings show that consensus methods for breath segmentation should be established alongside consensus definitions of PVAs to support reproducible model development across institutions.\u003c/p\u003e\u003cp\u003eOur high-performance results are consistent with those of Bakkes et al., whose conference paper also employed a U-Net architecture to identify physiologic features in ventilator waveforms\u003csup\u003e\u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e\u003c/sup\u003e. Whereas their model was designed to detect the patient’s inspiratory and expiratory efforts, our approach focused on identifying phase transitions based on when the ventilator initiates and terminates breath delivery. These complementary perspectives are both necessary for detecting patient–ventilator asynchronies, which arise from mismatches between the patient’s efforts and the ventilator’s timing. We extend their work by demonstrating the versatility of the U-Net architecture for physiologic time-series analysis, using a dataset that included more than twice as many patients and breaths, as well as a substantial number of double-triggered breaths that were absent in their cohort.\u003c/p\u003e\u003cp\u003eWhile Bakkes et al.’s model showed discrepancies between the true incidence of PVA types (delayed inspiration, early cycling, late cycling, and ineffective efforts) and the incidence detected by their model, our model reproduced the PVA frequencies observed in the reference standard. This difference may reflect both the type of asynchronies evaluated—our model focused on double triggering and breath stacking, which display more pronounced waveform deflections—and methodological differences in how the reference standard was incorporated. Specifically, our model trained on exact onset time points, whereas their approach used a 210-millisecond onset window. That interval may be too broad, given that some of their PVA definitions involved timing differences of only 100–300 milliseconds between the patient’s respiratory effort and the ventilator’s corresponding termination of breath delivery. Additionally, in our data, when the inspiratory onset was detected more than 100 milliseconds after the true onset, the estimated tidal volume decreased by over 10%. Such timing errors could affect the detection of asynchronies that depend on tidal volume measurements, including some of those analyzed in our study. These findings underscores that precise onset detection is critical for accurately characterizing these physiologic events.\u003c/p\u003e\u003cp\u003eOur results are further supported by another study that applied a U-Net architecture to segment invasive physiologic signals, specifically the onset and offset of atrial activity in electrophysiologic recordings\u003csup\u003e\u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e21\u003c/span\u003e\u003c/sup\u003e. Although that model achieved slightly lower performance than ours, their model showed resilience even when artificial noise was introduced. This finding highlights the suitability and resilience of U-Net architectures for segmenting complex time-series physiologic data, even under noisy conditions, such as PVAs.\u003c/p\u003e\u003cp\u003eAutomated segmentation addresses practical challenges in the field. Manual segmentation is time consuming and limits sample sizes, while ventilator-generated segmentation is inconsistently available across ventilator platforms and middleware solutions that collect ventilator waveform data. Heuristic-based approaches may fail because they typically use one waveform input (usually flow), which may differ across ventilator modes and PVA types. In contrast, Grad-CAM visualizations revealed that our model forms complex, temporally distributed feature maps across the breath and neighboring cycles, integrating information from both flow and pressure inputs to guide segmentation, which may explain our model’s consistent performance in both synchronous and asynchronous breaths. By providing a robust, automated solution, our model represents an important step down the path toward standardization of ventilator waveform data segmentation and subsequent research with this rich data type. With ~ 3\u0026nbsp;million trainable parameters (≈ 11 MB), the model is computationally efficient, and the 3.5-second sliding window enables near real-time inference. These characteristics make it practical for bedside use, where continuous breath-by-breath segmentation could form the foundation for a unified model for the automated detection of PVAs.\u003c/p\u003e\u003cp\u003eThis study has several limitations. External validation on additional ventilator types and at multiple centers is needed to assess broader generalizability. While our limited access to MV waveform data from a single health system and ventilator type prohibited external validation testing, we incorporated several standard regularization strategies, such as dropout layers, early stopping and a weight decay in the optimizer, to reduce overfitting. Uniquely, training the model with multiple heads also regularizes the shared trunk, which may improve generalization. Nonetheless, future studies will need to confirm our results on independent datasets and diverse ventilator platforms. Additionally, our baseline heuristics were implemented according to published descriptions, but source code was not available, which may have limited the fidelity of reproduction. The inspiratory onset reference standard was also proprietary, limiting transparency into how those labels were generated. Furthermore, the model’s segmentation performance should be systematically validated on additional types of patient–ventilator asynchronies (PVAs) and commonly-encountered artifacts such as cough or condensation in the circuit to ensure broad applicability, as manual review of mis-segmentations revealed challenges in detecting some cases. Finally, future work should evaluate the model’s actionability and its clinical impact when used to guide interventions aimed at reducing PVAs.\u003c/p\u003e\u003cp\u003eIn conclusion, our attention-gated U-Net achieves high segmentation accuracy and sufficient computational efficiency for near real-time use. By enabling data harmonization and scalable analysis, automated segmentation provides a foundation for more consistent study of ventilator–patient interactions. Because segmentation directly impacts PVA identification, future work should focus on standardizing not only PVA definitions but also breath segmentation methods, paving the way for precise, reproducible, and clinically deployable tools for automated PVA monitoring.\u003c/p\u003e\n\n\n\n\u003cdiv id=\"Sec11\" class=\"Section2\"\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e\u003cdiv id=\"Sec12\" class=\"Section2\"\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003cp\u003e\u003c/p\u003e\u003c/div\u003e"},{"header":"Methods","content":"\u003cp\u003eThis study was reported in accordance with the Checklist for Artificial Intelligence in Medical Imaging (CLAIM) guidelines (Supplementary Table\u0026nbsp;1)\u003csup\u003e\u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e22\u003c/span\u003e\u003c/sup\u003e. Although developed for imaging applications, CLAIM was selected because segmentation of ventilator waveform time series has important methodological parallels with imaging segmentation tasks. In the absence of a dedicated reporting standard for artificial intelligence applied to physiologic signals, CLAIM provided an appropriate framework to promote rigor, transparency, and reproducibility.\u003c/p\u003e\u003ch3\u003eData\u003c/h3\u003e\u003cp\u003eThis retrospective study was a secondary analysis of previously collected ventilator waveform data at the University of California, Davis Health and was approved by its institutional review board, with informed consent obtained for all participants\u003csup\u003e\u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e18\u003c/span\u003e\u003c/sup\u003e. All methods were performed in accordance with the relevant guidelines and regulations. Following data collection, the dataset was enriched for segments with high rates of PVA. Supplementary Fig.\u0026nbsp;1 shows examples of normal, asynchronous and artifact-laden breaths in the dataset with corresponding inspiratory and expiratory onset labels. Data was collected from Puritan Bennet 840 ventilators, using a serial port connected by a serial-USB null modem cable to a Raspberry pi microcomputer. The ventilator generated pressure and flow measurements at a rate of 50 Hz. The dataset consisted of 9,719 breaths from 33 unique patients, that were deidentified prior to receiving the dataset. Labels for PVAs (double triggers, breath stack or asynchrony not otherwise specified) had been annotated by two pulmonary and critical care physicians. All data from this dataset were included in the analysis, and no missing data was present. Data pre-processing entailed creating timestamps every 0.02s for each measurement.\u003c/p\u003e\u003cp\u003eThe reference standard for the start of each inspiration was provided as a discrete label by the ventilator, selected with the assumption that ventilator-generated breath onsets incorporate intrinsic knowledge of ventilator breath delivery. Since expiratory onsets were not available from the ventilator, we implemented a previously published algorithm to generate candidate expiratory onset points, providing a standardized initial estimate across all breaths. These candidate expiratory onsets were plotted where the flow waveform crossed zero following the largest positive continuous area under the curve. An expert pulmonary and critical care physician then manually reviewed every candidate and confirmed or relabeled each as appropriate, using a custom graphical user interface (GUI) developed in Python (version 3.13.5, Tkinter library)\u003csup\u003e\u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e18\u003c/span\u003e\u003c/sup\u003e. The physician disagreed with the algorithmic assignment in approximately 15% of instances, typically in breaths where the algorithm marked the onset of patient expiratory effort rather than the ventilator’s transition to expiration, reflecting our goal to label the precise time point when the ventilator cycled from inspiration to expiration rather than when patient expiratory effort began \u003csup\u003e\u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e\u003c/sup\u003e. Difficult or ambiguous cases were reviewed with senior physicians with more than a decade of experience in ventilator waveform research, to ensure accuracy and consistency. Reference standards were developed for the entire dataset prior to cohort generation.\u003c/p\u003e\u003cp\u003eThe dataset was split by patient file into training (80%), validation (10%) and test (10%) cohorts. No patient was present in more than one cohort. Based on sample size calculations, detecting an increase in accurately segmented breaths from 70% to 80% with 80% power would require a minimum of 291 breaths in the test set.\u003c/p\u003e\u003ch3\u003eBaseline Models\u003c/h3\u003e\u003cp\u003eThe deep learning model was compared to two baseline models. The first, termed zero crossings, labelled inspiratory onsets when flow crossed from negative to positive values and expiratory onsets when flow crossed from positive to negative values\u003csup\u003e\u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e14\u003c/span\u003e\u003c/sup\u003e. The second model, termed the derivative backtracking method, was adapted from a previously published heuristic\u003csup\u003e\u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e\u003c/sup\u003e. Inspiratory onsets were identified by first locating flow values greater than 12 L/min, then stepping backward to the point where the flow derivative began to change. Expiratory onsets were determined by finding flow values less than − 5 L/min that remained negative for at least 25 milliseconds after the inspiratory onset, and then stepping backward using the first derivative to identify where the flow crossed zero or plateaued.\u003c/p\u003e\u003ch2\u003eDeep Learning Model: Data Preparation and Architecture\u003c/h2\u003e\u003cp\u003eFor the deep learning model, ventilator waveform data were segmented into fixed-length windows of 352 timesteps (7.04 seconds at 50 Hz), each containing two one-dimensional input channels: airway pressure and flow. For each input window, pressure and flow values were normalized so that each feature had a mean of zero and a standard deviation of one, ensuring that all signals were on the same scale before training. Each input window was paired with output labels spanning the central 176 samples (3.52 seconds, which corresponds to the average breath duration) to minimize edge effects. A two-channel one-dimensional convolutional neural network with a U-Net–style encoder–decoder architecture with attention-gated skip connections was trained to jointly detect two types of cycling events, inspiratory and expiratory onsets (Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e3\u003c/span\u003e). The shared trunk then branches into dual heads, each specializing in its respective task. This design maintains efficiency through shared representations while enabling the model to capture idiosyncratic nuances in each head. It also helps mitigate potential conflicts where certain weights and biases might benefit one task but hinder the other.\u003c/p\u003e\u003cp\u003eFigure \u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e3\u003c/span\u003e. 1D U-Net with Attention-Gated Skip Connections for Dual Event Detection. The diagram illustrates the four primary components of the model architecture: encoder blocks, bottleneck layer, decoder blocks, and two task-specific heads. The numbers below each block represent the size of the feature maps. The encoder comprises four convolutional blocks, with progressively doubling feature depth, each consisting of paired 1D convolution and LeakyReLU layers, and max pooling layers. The bottleneck uses dilated convolutions, LeakyReLU, and a dropout layer. The decoder mirrors the encoder using 1D transposed convolution upsampling blocks and concatenates the output with skip connections from the encoder, gated by attention mechanisms. This shared representation is center cropped and passed onto two task-specific heads: one for inspiratory onset and another for expiratory onset. Each 1D convolution layer of these heads is followed by layer normalization, dropout, and time distributed dense layers with GELU and a terminal sigmoid activation.\u003c/p\u003e\u003ch2\u003eDeep Learning Model Training and Post-Processing\u003c/h2\u003e\u003cp\u003eTraining used an uncertainty-weighted composite loss combining focal and dice loss functions to address extreme class imbalance, event detection accuracy and dynamically balance the contributions of the two outputs\u003csup\u003e\u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e24\u003c/span\u003e\u003c/sup\u003e. Specifically, the total loss was defined as:\u003c/p\u003e\u003cdiv id=\"Equa\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equa\" name=\"EquationSource\"\u003e\n$$\\:{\\mathcal{L}}_{total}=\\frac{1}{2{\\sigma\\:}_{1}^{2}}{\\mathcal{L}}_{focal}+\\frac{1}{2{\\sigma\\:}_{2}^{2}}{\\mathcal{L}}_{dice}+\\text{log}{\\sigma\\:}_{1}+\\text{log}{\\sigma\\:}_{2}$$\u003c/div\u003e\u003c/div\u003e\u003cp\u003ewhere \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{\\sigma\\:}_{1}\\)\u003c/span\u003e\u003c/span\u003e and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{\\sigma\\:}_{2}\\)\u003c/span\u003e\u003c/span\u003e are task-specific uncertainty parameters learned during training. The logarithmic terms act as regularizers that prevent \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{\\sigma\\:}_{1}\\)\u003c/span\u003e\u003c/span\u003e and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{\\sigma\\:}_{2}\\)\u003c/span\u003e\u003c/span\u003e from diverging and help maintain numerical stability while balancing optimization across tasks. The focal loss was formulated as:\u003c/p\u003e\u003cdiv id=\"Equb\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equb\" name=\"EquationSource\"\u003e\n$$\\:{\\mathcal{L}}_{focal}={-\\alpha\\:(1-{p}_{t})}^{\\gamma\\:}\\text{log}\\left({p}_{t}\\right)$$\u003c/div\u003e\u003c/div\u003e\u003cp\u003ewhere \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{p}_{t}\\)\u003c/span\u003e\u003c/span\u003e is the predicted probability of the true class, \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:\\alpha\\:\\)\u003c/span\u003e\u003c/span\u003e is a balancing factor and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:\\gamma\\:\\)\u003c/span\u003e\u003c/span\u003e controls the focusing strength, to diminish the influence of easily classifiable examples on the overall loss. The Dice loss was defined as:\u003c/p\u003e\u003cdiv id=\"Equc\" class=\"Equation\"\u003e\u003cdiv format=\"TEX\" class=\"mathdisplay\" id=\"FileID_Equc\" name=\"EquationSource\"\u003e\n$$\\:{\\mathcal{L}}_{dice}=1-\\frac{2{\\sum\\:}_{i}{p}_{i}{g}_{i}+ϵ}{{\\sum\\:}_{i}{p}_{i}\\:+{\\sum\\:}_{i}{g}_{i}\\:+ϵ}$$\u003c/div\u003e\u003c/div\u003e\u003cp\u003eHere, \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{p}_{i}\\)\u003c/span\u003e\u003c/span\u003e denotes the predicted probability for element \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:i\\)\u003c/span\u003e\u003c/span\u003e, \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:{g}_{i}\\)\u003c/span\u003e\u003c/span\u003e represents the corresponding ground-truth label, and \u003cspan class=\"InlineEquation\"\u003e\u003cspan class=\"mathinline\"\u003e\\(\\:ϵ\\)\u003c/span\u003e\u003c/span\u003e is a small constant added for numerical stability. This function ensures better temporal alignment between predicted events and ground truth.\u003c/p\u003e\u003cp\u003eThe model was initialized using He initialization and trained with the AdamW optimizer with an initial learning rate of 5e-4, mini-batches of 32 windows, and early stopping based on validation loss (patience of 10 epochs, minimum delta of 1×10⁻⁴) to prevent overfitting\u003csup\u003e\u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e25\u003c/span\u003e\u003c/sup\u003e. The final model was selected as the epoch with the lowest validation loss under these criteria. Implementation was performed in TensorFlow/Keras and trained with GPU acceleration. During training, output windows were generated with a step size of 176 samples, resulting in non-overlapping output label spans. After inference, predictions were refined with debouncing and segment-level constraints, allowing at most one expiratory onset (with the maximum probability) per predicted breath interval, to improve clinical plausibility and reduce spurious detections.\u003c/p\u003e\u003ch2\u003eEvaluation\u003c/h2\u003e\u003cp\u003eDue to class imbalance, with 0.7% of data points representing onset events, the F1 score, the harmonic mean of precision (positive predictive value) and recall (sensitivity), was chosen to evaluate the primary outcome of the model’s segmentation performance against the reference standard in the test set, both at the exact time point and within a 0.1 second tolerance window. This window was chosen based on prior literature showing that patients exhibit no conscious or unconscious respiratory responses to occlusion within this period, suggesting this is a clinically insignificant time period that would avoid interference with PVAs while still allowing a small tolerance in breath segmentation\u003csup\u003e\u003cspan citationid=\"CR26\" class=\"CitationRef\"\u003e26\u003c/span\u003e\u003c/sup\u003e. This window duration was further informed by an analysis of our dataset in which inspiratory onsets detected more than 100 milliseconds after the true onset produced over 10% error in estimated tidal volume, further supporting the use of this threshold as both physiologically and analytically appropriate (Supplementary Fig.\u0026nbsp;2). To characterize model performance further, sensitivity analyses were performed by breath type (normal vs. asynchronous), based on the annotated dataset labels. Model interpretability was assessed by applying gradient weighted class activation maps (Grad-CAM)\u003csup\u003e\u003cspan citationid=\"CR27\" class=\"CitationRef\"\u003e27\u003c/span\u003e\u003c/sup\u003e on manually selected input windows.\u003c/p\u003e\u003cp\u003eThe secondary objective was to compare PVA quantification across the highest performing segmentation methods. Double-triggered breaths and stacked breaths were selected as clinically meaningful categories with established definitions based on inspiratory and expiratory segmentation\u003csup\u003e\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e,\u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e18\u003c/span\u003e\u003c/sup\u003e. Asynchrony frequency, defined as the ratio of asynchronous breaths to total breaths, was calculated using the reference standard according to two published definitions for double triggering and one for stacked breaths\u003csup\u003e\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e,\u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e18\u003c/span\u003e\u003c/sup\u003e.\u003c/p\u003e\u003cp\u003eThe first definition classifies a double-triggered breath as having an expiratory time less than 50% of the mean inspiratory time\u003csup\u003e\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e\u003c/sup\u003e. The other defines a double-triggered breath as one with an expiratory time ≤ 0.3 seconds combined with either an expiratory-to-inspiratory tidal volume ratio (TVe/TVi) \u0026lt; 0.25, or a TVe/TVi \u0026lt; 0.50 with an expiratory tidal volume \u0026lt; 100 mL\u003csup\u003e18\u003c/sup\u003e. For stacked breaths, the definition requires an expiratory time \u0026gt; 0.3 seconds with TVe/TVi \u0026lt; 0.9\u003csup\u003e18\u003c/sup\u003e. Segmentation outputs from both the derivative backtracking method and the deep learning model were applied to the test set, and asynchrony frequencies were calculated accordingly. Statistical comparisons were performed using two-sided t-tests for continuous variables and chi-squared tests for categorical variables.\u003c/p\u003e"},{"header":"Declarations","content":"\u003cp\u003e\u003cstrong\u003eData Availability:\u0026nbsp;\u003c/strong\u003eData are available on reasonable request.\u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCode Availability:\u0026nbsp;\u003c/strong\u003eCode is available on reasonable request.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAcknowledgments:\u0026nbsp;\u003c/strong\u003eResearch reported in this publication was supported by the National Center For Advancing Translational Sciences of the National Institutes of Health under Award Number K12TR004410. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAuthor Contributions: Preeti Gupta:\u0026nbsp;\u003c/strong\u003eConceptualization. Methodology, Formal analysis, Investigation, Data Curation, Writing – Original Draft, Visualization; \u003cstrong\u003eAditya Nemani:\u0026nbsp;\u003c/strong\u003eConceptualization, Methodology, Software, Formal analysis, Investigation, Data curation, Writing – Original Draft, Visualization; \u003cstrong\u003eVirginia R. de Sa:\u0026nbsp;\u003c/strong\u003eSupervision, Validation; \u003cstrong\u003eAlex K. Pearce:\u0026nbsp;\u003c/strong\u003eData curation; \u003cstrong\u003eShamim Nemati:\u0026nbsp;\u003c/strong\u003eSupervision, Validation; \u003cstrong\u003eAtul Malhotra: Conceptualization,\u0026nbsp;\u003c/strong\u003eSupervision; \u003cstrong\u003eJason Y. Adams:\u0026nbsp;\u003c/strong\u003eConceptualization, Methodology, Validation, Data curation, Supervision; \u003cstrong\u003eAll authors\u003c/strong\u003e: Writing – Review \u0026amp; Editing\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eFunding: Dr. Gupta is supported by a K12 award from NCATS (K12TR004410)\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eCompeting Interests:\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eDr. Malhotra is funded by NIH and reports income from Eli Lilly, Zoll, Livanova, Powell Mansfield and Sunrise. Resmed provides a philanthropic donation to UCSD. He and Dr. Nemati are co-founders of Clairyon, a small startup focused on predictive analytics in sepsis. Dr. Nemati is also a consultant for Neural Point, a start-up focused on the diagnosis of sleep apnea. Dr. Adams is funded by NIH and is also co-inventor (Patent# US11839585B2) of technology related to the detection of patient-ventilator asynchrony and is a co-founder of Certus Critical Care Inc.\u0026nbsp;\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\n\u003cli\u003eJivraj, N. K. \u003cem\u003eet al.\u003c/em\u003e Use of Mechanical Ventilation Across 3 Countries. \u003cem\u003eJAMA Intern. Med.\u003c/em\u003e \u003cstrong\u003e183\u003c/strong\u003e, 824 (2023).\u003c/li\u003e\n\u003cli\u003eUnited States - Census Bureau Profile. https://data.census.gov/profile/United_States?g=010XX00US.\u003c/li\u003e\n\u003cli\u003eWunsch, H. \u003cem\u003eet al.\u003c/em\u003e ICU Occupancy and Mechanical Ventilator Use in the United States*: \u003cem\u003eCrit. Care Med.\u003c/em\u003e \u003cstrong\u003e41\u003c/strong\u003e, 2712\u0026ndash;2719 (2013).\u003c/li\u003e\n\u003cli\u003eEsteban, A. \u003cem\u003eet al.\u003c/em\u003e Characteristics and Outcomes in Adult Patients Receiving Mechanical VentilationA 28-Day International Study. \u003cem\u003eJAMA\u003c/em\u003e \u003cstrong\u003e287\u003c/strong\u003e, 345\u0026ndash;355 (2002).\u003c/li\u003e\n\u003cli\u003eKaragiannidis, C. \u003cem\u003eet al.\u003c/em\u003e In-hospital mortality, comorbidities, and costs of one million mechanically ventilated patients in Germany: a nationwide observational study before, during, and after the COVID-19 pandemic. \u003cem\u003eLancet Reg. Health \u0026ndash; Eur.\u003c/em\u003e \u003cstrong\u003e42\u003c/strong\u003e, (2024).\u003c/li\u003e\n\u003cli\u003eRietveld, T. P. \u003cem\u003eet al.\u003c/em\u003e Let\u0026rsquo;s get in sync: current standing and future of AI-based detection of patient-ventilator asynchrony. \u003cem\u003eIntensive Care Med. Exp.\u003c/em\u003e \u003cstrong\u003e13\u003c/strong\u003e, 39 (2025).\u003c/li\u003e\n\u003cli\u003eBeitler, J. R. \u003cem\u003eet al.\u003c/em\u003e Quantifying unintended exposure to high tidal volumes from breath stacking dyssynchrony in ARDS: the BREATHE Criteria. \u003cem\u003eIntensive Care Med.\u003c/em\u003e \u003cstrong\u003e42\u003c/strong\u003e, 1427 (2016).\u003c/li\u003e\n\u003cli\u003eSottile, P. D., Smith, B., Stroh, J. N., Albers, D. J. \u0026amp; Moss, M. Flow-Limited and Reverse-Triggered Ventilator Dyssynchrony Are Associated With Increased Tidal and Dynamic Transpulmonary Pressure. \u003cem\u003eCrit. Care Med.\u003c/em\u003e \u003cstrong\u003e52\u003c/strong\u003e, 743\u0026ndash;751 (2024).\u003c/li\u003e\n\u003cli\u003eThille, A. W., Rodriguez, P., Cabello, B., Lellouche, F. \u0026amp; Brochard, L. Patient-ventilator asynchrony during assisted mechanical ventilation. \u003cem\u003eIntensive Care Med.\u003c/em\u003e \u003cstrong\u003e32\u003c/strong\u003e, 1515\u0026ndash;1522 (2006).\u003c/li\u003e\n\u003cli\u003eChen, D., Lin, K., Deng, Z., Li, D. \u0026amp; Deng, Q. Attention-based convolutional long short-term memory neural network for detection of patient-ventilator asynchrony from mechanical ventilation. \u003cem\u003eBiomed. Signal Process. Control\u003c/em\u003e \u003cstrong\u003e78\u003c/strong\u003e, 103923 (2022).\u003c/li\u003e\n\u003cli\u003eZhang, L. \u003cem\u003eet al.\u003c/em\u003e Detection of patient-ventilator asynchrony from mechanical ventilation waveforms using a two-layer long short-term memory neural network. \u003cem\u003eComput. Biol. Med.\u003c/em\u003e \u003cstrong\u003e120\u003c/strong\u003e, 103721 (2020).\u003c/li\u003e\n\u003cli\u003ePan, Q. \u003cem\u003eet al.\u003c/em\u003e An interpretable 1D convolutional neural network for detecting patient-ventilator asynchrony in mechanical ventilation. \u003cem\u003eComput. Methods Programs Biomed.\u003c/em\u003e \u003cstrong\u003e204\u003c/strong\u003e, 106057 (2021).\u003c/li\u003e\n\u003cli\u003eBlanch, L. \u003cem\u003eet al.\u003c/em\u003e Asynchronies during mechanical ventilation are associated with mortality. \u003cem\u003eIntensive Care Med.\u003c/em\u003e \u003cstrong\u003e41\u003c/strong\u003e, 633\u0026ndash;641 (2015).\u003c/li\u003e\n\u003cli\u003eSottile, P. D., Albers, D., Higgins, C., Mckeehan, J. \u0026amp; Moss, M. M. The Association between Ventilator Dyssynchrony, Delivered Tidal Volume, and Sedation using a Novel Automated Ventilator Dyssynchrony Detection Algorithm. \u003cem\u003eCrit. Care Med.\u003c/em\u003e \u003cstrong\u003e46\u003c/strong\u003e, e151\u0026ndash;e157 (2018).\u003c/li\u003e\n\u003cli\u003eRonneberger, O., Fischer, P. \u0026amp; Brox, T. U-Net: Convolutional Networks for Biomedical Image Segmentation. in \u003cem\u003eMedical Image Computing and Computer-Assisted Intervention \u0026ndash; MICCAI 2015\u003c/em\u003e (eds Navab, N., Hornegger, J., Wells, W. M. \u0026amp; Frangi, A. F.) vol. 9351 234\u0026ndash;241 (Springer International Publishing, Cham, 2015).\u003c/li\u003e\n\u003cli\u003eStoller, D., Ewert, S. \u0026amp; Dixon, S. Wave-U-Net: A Multi-Scale Neural Network for End-to-End Audio Source Separation. (2018) doi:10.48550/ARXIV.1806.03185.\u003c/li\u003e\n\u003cli\u003eBakkes, T. H. G. F., Montree, R. J. H., Mischi, M., Mojoli, F. \u0026amp; Turco, S. A machine learning method for automatic detection and classification of patient-ventilator asynchrony. in \u003cem\u003e2020 42nd Annual International Conference of the IEEE Engineering in Medicine \u0026amp; Biology Society (EMBC)\u003c/em\u003e 150\u0026ndash;153 (2020). doi:10.1109/EMBC44109.2020.9175796.\u003c/li\u003e\n\u003cli\u003eAdams, J. Y. \u003cem\u003eet al.\u003c/em\u003e Development and Validation of a Multi-Algorithm Analytic Platform to Detect Off-Target Mechanical Ventilation. \u003cem\u003eSci. Rep.\u003c/em\u003e \u003cstrong\u003e7\u003c/strong\u003e, 14980 (2017).\u003c/li\u003e\n\u003cli\u003eRietveld, T. P. \u003cem\u003eet al.\u003c/em\u003e Let\u0026rsquo;s get in sync: current standing and future of AI-based detection of patient-ventilator asynchrony. \u003cem\u003eIntensive Care Med. Exp.\u003c/em\u003e \u003cstrong\u003e13\u003c/strong\u003e, 39 (2025).\u003c/li\u003e\n\u003cli\u003eJiang, G. \u003cem\u003eet al.\u003c/em\u003e Application progress of machine learning in patient-ventilator asynchrony during mechanical ventilation: a systematic review. \u003cem\u003eCrit. Care\u003c/em\u003e \u003cstrong\u003e29\u003c/strong\u003e, 295 (2025).\u003c/li\u003e\n\u003cli\u003eRedina, R., Hejc, J., Filipenska, M. \u0026amp; Starek, Z. Analyzing the performance of biomedical time-series segmentation with electrophysiology data. \u003cem\u003eSci. Rep.\u003c/em\u003e \u003cstrong\u003e15\u003c/strong\u003e, 11776 (2025).\u003c/li\u003e\n\u003cli\u003eTejani, A. S. \u003cem\u003eet al.\u003c/em\u003e Checklist for Artificial Intelligence in Medical Imaging (CLAIM): 2024 Update. \u003cem\u003eRadiol. Artif. Intell.\u003c/em\u003e \u003cstrong\u003e6\u003c/strong\u003e, e240300 (2024).\u003c/li\u003e\n\u003cli\u003eBlanch, L. \u003cem\u003eet al.\u003c/em\u003e Asynchronies during mechanical ventilation are associated with mortality. \u003cem\u003eIntensive Care Med.\u003c/em\u003e \u003cstrong\u003e41\u003c/strong\u003e, 633\u0026ndash;641 (2015).\u003c/li\u003e\n\u003cli\u003eCipolla, R., Gal, Y. \u0026amp; Kendall, A. Multi-task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics. in \u003cem\u003e2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition\u003c/em\u003e 7482\u0026ndash;7491 (IEEE, Salt Lake City, UT, USA, 2018). doi:10.1109/CVPR.2018.00781.\u003c/li\u003e\n\u003cli\u003eHe, K., Zhang, X., Ren, S. \u0026amp; Sun, J. Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification. in \u003cem\u003e2015 IEEE International Conference on Computer Vision (ICCV)\u003c/em\u003e 1026\u0026ndash;1034 (IEEE, Santiago, Chile, 2015). doi:10.1109/ICCV.2015.123.\u003c/li\u003e\n\u003cli\u003eWhitelaw, W. A., Derenne, J.-P. \u0026amp; Milic-Emili, J. Occlusion pressure as a measure of respiratory center output cm conscious man. \u003cem\u003eRespir. Physiol.\u003c/em\u003e \u003cstrong\u003e23\u003c/strong\u003e, 181\u0026ndash;199 (1975).\u003c/li\u003e\n\u003cli\u003eSelvaraju, R. R. \u003cem\u003eet al.\u003c/em\u003e Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization. in \u003cem\u003e2017 IEEE International Conference on Computer Vision (ICCV)\u003c/em\u003e 618\u0026ndash;626 (2017). doi:10.1109/ICCV.2017.74.\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":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true},"keywords":"","lastPublishedDoi":"10.21203/rs.3.rs-8001137/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-8001137/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eAccurate segmentation of ventilator waveforms is essential for detecting patient\u0026ndash;ventilator asynchronies (PVAs), yet current heuristic methods can fail in noisy, real-world data. We developed and validated a deep learning model using a one-dimensional attention-gated U-Net architecture to identify inspiratory and expiratory onsets in mechanical ventilation waveforms. The model was trained and tested on 9,719 breaths from 33 patients and outperformed published rule-based methods, achieving F1 scores of \u0026gt;\u0026thinsp;0.99 for both inspiratory and expiratory onset detection within a 0.1-second tolerance window. Performance remained robust in asynchronous breaths (F1\u0026thinsp;\u0026ge;\u0026thinsp;0.98). When applied to quantify PVAs, the model reproduced reference standard asynchrony frequencies with no significant differences, whereas heuristic methods produced large deviations. Gradient-weighted class activation maps suggest that the model leveraged a diverse set of waveform features to inform segmentation. This computationally efficient model enables highly-accurate, real-time waveform analysis and provides a foundation for scalable, reproducible assessment of ventilator\u0026ndash;patient interactions.\u003c/p\u003e","manuscriptTitle":"Deep Learning for Time-Series Segmentation of Mechanical Ventilator Waveforms","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-11-21 18:14:58","doi":"10.21203/rs.3.rs-8001137/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"decision","content":"Revision requested","date":"2025-12-15T12:04:05+00:00","index":"","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-12-15T00:44:05+00:00","index":"hide","fulltext":""},{"type":"editorInvitedReview","content":"","date":"2025-12-03T11:54:29+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"119291275162289483080025894611504036670","date":"2025-11-21T15:10:03+00:00","index":"hide","fulltext":""},{"type":"reviewerAgreed","content":"183881072667165955004513113340159821621","date":"2025-11-17T10:04:15+00:00","index":"hide","fulltext":""},{"type":"reviewersInvited","content":"","date":"2025-11-11T15:23:22+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2025-11-11T15:10:07+00:00","index":"","fulltext":""},{"type":"editorInvited","content":"","date":"2025-11-04T04:10:28+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2025-11-03T07:11:40+00:00","index":"","fulltext":""},{"type":"submitted","content":"Scientific Reports","date":"2025-11-03T07:07:05+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"scientific-reports","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"scirep","sideBox":"Learn more about [Scientific Reports](http://www.nature.com/srep/)","snPcode":"","submissionUrl":"","title":"Scientific Reports","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"stoa","reportingPortfolio":"Scientific Reports","inReviewEnabled":true,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"5c6f506a-78fa-46d8-943c-e58c283d2085","owner":[],"postedDate":"November 21st, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[{"id":58283425,"name":"Biological sciences/Computational biology and bioinformatics"},{"id":58283426,"name":"Physical sciences/Engineering"},{"id":58283427,"name":"Health sciences/Health care"},{"id":58283428,"name":"Physical sciences/Mathematics and computing"},{"id":58283429,"name":"Health sciences/Medical research"}],"tags":[],"updatedAt":"2026-03-24T12:40:44+00:00","versionOfRecord":[],"versionCreatedAt":"2025-11-21 18:14:58","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-8001137","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-8001137","identity":"rs-8001137","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","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.