Lightweight ML framework for sleep classification with CNN and Mamba

Discover GamSleepNet: lightweight ML framework for sleep classification with CNN and Mamba. 87.86% accuracy with only 30k parameters, improving N1 and REM stages.

martes, 7 de julio de 2026 • 2 min read • Q2BSTUDIO Team

GamSleepNet: SOTA accuracy with only 30 thousand parameters

Automatic sleep stage classification has gained extraordinary relevance in recent years, especially with the rise of home monitoring and portable electroencephalogram (EEG) devices. Traditional methods, while accurate in controlled clinical settings, often suffer from issues such as oversized models prone to overfitting on small datasets, low sensitivity for complex stages like N1 or REM, and a lack of clarity regarding the optimal size of training sets. In this context, a new generation of lightweight architectures has emerged, seeking to balance performance and computational efficiency by combining classical signal processing techniques with modern temporal attention mechanisms.

A paradigmatic example of this trend is a machine learning framework that integrates enhanced convolutions with Gabor kernels —inspired by the physiology of the visual system— alongside learnable filters, and employs the Mamba architecture to efficiently model temporal dependencies. This approach also incorporates a contrastive loss function and a two-phase training strategy, significantly improving the identification of the most challenging stages while maintaining a surprisingly low number of parameters —on the order of tens of thousands— and minimal latency. Experimental results on public databases such as SleepEDF show an overall accuracy close to 88%, outperforming models that are orders of magnitude larger.

From a business and technological perspective, these advances open the door to artificial intelligence for businesses solutions seeking to integrate sleep monitoring into digital health platforms. The development of custom applications incorporating these lightweight models enables deployment on low-power devices, such as wearables or IoT sensors, without relying on permanent cloud connections. Companies like Q2BSTUDIO offer custom software to integrate these capabilities into clinical or home systems, facilitating real-time analysis and automated report generation.

The combination of this type of framework with AWS and Azure cloud services allows scaling solutions to entire populations, processing data securely and efficiently. Furthermore, business intelligence (through tools like Power BI) can visualize the obtained sleep metrics, correlating them with other health indicators. AI agents, in turn, can act as virtual assistants that alert about anomalous patterns or recommend lifestyle adjustments. Cybersecurity also plays a crucial role, as biomedical data is especially sensitive; therefore, platforms handling this information must comply with the highest protection standards.

Ultimately, the evolution toward lightweight and efficient models for sleep classification not only represents a technical milestone but also paves the way for commercial and clinical applications that were previously unfeasible due to hardware or computational cost limitations. Integrating these innovations with professional development and consulting services, such as those provided by Q2BSTUDIO, allows organizations to harness the full potential of AI in the health and wellness domain, transforming complex data into actionable decisions.

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.