نهج التعلم العميق القائم على المحولات لاكتشاف انقطاع النفس النومي الانسدادي باستخدام تخطيط القلب الكهربائي أحادي القناة Transformer-based deep learning approach for obstructive sleep apnea detection using single-lead ECG

شارك:
المجلة: Frontiers in Artificial Intelligence، المجلد: 9
DOI: https://doi.org/10.3389/frai.2026.1727091
PMID: https://pubmed.ncbi.nlm.nih.gov/41755912
تاريخ النشر: 2026-02-11
المؤلف: Malak Abdullah Almarshad وآخرون
الموضوع الرئيسي: مراقبة وتحليل تخطيط القلب الكهربائي

نظرة عامة

تقدم هذه الورقة البحثية إطار عمل جديد قائم على المحولات للتعلم العميق لاكتشاف انقطاع النفس النومي الانسدادي (OSA) باستخدام بيانات تخطيط القلب الكهربائي (ECG) ذات القناة الواحدة. تتناول الدراسة قيود تخطيط النوم التقليدي (PSG)، الذي يعد مكلفًا ويستغرق وقتًا طويلاً، من خلال الاستفادة من التقدم في التعلم الآلي (ML) والتعلم العميق (DL) لإنشاء أداة تشخيصية أكثر كفاءة. النموذج المقترح قادر على معالجة إشارات ECG الخام عالية الضوضاء دون الحاجة إلى معالجة مسبقة مكثفة، مع الحفاظ على الاستمرارية الزمنية على مدى فترات طويلة. يُظهر أداءً متفوقًا، حيث حقق درجة F1 تبلغ 0.863 ومنطقة تحت منحنى التشغيل (AUC-ROC) تبلغ 0.852، متفوقًا على الطرق الحالية بمتوسط هامش يزيد عن 13%.

تشير النتائج إلى أن تقنيات الترميز الموضعي القابلة للتعلم تحقق نتائج أفضل من الثابتة، وأن هيكل النموذج، الذي يدمج مشفرًا تلقائيًا للتشفير الموضعي، يعزز اكتشاف أحداث OSA مقارنة بالنماذج التقليدية مثل ResNet وLSTM وCNN. تهدف الأعمال المستقبلية إلى التحقق من صحة النموذج عبر مجموعات بيانات متنوعة ودمج إشارات PSG إضافية لتحسين الدقة السريرية. يخطط الباحثون أيضًا لجمع مجموعات بيانات أكبر ومتعددة المراكز وتطبيق تقنيات الذكاء الاصطناعي القابلة للتفسير لتعزيز القابلية للتفسير، مع معالجة الحاجة إلى نهج متعدد الإشارات في الممارسة السريرية، كما أشار إليه تعليقات الخبراء.

مقدمة

تتناول مقدمة هذه الورقة البحثية القضية الصحية الحرجة لانقطاع النفس النومي الانسدادي (OSA)، وهي حالة تؤثر على ما يقرب من مليار شخص على مستوى العالم، وتكون شائعة بشكل خاص بين البالغين في منتصف العمر وكبار السن. عواقب OSA غير المشخصة شديدة، بما في ذلك زيادة مخاطر الأمراض القلبية الوعائية والسكتة الدماغية وتدهور جودة الحياة. يُعتبر تخطيط النوم (PSG) المعيار الذهبي لتشخيص OSA، ومع ذلك فإن عملية تسجيله اليدوية تتطلب جهدًا كبيرًا وتكون مكلفة، مما يؤدي إلى تأخيرات في التشخيص والعلاج. أظهرت التقدمات الأخيرة في طرق التسجيل الآلي، وخاصة تلك التي تستخدم تقنيات التعلم العميق (DL)، وعدًا في تحسين دقة التشخيص.

تسلط الورقة الضوء على إمكانية استخدام إشارات تخطيط القلب الكهربائي (ECG) ذات القناة الواحدة لاكتشاف OSA، حيث يمكن أن ترتبط التغيرات في معدل ضربات القلب بأحداث انقطاع النفس. تناقش مجموعة متنوعة من هياكل DL، بما في ذلك الشبكات ذات الذاكرة الطويلة والقصيرة (LSTM)، التي أظهرت أداءً متفوقًا في اكتشاف انقطاع النفس. يقترح المؤلفون إطار عمل جديد قائم على المحولات للتعلم العميق يستفيد من مشفر تلقائي للتشفير الموضعي الأمثل، مما يسمح بتصنيف فعال لبيانات PSG دون الحاجة إلى معالجة مسبقة مكثفة. يهدف هذا النموذج إلى تعزيز اتخاذ القرارات السريرية من خلال تقديم رؤى مفصلة حول أحداث انقطاع النفس، وبالتالي تحسين العملية التشخيصية العامة لـ OSA. ستتناول الأقسام التالية من الورقة الأعمال ذات الصلة، النموذج المقترح، إعدادات التجارب، والنتائج المقارنة مع الطرق الحالية.

الطرق

توضح قسم الطرق مجموعة البيانات، خطوات المعالجة المسبقة، والهندسة المعمارية القائمة على المحولات المستخدمة لتصنيف أحداث انقطاع النفس من بيانات ECG. تبدأ سلسلة المعالجة، الموضحة في الشكل 2، بإدخال ECG الخام وتشتمل على تطبيع الإدخال والتحقق من صحة النموذج على بيانات غير مرئية. تتميز الهندسة المعمارية بمشفر وتستخدم تضمين موضعي لمشفر تلقائي، حيث تتم معالجة نافذة أخذ عينات ECG ككل. تم إجراء جميع التجارب على جهاز محلي بمواصفات أجهزة محددة، ورمز المصدر متاح علنًا لإعادة الإنتاج.

اتبعت تصميم التجربة مبدأ أوكام، بدءًا من نموذج بسيط وزيادة التعقيد تدريجيًا. تم ضبط المعلمات الفائقة باستخدام التحقق المتقاطع K-fold (k=5) على مجموعة بيانات تتكون من حوالي مليون عينة، مقسمة على مستوى المرضى إلى مجموعات تدريب (80%) واختبار (20%). منعت هذه الطريقة تسرب البيانات وضمنت القابلية للتعميم. تم إجراء مجموعتين من التجارب: واحدة تقيم تأثير استراتيجيات الترميز الموضعي المختلفة والأخرى تفحص تسريع التدريب من خلال تآكل الوزن. شملت مقاييس التقييم الدقة، الاسترجاع، الخصوصية، درجة F1، والمنطقة تحت منحنى ROC (AUC)، مع إجراء تعديلات لموازنة الفئات. من الجدير بالذكر أن النموذج حقق تسريعًا في سرعة التقارب بمعدل 0.3x مع الحفاظ على أداء مماثل باستخدام مُحسِّن AdamW مع تآكل وزن قدره 0.0001.

النتائج

في هذا القسم، يقدم المؤلفون نتائج خمس تجارب أجريت على مجموعة بيانات OSASUD لتقييم تكوينات نموذجية مختلفة لاكتشاف انقطاع النفس النومي الانسدادي (OSA) من إشارات ECG. استخدم النموذج الأول (model_1) مكون المشفر فقط من المحول دون تضمينات موضعية، مما أدى إلى أداء دون المستوى الأمثل. تضمنت التجارب اللاحقة (model_2 وmodel_3) تضمينات موضعية ثابتة—بسيطة وسينية—ومع ذلك، لم تعزز هذه بشكل كبير من أداء النموذج. في النموذج_4، أدى إدخال تآكل الوزن إلى تسريع التدريب وتحسين الخصوصية ومنطقة تحت المنحنى (AUC) بحوالي 0.3 مرة.

ثم انتقل المؤلفون إلى هياكل المشفر التلقائي، بدءًا من مشفر تلقائي متصل بالكامل أساسي قدم أداءً مشابهًا لمصنف عشوائي (AUC = 0.501). أظهر مشفر تلقائي تلافيفي (model_5) أداءً محسنًا، حيث حقق AUC قدره 0.814، وأدى إضافة طبقة تلافيفية معكوسة إلى تعزيز فعالية النموذج، مما أدى إلى تحقيق AUC قدره 0.852. تفوق هذا النموذج على الأساليب السابقة من خلال استخدام ترميز موضعي قابل للتعلم مستمد من مشفر تلقائي تلافيفي، مما سمح بتكيف أفضل مع تباين بيانات ECG في العالم الحقيقي. تشير النتائج إلى أن النماذج القائمة على المحولات المقترحة لم تتطابق فقط، بل تجاوزت أحيانًا الهياكل الحالية للتعلم العميق لتصنيف OSA، خاصة في الحساسية، وهو أمر حاسم للتطبيقات الطبية.

المناقشة

في هذا القسم، يناقش المؤلفون مشهد أساليب التعلم العميق (DL) لاكتشاف أحداث انقطاع النفس والنوم، مع التأكيد على استبعاد الدراسات التي تستخدم طرق إحصائية تقليدية أو مصادر بيانات غير PSG. تكشف مراجعة شاملة للأدبيات على مدى العقدين الماضيين أن معظم الدراسات قد ركزت بشكل أساسي على إشارات فسيولوجية واحدة، وخاصة ECG، بينما دمجت القليل منها إشارات متعددة مثل ECG وSpO₂. يبرز المؤلفون قيود مجموعات البيانات الحالية، مشيرين إلى أن العديد منها قديم وقد لا تعكس الممارسات السريرية الحالية. يقدمون مجموعة بيانات OSASUD، التي تقدم تحديات فريدة بسبب طبيعتها غير المتوازنة، تلوث الضوضاء، وصيغة البيانات المستمرة، مما يوفر سيناريو أكثر واقعية لاكتشاف انقطاع النفس.

يستفيد النموذج المقترح القائم على المحولات لتصنيف انقطاع النفس من استراتيجية ترميز موضعي جديدة مستمدة من مشفر تلقائي تلافيفي، مما يعزز قدرة النموذج على التعامل مع إشارات ECG المليئة بالضوضاء دون معالجة مسبقة مكثفة. يذكر المؤلفون مقاييس أداء متفوقة، بما في ذلك درجة F1 تبلغ 0.863 ومنطقة تحت منحنى التشغيل (AUC-ROC) تبلغ 0.852، مقارنة بالنماذج التقليدية مثل ResNet وLSTM. تهدف الأعمال المستقبلية إلى التحقق من صحة النموذج على مجموعات بيانات متنوعة، ودمج إشارات فسيولوجية إضافية، وتعزيز قابلية تفسير النموذج من خلال تقنيات الذكاء الاصطناعي القابلة للتفسير، مع معالجة الحاجة السريرية لتحليل متعدد الإشارات في اكتشاف انقطاع النفس.

Journal: Frontiers in Artificial Intelligence, Volume: 9
DOI: https://doi.org/10.3389/frai.2026.1727091
PMID: https://pubmed.ncbi.nlm.nih.gov/41755912
Publication Date: 2026-02-11
Author(s): Malak Abdullah Almarshad et al.
Primary Topic: ECG Monitoring and Analysis

Overview

This research paper presents a novel transformer-based deep learning framework for the detection of obstructive sleep apnea (OSA) using single-lead electrocardiogram (ECG) data. The study addresses the limitations of traditional polysomnography (PSG), which is costly and time-consuming, by leveraging advancements in machine learning (ML) and deep learning (DL) to create a more efficient diagnostic tool. The proposed model is capable of processing high-noise raw ECG signals without extensive preprocessing, maintaining temporal continuity over extended durations. It demonstrates superior performance, achieving an F1 score of 0.863 and an AUC-ROC of 0.852, outperforming existing methods by an average margin of over 13%.

The findings indicate that learnable positional encoding techniques yield better results than static ones, and the model’s architecture, which integrates a convolutional autoencoder for positional encoding, enhances OSA event detection compared to traditional models like ResNet, LSTM, and CNN. Future work aims to validate the model across diverse datasets and incorporate additional PSG signals to improve clinical accuracy. The researchers also plan to collect larger, multi-center datasets and apply Explainable AI techniques to enhance interpretability, addressing the need for a multi-signal approach in clinical practice, as highlighted by expert feedback.

Introduction

The introduction of this research paper addresses the critical health issue of obstructive sleep apnea (OSA), a condition affecting nearly one billion individuals globally, particularly prevalent among middle-aged and older adults. The consequences of undiagnosed OSA are severe, including increased risks of cardiovascular diseases, stroke, and diminished quality of life. Polysomnography (PSG) is the gold standard for diagnosing OSA, yet its manual scoring process is labor-intensive and costly, leading to delays in diagnosis and treatment. Recent advancements in automated scoring methods, particularly those utilizing deep learning (DL) techniques, have shown promise in improving diagnostic accuracy.

The paper highlights the potential of using single-lead electrocardiogram (ECG) signals for OSA detection, as variations in heart rate can correlate with apnea events. It discusses various DL architectures, including long short-term memory (LSTM) networks, which have demonstrated superior performance in apnea detection. The authors propose a novel Transformer-based deep learning framework that leverages a convolutional autoencoder for optimal positional encoding, allowing for effective classification of PSG data without extensive preprocessing. This model aims to enhance clinical decision-making by providing detailed insights into apnea events, thereby improving the overall diagnostic process for OSA. The subsequent sections of the paper will elaborate on related work, the proposed model, experimental settings, and comparative results with existing methods.

Methods

The Methods section outlines the dataset, preprocessing steps, and the Transformer-based architecture used for classifying apnea events from ECG data. The processing pipeline, depicted in Figure 2, begins with raw ECG input and includes input normalization and model validation on unseen data. The architecture features an encoder and employs an autoencoder positional embedding, processing the ECG sampling window as a whole. All experiments were conducted on a local machine with specific hardware specifications, and the source code is publicly available for reproducibility.

The experimental design followed Occam’s Razor, starting with a simple model and gradually increasing complexity. Hyperparameter tuning was performed using K-fold cross-validation (k=5) on a dataset of approximately 1 million samples, split at the patient level into training (80%) and test (20%) subsets. This approach prevented data leakage and ensured generalizability. Two sets of experiments were conducted: one assessing the impact of different positional encoding strategies and the other examining training acceleration through weight decay. Evaluation metrics included accuracy, recall, specificity, F1-score, and the area under the ROC curve (AUC), with adjustments made for class imbalance. Notably, the model achieved a convergence speedup of 0.3x while maintaining comparable performance using the AdamW optimizer with a weight decay of 0.0001.

Results

In this section, the authors present the results of five experiments conducted on the OSASUD dataset to evaluate various model configurations for detecting obstructive sleep apnea (OSA) from ECG signals. The initial model (model_1) utilized only the encoder component of a Transformer without positional embeddings, yielding suboptimal performance. Subsequent experiments (model_2 and model_3) incorporated fixed positional encodings—naive and sinusoidal—however, these did not significantly enhance model performance. In model_4, the introduction of weight decay accelerated training and improved specificity and area under the curve (AUC) by approximately 0.3 times.

The authors then transitioned to autoencoder architectures, starting with a basic fully-connected autoencoder that performed similarly to a random classifier (AUC = 0.501). A convolutional autoencoder (model_5) demonstrated improved performance, achieving an AUC of 0.814, and the addition of a transposed convolution layer further enhanced the model’s efficacy, culminating in an AUC of 0.852. This model outperformed previous approaches by employing a learnable positional encoding derived from a convolutional autoencoder, which allowed for better adaptation to the variability of real-world ECG data. The results indicate that the proposed Transformer-based models not only matched but occasionally surpassed existing deep learning architectures for OSA classification, particularly in sensitivity, which is crucial for medical applications.

Discussion

In this section, the authors discuss the landscape of deep learning (DL) approaches for detecting sleep apnea and hypopnea events, emphasizing the exclusion of studies utilizing traditional statistical methods or non-PSG data sources. A comprehensive review of literature over the past two decades reveals that most studies have predominantly focused on single physiological signals, particularly ECG, while only a few have integrated multiple signals like ECG and SpO₂. The authors highlight the limitations of existing datasets, noting that many are outdated and may not reflect current clinical practices. They introduce the OSASUD dataset, which presents unique challenges due to its imbalanced nature, noise contamination, and continuous data format, thus providing a more realistic scenario for apnea detection.

The proposed Transformer-based model for apnea classification leverages a novel positional encoding strategy derived from a convolutional autoencoder, which enhances the model’s ability to handle noisy ECG signals without extensive preprocessing. The authors report superior performance metrics, including an F1 score of 0.863 and an AUC-ROC of 0.852, compared to traditional models like ResNet and LSTM. Future work aims to validate the model on diverse datasets, incorporate additional physiological signals, and enhance model interpretability through Explainable AI techniques, addressing the clinical need for multi-signal analysis in apnea detection.