[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-82875-en":3,"doc-seo-82875-105":28,"detail-sidebar-cat-0-en-105":90},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":11,"language":21,"language_code":22,"site_id":23,"html_lang":22,"table_of_contents":24,"faqs":25,"seo_title":13,"seo_description":14,"update_tm":26,"read_time":27},82875,8796095462418,"Noah","https://ap-avatar.wpscdn.com/avatar/80000253c1241d02b47?x-image-process=image/resize,m_fixed,w_180,h_180&k=1778826106357471780",8,"Research & Report","Lightweight ML-Based Automatic Sleep Staging Framework with Constrained CNN and Mamba for Small-Sample EEG Datasets","Automatic sleep staging enables accurate diagnosis and long-term home monitoring of sleep disorders, yet existing approaches struggle with small-sample overfitting, limited accuracy on hard stages like N1 and REM, unclear guidance on training-set size, and deployment difficulty. A lightweight, low-latency single-channel EEG framework, GamSleepNet, is proposed with a FEB module using improved Gabor kernels plus learnable filters, a Mamba-based temporal classifier, and a novel contrastive loss with two-stage training. On SleepEDF, it reaches 87.86% overall accuracy with only 30.86K parameters and state-of-the-art performance.","Lightweight ML-Based Automatic Sleep Staging Framework with Constrained CNN and Mamba for  \nSmall-Sample EEG Datasets  \narXiv :2607 .04934v 1 [ cs .LG] 6 Jul 2026  \nZihao Wei 1 , ∗Yulin Gong 1 , Yudan Lv2  \n1 School of Electronic Information Engineering,  \nChangchun University of Science and Technology, Changchun 130022, Jilin Province, China  \n2Jilin University,  \nChangchun 130012, Jilin Province, China  \n∗ Corresponding author: Yulin Gong, Email: [gongyulin@cust.edu.cn](gongyulin@cust.edu.cn)  \nAbstract—Automatic sleep staging is a key technology for precise diagnosis and treatment of sleep disorders as well as long-term home sleep monitoring. Portable electroencephalogram (EEG) devices have become the focus of research due to their convenience in data collection. However, current methods still face three major challenges: large parameter sizes that easily lead to overfitting on small datasets, low accuracy in classifying difficult stages such as N1 and REM, unclear optimal training dataset size, and difficulty in deployment. This paper proposes GamSleepNet, a lightweight and low-latency automatic sleep staging framework for single-channel EEG. The framework features the FEB module, which combines improved Gabor kernels with learnable filters for feature extraction, uses the Mamba architecture to build a temporal classification network, introducesa novel contrastive loss and a two-stage training strategy, and experimentally validates the optimal dataset size for singlechannel EEG sleep staging models. On the Sleepedf dataset, this model achieves an overall accuracy of 87.86 percent with only 30.86 thousand parameters, with all metrics reaching SOTA levels and significantly improving the identification accuracy of challenging sleep stages.  \nIndex Terms—Automatic sleep staging; machine learning; Constrained CNN; Mamba  \nI. INTRODUCTION  \nSleep staging is a key process in the precise diagnosis and treatment of sleep disorders, with polysomnography (PSG) recognized as the clinical gold standard for sleep staging. According to the guidelines of the American Academy of Sleep Medicine (AASM) [1], [2], the sleep specialists are required to divide PSG data into 30-second segments (epochs) and classify them into five stages: Wake, non-rapid eye movement stages N1, N2, N3, and rapid eye movement stage REM.  \nTraditional manual sleep scoring is a tedious and timeconsuming task [3] that is difficult to meet the needs of largescale clinical screening and long-term home sleep monitoring. As a result, automatic sleep staging algorithms based on portable devices have become important technological directions for home sleep monitoring due to their convenience of data collection and the portability of equipments.  \nCurrently, automatic sleep staging methods are typically based on convolutional neural networks(CNN) [4]–[6], re-  \ncurrent neural networks(RNN) [7], fully convolutional networks(FCN) [8], [9], Transformer models [6], [10], [11], and hybrid architectures [12]–[16] . The emergence of these models has enabled automatic sleep staging to reach a level comparable to that of sleep specialists [17] .  \nHowever, the methods menthioned above still face three major challenges: First, the number of model parameters and computational requirements are relatively high [11],[16],[18], making it very easy to overfit when training on small datasets commonly used for deploying portable devices. Second, EEG patterns across different sleep stages are highly similar, which can easily lead to classification confusion and consistently low accuracy for challenging stages such as N1 and REM [19],[20] . Third, model performance varies significantly across datasets of different sizes [11],[16],[21]–[23], and the optimal amount of training data required remains unclear.  \nTo address these above issues, this study proposes a lightweight ML-based framework with constrained CNN and Mamba for small-sample EEG datasets. In this study, alearnable feature extraction","cbCaieREPAHGgZSf","https://ap.wps.com/l/cbCaieREPAHGgZSf","pdf",895126,1,"English","en",105,"# Introduction\n# Method\n## Overall Framework","[{\"question\":\"What problem does the paper address in automatic sleep staging?\",\"answer\":\"Automatic sleep staging must run accurately on portable single-channel EEG, but existing methods face overfitting on small datasets, low accuracy for difficult stages such as N1 and REM, uncertainty about optimal training data size, and deployment challenges.\"},{\"question\":\"How does GamSleepNet extract features from EEG signals?\",\"answer\":\"GamSleepNet uses a learnable feature extraction block (FEB) that combines improved Gabor kernels with learnable filters to capture multi-scale time-frequency features using a minimal parameter count.\"},{\"question\":\"What approach does the framework use for temporal classification and training?\",\"answer\":\"A Mamba-based temporal classification network replaces heavier sequence models to provide long-range modeling with linear complexity, and a novel contrastive loss plus a two-stage training strategy improves separation of challenging sleep stages and mitigates imbalance.\"}]",1784183599,20,{"code":4,"msg":29,"data":30},"ok",{"site_id":23,"language":22,"slug":31,"title":13,"keywords":32,"description":14,"schema_data":33,"social_meta":85,"head_meta":87,"extra_data":89,"updated_unix":26},"lightweight-ml-based-automatic-sleep-staging-framework-with-constrained-cnn-and-mamba-for-small-sample-eeg-datasets","",{"@graph":34,"@context":84},[35,52,67],{"@type":36,"itemListElement":37},"BreadcrumbList",[38,42,46,49],{"item":39,"name":40,"@type":41,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":43,"name":44,"@type":41,"position":45},"https://docshare.wps.com/document/","Document",2,{"item":47,"name":12,"@type":41,"position":48},"https://docshare.wps.com/document/research-report/",3,{"item":50,"name":13,"@type":41,"position":51},"https://docshare.wps.com/document/lightweight-ml-based-automatic-sleep-staging-framework-with-constrained-cnn-and-mamba-for-small-sample-eeg-datasets/82875/",4,{"url":50,"name":13,"@type":53,"author":54,"headline":13,"publisher":56,"fileFormat":59,"inLanguage":22,"description":14,"dateModified":60,"datePublished":61,"encodingFormat":59,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":55},"Person",{"url":39,"name":57,"@type":58},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":64,"interactionType":65,"userInteractionCount":20},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"What problem does the paper address in automatic sleep staging?","Question",{"text":74,"@type":75},"Automatic sleep staging must run accurately on portable single-channel EEG, but existing methods face overfitting on small datasets, low accuracy for difficult stages such as N1 and REM, uncertainty about optimal training data size, and deployment challenges.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How does GamSleepNet extract features from EEG signals?",{"text":79,"@type":75},"GamSleepNet uses a learnable feature extraction block (FEB) that combines improved Gabor kernels with learnable filters to capture multi-scale time-frequency features using a minimal parameter count.",{"name":81,"@type":72,"acceptedAnswer":82},"What approach does the framework use for temporal classification and training?",{"text":83,"@type":75},"A Mamba-based temporal classification network replaces heavier sequence models to provide long-range modeling with linear complexity, and a novel contrastive loss plus a two-stage training strategy improves separation of challenging sleep stages and mitigates imbalance.","https://schema.org",{"og:url":50,"og:type":86,"og:title":13,"og:site_name":57,"og:description":14},"article",{"robots":88,"canonical":50},"index,follow",{"doc_id":7,"site_id":23},{"code":4,"msg":5,"data":91},[92,96,100,104,109,114,119,122,126,129,133],{"id":20,"doc_module":4,"doc_module_name":44,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":45,"doc_module":4,"doc_module_name":44,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":51,"doc_module":4,"doc_module_name":44,"category_name":101,"show_sort_weight":102,"slug":103},"Exam",70,"exam",{"id":105,"doc_module":4,"doc_module_name":44,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":110,"doc_module":4,"doc_module_name":44,"category_name":111,"show_sort_weight":112,"slug":113},6,"Technology",50,"technology",{"id":115,"doc_module":4,"doc_module_name":44,"category_name":116,"show_sort_weight":117,"slug":118},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":44,"category_name":12,"show_sort_weight":120,"slug":121},30,"research-report",{"id":123,"doc_module":4,"doc_module_name":44,"category_name":124,"show_sort_weight":27,"slug":125},9,"Religion & Spirituality","religion-spirituality",{"id":27,"doc_module":4,"doc_module_name":44,"category_name":127,"show_sort_weight":27,"slug":128},"World Cup","world-cup",{"id":130,"doc_module":4,"doc_module_name":44,"category_name":131,"show_sort_weight":130,"slug":132},10,"Lifestyle","lifestyle",{"id":134,"doc_module":4,"doc_module_name":44,"category_name":135,"show_sort_weight":105,"slug":136},19,"General","general"]