Papers
Topics
Authors
Recent
Search
2000 character limit reached

Artificial Intelligence-Enabled Spirometry for Early Detection of Right Heart Failure

Published 17 Nov 2025 in cs.LG and cs.AI | (2511.13457v1)

Abstract: Right heart failure (RHF) is a disease characterized by abnormalities in the structure or function of the right ventricle (RV), which is associated with high morbidity and mortality. Lung disease often causes increased right ventricular load, leading to RHF. Therefore, it is very important to screen out patients with cor pulmonale who develop RHF from people with underlying lung diseases. In this work, we propose a self-supervised representation learning method to early detecting RHF from patients with cor pulmonale, which uses spirogram time series to predict patients with RHF at an early stage. The proposed model is divided into two stages. The first stage is the self-supervised representation learning-based spirogram embedding (SLSE) network training process, where the encoder of the Variational autoencoder (VAE-encoder) learns a robust low-dimensional representation of the spirogram time series from the data-augmented unlabeled data. Second, this low-dimensional representation is fused with demographic information and fed into a CatBoost classifier for the downstream RHF prediction task. Trained and tested on a carefully selected subset of 26,617 individuals from the UK Biobank, our model achieved an AUROC of 0.7501 in detecting RHF, demonstrating strong population-level distinction ability. We further evaluated the model on high-risk clinical subgroups, achieving AUROC values of 0.8194 on a test set of 74 patients with chronic kidney disease (CKD) and 0.8413 on a set of 64 patients with valvular heart disease (VHD). These results highlight the model's potential utility in predicting RHF among clinically elevated-risk populations. In conclusion, this study presents a self-supervised representation learning approach combining spirogram time series and demographic data, demonstrating promising potential for early RHF detection in clinical practice.

Summary

  • The paper demonstrates a novel use of self-supervised representation learning with a VAE-based encoder and data augmentation to extract subtle spirogram features for RHF detection.
  • It utilizes CatBoost ensemble classification fused with demographic data, achieving AUROC scores of 0.7501 overall and up to 0.8413 in high-risk cohorts.
  • The framework's interpretability is enhanced through SHAP and attention visualizations, which pinpoint critical spirogram segments indicative of right heart dysfunction.

Artificial Intelligence-Enabled Spirometry for Early Detection of Right Heart Failure

Introduction

The early identification of right heart failure (RHF), characterized by pathological alterations in right ventricular (RV) function or structure, remains an unmet diagnostic need, particularly within populations suffering from chronic lung disease. Traditional modalities—echocardiography, cardiac MRI, and invasive pulmonary artery catheterization—are infrequently applied in routine care, leading to delayed RHF detection. Meanwhile, spirometry represents a ubiquitous, non-invasive diagnostic employed in pulmonary medicine but is underutilized for cardiovascular risk stratification due to the subtlety and complexity of RHF-induced changes in spirogram signals. This work presents a self-supervised representation learning approach for early RHF detection via analysis of spirogram time series, leveraging automatic feature extraction to capture physiological signatures not accessible through expert-defined features or summary metrics.

Methodology

Data Source and Preprocessing

The study utilizes UK Biobank data (N=26,617, filtered for extreme RVEF, synchronized with valid spirometry), focusing on raw volume-time spirometry, subsequently transformed to standardized volume-flow spirograms. Rigorous preprocessing included noise handling (Gaussian smoothing, zero-padding) and demographic feature extraction (age, sex, smoking status, COPD).

Self-Supervised Representation Learning

The proposed SLSE framework employs a two-stage pipeline (Figure 1). Initially, robust low-dimensional embeddings of spirogram time series are generated using a VAE-encoder trained under the BYOL paradigm: an online network parameterized by θ\theta and a target network by ξ\xi (exp. moving average update). Data augmentation simulates clinical, equipment, and physiological variability, facilitating the learning of representations invariant to procedural noise or device-related artifacts (Figure 2). Five augmentation methods are used: Gaussian noise injection, post-peak segment amplification, horizontal and vertical stretching, and downsampling with Butterworth filtering. Figure 1

Figure 1: Model overview, including SLSE-based spirogram encoding, demographic data fusion, and CatBoost-based downstream classification for RHF detection.

Figure 2

Figure 2: Signal augmentation strategies simulating procedural/device variability for robust representation learning in the SLSE framework.

Downstream Classification

Low-dimensional encoder outputs are fused with demographic information for RHF classification utilizing CatBoost gradient boosting (ensemble of top-3 AUROC models via bagging for final output). This fusion emphasizes the utility of heterogeneous feature sets comprising both structured (demographic) and unstructured (signal-derived) data.

Results

Classification Performance

On the UK Biobank test set, the model achieves AUROC=0.7501 for RHF detection, significantly outperforming versions without data augmentation, VAE-encoder, or ensemble learning. Subgroup analysis reveals superior predictive performance among high-risk populations: AUROC=0.8194 (CKD), AUROC=0.8413 (VHD), substantiating robust discrimination capabilities even in small, clinically critical cohorts (Figure 3). Figure 3

Figure 3: Subgroup analysis, demonstrating AUROC improvements for CKD and VHD, stratified prediction probability distributions, and breakdown by clinical risk factors.

Ablation Analysis

Systematic ablation exposes performance deficits when excluding critical modules—data augmentation diminishes AUROC by 0.0086, VAE-encoder by 0.0198; demographic exclusion yields drastic loss (AUROC=0.6175). Further, comparative analysis of combinations of augmentation techniques demonstrates low sensitivity of MSE loss to method composition (Figure 4), endorsing the SLSE framework’s strong anti-interference capability. Figure 4

Figure 4: Modular ablation analysis and augmentation strategy robustness per cross-validated MSE loss and AUROC.

Model Interpretation

SHAP analysis (Figure 5) quantifies feature contributions, confirming positive associations between RHF risk and age, male sex, CKD, VHD, obesity, hypertension, LHF, and diabetes. Notably, nuanced feature dependencies manifest: smoking exhibits negligible/contradictory influence, and CHD status contributes to both true negative and true positive predictions—reflecting complex comorbidity interactions. Figure 5

Figure 5: SHAP beeswarm and dependency plots detailing feature importance and RHF risk interaction effects for age and sex.

Attention visualization in case studies (Figure 6) elucidates the VAE-encoder’s focus on spirogram segments, predominantly before and around FEF25\text{FEF}_{25}–FEF50\text{FEF}_{50}, which correspond to rapid flow decline phases indicative of RHF-influenced airway dynamics. Misclassification analyses further pinpoint the early or delayed drop in flow as a critical diagnostic signal. Figure 6

Figure 6: Encoder attention heatmaps demonstrating key regions in spirogram utilized for RHF discrimination across true/false positive and negative samples.

Discussion and Implications

This work establishes spirogram time series—processed via self-supervised representation learning—as a clinically viable early biomarker for RHF. Empirical evidence supports the integration of spirometry into cardiopulmonary risk stratification, enabling opportunistic, device-agnostic screening within routine pulmonary care. The SLSE methodology diverges from expert feature reliance, providing representations that capture both known and novel signal associations with RHF, substantiated by neural attention and SHAP analyses.

The model's robustness across diverse demographic and risk factor subgroups is particularly salient for clinical deployment. Its strong discrimination in CKD and VHD populations underscores theoretical value for prognostic modeling in multi-morbid cohorts, aiding risk-directed patient management. From a technical standpoint, the use of augmentation in self-supervised training confers resistance to real-world clinical measurement noise and device heterogeneity—essential attributes for widespread application.

Looking forward, the framework could be extended for longitudinal risk assessment, polygenic function prediction using embedded representations, and integrated multi-modal signal fusion with imaging or laboratory biomarkers. The demonstration of effective unsupervised feature extraction in spirometry opens future research avenues for disease subtyping, causal inference, and population-level screening for cardiovascular risk.

Conclusion

Artificial intelligence-enabled analysis of spirometry, coupled with self-supervised robust representation learning and heterogeneous feature fusion, offers a pragmatic strategy for the early detection of right heart failure. The approach substantially elevates RHF screening efficacy above conventional signal summary metrics, with validated performance across general and high-risk clinical subsets. The findings support future research and clinical implementation of AI-driven non-invasive screening for right heart pathology, particularly as part of integrated preventive cardiopulmonary care.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We found no open problems mentioned in this paper.

Collections

Sign up for free to add this paper to one or more collections.