DRLFormer: A Data Rebalancing Loss-Constrained Light Transformer for OSA Detection

Published: 01 Jan 2024, Last Modified: 25 Sept 2025IEEE Trans. Instrum. Meas. 2024EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Although Transformer-based methods have achieved significant success in obstructive sleep apnea (OSA) detection, they suffer from higher computational costs, lower feature-capturing ability in the frequency domain, and class imbalance at the data level. To address these problems, this article proposes a data rebalancing loss (DRLoss)-constrained light transformer for OSA detection, called DRLFormer. The core of the proposed method lies in the following two aspects: the development of the additive temporal–frequency fusion attention (ATFA) module, and the propose of data rebalancing loss (DRLoss) function. The purpose of the ATFA module is to fuse the frequency-domain features extracted by the frequency-domain enhancement module (FEM) with the important time-domain features extracted by the learnable time-domain attention (LTA) in a very low computational cost by novel using the summation strategy. The purpose of DRLoss is to solve the problem of imbalanced samples within batches which usually ignored by existing common used cross-entropy loss (CELoss). The novelty of the design of DRLoss lies in by designing weight memory units (WMUs) and allocating different weights for correctly and incorrectly predicted samples to achieve prediction level balance through classification penalty item (CPI). Extensive experiments are conducted on the Apnea-ECG dataset and compared with the state-of-the-art (SOTA) method. Our method achieves an improvement of 0.44% in accuracy (from 91.68% improved to 92.12%), with a reduction of size by 74% and FLOPs by 53%. Furthermore, excellent performance was achieved on the University College Dublin Sleep Apnea Database (UCD), PhysioNet, and clinical XJ300 datasets, thoroughly verifying the effectiveness and clinical application potential of DRLFormer.
Loading