Search bioRxiv⌕ Search

Biology subjects

Tang, K. K. W.

Publications and source records attributed to Tang, K. K. W..

2 recordsLinked to original sources

Postprocessing-Enhanced Machine Learning for Reliable Real-Time Sleep Staging in Closed-Loop Neuromodulation

Real-time sleep stage classification is important for closed-loop neuromodulation at certain stages during sleep, yet current models often yield noisy and unstable outputs that risk false triggers. These fluctuations, especially near stage boundaries, can compromise the safety and reliability of stimulation. Existing methods frequently rely on model-specific architectures or require extensive tuning to maximize precision, which limits their generalizability and hinders deployment in real-time systems. To address this, we propose a lightweight, classifier-independent post-processing pipeline that stabilizes predictions without modifying the underlying classifier. Our method first applies temporal smoothing to predicted sleep-stage probabilities, followed by conservative control logic to enhance stimulation precision. We evaluate four smoothing techniques: Moving Average (MA), Exponential Smoothing (ES), Kalman Filtering (KF), and a novel Weighted Exponential Smoothing (WES), on a 29-subject open-source sleep dataset. To capture the trade-offs between stability and responsiveness, we introduce new real-time evaluation metrics. We identify an optimal smoothing intensity range and assess three control strategies: probability thresholding, naive waiting, and entropy constraint, as well as a hybrid method combining high confidence and low uncertainty. Smoothing improves generalization and robustness: under both low and high synthetic noise ({sigma} > 0.2), smoothed outputs retain 10-15% higher precision and recall across all stages. Control logic further enhances reliability: our hybrid method achieves 80% (Wake), 96% (N2), 98% (N3), and 86% (REM) precision. Finally, we introduce a stage-transition constraint matrix to suppress biologically implausible transitions (e.g., REM[->] N3), to further stabilize outputs during evidence accumulation, with potential applications in objective sleep quality assessment. To our knowledge, this is the first study to systematically characterize real-time trade-offs between smoothing, latency, and control logic in sleep staging. Overall, our generalizable framework is expected to improve safety, interpretability, and deployment feasibility of real-time sleep classification for both clinical and wearable closed-loop neuromodulation systems.

bioengineering↗

Stretchable, hair-compatible, and long-term stable wearable EEG system

Electroencephalography (EEG) is a cornerstone in both neuroscience research and clinical diagnostics. However, conventional EEG monitoring faces hardware limitations, particularly its adaptability and stability. Headsets either require complicated wiring or do not have enough stretchability and wearability to comply with the diverse head anthropometry and hair conditions of the user population. Additionally, there is an inherent tradeoff between wet and dry electrodes in capturing high-fidelity signals from hair-covered scalp regions while ensuring continuous and long-term recording quality. Here, we present a Mesh-integrated, Stretchable, and Hair-compatible EEG system engineered to overcome these limitations. By incorporating a kirigami-inspired mesh design and stretchable eutectic Gallium-Indium interconnects, MindStretcH adapts to various head sizes and allows for easy wearing and removal. Moreover, its uniquely designed porous, conical, soft 3D-printed mold, embedded with hydrogel electrodes, effectively penetrates hair layers to deliver low impedance and sustained signal integrity with minimal discomfort. We validate MindStretcH through offline and online EEG-based brain-computer interface tasks over a month, demonstrating its exceptional stability in continuous monitoring and dynamic applications. These results mark a promising advance toward non-invasive neural interfaces in both clinical and everyday use.

bioengineering↗