- 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 θ and a target network by ξ (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: Model overview, including SLSE-based spirogram encoding, demographic data fusion, and CatBoost-based downstream classification for RHF detection.
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
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: 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: 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: 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​–FEF50​, 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: 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.