← Research

Sleep Staging Without Training

One metric. No training data. No patient-specific model.
Spectral transition rate separates all 5 sleep stages. Cohen’s d = 4.02.

How often does the brain change its tune? That single question separates wakefulness from deep sleep with an effect size larger than most clinical tests.

Awake: phases cohere. Deep sleep: phases scatter. The shape tells you which.

JIM’S OVERSIMPLIFICATION

Your brain is a radio dial. Awake: spinning constantly. Deep sleep: locked on one station. We can tell which sleep stage you’re in by counting how often the dial moves. One number. No training. A drummer’s ear applied to brain waves.

A DRUMMER LISTENING TO YOUR BRAIN

When a drummer checks if a drum is in tune, they listen for one thing: is the tone stable, or is it shifting? A well-tuned drum rings at one clean frequency. A badly tuned drum wobbles between frequencies. One question: how often does the sound change character?

We asked the same question about brain waves. How often does the brain's electrical signal change its spectral character? We counted the frequency shifts in sliding 5-minute windows of EEG data. That single number — the transition rate — separates all 5 sleep stages.

WHAT FALLS OUT

Deep sleep (N3): Transition rate = 0.019. Nearly zero. The brain locks into one rhythm and holds it. Like a drum ringing at its fundamental — pure, stable, unchanging. This is a brain that knows exactly what station it is on.

Light sleep (N1): Transition rate = 0.193. Maximum instability. The brain cannot decide if it is awake or asleep. It is constantly flipping between states. Like a drum with wrinkles — every moment sounds different. This is the brain state with the worst coupling.

The effect size between N1 and N3 is Cohen's d = 4.02. For context, most clinical tests are thrilled to get d = 0.8. This is enormous separation from a single number that requires no training, no labeled examples, and no patient-specific calibration.

WHY THIS MATTERS

Current sleep staging requires a $1,000-3,000 overnight lab test, a trained technician, and either manual scoring or a machine learning model trained on thousands of labeled nights. This approach uses one EEG channel, one metric, and zero training data. It could run on a consumer headband in real time. Tested on 22.1 hours of public data from PhysioNet.

Honest limit: tested on one recording. Needs validation across hundreds of patients. N1 and Wake overlap (d = 0.40) — those are hard to separate even for expert human scorers. This is a feature, not a finished system. But as a deep sleep detector, it works immediately.


The Metric

Transition Rate = fraction of time windows where the spectral centroid shifts by > 1σ

For each 5-minute sliding window of EEG, count how many times the spectral character changes significantly. High rate = the brain is shifting between states. Low rate = the brain is locked in one state.

This is the drum tuner’s algorithm applied to the brain: “how often does the tune change?”


Results

Sleep-EDF Database (PhysioNet), Fpz-Cz channel, 100 Hz

22.1 hours, 2,650 scored epochs, 5 sleep stages.

StageTransition RateCharacter
N1 (lightest sleep)0.193Drifting between wake and sleep. Maximally unstable.
Wake0.159Alert. Many frequency shifts from active thinking.
REM0.136Dreaming. Phasic bursts create spectral variability.
N20.100Sleep spindles and K-complexes. Relatively stable.
N3 (deep sleep)0.019Locked in slow-wave oscillation. Nearly zero transitions.

Effect Sizes

ComparisonCohen’s dInterpretation
N1 vs N34.02Enormous separation
REM vs N32.46Very large
Wake vs N31.71Large
N2 vs N31.45Large
N1 vs N21.29Large
N2 vs REM0.50Medium
Wake vs N10.40Small

ANOVA F = 174.4, p = 10−132. Kruskal-Wallis H = 614.1.

What It Means

The brain’s spectral stability IS the sleep stage

N3 (deep sleep): The brain locks into one rhythm and holds it. Transition rate ≈ 0. Like a drum ringing at its fundamental — one clean frequency, no changes.

N1 (lightest sleep): The brain can’t decide between wake and sleep. Constant frequency shifts. Like a drum head with wrinkles — every moment sounds different.

REM (dreaming): Bursts of activity create spectral variability, but less than N1. The brain is doing something organized (dreaming) with periodic disruptions (eye movements).

The observed order — N1 > W > REM > N2 > N3 — tracks spectral instability, not depth. N1 genuinely is the most unstable brain state: neither awake nor asleep, constantly transitioning. This is physiologically correct and has been noted in the sleep literature but we are not aware of a prior single zero-training metric achieving this separation.

Why This Is Different

Current sleep staging

Requires polysomnography ($1,000–3,000), a trained technician, and manual or ML-based scoring. Deep learning models need thousands of labeled nights for training. Patient-specific adaptation is common.

This approach

One EEG channel. One metric. No training data. No labeled examples. No patient-specific model. The metric is a single number computed from the power spectrum: how often does the spectral centroid shift by more than one standard deviation?

Could run on a consumer EEG headband in real time.

Honest Limits

The Connection

This metric comes from asking: what does a drummer hear when checking if a drum is in tune? The answer: how often the spectral character changes. A drum in tune rings at one frequency (low transition rate). A drum going out of tune shifts between frequencies (high transition rate).

The brain in deep sleep is a drum in tune — one clean rhythm, no shifts. The brain in N1 is a drum with wrinkles — every moment sounds different. The transition rate measures the same thing in both systems: spectral stability.

Verify

pip install begump

from gump.tune import detect
# Sweep window sizes on EEG to find spectral transition rate
# Higher rate = lighter sleep. Lower rate = deeper sleep.

Data: Sleep-EDF Database (PhysioNet). Free. Public.


One metric. d = 4.02. No training.
The brain’s spectral stability IS the sleep stage.
A drummer’s algorithm applied to neuroscience.

GUMPResearch · Support · [email protected]