Deep Sleep Classification via EEG Signal Criticality using Detrended Fluctuation Analysis (DFA) for passive Brain-Computer Interface (pBCI) neurofeedback applications. Probabilistic decoding of EEG criticality features for state-dependent sleep improvement interventions.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Deep Sleep Classification via EEG Signal Criticality using Detrended Fluctuation Analysis (DFA) for passive Brain-Computer Interface (pBCI) neurofeedback applications. Probabilistic decoding of EEG criticality features for state-dependent sleep improvement interventions.
version
1.0.0
category
neuroscience
authors
["Stanisław Narębski","Tomasz Komendziński","Tomasz M. Rutkowski"]
EEG Criticality Deep Sleep Classification for Neurofeedback
Overview
This methodology presents a probabilistic decoding approach for deep sleep (N3) identification using EEG signal criticality features derived from Detrended Fluctuation Analysis (DFA). The framework enables passive Brain-Computer Interface (pBCI) applications for state-dependent neurofeedback interventions such as targeted auditory stimulation for cognitive recovery enhancement.
Core Innovation
Criticality-Based Features: DFA-derived scaling exponents capture sleep state transitions
Phase transitions: Sharp changes between sleep stages
Neural avalanches: Cascading activity patterns
Optimal information processing: Balance at critical point
Detrended Fluctuation Analysis (DFA)
DFA quantifies self-similarity and scaling behavior:
Algorithm:
Input: Time series x(t) of length N
Integrate: y(k) = Σᵢ₌₁ᵏ (xᵢ - ⟨x⟩)
For window sizes n:
- Divide into N/n segments
- Fit local trend yₙ(k) in each segment
- Compute fluctuation: F(n) = √(1/N Σₖ (y(k) - yₙ(k))²)
Scaling exponent α: F(n) ~ n^α
For each epoch:
1. Compute DFA scaling exponent α
- Window sizes: n = 4 to n = N/4 (multiscale)
- Linear regression in log-log space
- Extract α as primary criticality feature
2. Extended features:
- α_short: scaling for short windows (4-16 samples)
- α_long: scaling for long windows (N/8 - N/4)
- α_ratio: α_long / α_short (measure of non-stationarity)
- F(n) trajectory: full fluctuation curve (multiscale representation)
Step 3: UMAP Manifold Learning
Purpose: Visualize state transitions in criticality space
Implementation:
1. Input: DFA features across all epochs
2. UMAP parameters:
- n_neighbors: 15-30 (local structure)
- min_dist: 0.1-0.5 (cluster tightness)
- metric: euclidean or cosine
3. Visualization:
- Color by sleep stage (Wake, N1, N2, N3, REM)
- Identify N3 cluster structure
- Assess manifold geometry (linear vs. non-linear)
Key Finding: DFA features reside on **non-linear manifold**
- Linear classifiers fail (LDA: 57.21%, SVM: 51.01%)
- Deep networks struggle (FNN: 81.58%)
- Probabilistic models succeed (Naive Bayes: 87.17%)
Step 4: Classifier Benchmarking
Models tested (10-fold cross-validation):
1. Naive Bayes: 87.17% ± 0.24% (BEST)
2. Random Forest: 80.97%
3. Fully Connected Network (FNN): 81.58%
4. LDA: 57.21% (POOR)
5. SVM: 51.01% (POOR)
Evaluation metric: Balanced accuracy
- Addresses class imbalance (N3 less common than N2/N1)
- Weighted by class frequency
- Suitable for clinical deployment
Step 5: Probabilistic Decoding Pipeline
Naive Bayes classifier:
- Prior probabilities: P(N3), P(not-N3) from dataset
- Likelihood: Gaussian modeled from DFA distribution
- Posterior: P(N3|α) = P(α|N3)P(N3) / P(α)
Decision rule:
- Threshold posterior probability (e.g., 0.5)
- Output: binary classification (N3 vs. not-N3)
State-sensing engine:
- Continuous probability output
- Enables soft decision-making
- Supports confidence-weighted neurofeedback
Criticality-Based Neurofeedback Design
State-Dependent Intervention
Targeted Auditory Stimulation Protocol:
Trigger Condition:
if P(N3|α) > threshold:
# Deep sleep detected
# Check duration criterion
if consecutive_N3_epochs > 90 seconds:
# Sufficient N3 consolidation
deliver_stimulation()