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

Bin Liu, Qinghao Zhao, Yuxi Zhou, Zhejun Sun, Kaijie Lei, Deyun Zhang, Shijia Geng, Shenda HongarXiv 2025 · DOI

Introduction

Right Heart Failure (RHF) is a critical condition characterized by the right ventricle's inability to pump blood effectively to the lungs. Often secondary to chronic lung diseases like COPD, RHF is notoriously difficult to diagnose in its early stages. Standard diagnostic tools such as echocardiography, cardiac MRI, and invasive catheterization are resource-intensive and not suitable for routine screening. This study explores the potential of using routine spirometry—a low-cost, non-invasive lung function test—as a screening tool for early RHF detection by leveraging advanced AI techniques.

Data and Cohort Selection

The researchers utilized the UK Biobank to identify a cohort of 26,617 individuals with both valid spirometry data and cardiac MRI measurements. Ground truth for RHF was established using Right Ventricular Ejection Fraction (RVEF) from MRI, with RVEF < 40% defined as RHF and RVEF > 50% as non-RHF.

Overview of clinical data processing and cohort selection from the UK Biobank.

The dataset included clinical characteristics such as age, sex, smoking status, and COPD history. The cohort was further divided into training (14,906), validation (3,725), and testing (7,986) sets. Data preprocessing transformed raw spirograms into volume-flow spirograms to standardize the input for the neural network.

Methods and Architecture

The proposed framework, Self-supervised Representation Learning-based Spirogram Embedding (SLSE), operates in two distinct stages to maximize the utility of both unlabeled and labeled data:

  1. Self-Supervised Pre-training: A Variational Autoencoder (VAE) is trained on unlabeled spirogram time series using a framework inspired by Bootstrap Your Own Latent (BYOL). Through data augmentation (e.g., adding Gaussian noise), the encoder learns to extract robust physiological "fingerprints" from the flow-volume curves without requiring explicit labels.
  2. Downstream Classification: The pre-trained embeddings are fused with clinical characteristics and fed into a CatBoost classifier to predict RHF risk.
The two-stage SLSE framework: (I) Self-supervised representation learning and (II) Downstream classification for RHF risk prediction.

The VAE-encoder utilizes 1D convolutional layers and an attention mechanism to identify critical segments of the breathing cycle. This architecture allows the model to focus on specific physiological markers within the spirogram that correlate with cardiac strain.

Results

The model achieved an AUROC of 0.7501 on the general test set. Notably, performance improved significantly in high-risk subgroups, reaching an AUROC of 0.8194 for patients with Chronic Kidney Disease (CKD) and 0.8413 for those with Valvular Heart Disease (VHD). Ablation studies highlighted that fusing spirogram embeddings with demographic data is crucial; the AUROC increased from approximately 0.62 to 0.75 upon integration of age, sex, and smoking status.

Explainability analysis using SHAP values and attention maps revealed that the AI prioritizes the pre-peak expiratory flow and mid-term expiratory phases. This aligns with clinical understanding that RHF affects small airway function and mid-term flow rates, validating that the model is learning clinically relevant features.

Discussion and Limitations

While promising, the study has limitations. The use of RVEF from MRI as a label introduces potential noise due to measurement variability. Furthermore, the cohort was restricted to individuals of European ancestry, necessitating further validation across diverse populations to ensure generalizability. As a retrospective study, prospective clinical trials are required to evaluate the real-world impact of this AI-enabled screening tool on patient outcomes and clinical decision-making in routine practice.

Summary updated

BibTeX
@misc{liu2025artificial,
  author = {Bin Liu and Qinghao Zhao and Yuxi Zhou and Zhejun Sun and Kaijie Lei and Deyun Zhang and Shijia Geng and Shenda Hong},
  title = {{Artificial Intelligence-Enabled Spirometry for Early Detection of Right Heart Failure}},
  year = {2025},
  eprint = {2511.13457},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.13457},
}
Figure